-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[core] Bug: showing invalid resource names in some specific APK files #919
Comments
That is an interesting case. The attribute value is of type 7, but the The value "131072" is the resource-ID containing the String apktool however seem to be able to decode this manifest it resolves the label as |
How could it be? Is it possible to fix it? |
As wer are outside of the specification we cloud only implement some code based on the sample data we have. But this code is likely to fail with a different APK as the definition of the data and how the different values relate to each other is unclear. |
AFAIR types 7 and 8 are for TYPE_DYNAMIC_REFERENCE and TYPE_DYNAMIC_ATTRIBUTE, respectively. Those references can be resolved and then used as TYPE_REFERENCE and TYPE_ATTRIBUTE. JEB renders that portion as:
aapt2 generates a similar (unresolved) output:
|
But somehow the Android framework handles it fine. |
@jackwpa Thanks for the info that sounds very good. A little research showed up that the Roboelectric project has an implementation that mentions those types. The project is under MIT license so we can use it as source for info and code. apktool defines it here: https://github.com/iBotPeaches/Apktool/blob/3ee39c988ac82962b01aabb096a36c21d8d1f9da/brut.apktool/apktool-lib/src/main/java/android/util/TypedValue.java#L57 |
You can also get it from ClassyShark: This is its result: Maybe you could have a dependency to their code ? Could be better to depend on Google, no? Checking here:
|
Why close? Was it fixed already? |
@AndroidDeveloperLB Yes, I just merged PR #923 submitted by @jpstotz . |
Sadly I still don't know how to use it on Android. Can you please help me on this? I need to know the dependency that I will have to put into gradle file, and then I need to know how, given an InputStream, of the APK file (or the manifest if you wish), to get the result information: package-name, version-code, version-name, app-label, app-icon... |
Describe error
full name of method or class with error
full java stacktrace (no need to copy method fallback code (commented pseudocode))
I used the online version, so I don't know what causes it:
http://www.javadecompilers.com/result?currentfile=resources/AndroidManifest.xml
IMPORTANT! attach or provide link to apk file (double check apk version)
Attached here:
GoogleExtServices.zip
The bug is that I get these:
The label is invalid.
The text was updated successfully, but these errors were encountered: