diff --git a/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt1/BuildAndDecodeTest.java b/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt1/BuildAndDecodeTest.java index de08096b..eb6c2cac 100644 --- a/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt1/BuildAndDecodeTest.java +++ b/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt1/BuildAndDecodeTest.java @@ -173,6 +173,13 @@ public class BuildAndDecodeTest extends BaseTest { assertEquals(0x8888, aaaa.length()); } + @Test + public void storedMp3FilesAreNotCompressedTest() throws BrutException { + ExtFile extFile = new ExtFile(sTmpDir, "testapp.apk"); + Integer built = extFile.getDirectory().getCompressionLevel("res/raw/rain.mp3"); + assertEquals(new Integer(0), built); + } + @Test public void crossTypeTest() throws BrutException { compareValuesFiles("values-mcc003/strings.xml"); diff --git a/brut.apktool/apktool-lib/src/test/resources/aapt1/testapp/apktool.yml b/brut.apktool/apktool-lib/src/test/resources/aapt1/testapp/apktool.yml index 26b96664..fa9a6379 100644 --- a/brut.apktool/apktool-lib/src/test/resources/aapt1/testapp/apktool.yml +++ b/brut.apktool/apktool-lib/src/test/resources/aapt1/testapp/apktool.yml @@ -10,6 +10,10 @@ versionInfo: versionCode: '1' versionName: '1.0' compressionType: false +doNotCompress: +- arsc +- png +- mp3 unknownFiles: hidden.file: '8' non\u007Fprintable.file: '8' diff --git a/brut.apktool/apktool-lib/src/test/resources/aapt1/testapp/res/raw/rain.mp3 b/brut.apktool/apktool-lib/src/test/resources/aapt1/testapp/res/raw/rain.mp3 new file mode 100644 index 00000000..86d631e2 Binary files /dev/null and b/brut.apktool/apktool-lib/src/test/resources/aapt1/testapp/res/raw/rain.mp3 differ