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
76fbf463
Commit
76fbf463
authored
Dec 26, 2022
by
topjohnwu
Committed by
John Wu
Dec 27, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update scripts
parent
7ce4bd33
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
11 deletions
+14
-11
avd_magisk.sh
scripts/avd_magisk.sh
+2
-3
boot_patch.sh
scripts/boot_patch.sh
+7
-6
flash_script.sh
scripts/flash_script.sh
+5
-2
No files found.
scripts/avd_magisk.sh
View file @
76fbf463
...
...
@@ -48,7 +48,7 @@ fi
pm
install
-r
$(
pwd
)
/magisk.apk
# Extract files from APK
unzip
-oj
magisk.apk
'assets/util_functions.sh'
unzip
-oj
magisk.apk
'assets/util_functions.sh'
'assets/stub.apk'
.
./util_functions.sh
api_level_arch_detect
...
...
@@ -120,12 +120,11 @@ fi
# Magisk stuff
mkdir
-p
$MAGISKBIN
2>/dev/null
unzip
-oj
magisk.apk
'assets/*.sh'
-d
$MAGISKBIN
unzip
-oj
magisk.apk
'assets/stub.apk'
-d
$MAGISKTMP
mkdir
$NVBASE
/modules 2>/dev/null
mkdir
$POSTFSDATAD
2>/dev/null
mkdir
$SERVICED
2>/dev/null
for
file
in
magisk32 magisk64 magiskpolicy
;
do
for
file
in
magisk32 magisk64 magiskpolicy
stub.apk
;
do
chmod
755 ./
$file
cp
-af
./
$file
$MAGISKTMP
/
$file
cp
-af
./
$file
$MAGISKBIN
/
$file
...
...
scripts/boot_patch.sh
View file @
76fbf463
...
...
@@ -6,7 +6,7 @@
# Usage: boot_patch.sh <bootimage>
#
# The following flags can be set in environment variables:
# KEEPVERITY, KEEPFORCEENCRYPT, RECOVERYMODE
# KEEPVERITY, KEEPFORCEENCRYPT,
PATCHVBMETAFLAG,
RECOVERYMODE
#
# This script should be placed in a directory with the following files:
#
...
...
@@ -14,12 +14,13 @@
#
# boot_patch.sh script A script to patch boot image for Magisk.
# (this file) The script will use files in its same
# directory to complete the patching process
# directory to complete the patching process
.
# util_functions.sh script A script which hosts all functions required
# for this script to work properly
# magiskinit binary The binary to replace /init
# magisk(32/64) binary The magisk binaries
# magiskboot binary A tool to manipulate boot images
# for this script to work properly.
# magiskinit binary The binary to replace /init.
# magisk(32/64) binary The magisk binaries.
# magiskboot binary A tool to manipulate boot images.
# stub.apk binary The stub Magisk app to embed into ramdisk.
# chromeos folder This folder includes the utility and keys to sign
# (optional) chromeos boot images. Only used for Pixel C.
#
...
...
scripts/flash_script.sh
View file @
76fbf463
...
...
@@ -57,8 +57,6 @@ cd $BINDIR
for
file
in
lib
*
.so
;
do
mv
"
$file
"
"
${
file
:3:
${#
file
}
-6
}
"
;
done
cd
/
cp
-af
$INSTALLER
/lib/
$ABI32
/libmagisk32.so
$BINDIR
/magisk32 2>/dev/null
cp
-af
$CHROMEDIR
/.
$BINDIR
/chromeos
chmod
-R
755
$BINDIR
# Check if system root is installed and remove
$BOOTMODE
||
remove_system_su
...
...
@@ -73,6 +71,11 @@ ui_print "- Constructing environment"
rm
-rf
$MAGISKBIN
/
*
2>/dev/null
mkdir
-p
$MAGISKBIN
2>/dev/null
cp
-af
$BINDIR
/.
$COMMONDIR
/.
$BBBIN
$MAGISKBIN
# Remove files only used by the Magisk app
rm
-f
$MAGISKBIN
/bootctl
$MAGISKBIN
/main.jar
\
$MAGISKBIN
/module_installer.sh
$MAGISKBIN
/uninstaller.sh
chmod
-R
755
$MAGISKBIN
# addon.d
...
...
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