From 372470c77b82e8601ca523e87a2cfd44f79d0e31 Mon Sep 17 00:00:00 2001 From: Nguyen Hoang The Vi <84650617+HuskyDG@users.noreply.github.com> Date: Thu, 1 Sep 2022 07:40:20 +0700 Subject: [PATCH] fix: mount bind revanced.apk from magisk's mirror Some banking apps detect the mountpoint of youtube base apk to determine device is rooted. So mount bind from magisk's mirror to trigger magisk unmount and let it hidden along with magisk hiding. --- src/main/kotlin/app/revanced/utils/adb/Constants.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/app/revanced/utils/adb/Constants.kt b/src/main/kotlin/app/revanced/utils/adb/Constants.kt index 80adb5d..32e3331 100644 --- a/src/main/kotlin/app/revanced/utils/adb/Constants.kt +++ b/src/main/kotlin/app/revanced/utils/adb/Constants.kt @@ -44,12 +44,14 @@ internal object Constants { internal val CONTENT_MOUNT_SCRIPT = """ #!/system/bin/sh + MAGISKTMP="${'$'}(magisk --path)" || MAGISKTMP=/sbin + MIRROR="${'$'}MAGISKTMP/.magisk/mirror" while [ "${'$'}(getprop sys.boot_completed | tr -d '\r')" != "1" ]; do sleep 1; done base_path="$PATH_REVANCED_APP" stock_path=${'$'}( pm path $PLACEHOLDER | grep base | sed 's/package://g' ) chcon u:object_r:apk_data_file:s0 ${'$'}base_path - mount -o bind ${'$'}base_path ${'$'}stock_path + mount -o bind ${'$'}MIRROR${'$'}base_path ${'$'}stock_path """.trimIndent() }