diff --git a/brut.apktool/apktool-lib/src/main/java/android/util/TypedValue.java b/brut.apktool/apktool-lib/src/main/java/android/util/TypedValue.java
index 2587b0e3..8dc3922d 100644
--- a/brut.apktool/apktool-lib/src/main/java/android/util/TypedValue.java
+++ b/brut.apktool/apktool-lib/src/main/java/android/util/TypedValue.java
@@ -56,6 +56,11 @@ public class TypedValue {
* resolved before it can be used like TYPE_REFERENCE
*/
public static final int TYPE_DYNAMIC_REFERENCE = 0x07;
+ /**
+ * The data an attribute resource identifier, which needs to be resolved
+ * before it can be used like a TYPE_ATTRIBUTE.
+ */
+ public static final int TYPE_DYNAMIC_ATTRIBUTE = 0x08;
/**
* Identifies the start of plain integer values. Any type value from this to
* {@link #TYPE_LAST_INT} means the data field holds a generic
diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/Androlib.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/Androlib.java
index d2f3ff39..6d08fe74 100644
--- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/Androlib.java
+++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/Androlib.java
@@ -752,6 +752,6 @@ public class Androlib {
// Taken from AOSP's frameworks/base/tools/aapt/Package.cpp
private final static Pattern NO_COMPRESS_PATTERN = Pattern.compile("\\.(" +
"jpg|jpeg|png|gif|wav|mp2|mp3|ogg|aac|mpg|mpeg|mid|midi|smf|jet|rtttl|imy|xmf|mp4|" +
- "m4a|m4v|3gp|3gpp|3g2|3gpp2|amr|awb|wma|wmv)$");
+ "m4a|m4v|3gp|3gpp|3g2|3gpp2|amr|awb|wma|wmv|webm|mkv)$");
}
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 031f5a47..4b14209e 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
@@ -55,6 +55,7 @@ public class ResValueFactory {
case TypedValue.TYPE_INT_BOOLEAN:
return new ResBoolValue(value != 0, value, rawValue);
case TypedValue.TYPE_DYNAMIC_REFERENCE:
+ case TypedValue.TYPE_DYNAMIC_ATTRIBUTE:
return newReference(value, rawValue);
}
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 abcb8eaa..bcba1b2e 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
@@ -375,6 +375,11 @@ public class ARSCDecoder {
read = 52;
}
+ if (size >= 56) {
+ mIn.skipBytes(4);
+ read = 56;
+ }
+
int exceedingSize = size - KNOWN_CONFIG_BYTES;
if (exceedingSize > 0) {
byte[] buf = new byte[exceedingSize];
@@ -550,7 +555,7 @@ public class ARSCDecoder {
}
private static final Logger LOGGER = Logger.getLogger(ARSCDecoder.class.getName());
- private static final int KNOWN_CONFIG_BYTES = 52;
+ private static final int KNOWN_CONFIG_BYTES = 56;
public static class ARSCData {
diff --git a/brut.apktool/apktool-lib/src/main/resources/prebuilt/aapt/linux/aapt b/brut.apktool/apktool-lib/src/main/resources/prebuilt/aapt/linux/aapt
index 149d149a..c45a583c 100755
Binary files a/brut.apktool/apktool-lib/src/main/resources/prebuilt/aapt/linux/aapt and b/brut.apktool/apktool-lib/src/main/resources/prebuilt/aapt/linux/aapt differ
diff --git a/brut.apktool/apktool-lib/src/main/resources/prebuilt/aapt/macosx/aapt b/brut.apktool/apktool-lib/src/main/resources/prebuilt/aapt/macosx/aapt
index cc0064ba..a8133333 100644
Binary files a/brut.apktool/apktool-lib/src/main/resources/prebuilt/aapt/macosx/aapt and b/brut.apktool/apktool-lib/src/main/resources/prebuilt/aapt/macosx/aapt differ
diff --git a/brut.apktool/apktool-lib/src/main/resources/prebuilt/aapt/windows/aapt.exe b/brut.apktool/apktool-lib/src/main/resources/prebuilt/aapt/windows/aapt.exe
index 64f277ca..597541c1 100755
Binary files a/brut.apktool/apktool-lib/src/main/resources/prebuilt/aapt/windows/aapt.exe and b/brut.apktool/apktool-lib/src/main/resources/prebuilt/aapt/windows/aapt.exe differ
diff --git a/brut.apktool/apktool-lib/src/test/resources/brut/apktool/testapp/res/values/integers.xml b/brut.apktool/apktool-lib/src/test/resources/brut/apktool/testapp/res/values/integers.xml
index b20ba7cb..856a6da8 100644
--- a/brut.apktool/apktool-lib/src/test/resources/brut/apktool/testapp/res/values/integers.xml
+++ b/brut.apktool/apktool-lib/src/test/resources/brut/apktool/testapp/res/values/integers.xml
@@ -4,4 +4,6 @@
0
1
0
+ 700
+ @integer/issue_1223_1