diff --git a/app/src/full/AndroidManifest.xml b/app/src/full/AndroidManifest.xml index 8be908fa6..b33046493 100644 --- a/app/src/full/AndroidManifest.xml +++ b/app/src/full/AndroidManifest.xml @@ -21,7 +21,6 @@ android:exported="true" /> diff --git a/app/src/full/java/com/topjohnwu/magisk/asyncs/PatchAPK.java b/app/src/full/java/com/topjohnwu/magisk/asyncs/PatchAPK.java index 8d73e5e40..7a9b77288 100644 --- a/app/src/full/java/com/topjohnwu/magisk/asyncs/PatchAPK.java +++ b/app/src/full/java/com/topjohnwu/magisk/asyncs/PatchAPK.java @@ -20,6 +20,7 @@ import com.topjohnwu.utils.SignAPK; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.CharBuffer; +import java.nio.IntBuffer; import java.security.SecureRandom; import java.util.jar.JarEntry; @@ -80,6 +81,18 @@ public class PatchAPK { return true; } + private static boolean findAndPatch(byte xml[], int a, int b) { + IntBuffer buf = ByteBuffer.wrap(xml).order(ByteOrder.LITTLE_ENDIAN).asIntBuffer(); + int len = xml.length / 4; + for (int i = 0; i < len; ++i) { + if (buf.get(i) == a) { + buf.put(i, b); + return true; + } + } + return false; + } + private static boolean patchAndHide() { MagiskManager mm = Data.MM(); @@ -115,7 +128,8 @@ public class PatchAPK { byte xml[] = apk.getRawData(je); if (!findAndPatch(xml, from, to) || - !findAndPatch(xml, from + ".provider", to + ".provider")) + !findAndPatch(xml, from + ".provider", to + ".provider") || + !findAndPatch(xml, R.string.app_name, R.string.re_app_name)) return false; // Write in changes diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index c679db4a6..b6dcf8062 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -13,7 +13,7 @@ android:allowBackup="false" android:directBootAware="true" android:icon="@drawable/ic_launcher" - android:label="@string/re_app_name" + android:label="@string/app_name" android:supportsRtl="true" tools:ignore="GoogleAppIndexingWarning,UnusedAttribute"> diff --git a/app/src/stub/AndroidManifest.xml b/app/src/stub/AndroidManifest.xml index 4da855f68..a82546250 100644 --- a/app/src/stub/AndroidManifest.xml +++ b/app/src/stub/AndroidManifest.xml @@ -6,7 +6,6 @@