diff --git a/app/src/main/java/com/drdisagree/iconify/utils/compiler/MonetCompiler.java b/app/src/main/java/com/drdisagree/iconify/utils/compiler/MonetCompiler.java index 654b2cbfe..9f7fd3f71 100644 --- a/app/src/main/java/com/drdisagree/iconify/utils/compiler/MonetCompiler.java +++ b/app/src/main/java/com/drdisagree/iconify/utils/compiler/MonetCompiler.java @@ -2,8 +2,10 @@ import static com.drdisagree.iconify.utils.helpers.Logger.writeLog; +import android.os.Build; import android.util.Log; +import com.drdisagree.iconify.BuildConfig; import com.drdisagree.iconify.common.Const; import com.drdisagree.iconify.common.Resources; import com.drdisagree.iconify.utils.FileUtil; @@ -14,6 +16,8 @@ import com.topjohnwu.superuser.Shell; import java.io.IOException; +import java.util.ArrayList; +import java.util.List; public class MonetCompiler { @@ -125,7 +129,15 @@ private static void postExecute(boolean hasErroredOut) { } private static boolean createManifest(String pkgName, String source) { - Shell.Result result = Shell.cmd("printf '\\n\\n\\t\\n\\t\\n' > " + source + "/AndroidManifest.xml;").exec(); + List module = new ArrayList<>(); + module.add("printf '"); + module.add(""); + module.add("\\t"); + module.add("\\t"); + module.add("\\t"); + module.add("' > " + source + "/AndroidManifest.xml;"); + + Shell.Result result = Shell.cmd(String.join("\\n", module)).exec(); if (result.isSuccess()) Log.i(TAG + " - Manifest", "Successfully created manifest for " + pkgName); diff --git a/app/src/main/java/com/drdisagree/iconify/utils/compiler/OnBoardingCompiler.java b/app/src/main/java/com/drdisagree/iconify/utils/compiler/OnBoardingCompiler.java index f70577a48..e91d21847 100644 --- a/app/src/main/java/com/drdisagree/iconify/utils/compiler/OnBoardingCompiler.java +++ b/app/src/main/java/com/drdisagree/iconify/utils/compiler/OnBoardingCompiler.java @@ -6,8 +6,10 @@ import static com.drdisagree.iconify.utils.apksigner.CryptoUtils.readPrivateKey; import static com.drdisagree.iconify.utils.helpers.Logger.writeLog; +import android.os.Build; import android.util.Log; +import com.drdisagree.iconify.BuildConfig; import com.drdisagree.iconify.Iconify; import com.drdisagree.iconify.common.Resources; import com.drdisagree.iconify.utils.apksigner.JarMap; @@ -19,6 +21,8 @@ import java.nio.file.Paths; import java.security.PrivateKey; import java.security.cert.X509Certificate; +import java.util.ArrayList; +import java.util.List; import java.util.Objects; public class OnBoardingCompiler { @@ -32,7 +36,15 @@ public static boolean createManifest(String name, String target, String source) int attempt = 3; while (attempt-- != 0) { - result = Shell.cmd("printf '\\n\\n\\t\\n\\t\\n' > " + source + "/AndroidManifest.xml;").exec(); + List module = new ArrayList<>(); + module.add("printf '"); + module.add(""); + module.add("\\t"); + module.add("\\t"); + module.add("\\t"); + module.add("' > " + source + "/AndroidManifest.xml;"); + + result = Shell.cmd(String.join("\\n", module)).exec(); if (result.isSuccess()) { Log.i(TAG + " - Manifest", "Successfully created manifest for " + name); diff --git a/app/src/main/java/com/drdisagree/iconify/utils/compiler/OnDemandCompiler.java b/app/src/main/java/com/drdisagree/iconify/utils/compiler/OnDemandCompiler.java index e56b36c11..17c4c756a 100644 --- a/app/src/main/java/com/drdisagree/iconify/utils/compiler/OnDemandCompiler.java +++ b/app/src/main/java/com/drdisagree/iconify/utils/compiler/OnDemandCompiler.java @@ -2,8 +2,10 @@ import static com.drdisagree.iconify.utils.helpers.Logger.writeLog; +import android.os.Build; import android.util.Log; +import com.drdisagree.iconify.BuildConfig; import com.drdisagree.iconify.common.Resources; import com.drdisagree.iconify.utils.FileUtil; import com.drdisagree.iconify.utils.OverlayUtil; @@ -13,6 +15,8 @@ import com.topjohnwu.superuser.Shell; import java.io.IOException; +import java.util.ArrayList; +import java.util.List; public class OnDemandCompiler { @@ -128,7 +132,15 @@ private static void moveOverlaysToCache() { } private static boolean createManifest(String overlayName, String source) { - Shell.Result result = Shell.cmd("printf '\\n\\n\\t\\n\\t\\n' > " + source + "/AndroidManifest.xml;").exec(); + List module = new ArrayList<>(); + module.add("printf '"); + module.add(""); + module.add("\\t"); + module.add("\\t"); + module.add("\\t"); + module.add("' > " + source + "/AndroidManifest.xml;"); + + Shell.Result result = Shell.cmd(String.join("\\n", module)).exec(); if (result.isSuccess()) Log.i(TAG + " - Manifest", "Successfully created manifest for " + overlayName); diff --git a/app/src/main/java/com/drdisagree/iconify/utils/compiler/QsMarginCompiler.java b/app/src/main/java/com/drdisagree/iconify/utils/compiler/QsMarginCompiler.java index dc3235a36..f6ac93eaa 100644 --- a/app/src/main/java/com/drdisagree/iconify/utils/compiler/QsMarginCompiler.java +++ b/app/src/main/java/com/drdisagree/iconify/utils/compiler/QsMarginCompiler.java @@ -4,8 +4,10 @@ import static com.drdisagree.iconify.common.Const.SYSTEMUI_PACKAGE; import static com.drdisagree.iconify.utils.helpers.Logger.writeLog; +import android.os.Build; import android.util.Log; +import com.drdisagree.iconify.BuildConfig; import com.drdisagree.iconify.common.Resources; import com.drdisagree.iconify.utils.FileUtil; import com.drdisagree.iconify.utils.OverlayUtil; @@ -15,6 +17,8 @@ import com.topjohnwu.superuser.Shell; import java.io.IOException; +import java.util.ArrayList; +import java.util.List; public class QsMarginCompiler { @@ -145,7 +149,15 @@ private static void postExecute(boolean hasErroredOut) { } private static boolean createManifest(String pkgName, String source, String target) { - Shell.Result result = Shell.cmd("printf '\\n\\n\\t\\n\\t\\n' > " + source + "/AndroidManifest.xml;").exec(); + List module = new ArrayList<>(); + module.add("printf '"); + module.add(""); + module.add("\\t"); + module.add("\\t"); + module.add("\\t"); + module.add("' > " + source + "/AndroidManifest.xml;"); + + Shell.Result result = Shell.cmd(String.join("\\n", module)).exec(); if (result.isSuccess()) Log.i(TAG + " - Manifest", "Successfully created manifest for " + pkgName); diff --git a/app/src/main/java/com/drdisagree/iconify/utils/compiler/QsTileHeightCompiler.java b/app/src/main/java/com/drdisagree/iconify/utils/compiler/QsTileHeightCompiler.java index dbf4cfcc8..96a7041ef 100644 --- a/app/src/main/java/com/drdisagree/iconify/utils/compiler/QsTileHeightCompiler.java +++ b/app/src/main/java/com/drdisagree/iconify/utils/compiler/QsTileHeightCompiler.java @@ -2,8 +2,10 @@ import static com.drdisagree.iconify.utils.helpers.Logger.writeLog; +import android.os.Build; import android.util.Log; +import com.drdisagree.iconify.BuildConfig; import com.drdisagree.iconify.common.Const; import com.drdisagree.iconify.common.Resources; import com.drdisagree.iconify.utils.FileUtil; @@ -14,6 +16,8 @@ import com.topjohnwu.superuser.Shell; import java.io.IOException; +import java.util.ArrayList; +import java.util.List; public class QsTileHeightCompiler { @@ -125,7 +129,15 @@ private static void postExecute(boolean hasErroredOut) { } private static boolean createManifest(String pkgName, String source) { - Shell.Result result = Shell.cmd("printf '\\n\\n\\t\\n\\t\\n' > " + source + "/AndroidManifest.xml;").exec(); + List module = new ArrayList<>(); + module.add("printf '"); + module.add(""); + module.add("\\t"); + module.add("\\t"); + module.add("\\t"); + module.add("' > " + source + "/AndroidManifest.xml;"); + + Shell.Result result = Shell.cmd(String.join("\\n", module)).exec(); if (result.isSuccess()) Log.i(TAG + " - Manifest", "Successfully created manifest for " + pkgName); diff --git a/app/src/main/java/com/drdisagree/iconify/utils/compiler/RoundnessCompiler.java b/app/src/main/java/com/drdisagree/iconify/utils/compiler/RoundnessCompiler.java index 618400b8d..686ffbfc7 100644 --- a/app/src/main/java/com/drdisagree/iconify/utils/compiler/RoundnessCompiler.java +++ b/app/src/main/java/com/drdisagree/iconify/utils/compiler/RoundnessCompiler.java @@ -4,8 +4,10 @@ import static com.drdisagree.iconify.common.Const.SYSTEMUI_PACKAGE; import static com.drdisagree.iconify.utils.helpers.Logger.writeLog; +import android.os.Build; import android.util.Log; +import com.drdisagree.iconify.BuildConfig; import com.drdisagree.iconify.common.Resources; import com.drdisagree.iconify.utils.FileUtil; import com.drdisagree.iconify.utils.OverlayUtil; @@ -15,6 +17,8 @@ import com.topjohnwu.superuser.Shell; import java.io.IOException; +import java.util.ArrayList; +import java.util.List; public class RoundnessCompiler { @@ -145,7 +149,15 @@ private static void postExecute(boolean hasErroredOut) { } private static boolean createManifest(String pkgName, String source, String target) { - Shell.Result result = Shell.cmd("printf '\\n\\n\\t\\n\\t\\n' > " + source + "/AndroidManifest.xml;").exec(); + List module = new ArrayList<>(); + module.add("printf '"); + module.add(""); + module.add("\\t"); + module.add("\\t"); + module.add("\\t"); + module.add("' > " + source + "/AndroidManifest.xml;"); + + Shell.Result result = Shell.cmd(String.join("\\n", module)).exec(); if (result.isSuccess()) Log.i(TAG + " - Manifest", "Successfully created manifest for " + pkgName); diff --git a/app/src/main/java/com/drdisagree/iconify/utils/compiler/SettingsIconsCompiler.java b/app/src/main/java/com/drdisagree/iconify/utils/compiler/SettingsIconsCompiler.java index 33db7f4c9..6380369c0 100644 --- a/app/src/main/java/com/drdisagree/iconify/utils/compiler/SettingsIconsCompiler.java +++ b/app/src/main/java/com/drdisagree/iconify/utils/compiler/SettingsIconsCompiler.java @@ -2,8 +2,10 @@ import static com.drdisagree.iconify.utils.helpers.Logger.writeLog; +import android.os.Build; import android.util.Log; +import com.drdisagree.iconify.BuildConfig; import com.drdisagree.iconify.common.Resources; import com.drdisagree.iconify.utils.FileUtil; import com.drdisagree.iconify.utils.OverlayUtil; @@ -13,6 +15,8 @@ import com.topjohnwu.superuser.Shell; import java.io.IOException; +import java.util.ArrayList; +import java.util.List; import java.util.Objects; public class SettingsIconsCompiler { @@ -171,7 +175,15 @@ private static void moveOverlaysToCache() { } private static boolean createManifest(String overlayName, String pkgName, String source) { - Shell.Result result = Shell.cmd("printf '\\n\\n\\t\\n\\t\\n' > " + source + "/AndroidManifest.xml;").exec(); + List module = new ArrayList<>(); + module.add("printf '"); + module.add(""); + module.add("\\t"); + module.add("\\t"); + module.add("\\t"); + module.add("' > " + source + "/AndroidManifest.xml;"); + + Shell.Result result = Shell.cmd(String.join("\\n", module)).exec(); if (result.isSuccess()) Log.i(TAG + " - Manifest", "Successfully created manifest for " + pkgName); diff --git a/app/src/main/java/com/drdisagree/iconify/utils/compiler/SwitchCompiler.java b/app/src/main/java/com/drdisagree/iconify/utils/compiler/SwitchCompiler.java index 576db359b..7d9f1463c 100644 --- a/app/src/main/java/com/drdisagree/iconify/utils/compiler/SwitchCompiler.java +++ b/app/src/main/java/com/drdisagree/iconify/utils/compiler/SwitchCompiler.java @@ -2,8 +2,10 @@ import static com.drdisagree.iconify.utils.helpers.Logger.writeLog; +import android.os.Build; import android.util.Log; +import com.drdisagree.iconify.BuildConfig; import com.drdisagree.iconify.common.Resources; import com.drdisagree.iconify.utils.FileUtil; import com.drdisagree.iconify.utils.OverlayUtil; @@ -13,6 +15,8 @@ import com.topjohnwu.superuser.Shell; import java.io.IOException; +import java.util.ArrayList; +import java.util.List; public class SwitchCompiler { @@ -148,7 +152,15 @@ private static void moveOverlaysToCache() { } private static boolean createManifest(String overlayName, String mPackage, String source) { - Shell.Result result = Shell.cmd("printf '\\n\\n\\t\\n\\t\\n' > " + source + "/AndroidManifest.xml;").exec(); + List module = new ArrayList<>(); + module.add("printf '"); + module.add(""); + module.add("\\t"); + module.add("\\t"); + module.add("\\t"); + module.add("' > " + source + "/AndroidManifest.xml;"); + + Shell.Result result = Shell.cmd(String.join("\\n", module)).exec(); if (result.isSuccess()) Log.i(TAG + " - Manifest", "Successfully created manifest for " + overlayName); diff --git a/app/src/main/java/com/drdisagree/iconify/utils/compiler/VolumeCompiler.java b/app/src/main/java/com/drdisagree/iconify/utils/compiler/VolumeCompiler.java index 6e0ef1512..b2f9a7d75 100644 --- a/app/src/main/java/com/drdisagree/iconify/utils/compiler/VolumeCompiler.java +++ b/app/src/main/java/com/drdisagree/iconify/utils/compiler/VolumeCompiler.java @@ -3,8 +3,10 @@ import static com.drdisagree.iconify.common.Dynamic.ZIP; import static com.drdisagree.iconify.utils.helpers.Logger.writeLog; +import android.os.Build; import android.util.Log; +import com.drdisagree.iconify.BuildConfig; import com.drdisagree.iconify.common.Resources; import com.drdisagree.iconify.utils.AppUtil; import com.drdisagree.iconify.utils.FileUtil; @@ -17,6 +19,8 @@ import java.io.File; import java.io.IOException; +import java.util.ArrayList; +import java.util.List; import java.util.Objects; public class VolumeCompiler { @@ -123,7 +127,15 @@ private static void postExecute(boolean hasErroredOut) throws Exception { } private static boolean createManifest(String pkgName, String target, String source) { - Shell.Result result = Shell.cmd("printf '\\n\\n\\t\\n\\t\\n' > " + source + "/AndroidManifest.xml;").exec(); + List module = new ArrayList<>(); + module.add("printf '"); + module.add(""); + module.add("\\t"); + module.add("\\t"); + module.add("\\t"); + module.add("' > " + source + "/AndroidManifest.xml;"); + + Shell.Result result = Shell.cmd(String.join("\\n", module)).exec(); if (result.isSuccess()) Log.i(TAG + " - Manifest", "Successfully created manifest for " + pkgName);