I have an AndroidManifest.xml, and I need to convert it to binary and place it by hand in the APK. After that, I can do a manual sign and align.
Longer explanation: I'm having trouble [again] with the familiar tools used in APK re-engineering, and I'm bulding the APK by hand with tools that don't crash.
Android includes sdklib.jar
, but I'm having trouble calling it (and it might not perform 'just' the XML -> binary conversion).
How does one convert AndroidManifest.xml
to binary?
You can try to run aapt manually like this:
$LIBS"aapt" package -f -m -F output_unsigned.apk --auto-add-overlay -S main/res -J Temp/gen -G Temp/android-aapt.pro -A Temp/assets -M Temp/AndroidManifest.xml -I $LIBS"android.jar"
In my case (under linux):
It may not work for you out-of-the-box, but I hope it helps you to start with it. Consult aapt help for more details.
If you have not seen it yet, there is android-apktool, which is quite helpful for these kinds of things. I have successfully used them before in repacking APKs by hand after modifying their binaries.
You can also look for the apkbuilder
tool which is in my android-sdk-linux/tools/
directory. (It is, however, deprecated.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With