Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Create --original feature using zip library #118
Comment #4 originally posted by frischmilch on 2012-01-25T03:56:04.000Z:
yes this would be great. I compiled and signed an apk with adobe's viewer builder (for their DPS solution) and wanted to change values in the manifest and rebuild again (certificates are installed on my machines and p12 files are heady"
Comment #5 originally posted by connor.tumbleson on 2012-12-30T03:18:25.000Z:
I've wanted to do this as well, but then comes the problem of system app vs non-system app, which then brings me back to my in-progress feature of injecting changed resources back into the original apk (thus retaining the signature), except w/ new data.
This method would only really work with non-system apps. Unless the APK was installed via ROM instead of adb push. Maybe drop in favour of --original
Comment #6 originally posted by connor.tumbleson on 2013-03-07T13:44:07.000Z:
Started to use aapt in order to iterate through all the files in the APK. Removing them one by one and then inserting the new file (ex classes.dex, resources.arsc, all binary data). In order to prevent the need of a zip reader.
This worked great until I started using APKs that had unknown resources and a non-standard build procedure. AAPT wouldn't allow data insertion into an APK that it didn't "perceive" as a true APK. If I shipped with this feature and the increasing rate that APKs are doing this process, the feature would be useless.
Thats why we have to use an ZIP library and manage / talk to the APK via that. We could modify aapt to allow this, but aapt is platform dependent and it would be difficult to force people to use ours when they already have difficulties using the most up to date aapt (some users still reporting bugs because they are using a 2 year old aapt).
The last time I tried this, I had very good progress except for the fact that all files were being duplicated in the ZIP instead of replaced.