Apktool/aapt/aapt2 error parsing unicode characters in xml files

602 Views Asked by At

I am trying to use apktool/aapt/aapt2 to rebuild an APK but I encountered an error when using the tools. The message states "error: not well-formed (invalid token)". This is because of the use of unicode characters in the various xml files for the class names etc.

Is there anyway I can convert those unicode names to an ASCII equivalent? I have tried to escape the characters in the XML files using

  • &#x....
  • &#.... (decimal equivalent of &#x)
  • \u....
  • \xxxx

However, none of the above escaping works. Any advice is greatly appreciated.

0

There are 0 best solutions below