android apktool 反编失败,提示brut.androlib.err.UndefinedResObject: resource spec:
来源:互联网 发布:qq三国100js单刷过关 编辑:程序博客网 时间:2024/05/16 07:52
I: Using Apktool 2.0.0-RC2 on yangtao.apk
I: Loading resource table...
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\yiyuan.zhangyy\apktool\framework\1.apk
I: Regular manifest package...
I: Decoding file-resources...
W: Could not decode attr value, using undecoded value instead: ns=android, name=layout_toStartOf, value=0x7f0e0051
W: Could not decode attr value, using undecoded value instead: ns=android, name=layout_marginEnd, value=0x00000601
I: Decoding values */* XMLs...
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x010103b7
at brut.androlib.res.data.ResPackage.getResSpec(ResPackage.java:59)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:58)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:54)
at brut.androlib.res.decoder.ResAttrDecoder.decode(ResAttrDecoder.java:36)
at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(AXmlResourceParser.java:369)
at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeValue(XmlPullParserDelegate.java:69)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartTag(StaticXmlSerializerWrapper.java:267)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(StaticXmlSerializerWrapper.java:211)
at brut.androlib.res.decoder.XmlPullStreamDecoder$1.event(XmlPullStreamDecoder.java:83)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDecoder.java:141)
at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(ResStreamDecoderContainer.java:33)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:107)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:91)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:322)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:123)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:102)
at brut.apktool.Main.cmdDecode(Main.java:170)
at brut.apktool.Main.main(Main.java:86)
问题分析:
从提示能看出来 layout_toStartOf layout_marginEnd 这两个货找不到。
一看名字就能明白,这两个是android 4.4左右为了适配RTL(right to left)布局上线的新配置。
猜测应该是和android platform什么配置有关。
验证
在D:\Java\adt-bundle-windows-x86_64-20130219\sdk\platforms\android-20> 这层目录下
aapt d resources android.jar | find "0x010103b7"
spec resource 0x010103b7 android:attr/layout_toStartOf: flags=0x40000000
resource 0x010103b7 android:attr/layout_toStartOf: <bag> (PUBLIC)
可以明确 0x010103b7 这个就是对应 layout_toStartOf
配了一圈path无果。(p.s. PATH有先后顺序,最高是当前目录,然后是按PATH从前向后。)
比如aapt,会优先用当前目录下面的。
从最新的build_tools下面找个了最新的粘贴过去也不行。
D:\Java\adt-bundle-windows-x86_64-20130219\sdk\build-tools\21.1.0>aapt v
Android Asset Packaging Tool, v0.2-1552913
猜测和framework-res.apk有关。
找了个5.0的 if 失败。
换了个思路。
配置user.home,也就是让apktool找最新的platform
--- 直接修改 apktool.bat
@echo off
set PATH=%CD%;%PATH%;
java -jar -Duser.language=en -Duser.home=%ANDROID_HOME%/build-tools/21.1.0 "%~dp0\apktool.jar" %1 %2 %3 %4 %5 %6 %7 %8 %9
问题解决。
- android apktool 反编失败,提示brut.androlib.err.UndefinedResObject: resource spec:
- 用apktool反编译的时候出错:Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec:
- brut.androlib.err.UndefinedResObject apktool反编译问题
- Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x01030200
- exception in thread main brut.androlib.err.undefinedresobject resource spec : 0x01010462
- 反编译apk出现Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec错误
- brut.androlib.err.UndefinedResObject(完美解决)apktool反编译问题
- 使用apktool反编译,出现brut.androlib.err.UndefinedResObject
- Android反编译时报错Exception in thread "main" brut.androlib.err.UndefinedResObject
- Linux下使用apktool打包apk报brut.androlib.AndrolibException
- Android 回编译 brut.androlib.AndrolibException
- apktool反编译报错 brut.androlib.AndrolibException: Could not decode arsc file解决办法
- apktool反编译:Exception in thread "main" brut.androlib.AndrolibException: Could not decode arsc file
- android反编
- android 反编
- android 反编 apk
- Android 反编
- exception in thread "main" brut.androlib.AndrdolibException: Counld not decode arse file
- OpenGL 纹理过滤
- Java NIO--Charset
- Codeforces Round #281 (Div. 2) - B
- stringByAppendingString、---Format、---PathComponent、---PathExtension之间的区别
- 【C#】小总
- android apktool 反编失败,提示brut.androlib.err.UndefinedResObject: resource spec:
- C指针,C语言中的指针详解
- SVN一些常用命令
- od命令
- codeception 运行testcase 的方式
- dbcp基本配置和重连配置
- university-imageloader使用遇到的异常及解决方法
- Java NIO--Selector
- 数据库的种类有哪些?区别是?