diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/ARSCDecoder.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/ARSCDecoder.java index 90bc296c..371aedd5 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/ARSCDecoder.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/ARSCDecoder.java @@ -415,6 +415,12 @@ public class ARSCDecoder { resId = mIn.readInt(); resValue = readValue(); + // #2824 - In some applications the res entries are duplicated with the 2nd being malformed. + // AOSP skips this, so we will do the same. + if (resValue == null) { + continue; + } + if (!(resValue instanceof ResScalarValue)) { resValue = new ResStringValue(resValue.toString(), resValue.getRawIntValue()); }