You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.(RandomAccessFile.java:259)
at java.base/java.io.RandomAccessFile.(RandomAccessFile.java:213)
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
sys.exit(cli())
^^^^^
File "/home/kali/androidVenv/lib/python3.11/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kali/androidVenv/lib/python3.11/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/home/kali/androidVenv/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kali/androidVenv/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kali/androidVenv/lib/python3.11/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kali/androidVenv/lib/python3.11/site-packages/objection/console/cli.py", line 373, in patchapk
patch_android_apk(**locals())
File "/home/kali/androidVenv/lib/python3.11/site-packages/objection/commands/mobile_packages.py", line 230, in patch_android_apk
shutil.copyfile(patcher.get_patched_apk_path(), os.path.join(os.path.abspath('.'), destination))
File "/usr/lib/python3.11/shutil.py", line 256, in copyfile
with open(src, 'rb') as fsrc:
^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmp3qgmu6by.apktemp.aligned.objection.apk'
Cleaning up temp files...
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
The text was updated successfully, but these errors were encountered:
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
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.(RandomAccessFile.java:259)
at java.base/java.io.RandomAccessFile.(RandomAccessFile.java:213)
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
sys.exit(cli())
^^^^^
File "/home/kali/androidVenv/lib/python3.11/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kali/androidVenv/lib/python3.11/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/home/kali/androidVenv/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kali/androidVenv/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kali/androidVenv/lib/python3.11/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kali/androidVenv/lib/python3.11/site-packages/objection/console/cli.py", line 373, in patchapk
patch_android_apk(**locals())
File "/home/kali/androidVenv/lib/python3.11/site-packages/objection/commands/mobile_packages.py", line 230, in patch_android_apk
shutil.copyfile(patcher.get_patched_apk_path(), os.path.join(os.path.abspath('.'), destination))
File "/usr/lib/python3.11/shutil.py", line 256, in copyfile
with open(src, 'rb') as fsrc:
^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmp3qgmu6by.apktemp.aligned.objection.apk'
Cleaning up temp files...
Evidence / Logs / Screenshots
Used Command
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: