mirror of
https://github.com/revanced/Apktool.git
synced 2025-05-01 06:34:25 +02:00
Added HTC resources from Desire rom.
This commit is contained in:
parent
9503976b59
commit
e520d13d6b
BIN
src/brut/androlib/com.htc.resources.apk
Normal file
BIN
src/brut/androlib/com.htc.resources.apk
Normal file
Binary file not shown.
@ -44,6 +44,9 @@ final public class AndrolibResources {
|
|||||||
if (! resTable.hasPackage(1)) {
|
if (! resTable.hasPackage(1)) {
|
||||||
decodeArsc(resTable, new ExtFile(getAndroidResourcesFile()), false);
|
decodeArsc(resTable, new ExtFile(getAndroidResourcesFile()), false);
|
||||||
}
|
}
|
||||||
|
if (! resTable.hasPackage(2)) {
|
||||||
|
decodeArsc(resTable, new ExtFile(getHtcResourcesFile()), false);
|
||||||
|
}
|
||||||
return resTable;
|
return resTable;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -87,7 +90,7 @@ final public class AndrolibResources {
|
|||||||
public void aaptPackage(File apkFile, File manifest, File resDir,
|
public void aaptPackage(File apkFile, File manifest, File resDir,
|
||||||
File rawDir, File assetDir, boolean update, boolean framework)
|
File rawDir, File assetDir, boolean update, boolean framework)
|
||||||
throws AndrolibException {
|
throws AndrolibException {
|
||||||
String[] cmd = new String[14];
|
String[] cmd = new String[16];
|
||||||
int i = 0;
|
int i = 0;
|
||||||
cmd[i++] = "aapt";
|
cmd[i++] = "aapt";
|
||||||
cmd[i++] = "p";
|
cmd[i++] = "p";
|
||||||
@ -103,6 +106,8 @@ final public class AndrolibResources {
|
|||||||
} else {
|
} else {
|
||||||
cmd[i++] = "-I";
|
cmd[i++] = "-I";
|
||||||
cmd[i++] = getAndroidResourcesFile().getAbsolutePath();
|
cmd[i++] = getAndroidResourcesFile().getAbsolutePath();
|
||||||
|
cmd[i++] = "-I";
|
||||||
|
cmd[i++] = getHtcResourcesFile().getAbsolutePath();
|
||||||
}
|
}
|
||||||
cmd[i++] = "-S";
|
cmd[i++] = "-S";
|
||||||
cmd[i++] = resDir.getAbsolutePath();
|
cmd[i++] = resDir.getAbsolutePath();
|
||||||
@ -308,6 +313,15 @@ final public class AndrolibResources {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private File getHtcResourcesFile() throws AndrolibException {
|
||||||
|
try {
|
||||||
|
return Jar.getResourceAsFile(
|
||||||
|
"/brut/androlib/com.htc.resources.apk");
|
||||||
|
} catch (BrutException ex) {
|
||||||
|
throw new AndrolibException(ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static String escapeForResXml(String value) {
|
public static String escapeForResXml(String value) {
|
||||||
if (value.isEmpty()) {
|
if (value.isEmpty()) {
|
||||||
return value;
|
return value;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user