Somebody asked me recently what AOSP stands for in Android context. AOSP actually stands for Android Open Source Project, that simple. However this suggested it might be a good idea to discuss what various Android OS (not Android application!) build options stand for.
Android OS build options are set by lunch command of Android OS build environment (look here at how to set it up if you haven’t done this yet). I guess lunch means ”build menu” in this case. Or somebody can attribute the choice of the command name to the fact that building Android OS takes so long that one can go for a lunch with friends after starting it
Anyway, if you type lunch command, it offers you several choices:
vlad@vlad-laptop:~/mydroid$ lunch You're building on Linux Lunch menu... pick a combo: 1. full-eng 2. full_x86-eng 3. simulator 4. full_passion-userdebug 5. full_crespo-userdebug Which would you like? [full-eng]
After you select a particular option, lunch command sets certain Android OS build variables that define what and how will be built.
For convenience I assembled a table below that show what values those variables will be getting with each choice:
There are 4 groups of variables:
- Those with names starting from PLATFORM… These describe Android OS as a platform, They are mostly for Android OS self-identification purposes
- Those with names starting from TARGET… These define a target device or emulator
- Those with names starting from HOST…. These define CPU architecture of a computer on which the build happens and its OS (remember, the build can be done on either Linux or Mac)
- BUILD_ID variable. Defines a build ID
You can find more about some of those variables if you look at /build/core/version_defaults.mk file in the directory you have downloaded through repo the Android OS source code.
The most interesting among them are TARGET_ARCH and TARGET_ARCH_VARIANT. They define CPU architecture for which the build happen. TARGET_ARCH has two values: either x86 or ARM. This reflects the fact that there are two CPU architectures for smartphones:
- ARM architecture. CPUs with such architecture are most common among smartphones
- Intel Atom architecture which is a version of x86 for CPUs with very low power consumption (smartphones, tablets, netbooks etc). Until recent ATOM didn’t get much traction due to its higher power consumption, but several months ago Intel announced its new version Atom Z6 which fits nicely in smartphone power limitations. I guess we’ll see more smartphones with Atom CPUs soon
TARGET_ARCH_VARIANT describes a particular model of CPU. For example, armv7-a-neon stands for Cortex A8 CPU which is used e.g. in Samsung Galaxy S smartphone.
Another interesting variable is TARGET_BUILD_TYPE which defines whether debugging functionality is enabled in the OS you are building. This functionality is typically disabled in Android OS installed on a regular devices since it does not make sense unless you debug the OS which is most smartphone owners don’t do.
Knowing all this, we can understand what those build choices actually mean:
- full_eng is a plain vanilla Android OS build for devices with ARM CPU
- full-x86_eng is a plain vanilla Android OS build for devices with Intel Atom CPU
- simulator is a plain vanilla Android OS build for running on AVD device
- full_passion-userdebug is a version of Android OS customized by HTC
- full_crespo-userdebug is a version of Android OS customized by Samsung