This page describes the build process of various Android development tools. It is intended to serve as a reference to create Debian specific rules.
Some general android build system info
Android currently (as of 6.0) uses a GNU make based build system. The majority of it's code lives in the build repo, with per-module rules included in their specific repositories (or multiple, as we'll see later)
To get a gist of how a specific Android components is built, an easy way is to run make showcommands <target>, where target is something like 'aapt'. This shows every command used to build that particular target, so it can be logged and replicated for a Debian build.
It is best to use the same android branch as the debian version, and to use releases in general. The Android master branch is something which moves fast, and as of now (6.0) it has a new, faster build system.
Don't forget to define NDEBUG for C/C++ projects. It is set system wide for Android builds, and not setting it can lead to subtle bugs, such as when asserts are hit. Example: #827216
This file contains the public API of the android framework, used when compiling apps. Since it only contains the public parts from the source which also includes private APIs, it's build process is a bit complex.
framework-res.apk is built from framework/base/core/res, which includes all the common image and string resources.
Both of the above are then used to create an android.jar including only the public API.
make showcommands api-stubs-doc output from Android 6.0: http://sprunge.us/QOgR
- Contains the common resources used by the system and apps.
Source is in frameworks/base/core/res
Can be easily built for Debian with aapt package -x -M core/res/AndroidManifest.xml -S core/res/res -A core/res/assets -F framework-res.apk
Needed by apktool
TODO: Sign it?
Used to build the SDK docs, and also generate public API stubs for android.jar.
Android fork's changes: https://android.googlesource.com/platform/external/doclava/+/android-6.0.1_r43/android-changes.txt
Built with gradle
It includes all the sources used to build android.jar, i.e. the public API of the android framework. Created by a python script
Built using the files defined in development/build/sdk.atree