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

bug in decompile some apks in version 2.3.1 that we can decompile in 2.2.0 #1735

Closed
mohamadk opened this issue Feb 25, 2018 · 2 comments
Closed
Labels

Comments

@mohamadk
Copy link

Information

  1. Apktool Version (v2.3.1 ) -
  2. Operating System ( Windows) -
  3. APK From? (Other) -

Stacktrace/Logcat

Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 1544
        at java.lang.String.substring(Unknown Source)
        at brut.androlib.res.decoder.StringBlock.getHTML(StringBlock.java:171)
        at brut.androlib.res.decoder.ARSCDecoder.readValue(ARSCDecoder.java:341)
        at brut.androlib.res.decoder.ARSCDecoder.readEntryData(ARSCDecoder.java:257)
        at brut.androlib.res.decoder.ARSCDecoder.readTableType(ARSCDecoder.java:233)
        at brut.androlib.res.decoder.ARSCDecoder.readTableTypeSpec(ARSCDecoder.java:156)
        at brut.androlib.res.decoder.ARSCDecoder.readTablePackage(ARSCDecoder.java:118)
        at brut.androlib.res.decoder.ARSCDecoder.readTableHeader(ARSCDecoder.java:80)
        at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:47)
        at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:599)
        at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:73)
        at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:65)
        at brut.androlib.Androlib.getResTable(Androlib.java:68)
        at brut.androlib.ApkDecoder.setTargetSdkVersion(ApkDecoder.java:228)
        at brut.androlib.ApkDecoder.decode(ApkDecoder.java:118)
        at brut.apktool.Main.cmdDecode(Main.java:163)
        at brut.apktool.Main.main(Main.java:72)

Steps to Reproduce

  1. apktool d app_version.apk

APK

https://drive.google.com/file/d/1KNneUcSmQ2oJ9D03WmgityO5LdA4YHPl/view?usp=sharing

Bug in version 2.3.1

  1. Have you tried apktool d, apktool b without changing anything? yes
    .2. If you are trying to install a modified apk, did you resign it? I just want to decompile manifest. so I don't need to.
  2. Are you using the latest apktool version? yes

If you decompile this apk with version 2.3.1 you get an error but if you use version 2.2.0 you don't get any error.

@iBotPeaches
Copy link
Owner

Confirmed. v2.2.0 is nearly 2 years old now, but thanks for the information. Regression that far can no longer just be reverted so a new patch will have to be made.

@iBotPeaches
Copy link
Owner

Merging this into #2244

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

No branches or pull requests

2 participants