Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ArrayIndexOutOfBoundsException on a split APK #2430

Closed
cliffjao opened this issue Nov 19, 2020 · 3 comments
Closed

ArrayIndexOutOfBoundsException on a split APK #2430

cliffjao opened this issue Nov 19, 2020 · 3 comments

Comments

@cliffjao
Copy link

Information

  1. Apktool Version (apktool -version) - 2.4.1
  2. Operating System (Mac, Linux, Windows) - Mac
  3. APK From? (Playstore, ROM, Other) - Playstore

Using https://github.com/NickstaDB/patch-apk/ to patch the Line app (jp.naver.line), which is a split APK. Seeing the following exception.

Stacktrace/Logcat

[+] Extracting: /var/folders/53/m7z83rfd37xgpl84zxzhn2xmmfhzx0/T/tmpmespmrkk/jp.naver.line.android-split_chat_data.config.xxhdpi.apk
I: Using Apktool 2.4.1 on jp.naver.line.android-split_chat_data.config.xxhdpi.apk
I: Loading resource table...
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
	at brut.androlib.res.AndrolibResources.selectPkgWithMostResSpecs(AndrolibResources.java:114)
	at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:86)
	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)
Error: Failed to run 'apktool d /var/folders/53/m7z83rfd37xgpl84zxzhn2xmmfhzx0/T/tmpmespmrkk/jp.naver.line.android-split_chat_data.config.xxhdpi.apk -o /var/folders/53/m7z83rfd37xgpl84zxzhn2xmmfhzx0/T/tmpmespmrkk/jp.naver.line.android-split_chat_data.config.xxhdpi'.

Steps to Reproduce

./patch-apk.py --save-apk line.apk jp.naver.line --debug-output

Frameworks

N/A

APK

Download Line app from Google Play store

Questions to ask before submission

  1. Have you tried apktool d, apktool b without changing anything? No
  2. If you are trying to install a modified apk, did you resign it? N/A
  3. Are you using the latest apktool version? Yes
@iBotPeaches
Copy link
Owner

Do you have a merged application available? Not sure I have time now to run some apps and merge an application.

@AndnixSH
Copy link

You can just use apkcombo to download single APK. saves you lot of time :)

https://apkcombo.com/en-dk/line-free-calls-messages/jp.naver.line.android/download/apk

@iBotPeaches
Copy link
Owner

Closing into my split apk ticket to track all of these together.

#2283

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants