Differences between revisions 11 and 14 (spanning 3 versions)
Revision 11 as of 2014-10-07 19:41:50
Size: 6008
Comment: Add note about SDK versions.
Revision 14 as of 2015-04-20 15:57:32
Size: 8263
Editor: KaichungYan
Comment: Add SDK version declaration details
Deletions are marked like this. Additions are marked like this.
Line 13: Line 13:
== Source package structure ==

The structure of each source package is documented in the README.source of each source package for this team:

 * http://anonscm.debian.org/cgit/android-tools/android-permissions.git/tree/debian/README.source
 * http://anonscm.debian.org/cgit/android-tools/android-platform-build.git/tree/debian/README.source
 * http://anonscm.debian.org/cgit/android-tools/android-platform-frameworks-base.git/tree/debian/README.source
 * http://anonscm.debian.org/cgit/android-tools/android-platform-frameworks-native.git/tree/debian/README.source
 * http://anonscm.debian.org/cgit/android-tools/android-platform-system-core.git/tree/debian/README.source
 * http://anonscm.debian.org/cgit/android-tools/android-platform-system-extras.git/tree/debian/README.source
 * http://anonscm.debian.org/cgit/android-tools/androidsdk-tool.git/tree/debian/README.source
 * http://anonscm.debian.org/cgit/android-tools/android-tools.git/tree/debian/README.source

Line 20: Line 34:

== Android SDK version declarations ==

However, the exact version number of Android SDK toolsets can be found in a `source.properties` under each directories. Here are the source locations of each version declaration:

 * SDK Tools: https://android.googlesource.com/platform/sdk/+/master/files/tools_source.properties
 * SDK Platform-tools: https://android.googlesource.com/platform/development/+/master/sdk/plat_tools_source.prop_template
 * SDK Build-tools: https://android.googlesource.com/platform/development/+/master/sdk/build_tools_source.prop_template

Which matches the [http://developer.android.com/tools/revisions | official release notes].

Note that according to the source code the major version number of Platform-tools and Build-tools is simply the API Level, which is defined [[https://android.googlesource.com/platform/build/+/master/core/version_defaults.mk | here]]. But for SDK Tools it follows its own version pattern and does not relate to the API Level.

Some tools tracks their own version and do not follow the SDK version:

 * adb
 * dx
Line 48: Line 79:
  * seems to vaguely contribute to understanding, but no concrete answers for which commit ID to build for SDK release v23.0.2. -- HansChristophSteiner <<DateTime(2014-10-07T19:51:57Z)>>

This page is a gathering place for information about the android-tools packaging team, which is focused on packaging the Android development tools for Debian. There are also some packages which help run Debian in a chroot on Android.

Package naming scheme

The naming scheme for android-tools packages is as follows:

Source package structure

The structure of each source package is documented in the README.source of each source package for this team:

Android's upstream version names

There are many naming schemes for versions in Android, and none are used everywhere. For the Android OS itself, there are three schemes: version names, like Gingerbread or Kitkat; version numbers, like 2.3.7 or 4.4.2; and, "API level" numbers, like android-10 or android-19. None of these line up with each other. For example, the Jelly Bean name spans 4.1 through 4.3.1 and android-16 through android-18. The version numbers and API level also do not line up, with android-14 covering 4.0.1 - 4.0.2, android-15 covering 4.0.3 - 4.0.4, but android-16 covers all of 4.1.x.

The madness doesn't end there. Next up we have SDK version numbers, which are like 20, or 23.0.2. Part of the SDK includes the build-tools package, which has its own version numbers, which are like 18.1.1 and 20.0.0, but these do not line up with the SDK version numbers. The platform-tools seems to have its own versioning scheme also, but it is not really exposed. Then there are the NDK release numbers, which are like r8b or r10, and they also do not line up with anything else.

In the git repo, there are a mishmash of tags and branches that do not represent all of these various versions. There does seem to be consistent tagging of the OS releases, you can see those listed under Source Code Tags and Builds. There are a few branches that seem to line up to the SDK version numbers, like tools_r21 and tools_r22.2, but there is not a complete set of those branches.

Android SDK version declarations

However, the exact version number of Android SDK toolsets can be found in a source.properties under each directories. Here are the source locations of each version declaration:

Which matches the [http://developer.android.com/tools/revisions | official release notes].

Note that according to the source code the major version number of Platform-tools and Build-tools is simply the API Level, which is defined here. But for SDK Tools it follows its own version pattern and does not relate to the API Level.

Some tools tracks their own version and do not follow the SDK version:

  • adb
  • dx

Needs doing

There is lots left to do before someone can do Android development using only official Debian packages.

  • figure out packaging scheme for various android "platforms", i.e. /opt/android-sdk/platforms/android-* and /opt/android-ndk/platforms/android-*

  • figure out how to represent Android NDK gcc and clang "toolchains" in Debian, i.e. /opt/android-sdk/toolchains

  • build "android support" jars
  • help Google integrate Android's QEMU into upstream (since Google has started to do this, I think this is the best approach to getting the Android emulator into Debian)

fdroidserver

fdroidserver is the tool suite for managing FDroid app repos and making release builds. It uses the Android SDK and NDK to make the builds and work with APKs. There are three notable milestones for fdroidserver packaging needs:

  1. everything to create and manage app repos
  2. everything to make pure Java builds
  3. everything to make native builds

The first milestone will be done once the aapt package is accepted into Debian. It is part of the android-platform-frameworks-base package that is waiting in the NEW queue.

low-hanging fruit

Here are a couple of easy tasks to do that will further this effort along:

  • get answer from Google on how the SDK versions are marked in the source git repos (i.e. what tag/branch is SDK v23.0.2? And what tag/branch is build-tools v20.0.0?)

    • Is https://source.android.com/source/code-lines.html#terms-and-caveats any helpful? Among other things, it says:

      • A release corresponds to a formal version of the Android platform, such as 1.5, 2.1, and so on. Generally speaking, a release of the platform corresponds to the version in the SdkVersion field of AndroidManifest.xml files and defined within frameworks/base/api in the source tree.

    • seems to vaguely contribute to understanding, but no concrete answers for which commit ID to build for SDK release v23.0.2. -- HansChristophSteiner 2014-10-07 19:51:57

  • android-platform-system-extras package, replacing android-tools-fsutils package.

  • build adb as part of android-platform-system-core package, replacing the android-tools-adb package.

  • build fastboot as part of android-platform-system-core package, replacing the android-tools-fastboot package.

  • update all source packages to the latest SDK release (v23.0.2, provided you can find the right tag or branch)