[bug] can't rebuilt apk
Describe the bug I tried to patch an apk using objection tool but I got an error like this
Performing zipalign Zipaligning the APK may have failed. Read the following output to determine if zipalign actually had an error:
/usr/bin/zipalign: symbol lookup error: /usr/bin/zipalign: undefined symbol: _ZN11zip_archive6WriterD2Ev
Zipalign completed Signing new APK. Signing the new APK may have failed.
Exception in thread "main" java.io.FileNotFoundException: /tmp/tmp3qgmu6by.apktemp.aligned.objection.apk (No such file or directory)
at java.base/java.io.RandomAccessFile.open0(Native Method)
at java.base/java.io.RandomAccessFile.open(RandomAccessFile.java:344)
at java.base/java.io.RandomAccessFile.
at java.base/java.io.RandomAccessFile.
at com.android.apksig.ApkSigner.sign(ApkSigner.java:190)
at com.android.apksigner.ApkSignerTool.sign(ApkSignerTool.java:356)
at com.android.apksigner.ApkSignerTool.main(ApkSignerTool.java:85)
Signed the new APK
Copying final apk from /tmp/tmp3qgmu6by.apktemp.aligned.objection.apk to o2.objection.apk in current directory...
Traceback (most recent call last):
File "/home/kali/androidVenv/bin/objection", line 8, in
Evidence / Logs / Screenshots
Used Command
objection patchapk -s o2.apk
Environment (please complete the following information):
- OS: kali
- apktool version: Apktool 2.9.3
- Frida Version: 16.2.1
- Objection Version: 1.11.0
Appears to be an issue with zipalign itself. You can try to add --skip-resources and --ignore-nativelibs when patching the app. Also check your zipalign version
i.e. objection -d patchapk -s o2.apk --skip-resources --ignore-nativelibs