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
parsing APK crashes if targetSdkVersion is set to a string value #1032
Comments
Hmm, makes me think about #1026 too. Seems like on both cases, androguard should do what the Android OS does when parsing these. That might mean just ignoring |
Hi @eighthave, Android internally makes the conversion as defined here. |
I don't think Build.java is where this parsing behavior is defined, or at least I can't see anything related there. Looks like here is the parsing:
And the crazy thing is that it looks like the parser there supports using a string there! APK formats are always full of surprises. The documentation says this field is "an integer": |
Hi @eighthave, I was not clear enough thus the confusion. Indeed you are right, the developer documentation from Android states it as an integer, presumably because eventually it is converted to one. I can agree that the documentation can be improved. |
Right, I see what you mean, |
Describe what you wanted to do
Inspect these APKs:
https://github.com/googlesamples/android-testdpc/releases/download/6.0.0-preview/TestDPC_6000.apk
https://github.com/googlesamples/android-testdpc/releases/download/5.0.0-preview/TestDPC_5000.apk
https://github.com/googlesamples/android-testdpc/releases/download/v3.0.2/TestDPC_N_3002.apk
https://github.com/googlesamples/android-testdpc/releases/download/v3.0.3/TestDPC_N_3003.apk
https://github.com/googlesamples/android-testdpc/releases/download/5.0.1-preview/TestDPC_5001.apk
Describe what you expected
This should work:
Describe what actually happened
System Information
The text was updated successfully, but these errors were encountered: