Apktool: Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x01010462

Created on 17 Sep 2015  路  5Comments  路  Source: iBotPeaches/Apktool

Hi! I got UndefinedResObject while decoding apk.
Manifest and some resources (xml layouts, values, drawables) has been decoded successfully.

Version:

apktool: 
2.0.1

java:
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)

Decode log:

I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec:
0x01010462
        at brut.androlib.res.data.ResPackage.getResSpec(ResPackage.java:59)
        at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:65)
        at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:61)
        at brut.androlib.res.data.value.ResReferenceValue.getReferent(ResReferen
ceValue.java:57)
        at brut.androlib.res.data.value.ResStyleValue.serializeToResValuesXml(Re
sStyleValue.java:54)
        at brut.androlib.res.AndrolibResources.generateValuesFile(AndrolibResour
ces.java:496)
        at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:252
)
        at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:134)
        at brut.androlib.ApkDecoder.decode(ApkDecoder.java:104)
        at brut.apktool.Main.cmdDecode(Main.java:165)
        at brut.apktool.Main.main(Main.java:81)

Most helpful comment

I also met the problem and have solved it:

  1. remove the /Users/your user /Library/apktool/framework/1.apk
    2.get another framework-res.apk from your phone ,it in /system/framework
  2. install the framework-res.apk
apktool if framework-res.apk

All 5 comments

I also met the problem and have solved it:

  1. remove the /Users/your user /Library/apktool/framework/1.apk
    2.get another framework-res.apk from your phone ,it in /system/framework
  2. install the framework-res.apk
apktool if framework-res.apk

Same problem here. imesong's suggestion does rather sound like a workaround than a real solution.

Apktool has no knowledge of framework files. It does not track, have knowledge of, or anything to do with them. If they become out of date, deletion of the default framework and letting apktool recreate it is a valid solution. Upgrade notes when this is needed notes this.

imesong solution worked for me. had the same problem with Samsung galaxy S3
It would be helpful if the app provided slightly more meaningful report rather than an exception report. Exception is an indicator of a bug.

OH MY GOD锛孴hx

Was this page helpful?
0 / 5 - 0 ratings