question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ArrayIndexOutOfBoundsException (getUtf8)

See original GitHub issue

Information

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

Stacktrace/Logcat

I: Using Apktool 2.4.1 on ArriveCAN_ca.gc.cbsa.coronavirus.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\jared\AppData\Local\apktool\framework\1.apk
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Index 1741 out of bounds for length 1732
        at brut.androlib.res.decoder.StringBlock.getUtf8(StringBlock.java:317)
        at brut.androlib.res.decoder.StringBlock.getString(StringBlock.java:102)
        at brut.androlib.res.decoder.AXmlResourceParser.getName(AXmlResourceParser.java:176)
        at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getName(XmlPullParserDelegate.java:57)
        at brut.androlib.res.decoder.XmlPullStreamDecoder$1.event(XmlPullStreamDecoder.java:64)
        at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDecoder.java:142)
        at brut.androlib.res.decoder.XmlPullStreamDecoder.decodeManifest(XmlPullStreamDecoder.java:154)
        at brut.androlib.res.decoder.ResFileDecoder.decodeManifest(ResFileDecoder.java:162)
        at brut.androlib.res.AndrolibResources.decodeManifestWithResources(AndrolibResources.java:204)
        at brut.androlib.Androlib.decodeManifestWithResources(Androlib.java:134)
        at brut.androlib.ApkDecoder.decode(ApkDecoder.java:122)
        at brut.apktool.Main.cmdDecode(Main.java:170)
        at brut.apktool.Main.main(Main.java:76)

Steps to Reproduce

  1. apktool d path\to\ArriveCAN.apk

Frameworks

APK is frameworkless

APK

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

Questions to ask before submission

1. Have you tried apktool d, apktool b without changing anything?

Not relevant as apktool d is the issue

2. If you are trying to install a modified apk, did you resign it?

Not relevant

3. Are you using the latest apktool version?

Yes


Attempting to do some decompilation of this app to see how it does system modification detection.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
iBotPeachescommented, Sep 13, 2020

Sorry for the delay. Took some time off. This file is no longer available and it looks like a crash in our UTF-8 parser and that won’t be patchable without the example.

If you re-upload, just ping and I’ll try and triage quicker.

Sorry.

0reactions
MrIksocommented, Nov 30, 2020

Resources in this file obfuscated… it is not strange that an error occurs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

java - I use netbeans IDE and i'm getting ... - Stack Overflow
I use netbeans IDE and i'm getting ArrayIndexOutOfBoundsException when i use Integer.parseInt(args[0]). why? How to resolve this error?
Read more >
common/java/com/android/common/DNParser.java - Google Git
private char getUTF8() throws IOException {. int res = getByte(pos);. pos++; //FIXME tmp ... to avoid ArrayIndexOutOfBoundsException.
Read more >
Resolved Problems - Oracle Help Center
getUtf8 (ConstantPool.java:251) at weblogic.utils.classfile.expr. ... instances timeout with an ArrayIndexOutOfBoundsException on the 6.1 server instance.
Read more >
AssertJ - fluent assertions java library - GitHub Pages
isInstanceOf(ArrayIndexOutOfBoundsException.class) . ... File utf8File = Files.write(Paths.get("utf8.txt"), "é à".getBytes()).
Read more >
ArrayIndexOutOfBoundsException Error (Java Tutorial)
In this Java Tutorial, you'll learn about the Array Index Out Of Bounds Exception, what causes it, and how to resolve it.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found