-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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] NullPointerException in serializeToResValuesXml #3416
Comments
Thanks - I'll spend a bit on investigating why the type is acting odd before I just take a shortcut and patch an NPE. |
So I peeked a few areas that I believe I need to investigate further. Apktool/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResValueFactory.java Lines 35 to 40 in 63b1976
Apktool/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResScalarValue.java Line 71 in 63b1976
Apktool/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResScalarValue.java Lines 75 to 94 in 63b1976
|
Taking a rework of the first code snippet I posted. PR is up. |
Reviving issue #2709 as I stumbled upon it with an updated app I was trying to decompile.
The sample APK provided at the bottom of the issue is sufficient to demonstrate the issue.
Using aapt2 dump resources you can see a problematic
color
resource with an unexpected@null
value:From debugging how Apktool categorizes the value type, it's detected as a
string
type rather than areference
. I have no idea how this happens to begin with, but we should at least allow this to be decompiled, even as an<item>
with a@null
reference (aapt2 allows to recompile that).The text was updated successfully, but these errors were encountered: