make-gapps-zip is an opensource project that allows you to create your own flashable GApps zip from existing firmware (e.g., Nexus factory images) on Linux/OS X/Windows. AFAIK there is only a Windows-only tool. Some other "devs" only publish GApps packages and are not transparent about the origin/methodology. For this reason, the project was started to document GApps files (Android >= 5.0) and create tooling for it.
The main tools that is part of this project are odex2apk.py and make-update-zip.py. Since these are Python scripts, these run on Linux, OS X and Windows. The only other dependency is Java 7 or newer.
odex2apk.py uses oat2dex.jar by Riddle Hsu. Given an OAT-optimized .odex file, it will add classes.dex to the APK file if missing. This process reproducible such that the resulting file contents are byte-for-byte identical given the same source files.
make-update-zip.py uses the above odex2apk.py script to create deodexed APK files, then creates a flashable .zip file that can be installed from recovery.
Links:
Example invocation and output:
Note: the tool is designed for Android 5.0 or newer. It can be adapted for Android 4.4 by using baksmali and adjusting the paths, but meh, it is outdated stuff... Have fun with these docs and tools!
The main tools that is part of this project are odex2apk.py and make-update-zip.py. Since these are Python scripts, these run on Linux, OS X and Windows. The only other dependency is Java 7 or newer.
odex2apk.py uses oat2dex.jar by Riddle Hsu. Given an OAT-optimized .odex file, it will add classes.dex to the APK file if missing. This process reproducible such that the resulting file contents are byte-for-byte identical given the same source files.
make-update-zip.py uses the above odex2apk.py script to create deodexed APK files, then creates a flashable .zip file that can be installed from recovery.
Links:
- Project site: https://github.com/Lekensteyn/make-gapps-zip
- GApps Documentation
- Please report issues at https://github.com/Lekensteyn/make-gapps-zip/issues
Example invocation and output:
Quote:
|
[peter@ubuntu1404 make-gapps-zip] $ ls -F /tmp/pfiles/ app/ bin/ build.prop etc/ fonts/ framework/ lib/ media/ priv-app/ recovery-from-boot.p usr/ vendor/ xbin/ [peter@ubuntu1404 make-gapps-zip] $ ./make-update-zip.py -o update.zip -c keys/testkey.x509.pem -k keys/testkey.pk8 -r /tmp/pfiles GoogleLoginService GoogleServicesFramework Phonesky PrebuiltGmsCore GoogleContactsSyncAdapter CalendarProvider -f lib/libjni_latinimegoogle.so Code:
odex2apk: Processing boot directory, may take a minute...Code:
Archive: update.zip87986ca452217658c6e3d72b91b631f40fe6dd2f update.zip [peter@ubuntu1404 make-gapps-zip] $ du -b update.zip # size in bytes 30224904 update.zip [peter@ubuntu1404 make-gapps-zip] $ grep ro.build.description /tmp/pfiles/build.prop ro.build.description=hammerhead-user 5.1.1 LMY48I 2074855 release-keys [peter@ubuntu1404 make-gapps-zip] $ java -version java version "1.7.0_79" OpenJDK Runtime Environment (IcedTea 2.5.6) (7u79-2.5.6-0ubuntu1.14.04.1) OpenJDK 64-Bit Server VM (build 24.79-b02, mixed mode) |