File tree 1 file changed +8
-4
lines changed
src/main/kotlin/app/revanced/library/adb
1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -29,13 +29,17 @@ internal object Constants {
29
29
internal val MOUNT_SCRIPT =
30
30
"""
31
31
#!/system/bin/sh
32
- MAGISKTMP="$( magisk --path )" || MAGISKTMP=/sbin
33
- MIRROR="${' $' } MAGISKTMP/.magisk/mirror"
32
+
33
+ # Use Magisk mirror, if possible.
34
+ if command -v magisk &> /dev/null; then
35
+ MIRROR="${' $' } (magisk --path)/.magisk/mirror"
36
+ fi
34
37
38
+ # Wait for the system to boot.
35
39
until [ "$( getprop sys.boot_completed )" = 1 ]; do sleep 3; done
36
40
until [ -d "/sdcard/Android" ]; do sleep 1; done
37
41
38
- # Unmount any existing mount as a safety measure
42
+ # Unmount any existing mount as a safety measure.
39
43
$UMOUNT
40
44
41
45
base_path="$PATCHED_APK_PATH "
@@ -44,7 +48,7 @@ internal object Constants {
44
48
chcon u:object_r:apk_data_file:s0 ${' $' } base_path
45
49
mount -o bind ${' $' } MIRROR${' $' } base_path ${' $' } stock_path
46
50
47
- # Kill the app to force it to restart the mounted APK in case it's already running
51
+ # Kill the app to force it to restart the mounted APK in case it's currently running.
48
52
$KILL
49
53
""" .trimIndent()
50
54
}
You can’t perform that action at this time.
0 commit comments