0

I always use apktool to decompiler the apk file ,and ,you known,some resources's name looks very strange, just like this: <attr name="do" format="string" />. when it's been decompilered.

the question is: when rebuild the folder which contains this resource file ,and then ,error occurs,the error message likes this:"error: invalid symbol: 'do'" or error: invalid symbol: 'if'.

of cause,I have read the source code of apktool ,and I found that these error messages are not throw by apktool,but throws by aapt when executes code: OS.exec(cmd.toArray(new String[0])); in package brut.androlib.res in it's AndroidLibResources.java file. So, I think the google has forgotten to handle these exceptions,because the words "if" and "do" are also the keywords of most popular programming language, and is there anybody has meet the same trouble with me? hope your(s) help.

Robert
  • 5,278
  • 43
  • 65
  • 115
yditxu
  • 61
  • 5

1 Answers1

0

This is a bug in aapt, which is why you see the error on that line in apktool. Basically symbols like do and if have special meaning. aapt should ignore that and treat them literally, but the validation is a bit too strong.

You may follow the AOSP Bug Report here.

Connor Tumbleson
  • 3,270
  • 2
  • 25
  • 37