Copy busybox instead of bind mounting

This commit is contained in:
topjohnwu 2019-03-22 01:52:13 -04:00
parent 2a40cb60a9
commit ea55532e33

View File

@ -422,8 +422,7 @@ static bool magisk_env() {
if (access(DATABIN "/busybox", X_OK) == -1) if (access(DATABIN "/busybox", X_OK) == -1)
return false; return false;
LOGI("* Setting up internal busybox"); LOGI("* Setting up internal busybox");
close(xopen(BBPATH "/busybox", O_RDONLY | O_CREAT | O_CLOEXEC)); cp_afc(DATABIN "/busybox", BBPATH "/busybox");
bind_mount(DATABIN "/busybox", BBPATH "/busybox", false);
exec_command_sync(BBPATH "/busybox", "--install", "-s", BBPATH); exec_command_sync(BBPATH "/busybox", "--install", "-s", BBPATH);
// Disable/remove magiskhide, resetprop, and modules // Disable/remove magiskhide, resetprop, and modules