-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error parsing XML: not well-formed (invalid token) #885
Comments
Comment #1 originally posted by connor.tumbleson on 2015-03-11T12:25:18.000Z:
<o.ᴗ android:gravity Dumping out the resources via aapt ibotpeaches@raganok:~/Downloads/Apktool/Bug776$ aapt d xmltree locus.apk res/layout/abc_action_menu_layout.xml Yields the same weird character. Needs more investigation. |
Comment #2 originally posted by Liquid.St.Ray on 2015-03-13T23:20:00.000Z:
|
Comment #3 originally posted by connor.tumbleson on 2015-03-13T23:21:51.000Z:
Its not like Android knows this mapping of obfuscation -> real resource names. |
Comment #4 originally posted by Liquid.St.Ray on 2015-03-13T23:52:04.000Z:
I tried to rename a custom UI component class using unexpected characters and suffered the same issue when building the APK file. That APK could be packed with custom built AAPT I think. |
Comment #5 originally posted by Liquid.St.Ray on 2015-03-14T00:18:07.000Z:
|
Comment #6 originally posted by connor.tumbleson on 2015-03-14T00:20:05.000Z:
|
Comment #7 originally posted by Liquid.St.Ray on 2015-03-14T00:25:04.000Z:
Once that class was obfuscate by something like DexGuard, the class reference in layout xml file would be modified as well. |
Comment #8 originally posted by connor.tumbleson on 2015-03-14T00:50:24.000Z:
The question remains AAPT is obviously not liking it. So as you said a custom AAPT must be used. With that being said, do you have any information on this? I looked around there website (Dexguard/Proguard) and couldn't find anything. |
Comment #9 originally posted by alkorware on 2015-03-14T18:33:01.000Z:
|
Would it be possible to work around this by just renaming the classes to unique [a-Z*] names and updating the references (during/after decompilation)? |
Is this issue fixed? I think I've seen some modded apps which gives the same error on latest version of apktool and there's those illegal characters in the manifest. If I'm not wrong that it's modded, how did they do it if apktool can't? |
though this issue is closed, I recently encountered this behavior with apktool 2.4.1 to summarize, the problem traced back to the fact that the decoded apk contained smali filenames with unicode characters. as a workaround, I wrote a small nodejs command-line utility to rename all smali unicode filenames, and remap all references elsewhere in the project. wrote it in a day.. might not solve everyone's woes, but I hope that some may find it useful; worked for me. |
Same issue here, I tested the same apk (titanium backup 7.6.0.1) linked in #1389 , using apktool 2.5.0 ... Gonna try @warren-bank script for now |
I'm in a virtualized environment right now, so I can't check my notes (on modding TB) until later.. but I do remember TB having some unique issues. I believe that more recent versions decompile with missing resource directories, in addition to unicode issues. I had to iteratively test older versions until I found the last one to decompile without any missing resource directories. It was that version that I was able to successfully round-trip: decompile, (optionally) modify smali source files, run my script, recompile, and run in Android without any installation or runtime errors. |
Actually, on another apk that had this issue, I managed to make recompile work (and also to correctly run on the emulator the recompiled apk after resigning it) by replacing:
but now apktool complains about Disclaimer: what I'm trying to do is recompiling some apks I don't trust, after having removed INTERNET permission from manifest (this avoids the burden of installing 3rd party firewalls for having the same functionality, since android doesn't have a decent way of providing firewall feature at the OS level) |
As an aside.. we should really set up some kind of repo:
I don't know about any of you, but:
|
Actually, I started experimenting with apktool just for curiosity, so that when I found those apk that gave errors during recompilation, I also tried to reproduce this by using an obfuscation dictionary in proguard rules in one application of mine: I thought these errors were due to usage of non-ascii characters in proguard mappings, yet the apk generated for my application decompiled and recompiled fine even with the proguard rules modification. |
BTW: you were talking about modifying smali files, it's clearly not my case, so this issue should be related to something else at least. |
Original issue 776 created by kefir500 on 2015-03-04T10:57:38.000Z:
What is the expected output? What do you see instead?
--- And 5 more similar errors ---
-- And >10 similar errors ---
What version of the product are you using? On what operating system?
Please provide any additional information below.
Seems that XML tags are corrupt. Tried to fix these XML tags manually - no luck. Also tried different aapt and Apktool releases - still the same. Removing "framework/1.apk" does not help.
The text was updated successfully, but these errors were encountered: