Android SDK Tools in Debian Kai-Chung Yan <seamlikok@gmail.com>
Why Android SDK in Debian? ● The SDK from Google is non-free [1]
Why Android SDK in Debian? ● The SDK from Google is non-free [1] ● Reproducible SDK & APKs ○ zipalign can zero out timestamps
Why Android SDK in Debian? ● The SDK from Google is non-free [1] ● Reproducible SDK & APKs ○ zipalign can zero out timestamps ● Completely free F-Droid build servers like “buildd” ○ sudo aptitude install android-sdk fdroidserver
Why Android SDK in Debian? ● The SDK from Google is non-free [1] ● Reproducible SDK & APKs ○ zipalign can zero out timestamps ● Completely free F-Droid build servers like “buildd” ○ sudo aptitude install android-sdk fdroidserver ● Handy for Android rooters and flashers ○ sudo aptitude install adb fastboot
Why Android SDK in Debian? ● The SDK from Google is non-free [1] ● Reproducible SDK & APKs ○ zipalign can zero out timestamps ● Completely free F-Droid build servers like “buildd” ○ sudo aptitude install android-sdk fdroidserver ● Handy for Android rooters and flashers ○ sudo aptitude install adb fastboot ● Prevent XcodeGhost (2015) on Android
The current goal ● A minimalist command-line build environment
The current goal ● A minimalist command-line build environment ● Along with… ○ NDK (via “contrib” installer) ○ Maven repo of Support Library ○ Maven repo of Google libraries (via “contrib” installer)
The current goal ● A minimalist command-line build environment ● Along with… ○ NDK (via “contrib” installer) ○ Maven repo of Support Library ○ Maven repo of Google libraries (via “contrib” installer) ● Without… ○ Emulator and System Images ○ Android Studio
Difficulties we faced ● Crazy inconsistent versioning ○ SDK version 24.0.2 ○ Build-tools version 23.0.2 ○ Platform-tools version 23.0.0 ○ API Level 23 ○ Android version 6.0.1
Difficulties we faced ● Circular dependencies
Difficulties we faced ● Circular dependencies android-platform-system-core android-platform-system-extras adb libf2fs_utils fastboot libext4_utils liblog libXXX...
Difficulties we faced ● Circular dependencies android-platform-system-core android-platform-system-extras adb libf2fs_utils fastboot libext4_utils liblog libXXX...
Difficulties we faced ● Circular dependencies android-platform-system-core android-platform-system-extras adb libf2fs_utils fastboot libext4_utils liblog libXXX...
Difficulties we faced ● Circular dependencies android-platform-system-core android-platform-system-extras Build-profiles solve this!
Difficulties we faced ● Circular dependencies android-platform-system-core android-platform-system-extras adb libf2fs_utils liblog,libXXX... libext4_utils fastboot
Difficulties we faced ● Building some components needs multiple upstream repos ○ “android.jar” needs 4 repos
Difficulties we faced ● Building some components needs multiple upstream repos ○ “android.jar” needs 4 repos ● No usable build system ○ Handwritten Makefile according to “Android.mk” ○ Perhaps “Android.mk” can be interpreted
Difficulties we faced ● Building some components needs multiple upstream repos ○ “android.jar” needs 4 repos ● No usable build system ○ Handwritten Makefile according to “Android.mk” ○ Perhaps “Android.mk” can be interpreted ● Some repos have C/C++ as well as Java projects
Difficulties we faced ● Building some components needs multiple upstream repos ○ “android.jar” needs 4 repos ● No usable build system ○ Handwritten Makefile according to “Android.mk” ○ Perhaps “Android.mk” can be interpreted ● Some repos have C/C++ as well as Java projects ● Google forked quite a lot of things ○ Doclava, libunwind, libselinux and even OpenSSL
The progress so far ● Updated Gradle to 2.x
The progress so far ● Updated Gradle to 2.x ● The Gradle plugin
The progress so far ● Updated Gradle to 2.x ● The Gradle plugin ● The Android Platform “android.jar” almost done
The progress so far ● Platform-tools ○ adb ☑ ○ dmtracedump ☑ ○ etc1tool ☑ ○ fastboot ☑ ○ hprof-conv ☑ ○ systrace.py
The progress so far ● Build-tools ○ aapt ☑ llvm-rs-cc ○ aidl ☑ mainDexClasses ○ bcc_compat split-select ☑ ○ dexdump ☑ zipalign ☑ ○ dx ☑ jack ○ renderscript <arch>-linux-android-ld
The progress so far ● Updated Gradle to 2.x ● The Gradle plugin ● The Android Platform “android.jar” almost done ● Not usable for now
How to find us? ● IRC: #debian-mobile #debian-android-tools ● Mailing list: android-tools-devel@lists.alioth.debian.org ● Wiki: https://wiki.debian.org/AndroidTools ● Join us!
Questions?
References [1]: https://developer.android.com/studio/terms.html
Recommend
More recommend