反编译后无修改重新编译微信,结果 weixin600android501\res\values\public.xml:165: error: invalid symbol: 'do' ,有解决办法吗?

2014-12-05 23:14:45 +08:00
 gamexg
搜索到的结果是和关键字冲突了,但是没找到怎么解决。直接修改的话应用运行相关的会出错吧?,修改有办法解决吗?

brut.common.BrutException: could not exec command 错误

C:\Users\GameXG\Desktop\apktool-install-windows-r05-ibot>java -jar apktool.jar
b -f weixin600android501
I: Using Apktool 2.0.0-RC2 on weixin600android501
I: Smaling smali folder into classes.dex...
I: Building resources...
warning: string 'cf9' has no default translation.
C:\Users\GameXG\Desktop\apktool-install-windows-r05-ibot\weixin600android501\res
\values\public.xml:165: error: invalid symbol: 'do'

C:\Users\GameXG\Desktop\apktool-install-windows-r05-ibot\weixin600android501\res
\values\public.xml:389: error: invalid symbol: 'do'

C:\Users\GameXG\Desktop\apktool-install-windows-r05-ibot\weixin600android501\res
\values\public.xml:568: error: invalid symbol: 'if'

C:\Users\GameXG\Desktop\apktool-install-windows-r05-ibot\weixin600android501\res
\values\public.xml:3040: error: invalid symbol: 'do'

C:\Users\GameXG\Desktop\apktool-install-windows-r05-ibot\weixin600android501\res
\values\public.xml:3216: error: invalid symbol: 'if'

C:\Users\GameXG\Desktop\apktool-install-windows-r05-ibot\weixin600android501\res
\values\public.xml:4358: error: invalid symbol: 'do'

C:\Users\GameXG\Desktop\apktool-install-windows-r05-ibot\weixin600android501\res
\values\public.xml:4534: error: invalid symbol: 'if'

C:\Users\GameXG\Desktop\apktool-install-windows-r05-ibot\weixin600android501\res
\values\public.xml:7665: error: invalid symbol: 'do'

C:\Users\GameXG\Desktop\apktool-install-windows-r05-ibot\weixin600android501\res
\values\public.xml:7841: error: invalid symbol: 'if'

C:\Users\GameXG\Desktop\apktool-install-windows-r05-ibot\weixin600android501\res
\values\public.xml:8010: error: invalid symbol: 'do'

C:\Users\GameXG\Desktop\apktool-install-windows-r05-ibot\weixin600android501\res
\values\public.xml:8294: error: invalid symbol: 'do'

C:\Users\GameXG\Desktop\apktool-install-windows-r05-ibot\weixin600android501\res
\values\public.xml:8470: error: invalid symbol: 'if'

C:\Users\GameXG\Desktop\apktool-install-windows-r05-ibot\weixin600android501\res
\values\public.xml:12627: error: invalid symbol: 'do'

C:\Users\GameXG\Desktop\apktool-install-windows-r05-ibot\weixin600android501\res
\values\public.xml:12803: error: invalid symbol: 'if'

C:\Users\GameXG\Desktop\apktool-install-windows-r05-ibot\weixin600android501\res
\values\attrs.xml:193: error: invalid symbol: 'do'

C:\Users\GameXG\Desktop\apktool-install-windows-r05-ibot\weixin600android501\res
\values\drawables.xml:168: error: invalid symbol: 'do'

C:\Users\GameXG\Desktop\apktool-install-windows-r05-ibot\weixin600android501\res
\values\drawables.xml:347: error: invalid symbol: 'if'

C:\Users\GameXG\Desktop\apktool-install-windows-r05-ibot\weixin600android501\res
\values\layouts.xml:166: error: invalid symbol: 'do'

C:\Users\GameXG\Desktop\apktool-install-windows-r05-ibot\weixin600android501\res
\values\layouts.xml:342: error: invalid symbol: 'if'

C:\Users\GameXG\Desktop\apktool-install-windows-r05-ibot\weixin600android501\res
\values\ids.xml:118: error: invalid symbol: 'do'

C:\Users\GameXG\Desktop\apktool-install-windows-r05-ibot\weixin600android501\res
\values\ids.xml:294: error: invalid symbol: 'if'

C:\Users\GameXG\Desktop\apktool-install-windows-r05-ibot\weixin600android501\res
\values\colors.xml:165: error: invalid symbol: 'do'

C:\Users\GameXG\Desktop\apktool-install-windows-r05-ibot\weixin600android501\res
\values\colors.xml:341: error: invalid symbol: 'if'

C:\Users\GameXG\Desktop\apktool-install-windows-r05-ibot\weixin600android501\res
\values\dimens.xml:165: error: invalid symbol: 'do'

C:\Users\GameXG\Desktop\apktool-install-windows-r05-ibot\weixin600android501\res
\values\strings.xml:168: error: invalid symbol: 'do'

C:\Users\GameXG\Desktop\apktool-install-windows-r05-ibot\weixin600android501\res
\values\strings.xml:359: error: invalid symbol: 'if'

C:\Users\GameXG\Desktop\apktool-install-windows-r05-ibot\weixin600android501\res
\values\styles.xml:703: error: invalid symbol: 'do'

C:\Users\GameXG\Desktop\apktool-install-windows-r05-ibot\weixin600android501\res
\values\styles.xml:1842: error: invalid symbol: 'if'

Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.Androl
ibException: brut.common.BrutException: could not exec command: [C:\Users\GameXG
\AppData\Local\Temp\brut_util_Jar_2501467213721325062.tmp, p, --forced-package-i
d, 127, --min-sdk-version, 10, --target-sdk-version, 16, --version-code, 501, --
version-name, 6.0.0.58_r884092, -F, C:\Users\GameXG\AppData\Local\Temp\APKTOOL27
68381377960702050.tmp, -0, arsc, -I, C:\Users\GameXG\apktool\framework\1.apk, -S
, C:\Users\GameXG\Desktop\apktool-install-windows-r05-ibot\weixin600android501\r
es, -M, C:\Users\GameXG\Desktop\apktool-install-windows-r05-ibot\weixin600androi
d501\AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:449)
at brut.androlib.Androlib.buildResources(Androlib.java:383)
at brut.androlib.Androlib.build(Androlib.java:286)
at brut.androlib.Androlib.build(Androlib.java:258)
at brut.apktool.Main.cmdBuild(Main.java:240)
at brut.apktool.Main.main(Main.java:89)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not
exec command: [C:\Users\GameXG\AppData\Local\Temp\brut_util_Jar_250146721372132
5062.tmp, p, --forced-package-id, 127, --min-sdk-version, 10, --target-sdk-versi
on, 16, --version-code, 501, --version-name, 6.0.0.58_r884092, -F, C:\Users\Game
XG\AppData\Local\Temp\APKTOOL2768381377960702050.tmp, -0, arsc, -I, C:\Users\Gam
eXG\apktool\framework\1.apk, -S, C:\Users\GameXG\Desktop\apktool-install-windows
-r05-ibot\weixin600android501\res, -M, C:\Users\GameXG\Desktop\apktool-install-w
indows-r05-ibot\weixin600android501\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:487)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:434)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [C:\Users\GameXG\A
ppData\Local\Temp\brut_util_Jar_2501467213721325062.tmp, p, --forced-package-id,
127, --min-sdk-version, 10, --target-sdk-version, 16, --version-code, 501, --ve
rsion-name, 6.0.0.58_r884092, -F, C:\Users\GameXG\AppData\Local\Temp\APKTOOL2768
381377960702050.tmp, -0, arsc, -I, C:\Users\GameXG\apktool\framework\1.apk, -S,
C:\Users\GameXG\Desktop\apktool-install-windows-r05-ibot\weixin600android501\res
, -M, C:\Users\GameXG\Desktop\apktool-install-windows-r05-ibot\weixin600android5
01\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:481)
... 6 more

C:\Users\GameXG\Desktop\apktool-install-windows-r05-ibot>
8048 次点击
所在节点    程序员
9 条回复
cst4you
2014-12-05 23:18:57 +08:00
微信这么复杂的基本编不回去的,二进制修改dex倒有可能,但是微信客户端好像有验证,so…
gamexg
2014-12-05 23:41:02 +08:00
试试呗。

这一步用改名的办法解决了,但是又出现新的问题了。
wallace
2014-12-15 16:31:32 +08:00
亲,怎么解决的?能教教我吗?搞了五天了,没一点进展,我qq652687233,期待亲联系
wallace
2014-12-15 17:03:03 +08:00
亲,能告诉一下吗?泪奔。。
gamexg
2014-12-15 17:53:57 +08:00
@wallace 我也没搞定微信,重新编译后连微信图标都没了,运行直接出错退出...

error: invalid symbol: 'do' 这个错误
批量替换 res 目录下的所有xml文件,把 "do" 替换成 "d_o" (带引号)即可解决。
wallace
2014-12-16 10:30:06 +08:00
改过之后还是无法回编译。。。泪奔
lemontv
2015-02-06 17:27:51 +08:00
5.0版本的可以,6.0的不知道 @gamexg 解决没有?
gamexg
2015-02-07 12:50:35 +08:00
@lemontv 没有...
imesong
2016-08-18 15:15:44 +08:00
5.3 以下版本都可以, 5.3 以上版本由于微信对资源文件做了压缩,回编译时会报错

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/151859

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX