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] java.lang.ArrayIndexOutOfBoundsException at decode #5

Open
bigConifer opened this issue Jan 24, 2022 · 1 comment
Open

[Bug] java.lang.ArrayIndexOutOfBoundsException at decode #5

bigConifer opened this issue Jan 24, 2022 · 1 comment

Comments

@bigConifer
Copy link

For some AndroidManifest.xml files decoding fails and java.lang.ArrayIndexOutOfBoundsException is thrown.

java.lang.ArrayIndexOutOfBoundsException: 2325
        at android.content.res.StringBlock.getShort(StringBlock.java:231)
        at android.content.res.StringBlock.getString(StringBlock.java:91)
        at android.content.res.AXmlResourceParser.getNamespaceUri(AXmlResourceParser.java:186)
        at com.bigzhao.xml2axml.test.AXMLPrinter.decode(AXMLPrinter.java:84)
        at com.bigzhao.xml2axml.test.AXMLPrinter.main(AXMLPrinter.java:47)
        at com.bigzhao.xml2axml.test.Main.decode(Main.java:37)
        at com.bigzhao.xml2axml.test.Main.main(Main.java:21)

To reproduce try to decode the following binary AndroidManifest.xml files extracted from old mozilla fennec nightly build APKs.

java -jar xml2axml d AndroidManifest---2018-07-25--10-30-32.xml.txt AndroidManifest-readable.xml

AndroidManifest---2018-07-25--10-30-32.xml.txt
AndroidManifest---2018-07-26--10-03-40.xml.txt

The the first Manifest fails but the second one works.

@bigConifer
Copy link
Author

It is a long known bug in AXMLPrinter2 which is the decoding part of xml2axml:
https://code.google.com/archive/p/android4me/issues/11

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

No branches or pull requests

1 participant