Update internal paths

This commit is contained in:
topjohnwu 2017-11-22 16:04:24 +08:00
parent 3bc31374ac
commit bc21a1fb71
7 changed files with 17 additions and 17 deletions

View File

@ -78,6 +78,7 @@ def build_all(args):
build_apk(args)
zip_main(args)
zip_uninstaller(args)
build_snet(args)
def build_binary(args):
header('* Building Magisk binaries')

2
java

@ -1 +1 @@
Subproject commit 389299afd103337ec3ab787278ac56ac249f9195
Subproject commit f520fe36bd503cd7fee779b3b5c68723f6e0d098

View File

@ -558,9 +558,6 @@ void fix_filecon() {
int dirfd = xopen(MOUNTPOINT, O_RDONLY | O_CLOEXEC);
restorecon(dirfd, 0);
close(dirfd);
dirfd = xopen(DATABIN, O_RDONLY | O_CLOEXEC);
restorecon(dirfd, 1);
close(dirfd);
}
/****************

View File

@ -21,9 +21,9 @@
#define DISABLEFILE "/cache/.disable_magisk"
#define UNINSTALLER "/cache/magisk_uninstaller.sh"
#define CACHEMOUNT "/cache/magisk_mount"
#define MAGISKTMP "/dev/magisk"
#define MAGISKTMP "/sbin/.core"
#define MIRRDIR MAGISKTMP "/mirror"
#define BBPATH MAGISKTMP "/bin"
#define BBPATH MAGISKTMP "/busybox"
#define MOUNTPOINT MAGISKTMP "/img"
#define FAKEPOINT "/magisk"
#define COREDIR MOUNTPOINT "/.core"
@ -31,7 +31,8 @@
#define HIDELIST COREDIR "/hidelist"
#define MAINIMG "/data/magisk.img"
#define DATABIN "/data/magisk"
#define MANAGERAPK DATABIN "/magisk.apk"
#define MANAGERAPK MIRRDIR "/bin/magisk.apk"
#define MAGISKRC "/init.magisk.rc"
#define SELINUX_PATH "/sys/fs/selinux/"

View File

@ -110,9 +110,9 @@ static void hide_daemon(int pid, int ppid) {
}
}
// Unmount dummy skeletons, /sbin links, and mirrors
// Unmount dummy skeletons, /sbin links
vec_for_each(&mount_list, line) {
if (strstr(line, "tmpfs /system") || strstr(line, "tmpfs /vendor") || strstr(line, "tmpfs /sbin") || strstr(line, MIRRDIR)) {
if (strstr(line, "tmpfs /system") || strstr(line, "tmpfs /vendor") || strstr(line, "tmpfs /sbin")) {
sscanf(line, "%*s %4096s", buffer);
lazy_unmount(buffer);
}
@ -134,9 +134,6 @@ static void hide_daemon(int pid, int ppid) {
free(line);
}
xmount(NULL, "/", NULL, MS_REMOUNT, NULL);
unlink(FAKEPOINT);
exit:
// Send resume signal
kill(pid, SIGCONT);
@ -250,6 +247,10 @@ void proc_monitor() {
* The setns system call do not support multithread processes
* We have to fork a new process, setns, then do the unmounts
*/
xmount(NULL, "/", NULL, MS_REMOUNT, NULL);
unlink(FAKEPOINT);
unlink(MAGISKRC);
xmount(NULL, "/", NULL, MS_REMOUNT | MS_RDONLY, NULL);
++hide_queue;
int selfpid = getpid();
if (fork_dont_care() == 0)

@ -1 +1 @@
Subproject commit 9e96824161ddf1d6af516f44cad4d0e904a7abed
Subproject commit b7e717ee8c49d3f2ae153b8ea8de6c932032c20a

View File

@ -257,11 +257,11 @@ api_level_arch_detect() {
}
boot_actions() {
if [ ! -d /dev/magisk/mirror/bin ]; then
mkdir -p /dev/magisk/mirror/bin
mount -o bind $MAGISKBIN /dev/magisk/mirror/bin
if [ ! -d /sbin/.core/mirror/bin ]; then
mkdir -p /sbin/.core/mirror/bin
mount -o bind $MAGISKBIN /sbin/.core/mirror/bin
fi
MAGISKBIN=/dev/magisk/mirror/bin
MAGISKBIN=/sbin/.core/mirror/bin
}
recovery_actions() {