fix: unmount script CONTENT_UMOUNT_SCRIPT

This commit is contained in:
oSumAtrIX 2022-05-07 05:41:34 +02:00 committed by GitHub
parent 167695f083
commit 3a2fa30676
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,7 +12,7 @@ internal object Constants {
internal const val COMMAND_RESTART = "monkey -p $PLACEHOLDER 1 && kill ${'$'}($COMMAND_PID_OF $PLACEHOLDER)"
// default mount file name
private const val NAME_MOUNT_SCRIPT = "mount_$PLACEHOLDER.sh"
private const val NAME_MOUNT_SCRIPT = "mount_revanced_$PLACEHOLDER.sh"
// initial directory to push files to via adb push
internal const val PATH_INIT_PUSH = "/sdcard/revanced.delete"
@ -41,7 +41,9 @@ internal object Constants {
internal val CONTENT_UMOUNT_SCRIPT =
"""
#!/system/bin/sh
while read line; do echo ${'$'}{line} | grep $PLACEHOLDER | awk '{print ${'$'}2}' | xargs umount -l; done< /proc/mounts
stock_path=${'$'}{ pm path $PLACEHOLDER | grep base | sed 's/package://g' }
umount -l $PLACEHOLDER; done< /proc/mounts
""".trimIndent()
// mount script
@ -54,4 +56,4 @@ internal object Constants {
stock_path=${'$'}{ pm path $PLACEHOLDER | grep base | sed 's/package://g' }
mount -o bind ${'$'}base_path ${'$'}stock_path
""".trimIndent()
}
}