Support fixing Magisk environment

This commit is contained in:
topjohnwu
2018-05-13 18:14:44 +08:00
parent c0e2f44092
commit c9ca42aaa9
3 changed files with 8 additions and 5 deletions

2
app

Submodule app updated: 15ed3e52f2...630f2b7d19

View File

@@ -25,7 +25,7 @@ allprojects {
ext {
compileSdkVersion = 27
buildToolsVersion = "28.0.0-rc1"
buildToolsVersion = "28.0.0-rc2"
supportLibVersion = "27.1.1"
}

View File

@@ -629,12 +629,15 @@ initialize:
#endif
}
xmkdirs(MIRRDIR "/bin", 0755);
xmkdirs(DATABIN, 0755);
bind_mount(DATABIN, MIRRDIR "/bin");
LOGI("* Setting up internal busybox");
xmkdirs(BBPATH, 0755);
exec_command_sync(MIRRDIR "/bin/busybox", "--install", "-s", BBPATH, NULL);
xsymlink(MIRRDIR "/bin/busybox", BBPATH "/busybox");
if (access(MIRRDIR "/bin/busybox", X_OK) == 0) {
LOGI("* Setting up internal busybox");
exec_command_sync(MIRRDIR "/bin/busybox", "--install", "-s", BBPATH, NULL);
xsymlink(MIRRDIR "/bin/busybox", BBPATH "/busybox");
}
// uninstall
if (access(UNINSTALLER, F_OK) == 0) {