rovellipaolo / NinjaDroid

Ninja Reverse Engineering on Android APK packages
GNU General Public License v3.0
273 stars 49 forks source link

Update apktools #5

Closed fdellwing closed 5 years ago

fdellwing commented 5 years ago

Getting error

Exception in thread "main" brut.androlib.AndrolibException: Could not decode arsc file
        at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:56)
        at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:491)
        at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:74)
        at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:66)
        at brut.androlib.Androlib.getResTable(Androlib.java:50)
        at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:189)
        at brut.androlib.ApkDecoder.decode(ApkDecoder.java:114)
        at brut.apktool.Main.cmdDecode(Main.java:146)
        at brut.apktool.Main.main(Main.java:77)
Caused by: java.io.IOException: Expected: 0x001c0001, got: 0x00000000
        at brut.util.ExtDataInput.skipCheckInt(ExtDataInput.java:48)
        at brut.androlib.res.decoder.StringBlock.read(StringBlock.java:44)
        at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:102)
        at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:83)
        at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:49)
        ... 8 more

Updating APKtools to 2.4.0 solved the problem.

rovellipaolo commented 5 years ago

Updated apktools to latest version: https://github.com/rovellipaolo/NinjaDroid/commit/46c153ff21e78d8e99c9f8fcadee6913e507ea63

Next time feel free to do a pull request yourself with the change. ;) You can download the latest apktool from here: https://ibotpeaches.github.io/Apktool/ Just ensure tests are passing before submitting it:

$ python -m unittest -v tests.test