From d8c51cb286cd5bc4649cfc693dda3e3e78f07b7a Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Sun, 31 Dec 2017 19:32:04 +0800 Subject: [PATCH] Update sepolicy handling --- core/jni/core/magiskinit.c | 3 ++- core/jni/magiskpolicy | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/core/jni/core/magiskinit.c b/core/jni/core/magiskinit.c index bf34ea021..59c30f25c 100644 --- a/core/jni/core/magiskinit.c +++ b/core/jni/core/magiskinit.c @@ -364,7 +364,8 @@ static void magisk_init_daemon() { sepol_allow("su", ALL, ALL, ALL); // Wait till init cold boot done - wait_till_exists("/dev/.coldboot_done"); + while (access("/dev/.coldboot_done", F_OK)) + usleep(1); int null = open("/dev/null", O_RDWR | O_CLOEXEC); dup3(null, STDIN_FILENO, O_CLOEXEC); diff --git a/core/jni/magiskpolicy b/core/jni/magiskpolicy index edab89142..5c338cd0a 160000 --- a/core/jni/magiskpolicy +++ b/core/jni/magiskpolicy @@ -1 +1 @@ -Subproject commit edab891427b8018b09cc6883e924b2c7e81b4a31 +Subproject commit 5c338cd0a7f3b85305dcc960c8533da9d7ff2f27