The AOSP build environment and the Android emulator build
In order to create our own Android system, we have to set up the AOSP build environment and build our own AOSP target for the Android emulator. Since Android is under rapid development, the build process and environment setup can change from time to time. You can always refer to Google's website for the latest information, https://source.android.com/source/building.html.
While the Google website and other sources can give general guidelines and procedures about the AOSP build, in this section we will look specifically at how to build AOSP for Android emulator image for API level 25.
The AOSP build environment
Since we want to set up a build environment for API level 25, you can refer to the table of AOSP releases for the basic requirements about the host and JDK. It is recommended to use the Ubuntu 14.04 64-bit host with Open JDK 8. For the hardware requirement, you may want to have a powerful enough computer with at least 8 GB RAM and...