Rename sepolicy-inject

This commit is contained in:
topjohnwu 2017-03-18 17:00:04 +08:00
parent ba93fcbda0
commit b4fe4f3d10
9 changed files with 11 additions and 11 deletions

6
.gitmodules vendored
View File

@ -1,6 +1,3 @@
[submodule "jni/sepolicy-inject"]
path = jni/sepolicy-inject
url = https://github.com/topjohnwu/sepolicy-inject
[submodule "jni/selinux"]
path = jni/selinux
url = https://github.com/topjohnwu/selinux.git
@ -10,3 +7,6 @@
[submodule "jni/ndk-compression"]
path = jni/ndk-compression
url = https://github.com/topjohnwu/ndk-compression.git
[submodule "jni/magiskpolicy"]
path = jni/magiskpolicy
url = https://github.com/topjohnwu/magiskpolicy.git

View File

@ -3,5 +3,5 @@ LOCAL_PATH := $(call my-dir)
include jni/magiskboot/Android.mk
include jni/magiskhide/Android.mk
include jni/resetprop/Android.mk
include jni/sepolicy-inject/Android.mk
include jni/magiskpolicy/Android.mk
include jni/su/Android.mk

View File

@ -22,7 +22,7 @@
#define HIDELIST "/magisk/.core/magiskhide/hidelist"
#define DUMMYPATH "/dev/magisk/dummy"
#define ENFORCE_FILE "/sys/fs/selinux/enforce"
#define SEPOLICY_INJECT "/data/magisk/sepolicy-inject"
#define SEPOLICY_INJECT "/data/magisk/magiskpolicy"
// Main thread
void monitor_proc();

1
jni/magiskpolicy Submodule

@ -0,0 +1 @@
Subproject commit ca75dd07283ff5fb9fec32f106ba8c58642742a0

@ -1 +0,0 @@
Subproject commit 9f35fa0fa3f9b52c2b6b31253bade848019d7ab2

View File

@ -248,7 +248,7 @@ is_mounted /data && MAGISKBIN=/data/magisk || MAGISKBIN=/cache/data_bin
# Copy required files
rm -rf $MAGISKBIN 2>/dev/null
mkdir -p $MAGISKBIN
cp -af $BINDIR/busybox $BINDIR/sepolicy-inject $BINDIR/resetprop $BINDIR/magiskboot \
cp -af $BINDIR/busybox $BINDIR/magiskpolicy $BINDIR/resetprop $BINDIR/magiskboot \
$COMMONDIR/ramdisk_patch.sh $COMMONDIR/init.magisk.rc \
$COMMONDIR/magic_mask.sh $COMMONDIR/magisk.apk $MAGISKBIN
chmod -R 755 $MAGISKBIN
@ -391,7 +391,7 @@ rm -f ramdisk.cpio.orig
##########################################################################################
# Fix SuperSU.....
$BOOTMODE && $BINDIR/sepolicy-inject --live "allow fsck * * *"
$BOOTMODE && $BINDIR/magiskpolicy --live "allow fsck * * *"
if (is_mounted /data); then
IMG=/data/magisk.img

View File

@ -305,7 +305,7 @@ case $1 in
chown -R 0.0 $BINPATH
# Live patch sepolicy
$BINPATH/sepolicy-inject --live
$BINPATH/magiskpolicy --live
if [ -f $UNINSTALLER ]; then
touch /dev/.magisk.unblock

View File

@ -21,7 +21,7 @@ ln -s /sbin_orig/* $MODDIR/sbin_bind
chcon -h u:object_r:rootfs:s0 $MODDIR/sbin_bind/*
chmod 755 $MODDIR/sbin_bind
ln -s $MODDIR/su $MODDIR/sbin_bind/su
ln -s /data/magisk/sepolicy-inject $MODDIR/sbin_bind/sepolicy-inject
ln -s /data/magisk/magiskpolicy $MODDIR/sbin_bind/magiskpolicy
mount -o bind $MODDIR/sbin_bind /sbin
log_print "Starting su daemon"

View File

@ -43,7 +43,7 @@ cpio_add 750 init.rc init.rc
# sepolicy patches
cpio_extract sepolicy sepolicy
LD_LIBRARY_PATH=$SYSTEMLIB $MAGISKBIN/sepolicy-inject --load sepolicy --save sepolicy --minimal
LD_LIBRARY_PATH=$SYSTEMLIB $MAGISKBIN/magiskpolicy --load sepolicy --save sepolicy --minimal
cpio_add 644 sepolicy sepolicy
# Add new items