From 15c4f333a5872b30b6df67a584d8aab9901b336f Mon Sep 17 00:00:00 2001 From: Connor Tumbleson Date: Wed, 24 May 2017 08:09:05 -0400 Subject: [PATCH] Correctly decode arrays.xml - #1453 - temporarily cast unknown enum (0) to ResArray --- .../java/brut/androlib/res/data/value/ResValueFactory.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResValueFactory.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResValueFactory.java index aa0741d1..875142b0 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResValueFactory.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResValueFactory.java @@ -90,7 +90,8 @@ public class ResValueFactory { if (key == ResAttr.BAG_KEY_ATTR_TYPE) { return ResAttr.factory(parentVal, items, this, mPackage); } - if (key == ResArrayValue.BAG_KEY_ARRAY_START) { + // Android O Preview added an unknown enum for ResTable_map. This is hardcoded as 0 for now. + if (key == ResArrayValue.BAG_KEY_ARRAY_START || key == 0) { return new ResArrayValue(parentVal, items); } if (key >= ResPluralsValue.BAG_KEY_PLURALS_START && key <= ResPluralsValue.BAG_KEY_PLURALS_END) {