Hey,
This is the first time that i ask something in a forum , the first time ever .
I used to found what i want in google or with some patience i found mostly the solution or i give up.
But this time i don't wanna give up :fingers-crossed: so here i'm asking for solution.
I'm trying to edit an android apk using apktools like i did many sevral time with others apk , but i had a problem from the begining
When i try to decompile using apktools
I get this error :
Code:
[COLOR="Red"][Fatal Error] AndroidManifest.xml:2:36: Element type "manifest" must be followed by either attribute specifications, ">" or "/>".[/COLOR]
And it decompile it
When i try to recompile it i got sevral error :
Code:
/usr/src/android/testMEapk/testMEapkDecompiled/AndroidManifest.xml:2: error: Error parsing XML: not well-formed (invalid token)
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [/tmp/brut_util_Jar_3771386797061777755.tmp, p, --forced-package-id, 127, --version-code, 65, -F, /tmp/APKTOOL1578726278950469476.tmp, -0, arsc, -I, /root/apktool/framework/1.apk, -S, /usr/src/android/testMEapk/testMEapkDecompiled/res, -M, /usr/src/android/testMEapk/testMEapkDecompiled/AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:435)
at brut.androlib.Androlib.buildResources(Androlib.java:363)
at brut.androlib.Androlib.build(Androlib.java:286)
at brut.androlib.Androlib.build(Androlib.java:258)
at brut.apktool.Main.cmdBuild(Main.java:236)
at brut.apktool.Main.main(Main.java:88)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [/tmp/brut_util_Jar_3771386797061777755.tmp, p, --forced-package-id, 127, --version-code, 65, -F, /tmp/APKTOOL1578726278950469476.tmp, -0, arsc, -I, /root/apktool/framework/1.apk, -S, /usr/src/android/testMEapk/testMEapkDecompiled/res, -M, /usr/src/android/testMEapk/testMEapkDecompiled/AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:470)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:416)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [/tmp/brut_util_Jar_3771386797061777755.tmp, p, --forced-package-id, 127, --version-code, 65, -F, /tmp/APKTOOL1578726278950469476.tmp, -0, arsc, -I, /root/apktool/framework/1.apk, -S, /usr/src/android/testMEapk/testMEapkDecompiled/res, -M, /usr/src/android/testMEapk/testMEapkDecompiled/AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:464)
... 6 more
After analyzing the problem i found that the AndroidManifest.xml is not well decompiled (not well written).
It contain several error it like all atributes name was removed from the file.
I thought that the problem is only on AndroidManifest.xml so i tried to add all attributes manyaly but my big surprise when i saw that all decompiled xml files are broken and not well written.
So my question doesn't any body have any idea about this ? why all xml file are not well decompiled ?
And how can i fix that.
I tried apktools Apktool v1.5.2 and apktool_2.0.0b9.jar and apktool_2.0.0b7jar same problem.
I hope that i will get some usefull answer and thanks for help.
This is how AndroidManifest.xml look like after decompiling the apk :
No body got this problem before ?
I hope that i will recieve an answer from my first question
Related
Hey,
I decompiled settings.apk from LewaOS (non odexed) to translate it, I translated several strings to only check but when I try to compile it back (apktool b settings NEWsettings.apk )
I got this error:
Code:
[email protected]:~/APK$ apktool b settings n.apk
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 command: [aapt, p, --min-sdk-version, 10, --target-sdk-version, 10, -F, /tmp/APKTOOL9063077177634782365.tmp, -0, arsc, -I, /home/lozohcum/apktool/framework/1.apk, -S, /home/lozohcum/APK/settings/res, -M, /home/lozohcum/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, 10, --target-sdk-version, 10, -F, /tmp/APKTOOL9063077177634782365.tmp, -0, arsc, -I, /home/lozohcum/apktool/framework/1.apk, -S, /home/lozohcum/APK/settings/res, -M, /home/lozohcum/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, 10, --target-sdk-version, 10, -F, /tmp/APKTOOL9063077177634782365.tmp, -0, arsc, -I, /home/lozohcum/apktool/framework/1.apk, -S, /home/lozohcum/APK/settings/res, -M, /home/lozohcum/APK/settings/AndroidManifest.xml]
at brut.util.OS.exec(OS.java:93)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:355)
... 6 more
Caused by: java.io.IOException: Cannot run program "aapt": java.io.IOException: error=13, Permission denied
at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
at java.lang.Runtime.exec(Runtime.java:593)
at java.lang.Runtime.exec(Runtime.java:466)
at brut.util.OS.exec(OS.java:84)
... 7 more
Caused by: java.io.IOException: java.io.IOException: error=13, Permission denied
at java.lang.UNIXProcess.<init>(UNIXProcess.java:148)
at java.lang.ProcessImpl.start(ProcessImpl.java:65)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
... 10 more
Can you help me with this?
I realy want to translate my ports
Try Change permision in setting source ( via chmod 777) .
permission of what? of out folder or permission for apktool?
Why didn't you compile a deodexed apk?
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...
I'm using apktool on my cherry mobile topaz
I decompile my systemui and recompile it again without doing or changing anything
and it gives me this errors !
W: Could not find sources
I: Building resources...
W: aapt location could not be found. Defaulting back to default
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, /data/data/per.pqy.apktool/APKTOOL2993844565012153827.tmp, -I, ?/apktool/framework/1.apk, -S, /sdcard/apktool/frame/SystemUI_src/res, -M, /sdcard/apktool/frame/SystemUI_src/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, /data/data/per.pqy.apktool/APKTOOL2993844565012153827.tmp, -I, ?/apktool/framework/1.apk, -S, /sdcard/apktool/frame/SystemUI_src/res, -M, /sdcard/apktool/frame/SystemUI_src/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, /data/data/per.pqy.apktool/APKTOOL2993844565012153827.tmp, -I, ?/apktool/framework/1.apk, -S, /sdcard/apktool/frame/SystemUI_src/res, -M, /sdcard/apktool/frame/SystemUI_src/AndroidManifest.xml]
at brut.util.OS.exec(OS.java:93)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:355)
... 6 more
Caused by: java.io.IOException: Cannot run program "aapt": error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1042)
at java.lang.Runtime.exec(Runtime.java:615)
at java.lang.Runtime.exec(Runtime.java:483)
at brut.util.OS.exec(OS.java:84)
... 7 more
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:135)
at java.lang.ProcessImpl.start(ProcessImpl.java:130)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1023)
... 10 more
can anyone help me plss.
plss
help plsss
up !!! plsss help
xxraicentxx said:
up !!! plsss help
Click to expand...
Click to collapse
Are you running APK tool with aapt from the android sdk ?
See code.google.com/p/android-apktool/issues/detail?id=213 (just add the https before, I cannot post any link ;( )
ebtokyo said:
Are you running APK tool with aapt from the android sdk ?
See code.google.com/p/android-apktool/issues/detail?id=213 (just add the https before, I cannot post any link ;( )
Click to expand...
Click to collapse
I'm using apktool on my cherry mobile topaz
local from Phil.
and it always give me that error even if I don't do anything on my systemui.apk ..
what should i do ? is there something wrong with the setups ?
here's the apktool path on my phone .
sdcard/apktool/new folder/framework-res.apk
plss help me get rid of this errors ..
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!
hi there iam decompiling the apk file and getting error anyone can guide me how to fix ? for this prupose i decompiled chegg study application apk and did a little tweak and recompiled the folder upon recompiling getting this error :
Tool used: APK Easy Tool
invalid resource directory name: C:\Users\fahad_satti22\Desktop\apktool\chegg_original\res navigation
brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\fahad_satti22\AppData\Local\Temp\brut_util_Jar_31928081245386695307597454261093548753.tmp, p, --forced-package-id, 127, --min-sdk-version, 23, --target-sdk-version, 29, --version-code, 294, --version-name, 10.0.4, --no-version-vectors, -F, C:\Users\fahad_satti22\AppData\Local\Temp\APKTOOL6994267000475427236.tmp, -e, C:\Users\fahad_satti22\AppData\Local\Temp\APKTOOL3529958739332127621.tmp, -0, arsc, -I, C:\Users\fahad_satti22\AppData\Local\apktool\framework\1.apk, -S, C:\Users\fahad_satti22\Desktop\apktool\chegg_original\res, -M, C:\Users\fahad_satti22\Desktop\apktool\chegg_original\AndroidManifest.xml]