Tutorial How to fix Apktool decompile error using MT Manager app (ARSCDecoder error)

AndnixSH

PMT Elite Modder
Staff member
Modding-Team
It's very rare that games can't decompile. Someone have discovered a game that can't decompile, so I gave it a try and I was greeted with this error:
Code:
Exception in thread "main" brut.androlib.AndrolibException: Invalid chunk type: expected=0x00000200, got=0x00000203

Image 1609349873.png


I'm using APK Easy Tool 1.58 with latest version of Apktool 2.5.0. I tested it with MyWellness app as an example

I looked up on Apktool Github repo and found a few related issues
Invalid chunk type · Issue #2099 · iBotPeaches/Apktool
APKTOOL D tiktok_app.apk Crashes · Issue #2469 · iBotPeaches/Apktool

It appears not only a game have this error, a lot of apps have same error too. I know what protection they are using but I will not mention here

So how to fix Invalid chunk type?
If you are not the developer, the best way to fix is to use MT manager app on your Android phone or on emulator

I will use an emulator with shared folder setup, so I can access my files on my HDD within emulator

Image 1610387809.png


Open the APK, and click VIEW

Image 1609349912.png


This will open APK as a ZIP file to see the APK structure.

Image 1610473796.png


Select file resource.arsc, it will ask which editor to open with. Select Arsc editor

Image 1609349923.png


Simply save it as it will rebuild the .arsc file and fix the errors.

Image 1609349930.png


Go back and update the APK with AUTO SIGN checked, if asked

Image 1609349937.png


Filename marked in green tells you, you have recently modified it

Image 1609350048.png


Image 1609350061.png


Apktool can now decompile almost perfectly with some errors

Image 1609350091.png


I went ahead and inject toast and compile it (I needed to fix another error on androidmanifest.xml first) compile, zipalign, sign and install APK. The app appear to be working fine but it had root detection, so I didn't test further

That's all for now

There is no guarantee that the app is fully working, there can be any bugs. Don't ask me how to fix it as there can be many many reasons why. You need to figure yourself or report an issue iBotPeaches/Apktool

Next, how to fix Apktool compile errors (Keep in mind not all errors can be fixed): How to fix apktool compiling errors - Platinmods.com - Android & iOS MODs, Mobile Games & Apps

-------------------------------------------------------------------------------

Facebook app also got another error related to ARSCDecoder

Code:
Exception in thread "main" brut.androlib.AndrolibException: unsupported res type name for bags. Found: style2

But it can't be fixed with this trick sadly

Open issue here: decompiling latest Facebook APK - unsupported res type name for bags. Found: style2 · Issue #1719 · iBotPeaches/Apktool
 
Last edited:
I tried what you did but still getting this error

 
Back
Top Bottom