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
953c40b0
Commit
953c40b0
authored
Oct 21, 2019
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow upgrade Magisk daemon in emulator
parent
271b0287
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
emulator.sh
scripts/emulator.sh
+8
-7
No files found.
scripts/emulator.sh
View file @
953c40b0
...
...
@@ -36,7 +36,6 @@ if [ ! -f /system/build.prop ]; then
else
adb push native/out/x86/magiskinit /data/local/tmp
fi
adb root
||
abort
'adb root failed'
adb shell sh /data/local/tmp/emulator.sh
exit
0
fi
...
...
@@ -45,12 +44,10 @@ cd /data/local/tmp
chmod
777 busybox
chmod
777 magiskinit
# Emulator's adb shell should have root
[
`
./busybox
id
-u
`
-eq
0
]
||
abort
'ADB shell should have root access'
# Check whether already setup
[
-f
/sbin/magisk
]
&&
abort
"Magisk is already setup"
./busybox pgrep magiskd
&&
abort
"Magisk is already setup"
if
[
`
./busybox
id
-u
`
-ne
0
]
;
then
# Re-run script with root
exec
/system/xbin/su 0 sh
$0
fi
# First setup a good env to work with
rm
-rf
bin
...
...
@@ -59,6 +56,10 @@ rm -rf bin
OLD_PATH
=
"
$PATH
"
PATH
=
"/data/local/tmp/bin:
$PATH
"
# Remove previous setup if exist
pgrep magiskd
>
/dev/null
&&
pkill
-9
magiskd
[
-f
/sbin/magisk
]
&&
umount
-l
/sbin
# SELinux stuffs
[
-e
/sys/fs/selinux
]
&&
SELINUX
=
true
||
SELINUX
=
false
if
$SELINUX
;
then
...
...
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