Skip to content

Commit

Permalink
Support fixing Magisk environment
Browse files Browse the repository at this point in the history
  • Loading branch information
topjohnwu committed May 13, 2018
1 parent c0e2f44 commit c9ca42a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ allprojects {

ext {
compileSdkVersion = 27
buildToolsVersion = "28.0.0-rc1"
buildToolsVersion = "28.0.0-rc2"
supportLibVersion = "27.1.1"
}

Expand Down
9 changes: 6 additions & 3 deletions native/jni/core/bootstages.c
Original file line number Diff line number Diff line change
Expand Up @@ -629,12 +629,15 @@ void startup() {
#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) {
Expand Down

0 comments on commit c9ca42a

Please sign in to comment.