Skip to content
This repository has been archived by the owner on Apr 15, 2024. It is now read-only.

Commit

Permalink
fix: unmount script CONTENT_UMOUNT_SCRIPT
Browse files Browse the repository at this point in the history
  • Loading branch information
oSumAtrIX authored May 7, 2022
1 parent 167695f commit 3a2fa30
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/main/kotlin/app/revanced/utils/adb/Constants.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand All @@ -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()
}
}

0 comments on commit 3a2fa30

Please sign in to comment.