lots of changes to handling of ARSCDecoder. Needs support to handle something that I don't know yet. Something todo with ResSpecs of dual packages.

This commit is contained in:
Connor Tumbleson 2012-08-28 21:26:56 -05:00
parent ebb2f6d623
commit 2509e402e7
6 changed files with 14 additions and 8 deletions

View File

@ -215,7 +215,7 @@ public class Main {
"Copyright 2010 Ryszard Wiśniewski <brut.alll@gmail.com>\n" +
"with smali v" + ApktoolProperties.get("smaliVersion") +
", and baksmali v" + ApktoolProperties.get("baksmaliVersion") + "\n" +
"Updated by iBotPeaches (@iBotPeaches) and yyj \n" +
"Updated by iBotPeaches (@iBotPeaches)\n" +
"Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)\n" +
"\n" +
"Usage: apktool [-q|--quiet OR -v|--verbose] COMMAND [...]\n" +

View File

@ -200,6 +200,7 @@ final public class AndrolibResources {
cmd.add("aapt");
cmd.add("p");
cmd.add("-v"); //mega debug mode.@todo REMOVE ON FINAL
if (update) {
cmd.add("-u");
}

View File

@ -266,11 +266,16 @@ public class ARSCDecoder {
short screenWidthDp = 0;
short screenHeightDp = 0;
if (size >= 36) {
screenWidthDp = mIn.readShort();
screenHeightDp = mIn.readShort();
}
if (size >= 40) {
mIn.skipBytes(2);
}
int exceedingSize = size - KNOWN_CONFIG_BYTES;
if (exceedingSize > 0) {
byte[] buf = new byte[exceedingSize];

View File

@ -118,7 +118,7 @@ public class BuildAndDecodeTest {
@Test
public void qualifiersTest() throws BrutException {
compareValuesFiles("values-mcc004-mnc4-en-rUS-sw100dp-w200dp-h300dp" +
"-xlarge-long-land-night-xhdpi-finger-keyssoft-12key" +
"-xlarge-long-land-desk-night-xhdpi-finger-keyssoft-12key" +
"-navhidden-dpad/strings.xml");
}

View File

@ -1,4 +1,4 @@
version: 1.4.7
version: 1.5.0
apkFileName: testapp.apk
isFrameworkApk: false
usesFramework: