[Android Q&A, Help & Troubleshooting] pml2307:
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 :

[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 :

/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 :