I am trying to use Objection with android app, and every time I try to use patchapk rebuilding fails with the following error:
Rebuilding the APK may have failed. Read the following output to determine if apktool actually had an error:
W: aapt: brut.common.BrutException: brut.common.BrutException: Could not extract resource: /prebuilt/linux/aapt_64 (defaulting to $PATH binary)
W: res/drawable/$avd_hide_password__0.xml: Invalid file name: must contain only [a-z0-9_.]
W: res/drawable/$avd_hide_password__1.xml: Invalid file name: must contain only [a-z0-9_.]
W: res/drawable/$avd_hide_password__2.xml: Invalid file name: must contain only [a-z0-9_.]
W: res/drawable/$avd_show_password__0.xml: Invalid file name: must contain only [a-z0-9_.]
W: res/drawable/$avd_show_password__1.xml: Invalid file name: must contain only [a-z0-9_.]
W: res/drawable/$avd_show_password__2.xml: Invalid file name: must contain only [a-z0-9_.]
W: res/drawable-v24/$ic_launcher_foreground__0.xml: Invalid file name: must contain only [a-z0-9_.]
brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [aapt, p, --min-sdk-version, 21, --target-sdk-version, 29, --version-code, 17, --version-name, 1.0.9, --no-version-vectors, -F, /tmp/APKTOOL364073371705851197.tmp, -0, resources.arsc, -0, assets/test, -0, png, -0, arsc, -I, /home/wodorek/.local/share/apktool/framework/1.apk, -S, /tmp/tmp5e995il1.apktemp/res, -M, /tmp/tmp5e995il1.apktemp/AndroidManifest.xml]
Both aapt and apktool are installed and their location is in the PATH variable, both installed via apt. The distro I am using is a fresh install of Mint 21.3
I found my answer right after asking the question, so I am going to leave it if somebody has the same issue:
First, I found where the apktool is located with which apktool
and then i replaced the apktool.jar there with the newest version from their website, and that seems to have fixed the issue.