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 c684b520..84e36377 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 @@ -319,9 +319,13 @@ public class ARSCDecoder { mPkg.addResSpec(spec); mType.addResSpec(spec); + if (mConfig == null) { + mConfig = mPkg.getOrCreateConfig(new ResConfigFlags()); + } + ResValue value = new ResBoolValue(false, null); - ResResource res = new ResResource( - mPkg.getOrCreateConfig(new ResConfigFlags()), spec, value); + ResResource res = new ResResource(mConfig, spec, value); + mPkg.addResource(res); mConfig.addResource(res); spec.addResource(res);