Kick-start your 64bit Android build engines
Submitted by Amit Pundir (@pundiramit) on Wednesday, 22 October 2014
Section: Hardware – crisp talks Technical level: Intermediate
Objective of this short talk is to get AOSP system/ROM builders and developers started with 64bit Android builds.
Android 64bit devices running AOSP/Lollipop will support both 64bit and 32bit runtime environment (called multilib in AOSP world). For multilib, AOSP introduced a new set of build variables which developers should be aware of, if they are building applications for 64bit Android devices. This quick talk will be based on these new build variables.
Here is a rough sketch of the talk:
1) Introducing multilib:
What is a Primary and Secondary Zygote? Significance of “ro.zygote”, /system/lib and /system/lib64 etc
2) How to do a multilib build?
Device config changes for Primary and Secondary ARCH:
- Set Primary and/or Secondary ARCHs TARGET_ARCH, TARGET_USES_64_BIT_BINDER etc
- Set toolchains TARGET_TOOLS_PREFIX, 32/64bit application support TARGET_SUPPORTS_*_BIT_APPS
- and other such variables
- multilib build variables to build module for Primary, Secondary, both ARCHs or preffered ARCH
- Set supported ARCHs to arm, arm64, x86 by setting LOCAL_MODULE_TARGET_ARCH
- Sharing /system/bin for both 64bit and 32bit apps using LOCAL_MODULE_STEM_*
- and other such useful variables
3) Working multilib examples from AOSP using above variables.