backdoor-apk is a shell script that simplifies the process of adding a backdoor to any Android APK file. Users of this shell script should have working knowledge of Linux, Bash, Metasploit, Apktool, the Android SDK, smali, etc. This shell script is provided as-is without warranty of any kind and is intended for educational purposes only.
Apache License 2.0
2.21k
stars
702
forks
source link
apktool decompiles successfully, but can`t build. #135
Hello,
I have an issue concerning apktool in kali linux. Whenever I try to recompile without doing any changes, it gives me this error:
I: Using Apktool 2.2.2
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 2): [aapt, p, --forced-package-id, 127, --min-sdk-version, 8, --target-sdk-version, 15, --version-code, 4, --version-name, 1.3, --no-version-vectors, -F, /tmp/APKTOOL6094303095087557697.tmp, -0, arsc, -0, arsc, -I, /root/.local/share/apktool/framework/1.apk, -S, /root/Downloads/flappybird/res, -M, /root/Downloads/flappybird/AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:477)
at brut.androlib.Androlib.buildResources(Androlib.java:411)
at brut.androlib.Androlib.build(Androlib.java:310)
at brut.androlib.Androlib.build(Androlib.java:263)
at brut.apktool.Main.cmdBuild(Main.java:227)
at brut.apktool.Main.main(Main.java:84)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 2): [aapt, p, --forced-package-id, 127, --min-sdk-version, 8, --target-sdk-version, 15, --version-code, 4, --version-name, 1.3, --no-version-vectors, -F, /tmp/APKTOOL6094303095087557697.tmp, -0, arsc, -0, arsc, -I, /root/.local/share/apktool/framework/1.apk, -S, /root/Downloads/flappybird/res, -M, /root/Downloads/flappybird/AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:440)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:463)
... 5 more
Caused by: brut.common.BrutException: could not exec (exit code = 2): [aapt, p, --forced-package-id, 127, --min-sdk-version, 8, --target-sdk-version, 15, --version-code, 4, --version-name, 1.3, --no-version-vectors, -F, /tmp/APKTOOL6094303095087557697.tmp, -0, arsc, -0, arsc, -I, /root/.local/share/apktool/framework/1.apk, -S, /root/Downloads/flappybird/res, -M, /root/Downloads/flappybird/AndroidManifest.xml]
at brut.util.OS.exec(OS.java:95)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:434)
... 6 more
W: ERROR: Unknown option '--forced-package-id'
However, it decompiles without any error.
When I do the command java -version I get:
openjdk version "10.0.1" 2018-04-17
OpenJDK Runtime Environment (build 10.0.1+10-Debian-4)
OpenJDK 64-Bit Server VM (build 10.0.1+10-Debian-4, mixed mode)
When I try to reinstall Android-SDK: android-sdk is already the newest version (22.0.1-1kali0).
@tobgy Apktool doesn't work with every APK out there. As a test, you can decompile and recompile an APK using Apktool on it's own and if it doesn't work then it won't work with backdoor-apk. :)
Hello, I have an issue concerning apktool in kali linux. Whenever I try to recompile without doing any changes, it gives me this error: I: Using Apktool 2.2.2 I: Checking whether sources has changed... I: Checking whether resources has changed... I: Building resources... Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 2): [aapt, p, --forced-package-id, 127, --min-sdk-version, 8, --target-sdk-version, 15, --version-code, 4, --version-name, 1.3, --no-version-vectors, -F, /tmp/APKTOOL6094303095087557697.tmp, -0, arsc, -0, arsc, -I, /root/.local/share/apktool/framework/1.apk, -S, /root/Downloads/flappybird/res, -M, /root/Downloads/flappybird/AndroidManifest.xml] at brut.androlib.Androlib.buildResourcesFull(Androlib.java:477) at brut.androlib.Androlib.buildResources(Androlib.java:411) at brut.androlib.Androlib.build(Androlib.java:310) at brut.androlib.Androlib.build(Androlib.java:263) at brut.apktool.Main.cmdBuild(Main.java:227) at brut.apktool.Main.main(Main.java:84) Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 2): [aapt, p, --forced-package-id, 127, --min-sdk-version, 8, --target-sdk-version, 15, --version-code, 4, --version-name, 1.3, --no-version-vectors, -F, /tmp/APKTOOL6094303095087557697.tmp, -0, arsc, -0, arsc, -I, /root/.local/share/apktool/framework/1.apk, -S, /root/Downloads/flappybird/res, -M, /root/Downloads/flappybird/AndroidManifest.xml] at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:440) at brut.androlib.Androlib.buildResourcesFull(Androlib.java:463) ... 5 more Caused by: brut.common.BrutException: could not exec (exit code = 2): [aapt, p, --forced-package-id, 127, --min-sdk-version, 8, --target-sdk-version, 15, --version-code, 4, --version-name, 1.3, --no-version-vectors, -F, /tmp/APKTOOL6094303095087557697.tmp, -0, arsc, -0, arsc, -I, /root/.local/share/apktool/framework/1.apk, -S, /root/Downloads/flappybird/res, -M, /root/Downloads/flappybird/AndroidManifest.xml] at brut.util.OS.exec(OS.java:95) at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:434) ... 6 more W: ERROR: Unknown option '--forced-package-id'
However, it decompiles without any error.
When I do the command java -version I get: openjdk version "10.0.1" 2018-04-17 OpenJDK Runtime Environment (build 10.0.1+10-Debian-4) OpenJDK 64-Bit Server VM (build 10.0.1+10-Debian-4, mixed mode)
When I try to reinstall Android-SDK: android-sdk is already the newest version (22.0.1-1kali0).
Please help me fix this issue. Thanks in advance.