sensepost / objection

📱 objection - runtime mobile exploration
GNU General Public License v3.0
7.41k stars 850 forks source link

[bug] invalid resource directory name #616

Closed Drjacky closed 2 months ago

Drjacky commented 1 year ago

Describe the bug Tried to patch an APK but got an error in repacking

Evidence / Logs / Screenshots

Writing patched smali back to: /var/folders/4c/13yp5nx15q1_vfhb_cswvjt00000gn/T/tmpkkk2kh7c.apktemp/smali_classes2/com/grindrapp/android/ui/home/HomeActivity.smali
Copying Frida gadget to libs path...
Rebuilding the APK with the frida-gadget loaded...
Rebuilding the APK may have failed. Read the following output to determine if apktool actually had an error:

W: invalid resource directory name: /var/folders/4c/13yp5nx15q1_vfhb_cswvjt00000gn/T/tmpkkk2kh7c.apktemp/res navigation
brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/var/folders/4c/13yp5nx15q1_vfhb_cswvjt00000gn/T/brut_util_Jar_41240485013109277342107803947858619266.tmp, p, --forced-package-id, 127, --min-sdk-version, 23, --target-sdk-version, 33, --version-code, 114084, --version-name, 9.7.0, --no-version-vectors, -F, /var/folders/4c/13yp5nx15q1_vfhb_cswvjt00000gn/T/APKTOOL9895362261769327576.tmp, -e, /var/folders/4c/13yp5nx15q1_vfhb_cswvjt00000gn/T/APKTOOL9345924166995557872.tmp, -0, arsc, -I, /Users/myusernameeee/Library/apktool/framework/1.apk, -S, /var/folders/4c/13yp5nx15q1_vfhb_cswvjt00000gn/T/tmpkkk2kh7c.apktemp/res, -M, /var/folders/4c/13yp5nx15q1_vfhb_cswvjt00000gn/T/tmpkkk2kh7c.apktemp/AndroidManifest.xml]

Built new APK with injected loadLibrary and frida-gadget
Performing zipalign
Zipalign completed
Signing new APK.
Signed the new APK
Copying final apk from /var/folders/4c/13yp5nx15q1_vfhb_cswvjt00000gn/T/tmpkkk2kh7c.apktemp.aligned.objection.apk to /Users/myusernameeee/Desktop/temp/grindr-9-7-0.objection.apk in current directory...
Cleaning up temp files...

Environment (please complete the following information):

Application https://play.google.com/store/apps/details?id=com.grindrapp.android

IPMegladon commented 2 months ago

Try running with the --skip-resources flag added

IPMegladon commented 2 months ago

Closing issue as stale for now, feel free to reopen.