Hi,
I'm trying to recompile an apk in debug mode (so no changes besides the one-liner in the manifest). But every time I execute "apktool b -d out" I get this error:
Code:
I: Using Apktool 2.0.0
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
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 command: [C:\Users\Me\AppData\Local\Temp\brut_util_Jar_7477717139219658502.tmp, p, --out-mode, --forced-package-id, 127, --min-sdk-version, 16, --target-sdk-version, 19, --version-code, 26, --version-name, @string/versionname, -F, C:\Users\Me\AppData\Local\Temp\APKTOOL7991561937292063981.tmp, -0, arsc, -I, C:\Users\Me\apktool\framework\1.apk, -S, D:\out\res, -M, D:\out\AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:458)
at brut.androlib.Androlib.buildResources(Androlib.java:396)
at brut.androlib.Androlib.build(Androlib.java:285)
at brut.androlib.Androlib.build(Androlib.java:256)
at brut.apktool.Main.cmdBuild(Main.java:225)
at brut.apktool.Main.main(Main.java:84)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [C:\Users\Me\AppData\Local\Temp\brut_util_Jar_7477717139219658502.tmp, p, --out-mode, --forced-package-id, 127, --min-sdk-version, 16, --target-sdk-version, 19, --version-code, 26, --version-name, @string/versionname, -F, C:\Users\Me\AppData\Local\Temp\APKTOOL7991561937292063981.tmp, -0, arsc, -I, C:\Users\Me\apktool\framework\1.apk, -S, D:\out\res, -M, D:\out\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:419)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:444)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [C:\Users\Me\AppData\Local\Temp\brut_util_Jar_7477717139219658502.tmp, p, --out-mode, --forced-package-id, 127, --min-sdk-version, 16, --target-sdk-version, 19, --version-code, 26, --version-name, @string/versionname, -F, C:\Users\Me\AppData\Local\Temp\APKTOOL7991561937292063981.tmp, -0, arsc, -I, C:\Users\Me\apktool\framework\1.apk, -S, D:\out\res, -M, D:\out\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:413)
... 6 more
I tried this both on Windows and Ubuntu and I'm always getting this error. If I decode with -r (copy resources raw) everything recompiles just fine, but then I can't add the "android:debuggable"-value (for obvious reasons, I just wanted to test the recompiling). I googled this error and often there is a problem with "aapt" not beeing recognized, so I added the path to my PATH-variable, but I'm still getting the above output.
Anyone out there with a fix or am I doing something wrong?
Regards,
me113
I fixed it myself. There was a problem with the decompiling of the resources. Three images were exported as jpg instead of png. Re-saving them as png fixed everything. :victory:
Related
hello freinds Got This Error always when decompile any apk and i used all apk tools but same . can anyone help me out
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
invalid resource directory name: C:\AndroidMultitool\Decompiled_apk\Settings\res/values-largeui
invalid resource directory name: C:\AndroidMultitool\Decompiled_apk\Settings\res/values-largeui-xhdpi
invalid resource directory name: C:\AndroidMultitool\Decompiled_apk\Settings\res/values-mediumui
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 17, --target-sdk-version, 17, -F, C:\Users\Java\AppData\Local\Temp\APKTOOL5856912769995947607.tmp, -0, arsc, -I, C:\Users\Java\apktool\framework\1.apk, -I, C:\Users\Java\apktool\framework\6.apk, -S, C:\AndroidMultitool\Decompiled_apk\Settings\res, -M, C:\AndroidMultitool\Decompiled_apk\Settings\AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:358)
at brut.androlib.Androlib.buildResources(Androlib.java:283)
at brut.androlib.Androlib.build(Androlib.java:206)
at brut.androlib.Androlib.build(Androlib.java:176)
at brut.apktool.Main.cmdBuild(Main.java:228)
at brut.apktool.Main.main(Main.java:79)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 17, --target-sdk-version, 17, -F, C:\Users\Java\AppData\Local\Temp\APKTOOL5856912769995947607.tmp, -0, arsc, -I, C:\Users\Java\apktool\framework\1.apk, -I, C:\Users\Java\apktool\framework\6.apk, -S, C:\AndroidMultitool\Decompiled_apk\Settings\res, -M, C:\AndroidMultitool\Decompiled_apk\Settings\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:357)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:336)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 17, --target-sdk-version, 17, -F, C:\Users\Java\AppData\Local\Temp\APKTOOL5856912769995947607.tmp, -0, arsc, -I, C:\Users\Java\apktool\framework\1.apk, -I, C:\Users\Java\apktool\framework\6.apk, -S, C:\AndroidMultitool\Decompiled_apk\Settings\res, -M, C:\AndroidMultitool\Decompiled_apk\Settings\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:355)
... 6 more
The system cannot find the file specified.
The system cannot find the file specified.
Hello to all!
I have a problem with recompiling an apk. Given that the apk is a free program, in practice i decompile the apk (with apktool), I make the changes (in particular, a few tweaks to the Italian translation of the app that often is not complete), but when I go to recompile everything I have these errors:
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
E:\Documenti\Download\Francesco\apktool1.5.2\w\res\xml-v17\widget_info.xml:2: er
ror: No resource identifier found for attribute 'widgetCategory' in package 'android'
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.Androl
ibException: brut.common.BrutException: could not exec command: [aapt, p, --min-
sdk-version, 7, --target-sdk-version, 17, -F, C:\DOCUME~1\FRANCE~1\IMPOST~1\Temp
\APKTOOL5497585975401121507.tmp, -0, arsc, -I, C:\Documents and Settings\Frances
co\apktool\framework\1.apk, -S, E:\Documenti\Download\Francesco\apktool1.5.2\w\r
es, -M, E:\Documenti\Download\Francesco\apktool1.5.2\w\AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:358)
at brut.androlib.Androlib.buildResources(Androlib.java:283)
at brut.androlib.Androlib.build(Androlib.java:206)
at brut.androlib.Androlib.build(Androlib.java:176)
at brut.apktool.Main.cmdBuild(Main.java:228)
at brut.apktool.Main.main(Main.java:79)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not
exec command: [aapt, p, --min-sdk-version, 7, --target-sdk-version, 17, -F, C:\
DOCUME~1\FRANCE~1\IMPOST~1\Temp\APKTOOL5497585975401121507.tmp, -0, arsc, -I, C:
\Documents and Settings\Francesco\apktool\framework\1.apk, -S, E:\Documenti\Down
load\Francesco\apktool1.5.2\w\res, -M, E:\Documenti\Download\Francesco\apktool1.
5.2\w\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:357)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:336)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sd
k-version, 7, --target-sdk-version, 17, -F, C:\DOCUME~1\FRANCE~1\IMPOST~1\Temp\A
PKTOOL5497585975401121507.tmp, -0, arsc, -I, C:\Documents and Settings\Francesco
\apktool\framework\1.apk, -S, E:\Documenti\Download\Francesco\apktool1.5.2\w\res
, -M, E:\Documenti\Download\Francesco\apktool1.5.2\w\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:355)
... 6 more
But I do not understand what they mean. The strange thing is that if i decompile the apk and recompile without changes anythings, it gives me the same errors.
Any suggestions?
Sorry for my bad english!
Ciccio0184 said:
Hello to all!
I have a problem with recompiling an apk. Given that the apk is a free program, in practice i decompile the apk (with apktool), I make the changes (in particular, a few tweaks to the Italian translation of the app that often is not complete), but when I go to recompile everything I have these errors:
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
E:\Documenti\Download\Francesco\apktool1.5.2\w\res\xml-v17\widget_info.xml:2: er
ror: No resource identifier found for attribute 'widgetCategory' in package 'android'
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.Androl
ibException: brut.common.BrutException: could not exec command: [aapt, p, --min-
sdk-version, 7, --target-sdk-version, 17, -F, C:\DOCUME~1\FRANCE~1\IMPOST~1\Temp
\APKTOOL5497585975401121507.tmp, -0, arsc, -I, C:\Documents and Settings\Frances
co\apktool\framework\1.apk, -S, E:\Documenti\Download\Francesco\apktool1.5.2\w\r
es, -M, E:\Documenti\Download\Francesco\apktool1.5.2\w\AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:358)
at brut.androlib.Androlib.buildResources(Androlib.java:283)
at brut.androlib.Androlib.build(Androlib.java:206)
at brut.androlib.Androlib.build(Androlib.java:176)
at brut.apktool.Main.cmdBuild(Main.java:228)
at brut.apktool.Main.main(Main.java:79)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not
exec command: [aapt, p, --min-sdk-version, 7, --target-sdk-version, 17, -F, C:\
DOCUME~1\FRANCE~1\IMPOST~1\Temp\APKTOOL5497585975401121507.tmp, -0, arsc, -I, C:
\Documents and Settings\Francesco\apktool\framework\1.apk, -S, E:\Documenti\Down
load\Francesco\apktool1.5.2\w\res, -M, E:\Documenti\Download\Francesco\apktool1.
5.2\w\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:357)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:336)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sd
k-version, 7, --target-sdk-version, 17, -F, C:\DOCUME~1\FRANCE~1\IMPOST~1\Temp\A
PKTOOL5497585975401121507.tmp, -0, arsc, -I, C:\Documents and Settings\Francesco
\apktool\framework\1.apk, -S, E:\Documenti\Download\Francesco\apktool1.5.2\w\res
, -M, E:\Documenti\Download\Francesco\apktool1.5.2\w\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:355)
... 6 more
But I do not understand what they mean. The strange thing is that if i decompile the apk and recompile without changes anythings, it gives me the same errors.
Any suggestions?
Sorry for my bad english!
Click to expand...
Click to collapse
Use Xplore filemanager for decompile & recompile, for sign apk use ZipSigner...
Hi,
I have this strange problem... I took a certain apk, decompiled it using apktools, but when I tried to recompile it back I got lots of errors like this one:
C:\apkto\test\res\layout\activity_wordfall.xml:46: error: No resource identifie
r found for attribute 'textAlignment' in package 'android'
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.Androl
ibException: brut.common.BrutException: could not exec command: [C:\Users\johny\
AppData\Local\Temp\brut_util_Jar_3012068314543899025.tmp, p, --forced-package-id
, 127, --min-sdk-version, 9, --target-sdk-version, 19, --version-code, 34, --ver
sion-name, 1.2.2, -F, C:\Users\johny\AppData\Local\Temp\APKTOOL64664871173833496
10.tmp, -0, resources.arsc, -0, arsc, -I, C:\Users\johny\apktool\framework\1.apk
, -S, C:\apkto\test\res, -M, C:\apkto\testo\AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:465)
at brut.androlib.Androlib.buildResources(Androlib.java:403)
at brut.androlib.Androlib.build(Androlib.java:291)
at brut.androlib.Androlib.build(Androlib.java:261)
at brut.apktool.Main.cmdBuild(Main.java:225)
at brut.apktool.Main.main(Main.java:84)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not
exec command: [C:\Users\johny\AppData\Local\Temp\brut_util_Jar_3012068314543899
025.tmp, p, --forced-package-id, 127, --min-sdk-version, 9, --target-sdk-version
, 19, --version-code, 34, --version-name, 1.2.2, -F, C:\Users\johny\AppData\Loca
l\Temp\APKTOOL6466487117383349610.tmp, -0, resources.arsc, -0, arsc, -I, C:\User
s\johny\apktool\framework\1.apk, -S, C:\apkto\testo\res, -M, C:\apkto\test\Andr
oidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:425)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:451)
... 5 more
Upon writing my question at XDA, I tried offhandedly to do the same thing in a virtual machine I own, not expecting much- but then BAM- apparently the process has ended just fine .
The only difference I see between my PC and my VM is that my PC has the latest Java update (1.8.0_66-b18) and the official android SDK, while my VM has only an older version of Java (1.8.0_31-b13).
So what's happening? and how can I fix it?
Thank you!
I have little to no knowledge of modifying APKs and all attempts in doing so in the past have resulted me in giving up, except now I really need this to work! looks fairly simply according to this old post using apktool and java outlined here https://www.reddit.com/r/Android/comments/11852r/how_to_modify_an_apk/
only issue is I can't get it to rebuild the apk from the folder even if I make no changes. I'm getting a bunch of "Error parsing XML: not well-formed (invalid token)" messages before it spits out the following exception
Code:
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException:could not exec (exit code = 1): [/tmp/brut_util_Jar_2053807626495926747.tmp, p, --forcedpackage-id, 127, --min-sdk-version, 14, --version-code, 708, --version-name, 3.1.3, -F, /tmp/APKTOOL6891156991859364727.tmp, -0, arsc, -0, arsc, -I, /home/nmok/.local/share/apktool/framework/1.apk, -S, /tmp/com.braksoftware.HumanJapanese-ca95c7eff15a41e99c94d68e5fe46a67/res, -M, /tmp/com.braksoftware.HumanJapanese-ca95c7eff15a41e99c94d68e5fe46a67/AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:478)
at brut.androlib.Androlib.buildResources(Androlib.java:412)
at brut.androlib.Androlib.build(Androlib.java:311)
at brut.androlib.Androlib.build(Androlib.java:264)
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 = 1): [/tmp/brut_util_Jar_2053807626495926747.tmp, p, --forced-package-id, 127, --min-sdk-version, 14, --version-code, 708, --version-name, 3.1.3, -F, /tmp/APKTOOL6891156991859364727.tmp, -0, arsc, -0, arsc, -I, /home/nmok/.local/share/apktool/framework/1.apk, -S, /tmp/com.braksoftware.HumanJapanese-ca95c7eff15a41e99c94d68e5fe46a67/res, -M, /tmp/com.braksoftware.HumanJapanese-ca95c7eff15a41e99c94d68e5fe46a67/AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:439)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:464)
... 5 more
Caused by: brut.common.BrutException: could not exec (exit code = 1): [/tmp/brut_util_Jar_2053807626495926747.tmp, p, --forced-package-id, 127, --min-sdk-version, 14, --version-code, 708, --version-name, 3.1.3, -F, /tmp/APKTOOL6891156991859364727.tmp, -0, arsc, -0, arsc, -I, /home/nmok/.local/share/apktool/framework/1.apk, -S, /tmp/com.braksoftware.HumanJapanese-ca95c7eff15a41e99c94d68e5fe46a67/res, -M, /tmp/com.braksoftware.HumanJapanese-ca95c7eff15a41e99c94d68e5fe46a67/AndroidManifest.xml]
at brut.util.OS.exec(OS.java:95)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:433)
... 6 more
any sort of help would be appreciated!
After decompiling this apk then immediatly attempting to recompile without changing anything I get this error log:
13/12/2017 19:22:55
java -Xmx1024m -jar "C:\Program Files (x86)\APK Easy Tool\Apktool\apktool_2.3.0.jar" b -f -o "C:\Users\James\Documents\2-Recompiled APKs\stick-fight-shadow-warrior-v1.04-mod-lenov.ru.apk" "C:\Users\James\Documents\1-Decompiled APKs\stick-fight-shadow-warrior-v1.04-mod-lenov.ru"
Compiling APK file...
I: Using Apktool 2.3.0
I: Smaling smali folder into classes.dex...
I: Building resources...
W: C:\Users\James\Documents\1-Decompiled APKs\stick-fight-shadow-warrior-v1.04-mod-lenov.ru\AndroidManifest.xml:3: error: No resource identifier found for attribute 'qihoo' in package 'android'
W:
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\James\AppData\Local\Temp\brut_util_Jar_3839531451092608287.tmp, p, --forced-package-id, 127, --min-sdk-version, 16, --target-sdk-version, 25, --version-code, 9, --version-name, 1.04, --no-version-vectors, -F, C:\Users\James\AppData\Local\Temp\APKTOOL9194040682419918563.tmp, -0, arsc, -0, bank, -0, appkey, -0, assets/Master Bank.strings.bank, -0, arsc, -I, C:\Users\James\AppData\Local\apktool\framework\1.apk, -S, C:\Users\James\Documents\1-Decompiled APKs\stick-fight-shadow-warrior-v1.04-mod-lenov.ru\res, -M, C:\Users\James\Documents\1-Decompiled APKs\stick-fight-shadow-warrior-v1.04-mod-lenov.ru\AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:485)
at brut.androlib.Androlib.buildResources(Androlib.java:419)
at brut.androlib.Androlib.build(Androlib.java:318)
at brut.androlib.Androlib.build(Androlib.java:270)
at brut.apktool.Main.cmdBuild(Main.java:224)
at brut.apktool.Main.main(Main.java:75)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\James\AppData\Local\Temp\brut_util_Jar_3839531451092608287.tmp, p, --forced-package-id, 127, --min-sdk-version, 16, --target-sdk-version, 25, --version-code, 9, --version-name, 1.04, --no-version-vectors, -F, C:\Users\James\AppData\Local\Temp\APKTOOL9194040682419918563.tmp, -0, arsc, -0, bank, -0, appkey, -0, assets/Master Bank.strings.bank, -0, arsc, -I, C:\Users\James\AppData\Local\apktool\framework\1.apk, -S, C:\Users\James\Documents\1-Decompiled APKs\stick-fight-shadow-warrior-v1.04-mod-lenov.ru\res, -M, C:\Users\James\Documents\1-Decompiled APKs\stick-fight-shadow-warrior-v1.04-mod-lenov.ru\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:454)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:471)
... 5 more
Caused by: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\James\AppData\Local\Temp\brut_util_Jar_3839531451092608287.tmp, p, --forced-package-id, 127, --min-sdk-version, 16, --target-sdk-version, 25, --version-code, 9, --version-name, 1.04, --no-version-vectors, -F, C:\Users\James\AppData\Local\Temp\APKTOOL9194040682419918563.tmp, -0, arsc, -0, bank, -0, appkey, -0, assets/Master Bank.strings.bank, -0, arsc, -I, C:\Users\James\AppData\Local\apktool\framework\1.apk, -S, C:\Users\James\Documents\1-Decompiled APKs\stick-fight-shadow-warrior-v1.04-mod-lenov.ru\res, -M, C:\Users\James\Documents\1-Decompiled APKs\stick-fight-shadow-warrior-v1.04-mod-lenov.ru\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:95)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:448)
... 6 more
------------------------------------------
Could anybody help me to understand this?