From 4e8818690325f022fd5412b6c349bcd5fa13dd8b Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Thu, 22 Dec 2016 20:03:35 +0800 Subject: [PATCH] Move /sbin binaries to new location for root Finally fix #12 --- zip_static/common/phh/service.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/zip_static/common/phh/service.sh b/zip_static/common/phh/service.sh index 88d52fc29..011d4130d 100644 --- a/zip_static/common/phh/service.sh +++ b/zip_static/common/phh/service.sh @@ -15,6 +15,14 @@ log_print() { log_print "Live patching sepolicy" $MODDIR/bin/sepolicy-inject --live +log_print "Moving and linking /sbin binaries" +mount -o rw,remount rootfs / +mv /sbin /sbin_orig +mkdir /sbin +chmod 755 /sbin +ln -s /sbin_orig/* /sbin +mount -o ro,remount rootfs / + # Expose the root path log_print "Mounting supath" rm -rf /magisk/.core/bin $MODDIR/sbin_bind