mirror of
https://github.com/revanced/Apktool.git
synced 2025-05-03 15:24:26 +02:00
AndrolibResources.aaptPackage(): added possibility to package framework resources.
This commit is contained in:
parent
79a1b564e7
commit
5a6e684f80
@ -213,7 +213,8 @@ public class Androlib {
|
||||
mAndRes.aaptPackage(
|
||||
apkFile,
|
||||
new File(appDir, "AndroidManifest.xml"),
|
||||
new File(appDir, "res"), ninePatch, null, false
|
||||
new File(appDir, "res"), ninePatch, null, false,
|
||||
false
|
||||
);
|
||||
|
||||
new ExtFile(apkFile).getDirectory()
|
||||
@ -261,7 +262,7 @@ public class Androlib {
|
||||
assetDir = null;
|
||||
}
|
||||
mAndRes.aaptPackage(outApk, null, null,
|
||||
new File(appDir, APK_DIRNAME), assetDir, false);
|
||||
new File(appDir, APK_DIRNAME), assetDir, false, false);
|
||||
}
|
||||
|
||||
private boolean isModified(File working, File stored) {
|
||||
|
@ -80,13 +80,8 @@ final public class AndrolibResources {
|
||||
}
|
||||
}
|
||||
|
||||
public void aaptPackage(File apkFile, File manifest, File resDir)
|
||||
throws AndrolibException {
|
||||
aaptPackage(apkFile, manifest, resDir, null, null, false);
|
||||
}
|
||||
|
||||
public void aaptPackage(File apkFile, File manifest, File resDir,
|
||||
File rawDir, File assetDir, boolean update)
|
||||
File rawDir, File assetDir, boolean update, boolean framework)
|
||||
throws AndrolibException {
|
||||
String[] cmd = new String[13];
|
||||
int i = 0;
|
||||
@ -97,8 +92,14 @@ final public class AndrolibResources {
|
||||
}
|
||||
cmd[i++] = "-F";
|
||||
cmd[i++] = apkFile.getAbsolutePath();
|
||||
cmd[i++] = "-I";
|
||||
cmd[i++] = getAndroidResourcesFile().getAbsolutePath();
|
||||
|
||||
if (framework) {
|
||||
cmd[i++] = "-x";
|
||||
} else {
|
||||
cmd[i++] = "-I";
|
||||
cmd[i++] = getAndroidResourcesFile().getAbsolutePath();
|
||||
}
|
||||
|
||||
if (manifest != null) {
|
||||
cmd[i++] = "-M";
|
||||
cmd[i++] = manifest.getAbsolutePath();
|
||||
|
Loading…
x
Reference in New Issue
Block a user