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
8664e9d1
Commit
8664e9d1
authored
Aug 29, 2018
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update scripts
parent
50d98774
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
11 deletions
+16
-11
addon.d.sh
scripts/addon.d.sh
+1
-1
flash_script.sh
scripts/flash_script.sh
+1
-1
magisk_uninstaller.sh
scripts/magisk_uninstaller.sh
+1
-1
util_functions.sh
scripts/util_functions.sh
+13
-8
No files found.
scripts/addon.d.sh
View file @
8664e9d1
...
@@ -131,7 +131,7 @@ case "$1" in
...
@@ -131,7 +131,7 @@ case "$1" in
else
else
initialize
initialize
OUTFD
=
OUTFD
=
get_outfd
setup_flashable
# Run in background, hack for addon.d-v1
# Run in background, hack for addon.d-v1
(
main_v1
)
&
(
main_v1
)
&
fi
fi
...
...
scripts/flash_script.sh
View file @
8664e9d1
...
@@ -31,7 +31,7 @@ fi
...
@@ -31,7 +31,7 @@ fi
# Load utility fuctions
# Load utility fuctions
.
$COMMONDIR
/util_functions.sh
.
$COMMONDIR
/util_functions.sh
get_outfd
setup_flashable
##########################################################################################
##########################################################################################
# Detection
# Detection
...
...
scripts/magisk_uninstaller.sh
View file @
8664e9d1
...
@@ -30,7 +30,7 @@ fi
...
@@ -30,7 +30,7 @@ fi
# Load utility functions
# Load utility functions
.
$INSTALLER
/util_functions.sh
.
$INSTALLER
/util_functions.sh
get_outfd
setup_flashable
ui_print
"************************"
ui_print
"************************"
ui_print
" Magisk Uninstaller "
ui_print
" Magisk Uninstaller "
...
...
scripts/util_functions.sh
View file @
8664e9d1
...
@@ -10,19 +10,19 @@
...
@@ -10,19 +10,19 @@
#MAGISK_VERSION_STUB
#MAGISK_VERSION_STUB
# Detect whether in boot mode
# Detect whether in boot mode
ps |
grep
zygote |
grep
-v
grep
>
/dev/null
&&
BOOTMODE
=
true
||
BOOTMODE
=
false
ps |
grep
zygote |
grep
-qv
grep
&&
BOOTMODE
=
true
||
BOOTMODE
=
false
$BOOTMODE
||
ps
-A
2>/dev/null |
grep
zygote |
grep
-v
grep
>
/dev/null
&&
BOOTMODE
=
true
$BOOTMODE
||
ps
-A
|
grep
zygote |
grep
-qv
grep
&&
BOOTMODE
=
true
$BOOTMODE
||
id
|
grep
-q
'uid=0'
||
BOOTMODE
=
true
# Default location, will override if needed
# Presets
MAGISKBIN
=
/data/adb/magisk
[
-z
$NVBASE
]
&&
NVBASE
=
/data/adb
[
-z
$MAGISKBIN
]
&&
MAGISKBIN
=
$NVBASE
/magisk
[
-z
$IMG
]
&&
IMG
=
$NVBASE
/magisk.img
[
-z
$MOUNTPATH
]
&&
MOUNTPATH
=
/sbin/.core/img
[
-z
$MOUNTPATH
]
&&
MOUNTPATH
=
/sbin/.core/img
[
-z
$IMG
]
&&
IMG
=
/data/adb/magisk.img
BOOTSIGNER
=
"/system/bin/dalvikvm -Xnodex2oat -Xnoimage-dex2oat -cp
\$
APK com.topjohnwu.magisk.utils.BootSigner"
BOOTSIGNER
=
"/system/bin/dalvikvm -Xnodex2oat -Xnoimage-dex2oat -cp
\$
APK com.topjohnwu.magisk.utils.BootSigner"
BOOTSIGNED
=
false
BOOTSIGNED
=
false
get_outfd
()
{
setup_flashable
()
{
$BOOTMODE
&&
return
$BOOTMODE
&&
return
# Preserve environment varibles
# Preserve environment varibles
OLD_PATH
=
$PATH
OLD_PATH
=
$PATH
...
@@ -40,6 +40,11 @@ get_outfd() {
...
@@ -40,6 +40,11 @@ get_outfd() {
fi
fi
}
}
# Backward compatibility
get_outfd
()
{
setup_flashable
}
ui_print
()
{
ui_print
()
{
$BOOTMODE
&&
echo
"
$1
"
||
echo
-e
"ui_print
$1
\n
ui_print"
>>
/proc/self/fd/
$OUTFD
$BOOTMODE
&&
echo
"
$1
"
||
echo
-e
"ui_print
$1
\n
ui_print"
>>
/proc/self/fd/
$OUTFD
}
}
...
@@ -250,7 +255,7 @@ is_mounted() {
...
@@ -250,7 +255,7 @@ is_mounted() {
remove_system_su
()
{
remove_system_su
()
{
if
[
-f
/system/bin/su
-o
-f
/system/xbin/su
]
&&
[
!
-f
/su/bin/su
]
;
then
if
[
-f
/system/bin/su
-o
-f
/system/xbin/su
]
&&
[
!
-f
/su/bin/su
]
;
then
ui_print
"
! System installed root detected, mount rw :(
"
ui_print
"
- Removing system installed root
"
mount
-o
rw,remount /system
mount
-o
rw,remount /system
# SuperSU
# SuperSU
if
[
-e
/system/bin/.ext/.su
]
;
then
if
[
-e
/system/bin/.ext/.su
]
;
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