I am building AOSP for a custom device (let's call it mycustomdevice), and have successfully built, imaged and deployed an Engineering build (TARGET_BUILD_VARIANT=eng).
However, when I try to do a build using either a user or userdebug build, the data directory is no longer created (myAOSP/out/target/product/mycustomdevice/data). Thus, there is also no userdata.img created.
I've done a full purge of the AOSP source directory (thus the out directory is purged too), and re-loaded source. I then perform a lunch mycustomdevice-userdebug (or mycustomdevice-user), and then run the m command. Nothing else has changed between eng and user/userdebug, and a repeat of the same steps with the build variant set as eng will result in the data directory being included again.
I can't find any documentation on the inclusion of the data directory. I understand from a training session I did several months ago that the data staging directory is optional. What should I do to ensure for all TARGET_BUILD_VARIANTs that the data directory gets created?