mirror of
https://github.com/revanced/Apktool.git
synced 2025-06-13 13:27:37 +02:00
MNC, noticed recently in API 23, is no longer 0 padded. So mnc001 is now mnc1
- Frameworks between froyo and honeycomb have mnc001, etc - A size check of ResConfig header for less than 32 (honeycomb) uses old decode method - Greater than 32 bytes moves to new decode method of mnc# vs mnc###
This commit is contained in:
@ -177,14 +177,14 @@ public class BuildAndDecodeTest {
|
||||
|
||||
@Test
|
||||
public void qualifiersTest() throws BrutException {
|
||||
compareValuesFiles("values-mcc004-mnc04-en-rUS-ldrtl-sw100dp-w200dp-h300dp"
|
||||
compareValuesFiles("values-mcc004-mnc4-en-rUS-ldrtl-sw100dp-w200dp-h300dp"
|
||||
+ "-xlarge-long-round-land-desk-night-xhdpi-finger-keyssoft-12key"
|
||||
+ "-navhidden-dpad/strings.xml");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shortendedMncTest() throws BrutException {
|
||||
compareValuesFiles("values-mcc001-mnc01/strings.xml");
|
||||
compareValuesFiles("values-mcc001-mnc1/strings.xml");
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -192,6 +192,16 @@ public class BuildAndDecodeTest {
|
||||
compareValuesFiles("values-mnc1/strings.xml");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shortMncv2Test() throws BrutException {
|
||||
compareValuesFiles("values-mcc238-mnc6/strings.xml");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void longMncTest() throws BrutException {
|
||||
compareValuesFiles("values-mcc238-mnc870/strings.xml");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void anyDpiTest() throws BrutException, IOException {
|
||||
compareValuesFiles("values-watch/strings.xml");
|
||||
|
@ -16,11 +16,13 @@
|
||||
|
||||
package brut.androlib;
|
||||
|
||||
import brut.androlib.res.AndrolibResources;
|
||||
import brut.common.BrutException;
|
||||
import brut.directory.*;
|
||||
import java.io.*;
|
||||
import java.net.URL;
|
||||
import java.net.URLDecoder;
|
||||
import java.nio.file.Files;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import org.custommonkey.xmlunit.ElementQualifier;
|
||||
|
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="test1">test1</string>
|
||||
</resources>
|
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="test1">test1</string>
|
||||
</resources>
|
Reference in New Issue
Block a user