V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
gamexg
V2EX  ›  程序员

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

  •  
  •   gamexg · 2014-12-05 23:14:45 +08:00 · 8040 次点击
    这是一个创建于 3633 天前的主题,其中的信息可能已经有所发展或是发生改变。
    搜索到的结果是和关键字冲突了,但是没找到怎么解决。直接修改的话应用运行相关的会出错吧?,修改有办法解决吗?

    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>
    9 条回复    2016-08-18 15:15:44 +08:00
    cst4you
        1
    cst4you  
       2014-12-05 23:18:57 +08:00 via Android
    微信这么复杂的基本编不回去的,二进制修改dex倒有可能,但是微信客户端好像有验证,so…
    gamexg
        2
    gamexg  
    OP
       2014-12-05 23:41:02 +08:00
    试试呗。

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

    error: invalid symbol: 'do' 这个错误
    批量替换 res 目录下的所有xml文件,把 "do" 替换成 "d_o" (带引号)即可解决。
    wallace
        6
    wallace  
       2014-12-16 10:30:06 +08:00
    改过之后还是无法回编译。。。泪奔
    lemontv
        7
    lemontv  
       2015-02-06 17:27:51 +08:00
    5.0版本的可以,6.0的不知道 @gamexg 解决没有?
    gamexg
        8
    gamexg  
    OP
       2015-02-07 12:50:35 +08:00
    @lemontv 没有...
    imesong
        9
    imesong  
       2016-08-18 15:15:44 +08:00
    5.3 以下版本都可以, 5.3 以上版本由于微信对资源文件做了压缩,回编译时会报错
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2895 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 14:38 · PVG 22:38 · LAX 06:38 · JFK 09:38
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.