brut.androlib.err.UndefinedResObject apktool反编译问题

from:http://blog.csdn.net/aeolus1019/article/details/8119786


我只删掉用户目录下的apktool下的apk文件就可以正常反编译了


原文:

错误代码~

[java]  view plain copy
  1. D:\DpAPK\apktool-1.5.0>apktool d dianping.apk dp  
  2. I: Baksmaling...  
  3. I: Loading resource table...  
  4. W: Skipping "android" package group  
  5. I: Loaded.  
  6. I: Decoding AndroidManifest.xml with resources...  
  7. I: Loading resource table from file: C:\Users\Administrator.AEOLUS-PC2\apktool\f  
  8. ramework\1.apk  
  9. I: Loaded.  
  10. I: Decoding file-resources...  
  11. W: Could not decode attr value, using undecoded value instead: ns=android, name=  
  12. splitMotionEvents, value=0xffffffff  
  13. W: Could not decode attr value, using undecoded value instead: ns=android, name=  
  14. splitMotionEvents, value=0xffffffff  
  15. W: Could not decode attr value, using undecoded value instead: ns=android, name=  
  16. splitMotionEvents, value=0xffffffff  
  17. W: Could not decode attr value, using undecoded value instead: ns=android, name=  
  18. splitMotionEvents, value=0xffffffff  
  19. W: Could not decode attr value, using undecoded value instead: ns=android, name=  
  20. splitMotionEvents, value=0xffffffff  
  21. W: Could not decode attr value, using undecoded value instead: ns=android, name=  
  22. splitMotionEvents, value=0xffffffff  
  23. W: Could not decode attr value, using undecoded value instead: ns=android, name=  
  24. splitMotionEvents, value=0xffffffff  
  25. W: Could not decode attr value, using undecoded value instead: ns=android, name=  
  26. alpha, value=0x42480000  
  27. W: Could not decode attr value, using undecoded value instead: ns=android, name=  
  28. splitMotionEvents, value=0xffffffff  
  29. W: Could not decode attr value, using undecoded value instead: ns=android, name=  
  30. splitMotionEvents, value=0xffffffff  
  31. W: Could not decode attr value, using undecoded value instead: ns=android, name=  
  32. splitMotionEvents, value=0xffffffff  
  33. W: Could not decode attr value, using undecoded value instead: ns=android, name=  
  34. splitMotionEvents, value=0xffffffff  
  35. W: Could not decode attr value, using undecoded value instead: ns=android, name=  
  36. splitMotionEvents, value=0xffffffff  
  37. W: Could not decode attr value, using undecoded value instead: ns=android, name=  
  38. showDividers, value=0x00000002  
  39. W: Could not decode attr value, using undecoded value instead: ns=android, name=  
  40. splitMotionEvents, value=0xffffffff  
  41. W: Could not decode attr value, using undecoded value instead: ns=android, name=  
  42. splitMotionEvents, value=0xffffffff  
  43. W: Could not decode attr value, using undecoded value instead: ns=android, name=  
  44. splitMotionEvents, value=0xffffffff  
  45. I: Decoding values */* XMLs...  
  46. Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec:  
  47. 0x010300dd  
  48.         at brut.androlib.res.data.ResPackage.getResSpec(ResPackage.java:61)  
  49.         at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:57)  
  50.         at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:53)  
  51.         at brut.androlib.res.data.value.ResReferenceValue.getReferent(ResReferen  
  52. ceValue.java:62)  
  53.         at brut.androlib.res.data.value.ResReferenceValue.encodeAsResXml(ResRefe  
  54. renceValue.java:46)  
  55.         at brut.androlib.res.data.value.ResScalarValue.encodeAsResXmlAttr(ResSca  
  56. larValue.java:44)  
  57.         at brut.androlib.res.data.value.ResStyleValue.serializeToResValuesXml(Re  
  58. sStyleValue.java:48)  
  59.         at brut.androlib.res.data.value.ResBagValue.serializeToResValuesXml(ResB  
  60. agValue.java:40)  
  61.         at brut.androlib.res.AndrolibResources.generateValuesFile(AndrolibResour  
  62. ces.java:339)  
  63.         at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:174  
  64. )  
  65.         at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:113)  
  66.         at brut.androlib.ApkDecoder.decode(ApkDecoder.java:99)  
  67.         at brut.apktool.Main.cmdDecode(Main.java:131)  
  68.         at brut.apktool.Main.main(Main.java:68)  



1. 删除文件下的框架文件 c:\Documents and Settings\%current user%\apktool\framework\*
2. 从手机里提取出 com.htc.resources.apk 
3. 在电脑上用apktool安装 com.htc.resources.apk  

4. 再反编译一次!ok!

5. 如果不行把framework-res.apk 也安装了试试

效果完成:

[java]  view plain copy
  1. D:\DpAPK\apktool-1.5.0>apktool d TestBIM.apk TB  
  2. I: Baksmaling...  
  3. I: Loading resource table...  
  4. I: Loaded.  
  5. I: Decoding AndroidManifest.xml with resources...  
  6. I: Loading resource table from file: C:\Users\Administrator.AEOLUS-PC2\apktool\f  
  7. ramework\1.apk  
  8. I: Loaded.  
  9. I: Decoding file-resources...  
  10. I: Decoding values */* XMLs...  
  11. I: Done.  
  12. I: Copying assets and libs...  
  13.   
  14. D:\DpAPK\apktool-1.5.0>apktool b TB  
  15. I: Checking whether sources has changed...  
  16. I: Smaling...  
  17. I: Checking whether resources has changed...  
  18. I: Building resources...  
  19. I: Building apk file...  


注:安装 com.htc.resources.apk 后

[java]  view plain copy
  1. D:\DpAPK\apktool-1.5.0>apktool if com.htc.resources.apk  
  2. W: Config flags size > 36. Exceeding bytes: 0x2000000.  
  3. W: Invalid config flags detected: dimen-hdpi-ERR0  
  4. W: Config flags size > 36. Exceeding bytes: 0x4000000.  
  5. W: Invalid config flags detected: dimen-hdpi-ERR1  
  6. W: Config flags size > 36. Exceeding bytes: 0x5000000.  
  7. W: Invalid config flags detected: dimen-hdpi-ERR2  
  8. W: Config flags size > 36. Exceeding bytes: 0x6000000.  
  9. W: Invalid config flags detected: dimen-hdpi-ERR3  
  10. W: Config flags size > 36. Exceeding bytes: 0x2000000.  
  11. W: Invalid config flags detected: dimen-ja-hdpi-ERR4  
  12. W: Config flags size > 36. Exceeding bytes: 0x4000000.  
  13. W: Invalid config flags detected: dimen-ja-hdpi-ERR5  
  14. W: Config flags size > 36. Exceeding bytes: 0x5000000.  
  15. W: Invalid config flags detected: dimen-ja-hdpi-ERR6  
  16. W: Config flags size > 36. Exceeding bytes: 0x2000000.  
  17. W: Invalid config flags detected: dimen-ko-hdpi-ERR7  
  18. W: Config flags size > 36. Exceeding bytes: 0x4000000.  
  19. W: Invalid config flags detected: dimen-ko-hdpi-ERR8  
  20. W: Config flags size > 36. Exceeding bytes: 0x5000000.  
  21. W: Invalid config flags detected: dimen-ko-hdpi-ERR9  
  22. W: Config flags size > 36. Exceeding bytes: 0x2000000.  
  23. W: Invalid config flags detected: dimen-zh-rCN-hdpi-ERR10  
  24. W: Config flags size > 36. Exceeding bytes: 0x4000000.  
  25. W: Invalid config flags detected: dimen-zh-rCN-hdpi-ERR11  
  26. W: Config flags size > 36. Exceeding bytes: 0x5000000.  
  27. W: Invalid config flags detected: dimen-zh-rCN-hdpi-ERR12  
  28. W: Config flags size > 36. Exceeding bytes: 0x2000000.  
  29. W: Invalid config flags detected: dimen-zh-rTW-hdpi-ERR13  
  30. W: Config flags size > 36. Exceeding bytes: 0x4000000.  
  31. W: Invalid config flags detected: dimen-zh-rTW-hdpi-ERR14  
  32. W: Config flags size > 36. Exceeding bytes: 0x5000000.  
  33. W: Invalid config flags detected: dimen-zh-rTW-hdpi-ERR15  
  34. W: Config flags size > 36. Exceeding bytes: 0x2000000.  
  35. W: Invalid config flags detected: integer-hdpi-ERR16  
  36. W: Config flags size > 36. Exceeding bytes: 0x4000000.  
  37. W: Invalid config flags detected: integer-hdpi-ERR17  
  38. W: Config flags size > 36. Exceeding bytes: 0x5000000.  
  39. W: Invalid config flags detected: integer-hdpi-ERR18  
  40. W: Config flags size > 36. Exceeding bytes: 0x6000000.  
  41. W: Invalid config flags detected: integer-hdpi-ERR19  
  42. I: Framework installed to: C:\Users\Administrator.AEOLUS-PC2\apktool\framework\2  
  43. .apk  

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值