Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
Magisk
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Magisk
Commits
9ea028f5
Commit
9ea028f5
authored
Oct 29, 2016
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Various updates, prepare for Multirom support
parent
aa309087
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
167 additions
and
175 deletions
+167
-175
Android.mk
jni/Android.mk
+0
-2
init.magisk.rc
zip_static/common/init.magisk.rc
+3
-0
magic_mask.sh
zip_static/common/magic_mask.sh
+164
-173
No files found.
jni/Android.mk
View file @
9ea028f5
...
@@ -5,14 +5,12 @@ LOCAL_PATH := $(my_path)
...
@@ -5,14 +5,12 @@ LOCAL_PATH := $(my_path)
include $(CLEAR_VARS)
include $(CLEAR_VARS)
LOCAL_MODULE := magiskhide
LOCAL_MODULE := magiskhide
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TAGS := optional
LOCAL_FORCE_STATIC_EXECUTABLE := true
LOCAL_SRC_FILES := magiskhide.c
LOCAL_SRC_FILES := magiskhide.c
include $(BUILD_EXECUTABLE)
include $(BUILD_EXECUTABLE)
include $(CLEAR_VARS)
include $(CLEAR_VARS)
LOCAL_MODULE := bootimgtools
LOCAL_MODULE := bootimgtools
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_TAGS := optional
LOCAL_FORCE_STATIC_EXECUTABLE := true
LOCAL_SRC_FILES := bootimgtools.c extract.c repack.c hexpatch.c
LOCAL_SRC_FILES := bootimgtools.c extract.c repack.c hexpatch.c
LOCAL_CFLAGS += -std=gnu11
LOCAL_CFLAGS += -std=gnu11
include $(BUILD_EXECUTABLE)
include $(BUILD_EXECUTABLE)
...
...
zip_static/common/init.magisk.rc
View file @
9ea028f5
...
@@ -13,6 +13,9 @@ on post-fs-data
...
@@ -13,6 +13,9 @@ on post-fs-data
on property:magisk.hide=1
on property:magisk.hide=1
restart magisk_hide
restart magisk_hide
on property:magisk.restart_pfsd=1
trigger post-fs-data
# Services
# Services
# launch post-fs script
# launch post-fs script
...
...
zip_static/common/magic_mask.sh
View file @
9ea028f5
#!/system/bin/sh
#!/system/bin/sh
LOGFILE
=
/cache/magisk.log
LOGFILE
=
/cache/magisk.log
HIDELOG
=
/cache/magiskhide.log
IMG
=
/data/magisk.img
IMG
=
/data/magisk.img
export
MOUNTPOINT
=
/magisk
MOUNTPOINT
=
/magisk
COREDIR
=
$MOUNTPOINT
/.core
COREDIR
=
$MOUNTPOINT
/.core
DUMMDIR
=
$COREDIR
/dummy
TMPDIR
=
/dev/magisk
MIRRDIR
=
$COREDIR
/mirror
DUMMDIR
=
$TMPDIR
/dummy
MIRRDIR
=
$TMPDIR
/mirror
MOUNTINFO
=
$TMPDIR
/mnt
TMPDIR
=
/dev/tmp
# Use the included busybox for maximum compatibility and reliable results
# e.g. we rely on the option "-c" for cp (reserve contexts), and -exec for find
TOOLPATH
=
/data/busybox
# Use the included busybox to do everything for maximum compatibility
# Legacy support for old phh, we don't change PATH now
# We also do so because we rely on the option "-c" for cp (reserve contexts)
# Reserve the original PATH
export
OLDPATH
=
$PATH
export
OLDPATH
=
$PATH
export
PATH
=
"/data/busybox:
$PATH
"
log_print
()
{
log_print
()
{
echo
$1
echo
$1
...
@@ -42,17 +42,13 @@ unblock() {
...
@@ -42,17 +42,13 @@ unblock() {
run_scripts
()
{
run_scripts
()
{
BASE
=
$MOUNTPOINT
BASE
=
$MOUNTPOINT
if
[
"
$1
"
=
"post-fs"
]
;
then
BASE
=
/cache/magisk
fi
for
MOD
in
$BASE
/
*
;
do
for
MOD
in
$BASE
/
*
;
do
if
[
!
-f
"
$MOD
/disable"
]
;
then
if
[
!
-f
"
$MOD
/disable"
]
;
then
if
[
-f
"
$MOD
/
$1
.sh"
]
;
then
if
[
-f
"
$MOD
/
$1
.sh"
]
;
then
chmod
755
$MOD
/
$1
.sh
chmod
755
$MOD
/
$1
.sh
chcon
'u:object_r:system_file:s0'
$MOD
/
$1
.sh
chcon
'u:object_r:system_file:s0'
$MOD
/
$1
.sh
log_print
"
$1
:
$MOD
/
$1
.sh"
log_print
"
$1
:
$MOD
/
$1
.sh"
$MOD
/
$1
.sh
sh
$MOD
/
$1
.sh
fi
fi
fi
fi
done
done
...
@@ -61,7 +57,7 @@ run_scripts() {
...
@@ -61,7 +57,7 @@ run_scripts() {
loopsetup
()
{
loopsetup
()
{
LOOPDEVICE
=
LOOPDEVICE
=
for
DEV
in
$(
ls
/dev/block/loop
*)
;
do
for
DEV
in
$(
ls
/dev/block/loop
*)
;
do
if
[
`
losetup
$DEV
$1
>
/dev/null 2>&1
;
echo
$?
`
-eq
0
]
;
then
if
[
`
$TOOLPATH
/
losetup
$DEV
$1
>
/dev/null 2>&1
;
echo
$?
`
-eq
0
]
;
then
LOOPDEVICE
=
$DEV
LOOPDEVICE
=
$DEV
break
break
fi
fi
...
@@ -79,8 +75,8 @@ target_size_check() {
...
@@ -79,8 +75,8 @@ target_size_check() {
travel
()
{
travel
()
{
cd
$1
/
$2
cd
$1
/
$2
if
[
-f
".replace"
]
;
then
if
[
-f
".replace"
]
;
then
rm
-rf
$
TMPDIR
/
$2
rm
-rf
$
MOUNTINFO
/
$2
mktouch
$
TMPDIR
/
$2
$1
mktouch
$
MOUNTINFO
/
$2
$1
else
else
for
ITEM
in
*
;
do
for
ITEM
in
*
;
do
if
[
!
-e
"/
$2
/
$ITEM
"
]
;
then
if
[
!
-e
"/
$2
/
$ITEM
"
]
;
then
...
@@ -89,12 +85,12 @@ travel() {
...
@@ -89,12 +85,12 @@ travel() {
# We cannot add new items to /system root, delete it
# We cannot add new items to /system root, delete it
rm
-rf
$ITEM
rm
-rf
$ITEM
else
else
if
[
-d
"
$
TMPDIR
/dummy/
$2
"
]
;
then
if
[
-d
"
$
MOUNTINFO
/dummy/
$2
"
]
;
then
# We are in a higher level, delete the lower levels
# We are in a higher level, delete the lower levels
rm
-rf
$
TMPDIR
/dummy/
$2
rm
-rf
$
MOUNTINFO
/dummy/
$2
fi
fi
# Mount the dummy parent
# Mount the dummy parent
mktouch
$
TMPDIR
/dummy/
$2
mktouch
$
MOUNTINFO
/dummy/
$2
mkdir
-p
$DUMMDIR
/
$2
2>/dev/null
mkdir
-p
$DUMMDIR
/
$2
2>/dev/null
if
[
-d
"
$ITEM
"
]
;
then
if
[
-d
"
$ITEM
"
]
;
then
...
@@ -102,7 +98,7 @@ travel() {
...
@@ -102,7 +98,7 @@ travel() {
mkdir
-p
$DUMMDIR
/
$2
/
$ITEM
mkdir
-p
$DUMMDIR
/
$2
/
$ITEM
elif
[
-L
"
$ITEM
"
]
;
then
elif
[
-L
"
$ITEM
"
]
;
then
# Symlinks are small, copy them
# Symlinks are small, copy them
cp
-afc
$ITEM
$DUMMDIR
/
$2
/
$ITEM
$TOOLPATH
/
cp
-afc
$ITEM
$DUMMDIR
/
$2
/
$ITEM
else
else
# Create new dummy file
# Create new dummy file
mktouch
$DUMMDIR
/
$2
/
$ITEM
mktouch
$DUMMDIR
/
$2
/
$ITEM
...
@@ -116,7 +112,7 @@ travel() {
...
@@ -116,7 +112,7 @@ travel() {
mkdir
-p
$DUMMDIR$DUMMY
mkdir
-p
$DUMMDIR$DUMMY
elif
[
-L
"
$DUMMY
"
]
;
then
elif
[
-L
"
$DUMMY
"
]
;
then
# Symlinks are small, copy them
# Symlinks are small, copy them
cp
-afc
$DUMMY
$DUMMDIR$DUMMY
$TOOLPATH
/
cp
-afc
$DUMMY
$DUMMDIR$DUMMY
else
else
# Create dummy file
# Create dummy file
mktouch
$DUMMDIR$DUMMY
mktouch
$DUMMDIR$DUMMY
...
@@ -131,7 +127,7 @@ travel() {
...
@@ -131,7 +127,7 @@ travel() {
(
travel
$1
$2
/
$ITEM
)
(
travel
$1
$2
/
$ITEM
)
elif
[
!
-L
"
$ITEM
"
]
;
then
elif
[
!
-L
"
$ITEM
"
]
;
then
# Mount this file
# Mount this file
mktouch
$
TMPDIR
/
$2
/
$ITEM
$1
mktouch
$
MOUNTINFO
/
$2
/
$ITEM
$1
fi
fi
done
done
fi
fi
...
@@ -194,10 +190,13 @@ merge_image() {
...
@@ -194,10 +190,13 @@ merge_image() {
# Merge (will reserve selinux contexts)
# Merge (will reserve selinux contexts)
cd
/cache/merge_img
cd
/cache/merge_img
for
MOD
in
*
;
do
for
MOD
in
*
;
do
if
[
"
$MOD
"
!=
"lost+found"
]
;
then
log_print
"Merging:
$MOD
"
log_print
"Merging:
$MOD
"
rm
-rf
/cache/data_img/
$MOD
rm
-rf
/cache/data_img/
$MOD
cp
-afc
$MOD
/cache/data_img/
$TOOLPATH
/cp
-afc
$MOD
/cache/data_img/
fi
done
done
$TOOLPATH
/cp
-afc
.core/. /cache/data_img/.core 2>/dev/null
log_print
"Merge complete"
log_print
"Merge complete"
fi
fi
...
@@ -206,8 +205,8 @@ merge_image() {
...
@@ -206,8 +205,8 @@ merge_image() {
fi
fi
fi
fi
losetup
-d
$LOOPDATA
$TOOLPATH
/
losetup
-d
$LOOPDATA
losetup
-d
$LOOPMERGE
$TOOLPATH
/
losetup
-d
$LOOPMERGE
rmdir
/cache/data_img
rmdir
/cache/data_img
rmdir
/cache/merge_img
rmdir
/cache/merge_img
...
@@ -224,31 +223,12 @@ case $1 in
...
@@ -224,31 +223,12 @@ case $1 in
mv
$LOGFILE
/cache/last_magisk.log
mv
$LOGFILE
/cache/last_magisk.log
touch
$LOGFILE
touch
$LOGFILE
chmod
644
$LOGFILE
chmod
644
$LOGFILE
log_print
"Magisk post-fs mode running..."
if
[
-d
"/cache/magisk_merge"
]
;
then
log_print
"Magisk post-fs mode running..."
cd
/cache/magisk_merge
for
MOD
in
*
;
do
log_print
"Merging:
$MOD
"
rm
-rf
/cache/magisk/
$MOD
mv
$MOD
/cache/magisk/
$MOD
done
rm
-rf
/cache/magisk_merge
fi
for
MOD
in
/cache/magisk/
*
;
do
# No more cache mods!
if
[
-f
"
$MOD
/remove"
]
;
then
# Only for multirom!
log_print
"Remove module:
$MOD
"
rm
-rf
$MOD
elif
[
-f
"
$MOD
/auto_mount"
-a
!
-f
"
$MOD
/disable"
]
;
then
find
$MOD
/system
-type
f 2>/dev/null |
while
read
ITEM
;
do
TARGET
=
${
ITEM
#
$MOD
}
bind_mount
$ITEM
$TARGET
done
fi
done
run_scripts post-fs
unblock
unblock
;;
;;
...
@@ -263,33 +243,37 @@ case $1 in
...
@@ -263,33 +243,37 @@ case $1 in
unblock
unblock
fi
fi
# Don't run twice
if
[
"
$(
getprop magisk.restart_pfsd
)
"
!=
"1"
]
;
then
log_print
"Magisk post-fs-data mode running..."
log_print
"Magisk post-fs-data mode running..."
# Live patch sepolicy
# Live patch sepolicy
/data/magisk/sepolicy-inject
--live
-s
su
/data/magisk/sepolicy-inject
--live
-s
su
[
!
-d
"
$MOUNTPOINT
"
]
&&
mkdir
-p
$MOUNTPOINT
# Cache support
# Cache support
if
[
-d
"/cache/data_bin"
]
;
then
if
[
-d
"/cache/data_bin"
]
;
then
rm
-rf
/data/busybox /data/magisk
rm
-rf
/data/busybox /data/magisk
mkdir
-p
/data/busybox
mkdir
-p
/data/busybox
mv
/cache/data_bin /data/magisk
mv
/cache/data_bin /data/magisk
chmod
755 /data/busybox /data/magisk /data/magisk/
*
chmod
-R
755 /data/busybox /data/magisk
chcon
'u:object_r:system_file:s0'
/data/busybox /data/magisk /data/magisk/
*
/data/magisk/busybox
--install
-s
/data/busybox
/data/magisk/busybox
--install
-s
/data/busybox
ln
-s
/data/magisk/busybox /data/busybox/busybox
# Prevent issues
# Prevent issues
rm
-f
/data/busybox/su /data/busybox/sh
rm
-f
/data/busybox/su /data/busybox/sh
fi
fi
mv
/cache/stock_boot.img /data 2>/dev/null
mv
/cache/stock_boot.img /data 2>/dev/null
chmod
644
$IMG
/cache/magisk.img /data/magisk_merge.img 2>/dev/null
chcon
-R
'u:object_r:system_file:s0'
/data/busybox /data/magisk
# Handle image merging
# Image merging
chmod
644
$IMG
/cache/magisk.img /data/magisk_merge.img 2>/dev/null
merge_image /cache/magisk.img
merge_image /cache/magisk.img
merge_image /data/magisk_merge.img
merge_image /data/magisk_merge.img
# Mount magisk.img
# Mount magisk.img
[
!
-d
"
$MOUNTPOINT
"
]
&&
mkdir
-p
$MOUNTPOINT
if
[
`
cat
/proc/mounts |
grep
$MOUNTPOINT
>
/dev/null 2>&1
;
echo
$?
`
-ne
0
]
;
then
if
[
`
cat
/proc/mounts |
grep
$MOUNTPOINT
>
/dev/null 2>&1
;
echo
$?
`
-ne
0
]
;
then
loopsetup
$IMG
loopsetup
$IMG
if
[
!
-z
"
$LOOPDEVICE
"
]
;
then
if
[
!
-z
"
$LOOPDEVICE
"
]
;
then
...
@@ -302,41 +286,21 @@ case $1 in
...
@@ -302,41 +286,21 @@ case $1 in
unblock
unblock
fi
fi
log_print
"Preparing modules"
# Remove empty directories and remove legacy paths and previous symlink
# First do cleanups
rm
-rf
$COREDIR
/bin
$COREDIR
/dummy
$COREDIR
/mirror
rm
-rf
$DUMMDIR
$TOOLPATH
/find
$MOUNTPOINT
-type
d
-depth
!
-path
"*core*"
-exec
rmdir
{}
\;
2>/dev/null
rmdir
$(
find
$MOUNTPOINT
-type
d
-depth
!
-path
"*core*"
)
2>/dev/null
rm
-rf
$COREDIR
/bin
mkdir
-p
$DUMMDIR
# Remove modules
mkdir
-p
$MIRRDIR
/system
# Travel through all mods
for
MOD
in
$MOUNTPOINT
/
*
;
do
for
MOD
in
$MOUNTPOINT
/
*
;
do
if
[
-f
"
$MOD
/remove"
]
;
then
if
[
-f
"
$MOD
/remove"
]
;
then
log_print
"Remove module:
$MOD
"
log_print
"Remove module:
$MOD
"
rm
-rf
$MOD
rm
-rf
$MOD
elif
[
-f
"
$MOD
/auto_mount"
-a
-d
"
$MOD
/system"
-a
!
-f
"
$MOD
/disable"
]
;
then
(
travel
$MOD
system
)
fi
fi
done
done
# Proper permissions for generated items
chmod
755
$(
find
$COREDIR
-type
d
)
chmod
644
$(
find
$COREDIR
-type
f
)
find
$COREDIR
-type
d
-exec
chmod
755
{}
\;
find
$COREDIR
-type
f
-exec
chmod
644
{}
\;
# linker(64), t*box, and app_process* are required if we need to dummy mount bin folder
if
[
-f
"
$TMPDIR
/dummy/system/bin"
]
;
then
rm
-f
$DUMMDIR
/system/bin/linker
*
$DUMMDIR
/system/bin/t
*
box
$DUMMDIR
/system/bin/app_process
*
cd
/system/bin
cp
-afc
linker
*
t
*
box app_process
*
$DUMMDIR
/system/bin/
fi
# Unmount, shrink, remount
# Unmount, shrink, remount
if
[
`
umount
$MOUNTPOINT
>
/dev/null 2>&1
;
echo
$?
`
-eq
0
]
;
then
if
[
`
umount
$MOUNTPOINT
>
/dev/null 2>&1
;
echo
$?
`
-eq
0
]
;
then
losetup
-d
$LOOPDEVICE
$TOOLPATH
/
losetup
-d
$LOOPDEVICE
target_size_check
$IMG
target_size_check
$IMG
NEWDATASIZE
=
$((
(
curUsedM
/
32
+
2
)
*
32
))
NEWDATASIZE
=
$((
(
curUsedM
/
32
+
2
)
*
32
))
if
[
"
$curSizeM
"
-gt
"
$NEWDATASIZE
"
]
;
then
if
[
"
$curSizeM
"
-gt
"
$NEWDATASIZE
"
]
;
then
...
@@ -347,12 +311,35 @@ case $1 in
...
@@ -347,12 +311,35 @@ case $1 in
if
[
!
-z
"
$LOOPDEVICE
"
]
;
then
if
[
!
-z
"
$LOOPDEVICE
"
]
;
then
mount
-t
ext4
-o
rw,noatime
$LOOPDEVICE
$MOUNTPOINT
mount
-t
ext4
-o
rw,noatime
$LOOPDEVICE
$MOUNTPOINT
fi
fi
fi
if
[
`
cat
/proc/mounts |
grep
$MOUNTPOINT
>
/dev/null 2>&1
;
echo
$?
`
-ne
0
]
;
then
if
[
`
cat
/proc/mounts |
grep
$MOUNTPOINT
>
/dev/null 2>&1
;
echo
$?
`
-ne
0
]
;
then
log_print
"magisk.img mount failed, nothing to do :("
log_print
"magisk.img mount failed, nothing to do :("
unblock
unblock
fi
fi
fi
log_print
"Preparing modules"
mkdir
-p
$DUMMDIR
mkdir
-p
$MIRRDIR
/system
# Travel through all mods
for
MOD
in
$MOUNTPOINT
/
*
;
do
if
[
-f
"
$MOD
/auto_mount"
-a
-d
"
$MOD
/system"
-a
!
-f
"
$MOD
/disable"
]
;
then
(
travel
$MOD
system
)
fi
done
# Proper permissions for generated items
$TOOLPATH
/find
$DUMMDIR
-type
d
-exec
chmod
755
{}
\;
$TOOLPATH
/find
$DUMMDIR
-type
f
-exec
chmod
644
{}
\;
$TOOLPATH
/find
$DUMMDIR
-exec
chcon
'u:object_r:system_file:s0'
{}
\;
# linker(64), t*box, and app_process* are required if we need to dummy mount bin folder
if
[
-f
"
$MOUNTINFO
/dummy/system/bin"
]
;
then
rm
-f
$DUMMDIR
/system/bin/linker
*
$DUMMDIR
/system/bin/t
*
box
$DUMMDIR
/system/bin/app_process
*
cd
/system/bin
$TOOLPATH
/cp
-afc
linker
*
t
*
box app_process
*
$DUMMDIR
/system/bin/
fi
# Remove crap folder
# Remove crap folder
rm
-rf
$MOUNTPOINT
/lost+found
rm
-rf
$MOUNTPOINT
/lost+found
...
@@ -361,16 +348,16 @@ case $1 in
...
@@ -361,16 +348,16 @@ case $1 in
# Stage 1
# Stage 1
log_print
"Bind mount dummy system"
log_print
"Bind mount dummy system"
find
$TMPDIR
/dummy
-type
f 2>/dev/null |
while
read
ITEM
;
do
$TOOLPATH
/find
$MOUNTINFO
/dummy
-type
f 2>/dev/null |
while
read
ITEM
;
do
TARGET
=
${
ITEM
#
$TMPDIR
/dummy
}
TARGET
=
${
ITEM
#
$MOUNTINFO
/dummy
}
ORIG
=
$DUMMDIR$TARGET
ORIG
=
$DUMMDIR$TARGET
bind_mount
$ORIG
$TARGET
bind_mount
$ORIG
$TARGET
done
done
# Stage 2
# Stage 2
log_print
"Bind mount module items"
log_print
"Bind mount module items"
find
$TMPDIR
/system
-type
f 2>/dev/null |
while
read
ITEM
;
do
$TOOLPATH
/find
$MOUNTINFO
/system
-type
f 2>/dev/null |
while
read
ITEM
;
do
TARGET
=
${
ITEM
#
$TMPDIR
}
TARGET
=
${
ITEM
#
$MOUNTINFO
}
ORIG
=
`
cat
$ITEM
`
$TARGET
ORIG
=
`
cat
$ITEM
`
$TARGET
bind_mount
$ORIG
$TARGET
bind_mount
$ORIG
$TARGET
rm
-f
$DUMMDIR
${
TARGET
%/*
}
/.dummy 2>/dev/null
rm
-f
$DUMMDIR
${
TARGET
%/*
}
/.dummy 2>/dev/null
...
@@ -380,7 +367,7 @@ case $1 in
...
@@ -380,7 +367,7 @@ case $1 in
run_scripts post-fs-data
run_scripts post-fs-data
# Bind hosts for Adblock apps
# Bind hosts for Adblock apps
[
!
-f
"
$COREDIR
/hosts"
]
&&
cp
-afc
/system/etc/hosts
$COREDIR
/hosts
[
!
-f
"
$COREDIR
/hosts"
]
&&
$TOOLPATH
/
cp
-afc
/system/etc/hosts
$COREDIR
/hosts
log_print
"Enabling systemless hosts file support"
log_print
"Enabling systemless hosts file support"
bind_mount
$COREDIR
/hosts /system/etc/hosts
bind_mount
$COREDIR
/hosts /system/etc/hosts
...
@@ -391,15 +378,19 @@ case $1 in
...
@@ -391,15 +378,19 @@ case $1 in
# Stage 4
# Stage 4
log_print
"Bind mount mirror items"
log_print
"Bind mount mirror items"
# Find all empty directores and dummy files, they should be mounted by original files in /system
# Find all empty directores and dummy files, they should be mounted by original files in /system
find
$DUMMDIR
-type
d
-exec
sh
-c
'[ -z "$(ls -A $1)" ] && echo $1'
--
{}
\;
-o
\(
-type
f
-size
0
-print
\)
|
while
read
ITEM
;
do
TOOLPATH
=
/data/busybox
$TOOLPATH
/find
$DUMMDIR
-type
d
\
-exec
sh
-c
'[ -z "$($TOOLPATH/ls -A $1)" ] && echo $1'
--
{}
\;
\
-o
\(
-type
f
-size
0
-print
\)
|
\
while
read
ITEM
;
do
ORIG
=
${
ITEM
/dummy/mirror
}
ORIG
=
${
ITEM
/dummy/mirror
}
TARGET
=
${
ITEM
#
$DUMMDIR
}
TARGET
=
${
ITEM
#
$DUMMDIR
}
bind_mount
$ORIG
$TARGET
bind_mount
$ORIG
$TARGET
done
done
# All done
# Restart post-fs-data, since data might be changed (multirom)
rm
-rf
$TMPDIR
setprop magisk.restart_pfsd 1
fi
unblock
unblock
;;
;;
...
@@ -423,7 +414,7 @@ case $1 in
...
@@ -423,7 +414,7 @@ case $1 in
fi
fi
chmod
755
$COREDIR
/magiskhide
$COREDIR
/magiskhide/
*
chmod
755
$COREDIR
/magiskhide
$COREDIR
/magiskhide/
*
log_print
"Starting Magisk Hide"
log_print
"Starting Magisk Hide"
exec
/data/magisk/magiskhide
$COREDIR
/magiskhide/hidelist
>
$HIDELOG
exec
/data/magisk/magiskhide
$COREDIR
/magiskhide/hidelist
;;
;;
esac
esac
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment