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
c421e45f
Commit
c421e45f
authored
Mar 12, 2017
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small improvements and bug fixes
parent
8833d21a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
16 deletions
+12
-16
cpio.c
jni/magiskboot/cpio.c
+1
-1
flash_script.sh
scripts/flash_script.sh
+8
-11
magisk_uninstaller.sh
scripts/magisk_uninstaller.sh
+3
-4
No files found.
jni/magiskboot/cpio.c
View file @
c421e45f
...
@@ -196,7 +196,7 @@ static void cpio_test(vector *v) {
...
@@ -196,7 +196,7 @@ static void cpio_test(vector *v) {
vec_for_each
(
v
,
f
)
{
vec_for_each
(
v
,
f
)
{
if
(
strcmp
(
f
->
filename
,
"sbin/launch_daemonsu.sh"
)
==
0
)
{
if
(
strcmp
(
f
->
filename
,
"sbin/launch_daemonsu.sh"
)
==
0
)
{
if
(
!
ret
)
ret
=
2
;
if
(
!
ret
)
ret
=
2
;
}
else
if
(
strcmp
(
f
->
filename
,
"
magisk
"
)
==
0
)
{
}
else
if
(
strcmp
(
f
->
filename
,
"
init.magisk.rc
"
)
==
0
)
{
ret
=
1
;
ret
=
1
;
break
;
break
;
}
}
...
...
scripts/flash_script.sh
View file @
c421e45f
...
@@ -198,12 +198,8 @@ getvar KEEPVERITY
...
@@ -198,12 +198,8 @@ getvar KEEPVERITY
getvar KEEPFORCEENCRYPT
getvar KEEPFORCEENCRYPT
getvar BOOTIMAGE
getvar BOOTIMAGE
if
[
-z
"
$KEEPVERITY
"
]
;
then
[
-z
$KEEPVERITY
]
&&
KEEPVERITY
=
false
KEEPVERITY
=
false
[
-z
$KEEPFORCEENCRYPT
]
&&
KEEPFORCEENCRYPT
=
false
fi
if
[
-z
"
$KEEPFORCEENCRYPT
"
]
;
then
KEEPFORCEENCRYPT
=
false
fi
# Check if system root is installed and remove
# Check if system root is installed and remove
remove_system_su
remove_system_su
...
@@ -229,13 +225,13 @@ fi
...
@@ -229,13 +225,13 @@ fi
ui_print
"- Device platform:
$ARCH
"
ui_print
"- Device platform:
$ARCH
"
BINDIR
=
$INSTALLER
/
$ARCH
BINDIR
=
$INSTALLER
/
$ARCH
chmod
-R
755
$CHROMEDIR
/futility
$BINDIR
chmod
-R
755
$CHROMEDIR
$BINDIR
SYSTEMLIB
=
/system/lib
SYSTEMLIB
=
/system/lib
$IS64BIT
&&
SYSTEMLIB
=
/system/lib64
$IS64BIT
&&
SYSTEMLIB
=
/system/lib64
find_boot_image
find_boot_image
if
[
-z
"
$BOOTIMAGE
"
]
;
then
if
[
-z
$BOOTIMAGE
]
;
then
ui_print
"! Unable to detect boot image"
ui_print
"! Unable to detect boot image"
exit
1
exit
1
fi
fi
...
@@ -258,6 +254,7 @@ chmod -R 755 $MAGISKBIN
...
@@ -258,6 +254,7 @@ chmod -R 755 $MAGISKBIN
chcon
-h
u:object_r:system_file:s0
$MAGISKBIN
$MAGISKBIN
/
*
chcon
-h
u:object_r:system_file:s0
$MAGISKBIN
$MAGISKBIN
/
*
# Temporary busybox for installation
# Temporary busybox for installation
rm
-rf
$TMPDIR
/busybox 2>/dev/null
mkdir
-p
$TMPDIR
/busybox
mkdir
-p
$TMPDIR
/busybox
$BINDIR
/busybox
--install
-s
$TMPDIR
/busybox
$BINDIR
/busybox
--install
-s
$TMPDIR
/busybox
rm
-f
$TMPDIR
/busybox/su
$TMPDIR
/busybox/sh
$TMPDIR
/busybox/reboot
rm
-f
$TMPDIR
/busybox/su
$TMPDIR
/busybox/sh
$TMPDIR
/busybox/reboot
...
@@ -456,9 +453,9 @@ esac
...
@@ -456,9 +453,9 @@ esac
# Sign chromeos boot
# Sign chromeos boot
if
[
-f
chromeos
]
;
then
if
[
-f
chromeos
]
;
then
cp
-af
$CHROMEDIR
/.
$MAGISKBIN
/chromeos
cp
-af
$CHROMEDIR
/.
$MAGISKBIN
/chromeos
echo
" "
>
config
echo
>
config
echo
" "
>
bootloader
echo
>
bootloader
LD_LIBRARY_PATH
=
$SYSTEMLIB
$CHROMEDIR
/futility vbutil_kernel
--pack
new-boot.img.signed
--keyblock
$CHROMEDIR
/kernel.keyblock
--signprivate
$CHROMEDIR
/kernel_data_key.vbprivk
--version
1
--vmlinuz
new-boot.img
--config
config
--arch
arm
--bootloader
bootloader
--flags
0x1
LD_LIBRARY_PATH
=
$SYSTEMLIB
$CHROMEDIR
/futility vbutil_kernel
--pack
new-boot.img.signed
--keyblock
$CHROMEDIR
/kernel.keyblock
--signprivate
$CHROMEDIR
/kernel_data_key.vbprivk
--version
1
--vmlinuz
new-boot.img
--config
config
--arch
arm
--bootloader
bootloader
--flags
0x1
rm
-f
new-boot.img
rm
-f
new-boot.img
mv
new-boot.img.signed new-boot.img
mv
new-boot.img.signed new-boot.img
...
...
scripts/magisk_uninstaller.sh
View file @
c421e45f
...
@@ -114,12 +114,11 @@ esac
...
@@ -114,12 +114,11 @@ esac
# Sign chromeos boot
# Sign chromeos boot
if
[
-f
chromeos
]
;
then
if
[
-f
chromeos
]
;
then
cp
-af
$CHROMEDIR
/.
$MAGISKBIN
/chromeos
echo
>
config
echo
>
config
echo
>
bootloader
echo
>
bootloader
LD_LIBRARY_PATH
=
$SYSTEMLIB
$CHROMEDIR
/futility vbutil_kernel
--pack
new-boot.img.signed
--keyblock
$CHROMEDIR
/kernel.keyblock
--signprivate
$CHROMEDIR
/kernel_data_key.vbprivk
--version
1
--vmlinuz
new-
boot.img
--config
config
--arch
arm
--bootloader
bootloader
--flags
0x1
LD_LIBRARY_PATH
=
$SYSTEMLIB
$CHROMEDIR
/futility vbutil_kernel
--pack
stock_boot.img.signed
--keyblock
$CHROMEDIR
/kernel.keyblock
--signprivate
$CHROMEDIR
/kernel_data_key.vbprivk
--version
1
--vmlinuz
stock_
boot.img
--config
config
--arch
arm
--bootloader
bootloader
--flags
0x1
rm
-f
new-
boot.img
rm
-f
stock_
boot.img
mv
new-boot.img.signed new-
boot.img
mv
stock_boot.img.signed stock_
boot.img
fi
fi
ui_print_wrapper
"- Flashing stock/reverted image"
ui_print_wrapper
"- Flashing stock/reverted image"
...
...
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