mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-06-12 05:07:45 +02:00
scripts: make remaining header/section dividers uniform
- match other recent formatting updates from topjohnwu
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
#!/system/bin/sh
|
||||
##########################################################################################
|
||||
###########################################################################################
|
||||
#
|
||||
# Magisk Boot Image Patcher
|
||||
# by topjohnwu
|
||||
@ -23,10 +23,11 @@
|
||||
# chromeos folder This folder includes all the utilities and keys to sign
|
||||
# (optional) chromeos boot images. Currently only used for Pixel C
|
||||
#
|
||||
##########################################################################################
|
||||
##########################################################################################
|
||||
###########################################################################################
|
||||
|
||||
############
|
||||
# Functions
|
||||
##########################################################################################
|
||||
############
|
||||
|
||||
# Pure bash dirname implementation
|
||||
getdir() {
|
||||
@ -36,9 +37,9 @@ getdir() {
|
||||
esac
|
||||
}
|
||||
|
||||
##########################################################################################
|
||||
#################
|
||||
# Initialization
|
||||
##########################################################################################
|
||||
#################
|
||||
|
||||
if [ -z $SOURCEDMODE ]; then
|
||||
# Switch to the location of the script file
|
||||
@ -62,9 +63,9 @@ chmod -R 755 .
|
||||
# Extract magisk if doesn't exist
|
||||
[ -e magisk ] || ./magiskinit -x magisk magisk
|
||||
|
||||
##########################################################################################
|
||||
#########
|
||||
# Unpack
|
||||
##########################################################################################
|
||||
#########
|
||||
|
||||
CHROMEOS=false
|
||||
|
||||
@ -83,9 +84,9 @@ esac
|
||||
|
||||
[ -f recovery_dtbo ] && RECOVERYMODE=true
|
||||
|
||||
##########################################################################################
|
||||
# Ramdisk restores
|
||||
##########################################################################################
|
||||
###################
|
||||
# Ramdisk Restores
|
||||
###################
|
||||
|
||||
# Test patch status and do restore
|
||||
ui_print "- Checking ramdisk status"
|
||||
@ -121,9 +122,9 @@ if [ $((STATUS & 8)) -ne 0 ]; then
|
||||
export TWOSTAGEINIT=true
|
||||
fi
|
||||
|
||||
##########################################################################################
|
||||
# Ramdisk patches
|
||||
##########################################################################################
|
||||
##################
|
||||
# Ramdisk Patches
|
||||
##################
|
||||
|
||||
ui_print "- Patching ramdisk"
|
||||
|
||||
@ -146,9 +147,9 @@ fi
|
||||
|
||||
rm -f ramdisk.cpio.orig config
|
||||
|
||||
##########################################################################################
|
||||
# Binary patches
|
||||
##########################################################################################
|
||||
#################
|
||||
# Binary Patches
|
||||
#################
|
||||
|
||||
for dt in dtb kernel_dtb extra recovery_dtbo; do
|
||||
[ -f $dt ] && ./magiskboot dtb $dt patch && ui_print "- Patch fstab in $dt"
|
||||
@ -172,9 +173,9 @@ if [ -f kernel ]; then
|
||||
77616E745F696E697472616D667300
|
||||
fi
|
||||
|
||||
##########################################################################################
|
||||
# Repack and flash
|
||||
##########################################################################################
|
||||
#################
|
||||
# Repack & Flash
|
||||
#################
|
||||
|
||||
ui_print "- Repacking boot image"
|
||||
./magiskboot repack "$BOOTIMAGE" || abort "! Unable to repack boot image!"
|
||||
|
Reference in New Issue
Block a user