Skip to content

Android apk development/decompile/compile utilities

License

Notifications You must be signed in to change notification settings

kaosko/apkutil

 
 

Repository files navigation

Android 4.4 build-tools without the whole Android source tree

Little did I know about how big of a trouble I was getting myself into when I simply added a new application icon and a drawable-xxxhdpi resource directory to my build. Suddenly my CI server start failing with "Invalid resource directory name: "drawable-xxxhdpi". No problem I thought, just need to update to a newer version of ADT build tools. True, except Google had silently started requiring SSE2 instruction set on the build platform since API level 18 which my trustworthy Athlon K7 T-Bird based CI system unfortunaly doesn't support. The official issue is #58663 with WorkingAsIntended resolution on the basis of build performance degradation if SSE optimizations are turned off. (If that were true, I don't think ART would have never seen the light of day, but that's for another story). No, I think it's more likely that the official build platform or some of the required software were upgraded and it was an unintended consequence that no one bothered to revisit since.

In any case, I needed to get my CI system working but I really didn't want to reserve 30GBs or more of disk space and go through the hoops of setting a full Android build environment just to build a relatively simple utility. To my surprise, there are only a few forks publicly available and even fewer pre-built binaries. I based mine on xiangzhai/apkutil since it claimed it was created from 4.4 source but at least the aapt parts are clearly from api level 17 and likely based on https://code.google.com/p/ios-toolchain-based-on-clang-for-linux/downloads/list (Android 4.1). Support for drawable-xxxhdpi was half way there but that aapt version is missing support for option output-text-symbols. Based on the commit f5de650ff and android-4.4.4_r2.0.1 tag I selectively replaced and modified source files to arrive at a functional, up-to-date version of the aapt tool. Oh and this version requires at least 1.6.x version of the libpng dependency (I was using 1.6.14).

About

Android apk development/decompile/compile utilities

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 57.1%
  • C++ 30.9%
  • Shell 10.3%
  • Assembly 0.9%
  • Awk 0.6%
  • Java 0.1%
  • Other 0.1%