kuter007 / android-apktool

Automatically exported from code.google.com/p/android-apktool
Other
0 stars 0 forks source link

Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x010303ba #586

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.try to decompile an APK file "contacts.apk" using the following command: java 
-jar apktool_2.0.0b8.jar d contacts.apk

What is the expected output? What do you see instead?
C:\A-tools\apktool>java -jar apktool2.0.0b8.jar d contacts.apk
I: Using Apktool 2.0.0-Beta8 on contacts.apk
I: Loading resource table...
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Documents and 
Settings\mecusdisp\apktool\framework\1.apk
I: Regular manifest package...
I: Decoding file-resources...
Cleaning up unclosed ZipFile for archive C:\Documents and 
Settings\mecusdisp\apktool\framework\1.apk
I: Decoding values */* XMLs...
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 
0x010303ba
        at brut.androlib.res.data.ResPackage.getResSpec(ResPackage.java:58)
        at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:57)
        at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:53)
        at brut.androlib.res.data.value.ResReferenceValue.getReferent(ResReferenceValue.java:60)
        at brut.androlib.res.data.value.ResReferenceValue.encodeAsResXml(ResReferenceValue.java:47)
        at brut.androlib.res.data.value.ResScalarValue.encodeAsResXmlAttr(ResScalarValue.java:45)
        at brut.androlib.res.data.value.ResStyleValue.serializeToResValuesXml(ResStyleValue.java:49)
        at brut.androlib.res.AndrolibResources.generateValuesFile(AndrolibResources.java:552)
        at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:307)
        at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:116)
        at brut.androlib.ApkDecoder.decode(ApkDecoder.java:115)
        at brut.apktool.Main.cmdDecode(Main.java:169)
        at brut.apktool.Main.main(Main.java:85)

What version of the product are you using? On what operating system?
Apktool 2.0.0-Beta8? Win XP

Please provide any additional information below.
ZTE Z5 mini, 4.2.2

Original issue reported on code.google.com by Diam.Dm...@gmail.com on 8 Jan 2014 at 11:27

Attachments:

GoogleCodeExporter commented 9 years ago
        resource 0x7f0f004b com.android.contacts:style/ContactsSettingsSeparator: <bag>
          Parent=0x010303ba, Count=3
          #0 (Key=0x01010098): (reference) 0x7f08003b
          #1 (Key=0x010100af): (color) #00000011
          #2 (Key=0x010100d4): (reference) 0x7f0201d4
        resource 0x7f0f004c com.android.contacts:style/ContactsSettingsSeparatorLight: <bag>
          Parent=0x010303ba, Count=3
          #0 (Key=0x01010098): (reference) 0x0106000b
          #1 (Key=0x010100af): (color) #00000011
          #2 (Key=0x010100d4): (reference) 0x7f0200f5

These are the two styles that have 0x010303ba as a parent. Notice the package 
id of those is 0x01, while the apk resources are 0x7F. (0x7F = private 
resources, specific for that apk).

This APK is dependent on that parent resource, which is package id 1. That 
corresponds to the framework at $HOME/apktool/framework/1.apk (assuming you 
didn't use tags)

Seeing how I used a stock API 19 framework, and I didn't have the resource. 
This APK must come from a separate ROM or something that has a non-default 
framework. The error could be more helpful, but that resource is not in stock 
API 19 framework or in this apk. So you are missing a FrameworkFile.

Original comment by connor.tumbleson on 9 Jan 2014 at 2:02