mirror of
https://github.com/revanced/Apktool.git
synced 2025-05-02 06:54:25 +02:00
only use --forced-package-id if prebuilt aapt is used
This commit is contained in:
parent
d8b774864c
commit
be77354859
@ -328,6 +328,7 @@ final public class AndrolibResources {
|
||||
HashMap<String, Boolean> flags, String aaptPath)
|
||||
throws AndrolibException {
|
||||
|
||||
boolean customAapt = false;
|
||||
List<String> cmd = new ArrayList<String>();
|
||||
|
||||
// path for aapt binary
|
||||
@ -336,6 +337,7 @@ final public class AndrolibResources {
|
||||
if (aaptFile.canRead() && aaptFile.exists()) {
|
||||
aaptFile.setExecutable(true);
|
||||
cmd.add(aaptFile.getPath());
|
||||
customAapt = true;
|
||||
|
||||
if (flags.get("verbose")) {
|
||||
LOGGER.info(aaptFile.getPath()
|
||||
@ -369,7 +371,10 @@ final public class AndrolibResources {
|
||||
if (flags.get("debug")) { // inject debuggable="true" into manifest
|
||||
cmd.add("--debug-mode");
|
||||
}
|
||||
if (mPackageId != null) {
|
||||
|
||||
// force package id so that some frameworks build with correct id
|
||||
// disable if user adds own aapt (can't know if they have this feature)
|
||||
if (mPackageId != null && customAapt == false) {
|
||||
cmd.add("--forced-package-id");
|
||||
cmd.add(mPackageId);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user