broo2s / brut.apktool

A tool for reverse engineering Android apk files
http://code.google.com/p/android-apktool/
353 stars 118 forks source link

Cannot decode M Preview 2 resources.arsc #31

Open trevd opened 9 years ago

trevd commented 9 years ago

Figured I'll report this.

Tried TeleService and framework-res from the Nexus 9 ( volantis ) M Preview 2 both produce the same results ... Output below. Looks like the format has changed a little

java -Xmx256M -jar /android/bin/apktool.jar -v -d d -f TeleService.apk
Jul 10, 2015 12:36:46 PM brut.androlib.ApkDecoder decode
INFO: Using Apktool 2.0.0 on TeleService.apk
Jul 10, 2015 12:36:46 PM brut.androlib.res.AndrolibResources loadMainPkg
INFO: Loading resource table...
Jul 10, 2015 12:36:46 PM brut.androlib.res.decoder.ARSCDecoder readConfigFlags
FINE: Config flags size > 48, but exceeding bytes are all zero, so it should be ok.
Exception in thread "main" brut.androlib.AndrolibException: Could not decode arsc file
    at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:52)
    at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:538)
    at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:63)
    at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:55)
    at brut.androlib.Androlib.getResTable(Androlib.java:64)
    at brut.androlib.ApkDecoder.setTargetSdkVersion(ApkDecoder.java:209)
    at brut.androlib.ApkDecoder.decode(ApkDecoder.java:92)
    at brut.apktool.Main.cmdDecode(Main.java:165)
    at brut.apktool.Main.main(Main.java:81)
Caused by: java.io.IOException: Expected: 0x00000008, got: 0x00000001
    at brut.util.ExtDataInput.skipCheckShort(ExtDataInput.java:56)
    at brut.androlib.res.decoder.ARSCDecoder.readValue(ARSCDecoder.java:238)
    at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:201)
    at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:189)
    at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:157)
    at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:114)
    at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:78)
    at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:47)
    ... 8 more