AddSecurityExceptionAndroid icon indicating copy to clipboard operation
AddSecurityExceptionAndroid copied to clipboard

APKTool Decompile issue -

Open Tushar-Rastogi opened this issue 6 years ago • 8 comments

Facing below exception form apktool while running the script:

Exception in thread "main" brut.androlib.AndrolibException: Invalid chunk type: expected=0x00000200, got=0x00000203 at brut.androlib.res.decoder.ARSCDecoder.checkChunkType(ARSCDecoder.java:542) at brut.androlib.res.decoder.ARSCDecoder.readTablePackage(ARSCDecoder.java:88) at brut.androlib.res.decoder.ARSCDecoder.readTableHeader(ARSCDecoder.java:82) at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:48) at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:786) at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:67) at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:59) at brut.androlib.Androlib.getResTable(Androlib.java:66) at brut.androlib.ApkDecoder.setTargetSdkVersion(ApkDecoder.java:236) at brut.androlib.ApkDecoder.decode(ApkDecoder.java:118) at brut.apktool.Main.cmdDecode(Main.java:170) at brut.apktool.Main.main(Main.java:76)

P.S. This is an ongoing issue with APKTool!! We need to look for an alternative of APKTool as without that this Utility would be inefficient.

Tushar-Rastogi avatar May 20 '20 09:05 Tushar-Rastogi

Can you share the apk you are using and got this exception ? I would like to take a closer look

levyitay avatar May 20 '20 16:05 levyitay

I basically have .aab file from which I make universal apk using bundletool and I'm using that apk. Is this supposed to work that way?

Tushar-Rastogi avatar Jun 01 '20 08:06 Tushar-Rastogi

No it's not. You would need an apk. aab might contain 2 or more apks. So what you would need is the run the process manually on the main apk. Then manually sign them both with the same debug key

levyitay avatar Jun 01 '20 16:06 levyitay

Actually (as mentioned above) I'm not directly using .aab file but instead a universal apk file, refer this link. And I'm providing the same universal.apk file to this script, but it somehow doesn't work.

Tushar-Rastogi avatar Jun 02 '20 14:06 Tushar-Rastogi

Correct, If you look at the folder that the apk was extracted to under /tmp/ you will see that there are few apk files that need to be handled.

Bottom line I still need to write something to handle split apks.

levyitay avatar Jun 02 '20 16:06 levyitay

This is happening for example with this apk https://www.apkmirror.com/apk/google-inc/chrome/chrome-83-0-4103-106-release/google-chrome-fast-secure-83-0-4103-106-11-android-apk-download/ but indeed an APKTool issue.

gderaco avatar Jun 16 '20 14:06 gderaco

So this apk is packed in a different way indeed.. probably the reason why the apktool can't open it Any reason why you would want to do it with this apk? I think chrome traffic is open anyways

levyitay avatar Jun 16 '20 17:06 levyitay

Closing issue due to inactivity

levyitay avatar Aug 10 '20 15:08 levyitay