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
...
@@ -36,7 +36,6 @@ if [ ! -f /system/build.prop ]; then
else
else
adb push native/out/x86/magiskinit /data/local/tmp
adb push native/out/x86/magiskinit /data/local/tmp
fi
fi
adb root
||
abort
'adb root failed'
adb shell sh /data/local/tmp/emulator.sh
adb shell sh /data/local/tmp/emulator.sh
exit
0
exit
0
fi
fi
...
@@ -45,12 +44,10 @@ cd /data/local/tmp
...
@@ -45,12 +44,10 @@ cd /data/local/tmp
chmod
777 busybox
chmod
777 busybox
chmod
777 magiskinit
chmod
777 magiskinit
# Emulator's adb shell should have root
if
[
`
./busybox
id
-u
`
-ne
0
]
;
then
[
`
./busybox
id
-u
`
-eq
0
]
||
abort
'ADB shell should have root access'
# Re-run script with root
exec
/system/xbin/su 0 sh
$0
# Check whether already setup
fi
[
-f
/sbin/magisk
]
&&
abort
"Magisk is already setup"
./busybox pgrep magiskd
&&
abort
"Magisk is already setup"
# First setup a good env to work with
# First setup a good env to work with
rm
-rf
bin
rm
-rf
bin
...
@@ -59,6 +56,10 @@ rm -rf bin
...
@@ -59,6 +56,10 @@ rm -rf bin
OLD_PATH
=
"
$PATH
"
OLD_PATH
=
"
$PATH
"
PATH
=
"/data/local/tmp/bin:
$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
# SELinux stuffs
[
-e
/sys/fs/selinux
]
&&
SELINUX
=
true
||
SELINUX
=
false
[
-e
/sys/fs/selinux
]
&&
SELINUX
=
true
||
SELINUX
=
false
if
$SELINUX
;
then
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