Skip to content

Exception in thread "main" brut.androlib.AndrolibException: Could not decode arsc file #1131

Closed
@HOumoumen

Description

@HOumoumen
Hamids-MBP:apk Hamid$ ./apktool d roqya.apk
I: Using Apktool 2.0.0 on roqya.apk
I: Loading resource table...
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

Activity

iBotPeaches

iBotPeaches commented on Jan 14, 2016

@iBotPeaches
Owner

Looks like duplicate of #1121 , but I haven't got an APK for either.

wanam

wanam commented on Jan 14, 2016

@wanam

I'm getting the same issue on the new TW M builds with the latest apktool release and master branch:

I: Using Apktool 2.1.0-a64a03-SNAPSHOT on framework-res.apk
I: Loading resource table...
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:544)
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:67)
at brut.androlib.ApkDecoder.setTargetSdkVersion(ApkDecoder.java:198)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:96)
at brut.apktool.Main.cmdDecode(Main.java:165)
at brut.apktool.Main.main(Main.java:81)
Caused by: java.io.IOException: Expected: 0x00000008, got: 0x00000000
at brut.util.ExtDataInput.skipCheckShort(ExtDataInput.java:56)
at brut.androlib.res.decoder.ARSCDecoder.readValue(ARSCDecoder.java:282)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:224)
at brut.androlib.res.decoder.ARSCDecoder.readTableType(ARSCDecoder.java:212)
at brut.androlib.res.decoder.ARSCDecoder.readTableTypeSpec(ARSCDecoder.java:154)
at brut.androlib.res.decoder.ARSCDecoder.readTablePackage(ARSCDecoder.java:116)
at brut.androlib.res.decoder.ARSCDecoder.readTableHeader(ARSCDecoder.java:78)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:47)
... 8 more

Apk: https://www.dropbox.com/s/i80xi2uyjlfttji/framework-res.apk?dl=0

mythtrandyr

mythtrandyr commented on Jan 14, 2016

@mythtrandyr

@wanam
Use Apktool v2.0.0 for TW M framework-res & other file

wanam

wanam commented on Jan 15, 2016

@wanam

@mythtrandyr Nice catch, 2.0.0 is working fine.
@iBotPeaches Is this a regression?

iBotPeaches

iBotPeaches commented on Jan 15, 2016

@iBotPeaches
Owner

Confirmed.

iBotPeaches

iBotPeaches commented on Jan 22, 2016

@iBotPeaches
Owner

Yeah this is strange and regression. I thought the problem occurred during my massive changes in 2.0.3, but this is isolated to changes between 2.0.0 and 2.0.1. More importantly during the read of ConfigFlags.

Working on a fix.

omervk

omervk commented on Feb 21, 2016

@omervk

I have a similar issue. Would an additional APK sample help?

ShinySide

ShinySide commented on Mar 12, 2016

@ShinySide

@iBotPeaches Having the same issue with the Galaxy S7. I can install and decompile frameworks and secsettings with 2.0.0, other apks get the same error as above. If I switch to 2.0.3 or build form source, after installing frameworks, I receive a non stop entire apk of the following error (SecContacts was used in screenshot. Terminal wouldnt let me copy)

screenshot- https://drive.google.com/file/d/0B3FpYTXXDE_ARTlVYWtsM2o2R3M/view?usp=sharing

apks- https://drive.google.com/file/d/0B3FpYTXXDE_AbjF0NEpqNEQ2a1E/view?usp=sharing

24 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

      Participants

      @jerdog@hoshsadiq@iBotPeaches@wanam@omervk

      Issue actions

        Exception in thread "main" brut.androlib.AndrolibException: Could not decode arsc file · Issue #1131 · iBotPeaches/Apktool