google / google/smali

java.lang.ArrayIndexOutOfBoundsException when decompile apk

Open
#88 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
400
Forks
67
Avg merge
1d 2h
Merged PRs (30d)
1

Description

Hello, when using apktool 2.9.3, smali version 3.0.3, it works fine, but later smali version it has this error. This seem to be smali problem, please take a look when you have free time. Thank you!
APK link: https://pixeldrain.com/u/fhzaEige
Issue link in apktool: https://github.com/iBotPeaches/Apktool/issues/3767
> I: Using Apktool 2.11.0 on test.apk with 8 threads
I: Baksmaling classes.dex...
I: Baksmaling classes2.dex...
I: Copying raw assets/.wxxaawy.dex file...
I: Baksmaling classes3.dex...
I: Baksmaling classes4.dex...
I: Loading resource table...
I: Decoding file-resources...
I: Loading resource table from file: C:\Users\sss\AppData\Local\apktool\framework\1.apk
I: Decoding values */* XMLs...
I: Decoding AndroidManifest.xml with resources...
I: Regular manifest package...
Exception in thread "main" java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.ArrayIndexOutOfBoundsException: Index 10350680 out of bounds for length 129317
at brut.androlib.BackgroundWorker.waitForFinish(SourceFile:0)
at brut.androlib.ApkDecoder.decode(SourceFile:0)
at brut.apktool.Main.main(SourceFile:0)
Caused by: java.util.concurrent.ExecutionException: java.lang.ArrayIndexOutOfBoundsException: Index 10350680 out of bounds for length 129317
at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
... 3 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 10350680 out of bounds for length 129317
at com.android.tools.smali.dexlib2.dexbacked.DexBuffer.readSmallUint(SourceFile)
at com.android.tools.smali.dexlib2.dexbacked.DexBackedDexFile.getMapItemForSection(SourceFile:0)
at com.android.tools.smali.dexlib2.dexbacked.DexBackedDexFile.(SourceFile)
at com.android.tools.smali.dexlib2.dexbacked.ZipDexContainer.getEntries(SourceFile:0)
at com.android.tools.smali.dexlib2.dexbacked.ZipDexContainer.getDexEntryNames(SourceFile)
at brut.androlib.ApkDecoder.decodeSourcesSmaliJob(SourceFile:0)
at brut.androlib.ApkDecoder.lambda$decodeSourcesSmali$0(SourceFile)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1570)

An error has occured.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.