Differences between revisions 11 and 12
Revision 11 as of 2016-06-08 16:53:30
Size: 3284
Editor: ChirayuDesai
Comment:
Revision 12 as of 2016-06-14 12:13:33
Size: 3456
Editor: ChirayuDesai
Comment: Add aapt build log and bug URL.
Deletions are marked like this. Additions are marked like this.
Line 41: Line 41:

= aapt / libaapt =
Already packaged in Debian, but not fully working. Bug [[https://bugs.debian.org/827264|#827264]]
<<BR>>
Android build log: http://sprunge.us/CYJL

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.

android.jar

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.

  1. doclava processes the public parts of the API and puts the relevant files in a folder.

  2. framework-res.apk is built from framework/base/core/res, which includes all the common image and string resources.

  3. 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

framework-res.apk

  • 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?

doclava

Used to build the SDK docs, and also generate public API stubs for android.jar.
Upstream: https://code.google.com/archive/p/doclava/
Android fork's changes: https://android.googlesource.com/platform/external/doclava/+/android-6.0.1_r43/android-changes.txt
Built with gradle

sources.zip

It includes all the sources used to build android.jar, i.e. the public API of the android framework. Created by a python script

platform.zip

Built using the files defined in development/build/sdk.atree

aapt / libaapt

Already packaged in Debian, but not fully working. Bug #827264
Android build log: http://sprunge.us/CYJL