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:
| full-eng | full_x86-eng | simulator | full_passion-userdebug | full_crespo-userdebug | |
| PLATFORM_VERSION_CODENAME | AOSP | AOSP | AOSP | AOSP | AOSP |
| PLATFORM_VERSION | AOSP | AOSP | AOSP | AOSP | AOSP |
| TARGET_PRODUCT | full | full_x86 | sim | full_passion | full_crespo |
| TARGET_BUILD_VARIANT | eng | eng | eng | userdebug | userdebug |
| TARGET_SIMULATOR | false | false | true | false | false |
| TARGET_BUILD_TYPE | release | release | debug | release | release |
| TARGET_BUILD_APPS | |||||
| TARGET_ARCH | arm | x86 | x86 | arm | arm |
| TARGET_ARCH_VARIANT | armv5te | x86 | x86 | armv7-a-neon | armv7-a-neon |
| HOST_ARCH | x86 | x86 | x86 | x86 | x86 |
| HOST_OS | linux | linux | linux | linux | linux |
| HOST_BUILD_TYPE | release | release | release | release | release |
| BUILD_ID | OPENMASTER | OPENMASTER | OPENMASTER | OPENMASTER | OPENMASTER |
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
That’s all.
Hi, I doubt about the difference between the build eng and the build userdebug?
Can you tell which is the difference in choice one or another?
Thanks in advance
jesus
To Jesus
If you want to build a final release, TARGET_BUILD_TYPE variable should be set to eng. If you want to make a build for debugging purposes (you are going to debug what you have built), the variable should be set to userdebug.
Disclaimer: I’m not a member of Google Android team and my reply is based on what I have learned from Android code and documentation. This means I can be wrong, of course.
Hi
Can we check the TARGET_BUILD_TYPE thru code?
Please help
let me clarify my doubt in details. i really want to re-direct my code control upon build (eng or userdebug) variant. Any idea how to check the TARGET_BUILD_VARIANT thru code?
Thanks in advance
Where can I find the latest full_crespo-userdebug build binary for NexusS? Sadly google is not offering Developer phones anymore, looks like this is the only way to go.
Narayan,
As far as I know there is no officially published binaries. There may be ones published by somebody, but how would you know that there is no spyware etc in them? So the only practical way to get bimaries I know is to build them.
I am working on a simulator build in Ice Cream Sandwich. Has the ‘simulator’ lunch option changed to ‘vbox_x86-eng’ in Android 4.0?
Thanks -