Android SDK Tools in Debian Kai-Chung Yan - - PowerPoint PPT Presentation

android sdk tools in debian
SMART_READER_LITE
LIVE PREVIEW

Android SDK Tools in Debian Kai-Chung Yan - - PowerPoint PPT Presentation

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


slide-1
SLIDE 1

Android SDK Tools in Debian

Kai-Chung Yan <seamlikok@gmail.com>

slide-2
SLIDE 2

Why Android SDK in Debian?

  • The SDK from Google is non-free [1]
slide-3
SLIDE 3

Why Android SDK in Debian?

  • The SDK from Google is non-free [1]
  • Reproducible SDK & APKs

○ zipalign can zero out timestamps

slide-4
SLIDE 4

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

slide-5
SLIDE 5

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

slide-6
SLIDE 6

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
slide-7
SLIDE 7

The current goal

  • A minimalist command-line build environment
slide-8
SLIDE 8

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)

slide-9
SLIDE 9

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

slide-10
SLIDE 10

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

slide-11
SLIDE 11

Difficulties we faced

  • Circular dependencies
slide-12
SLIDE 12

Difficulties we faced

  • Circular dependencies

android-platform-system-core android-platform-system-extras adb fastboot liblog libXXX... libf2fs_utils libext4_utils

slide-13
SLIDE 13

Difficulties we faced

  • Circular dependencies

android-platform-system-core android-platform-system-extras adb fastboot liblog libXXX... libf2fs_utils libext4_utils

slide-14
SLIDE 14

Difficulties we faced

  • Circular dependencies

android-platform-system-core android-platform-system-extras adb fastboot liblog libXXX... libf2fs_utils libext4_utils

slide-15
SLIDE 15

Difficulties we faced

  • Circular dependencies

android-platform-system-core android-platform-system-extras

Build-profiles solve this!

slide-16
SLIDE 16

Difficulties we faced

  • Circular dependencies

android-platform-system-core android-platform-system-extras adb liblog,libXXX... libf2fs_utils libext4_utils fastboot

slide-17
SLIDE 17

Difficulties we faced

  • Building some components needs multiple upstream repos

○ “android.jar” needs 4 repos

slide-18
SLIDE 18

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

slide-19
SLIDE 19

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
slide-20
SLIDE 20

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

slide-21
SLIDE 21

The progress so far

  • Updated Gradle to 2.x
slide-22
SLIDE 22

The progress so far

  • Updated Gradle to 2.x
  • The Gradle plugin
slide-23
SLIDE 23

The progress so far

  • Updated Gradle to 2.x
  • The Gradle plugin
  • The Android Platform “android.jar” almost done
slide-24
SLIDE 24

The progress so far

  • Platform-tools

○ adb ☑ ○ dmtracedump ☑ ○ etc1tool ☑ ○ fastboot ☑ ○ hprof-conv ☑ ○ systrace.py

slide-25
SLIDE 25

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

slide-26
SLIDE 26

The progress so far

  • Updated Gradle to 2.x
  • The Gradle plugin
  • The Android Platform “android.jar” almost done
  • Not usable for now
slide-27
SLIDE 27

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!
slide-28
SLIDE 28

Questions?

slide-29
SLIDE 29

References

[1]: https://developer.android.com/studio/terms.html