From c921964938bfe05761f0a7573dee3bc59053707b Mon Sep 17 00:00:00 2001 From: canyie Date: Sun, 30 Jan 2022 19:29:09 +0800 Subject: [PATCH] Make sure busybox can be executed recursively Busybox will execute itself. On some older Samsung devices, when it is located in /data, it will not have rights to execute other programs including itself. We should also relocate busybox in this case to workaround Samsung bullshit. See topjohnwu/ndk-busybox@bdc8655 Fix the "app doesn't detect installed Magisk" issue in topjohnwu#4174 --- app/src/main/java/com/topjohnwu/magisk/core/utils/ShellInit.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/topjohnwu/magisk/core/utils/ShellInit.kt b/app/src/main/java/com/topjohnwu/magisk/core/utils/ShellInit.kt index c138d8ded..866875e80 100644 --- a/app/src/main/java/com/topjohnwu/magisk/core/utils/ShellInit.kt +++ b/app/src/main/java/com/topjohnwu/magisk/core/utils/ShellInit.kt @@ -42,7 +42,7 @@ class ShellInit : Shell.Initializer() { if (shell.isRoot) { add("export MAGISKTMP=\$(magisk --path)/.magisk") // Test if we can properly execute stuff in /data - Info.noDataExec = !shell.newJob().add("$localBB true").exec().isSuccess + Info.noDataExec = !shell.newJob().add("$localBB sh -c \"$localBB true\"").exec().isSuccess } if (Info.noDataExec) {