scripts: make remaining header/section dividers uniform
- match other recent formatting updates from topjohnwu
This commit is contained in:
parent
84ecba4629
commit
0b70bd2b60
@ -26,9 +26,9 @@ trampoline() {
|
|||||||
fi
|
fi
|
||||||
ui_print() { $BOOTMODE && log -t Magisk -- "$1" || echo -e "ui_print $1\nui_print" >> /proc/self/fd/$OUTFD; }
|
ui_print() { $BOOTMODE && log -t Magisk -- "$1" || echo -e "ui_print $1\nui_print" >> /proc/self/fd/$OUTFD; }
|
||||||
|
|
||||||
ui_print "************************"
|
ui_print "***********************"
|
||||||
ui_print "* Magisk addon.d failed"
|
ui_print " Magisk addon.d failed"
|
||||||
ui_print "************************"
|
ui_print "***********************"
|
||||||
ui_print "! Cannot find Magisk binaries - was data wiped or not decrypted?"
|
ui_print "! Cannot find Magisk binaries - was data wiped or not decrypted?"
|
||||||
ui_print "! Reflash OTA from decrypted recovery or reflash Magisk"
|
ui_print "! Reflash OTA from decrypted recovery or reflash Magisk"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#!/system/bin/sh
|
#!/system/bin/sh
|
||||||
##########################################################################################
|
###########################################################################################
|
||||||
#
|
#
|
||||||
# Magisk Boot Image Patcher
|
# Magisk Boot Image Patcher
|
||||||
# by topjohnwu
|
# by topjohnwu
|
||||||
@ -23,10 +23,11 @@
|
|||||||
# chromeos folder This folder includes all the utilities and keys to sign
|
# chromeos folder This folder includes all the utilities and keys to sign
|
||||||
# (optional) chromeos boot images. Currently only used for Pixel C
|
# (optional) chromeos boot images. Currently only used for Pixel C
|
||||||
#
|
#
|
||||||
##########################################################################################
|
###########################################################################################
|
||||||
##########################################################################################
|
|
||||||
|
############
|
||||||
# Functions
|
# Functions
|
||||||
##########################################################################################
|
############
|
||||||
|
|
||||||
# Pure bash dirname implementation
|
# Pure bash dirname implementation
|
||||||
getdir() {
|
getdir() {
|
||||||
@ -36,9 +37,9 @@ getdir() {
|
|||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
##########################################################################################
|
#################
|
||||||
# Initialization
|
# Initialization
|
||||||
##########################################################################################
|
#################
|
||||||
|
|
||||||
if [ -z $SOURCEDMODE ]; then
|
if [ -z $SOURCEDMODE ]; then
|
||||||
# Switch to the location of the script file
|
# Switch to the location of the script file
|
||||||
@ -62,9 +63,9 @@ chmod -R 755 .
|
|||||||
# Extract magisk if doesn't exist
|
# Extract magisk if doesn't exist
|
||||||
[ -e magisk ] || ./magiskinit -x magisk magisk
|
[ -e magisk ] || ./magiskinit -x magisk magisk
|
||||||
|
|
||||||
##########################################################################################
|
#########
|
||||||
# Unpack
|
# Unpack
|
||||||
##########################################################################################
|
#########
|
||||||
|
|
||||||
CHROMEOS=false
|
CHROMEOS=false
|
||||||
|
|
||||||
@ -83,9 +84,9 @@ esac
|
|||||||
|
|
||||||
[ -f recovery_dtbo ] && RECOVERYMODE=true
|
[ -f recovery_dtbo ] && RECOVERYMODE=true
|
||||||
|
|
||||||
##########################################################################################
|
###################
|
||||||
# Ramdisk restores
|
# Ramdisk Restores
|
||||||
##########################################################################################
|
###################
|
||||||
|
|
||||||
# Test patch status and do restore
|
# Test patch status and do restore
|
||||||
ui_print "- Checking ramdisk status"
|
ui_print "- Checking ramdisk status"
|
||||||
@ -121,9 +122,9 @@ if [ $((STATUS & 8)) -ne 0 ]; then
|
|||||||
export TWOSTAGEINIT=true
|
export TWOSTAGEINIT=true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
##########################################################################################
|
##################
|
||||||
# Ramdisk patches
|
# Ramdisk Patches
|
||||||
##########################################################################################
|
##################
|
||||||
|
|
||||||
ui_print "- Patching ramdisk"
|
ui_print "- Patching ramdisk"
|
||||||
|
|
||||||
@ -146,9 +147,9 @@ fi
|
|||||||
|
|
||||||
rm -f ramdisk.cpio.orig config
|
rm -f ramdisk.cpio.orig config
|
||||||
|
|
||||||
##########################################################################################
|
#################
|
||||||
# Binary patches
|
# Binary Patches
|
||||||
##########################################################################################
|
#################
|
||||||
|
|
||||||
for dt in dtb kernel_dtb extra recovery_dtbo; do
|
for dt in dtb kernel_dtb extra recovery_dtbo; do
|
||||||
[ -f $dt ] && ./magiskboot dtb $dt patch && ui_print "- Patch fstab in $dt"
|
[ -f $dt ] && ./magiskboot dtb $dt patch && ui_print "- Patch fstab in $dt"
|
||||||
@ -172,9 +173,9 @@ if [ -f kernel ]; then
|
|||||||
77616E745F696E697472616D667300
|
77616E745F696E697472616D667300
|
||||||
fi
|
fi
|
||||||
|
|
||||||
##########################################################################################
|
#################
|
||||||
# Repack and flash
|
# Repack & Flash
|
||||||
##########################################################################################
|
#################
|
||||||
|
|
||||||
ui_print "- Repacking boot image"
|
ui_print "- Repacking boot image"
|
||||||
./magiskboot repack "$BOOTIMAGE" || abort "! Unable to repack boot image!"
|
./magiskboot repack "$BOOTIMAGE" || abort "! Unable to repack boot image!"
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
################################################################
|
#####################################################################
|
||||||
# AVD Magisk Setup
|
# AVD Magisk Setup
|
||||||
################################################################
|
#####################################################################
|
||||||
#
|
#
|
||||||
# This script will setup an environment with minimal Magisk that
|
# This script will setup an environment with minimal Magisk that
|
||||||
# Magisk Manager will be happy to run properly within the official
|
# Magisk Manager will be happy to run properly within the official
|
||||||
@ -14,7 +14,7 @@
|
|||||||
# The script assumes you are using x86/x64 emulator images.
|
# The script assumes you are using x86/x64 emulator images.
|
||||||
# Build binaries with `./build.py binary` before running this script.
|
# Build binaries with `./build.py binary` before running this script.
|
||||||
#
|
#
|
||||||
################################################################
|
#####################################################################
|
||||||
|
|
||||||
abort() {
|
abort() {
|
||||||
echo "$@"
|
echo "$@"
|
||||||
|
@ -6,9 +6,9 @@
|
|||||||
#
|
#
|
||||||
############################################
|
############################################
|
||||||
|
|
||||||
############################################
|
##############
|
||||||
# Preparation
|
# Preparation
|
||||||
############################################
|
##############
|
||||||
|
|
||||||
COMMONDIR=$INSTALLER/common
|
COMMONDIR=$INSTALLER/common
|
||||||
APK=$COMMONDIR/magisk.apk
|
APK=$COMMONDIR/magisk.apk
|
||||||
@ -30,9 +30,9 @@ fi
|
|||||||
|
|
||||||
setup_flashable
|
setup_flashable
|
||||||
|
|
||||||
############################################
|
############
|
||||||
# Detection
|
# Detection
|
||||||
############################################
|
############
|
||||||
|
|
||||||
PRETTY_VER=$MAGISK_VER
|
PRETTY_VER=$MAGISK_VER
|
||||||
echo $PRETTY_VER | grep -q '\.' && PRETTY_VER=v$PRETTY_VER
|
echo $PRETTY_VER | grep -q '\.' && PRETTY_VER=v$PRETTY_VER
|
||||||
@ -60,9 +60,9 @@ chmod -R 755 $CHROMEDIR $BINDIR
|
|||||||
# Check if system root is installed and remove
|
# Check if system root is installed and remove
|
||||||
remove_system_su
|
remove_system_su
|
||||||
|
|
||||||
############################################
|
##############
|
||||||
# Environment
|
# Environment
|
||||||
############################################
|
##############
|
||||||
|
|
||||||
ui_print "- Constructing environment"
|
ui_print "- Constructing environment"
|
||||||
|
|
||||||
@ -83,9 +83,9 @@ fi
|
|||||||
|
|
||||||
$BOOTMODE || recovery_actions
|
$BOOTMODE || recovery_actions
|
||||||
|
|
||||||
############################################
|
#####################
|
||||||
# Boot/DTBO Patching
|
# Boot/DTBO Patching
|
||||||
############################################
|
#####################
|
||||||
|
|
||||||
install_magisk
|
install_magisk
|
||||||
|
|
||||||
|
@ -6,9 +6,9 @@
|
|||||||
#
|
#
|
||||||
############################################
|
############################################
|
||||||
|
|
||||||
############################################
|
##############
|
||||||
# Preparation
|
# Preparation
|
||||||
############################################
|
##############
|
||||||
|
|
||||||
# This path should work in any cases
|
# This path should work in any cases
|
||||||
TMPDIR=/dev/tmp
|
TMPDIR=/dev/tmp
|
||||||
@ -51,9 +51,9 @@ $DATA_DE || abort "! Cannot access /data, please uninstall with Magisk Manager"
|
|||||||
$BOOTMODE || recovery_actions
|
$BOOTMODE || recovery_actions
|
||||||
run_migrations
|
run_migrations
|
||||||
|
|
||||||
############################################
|
############
|
||||||
# Uninstall
|
# Uninstall
|
||||||
############################################
|
############
|
||||||
|
|
||||||
get_flags
|
get_flags
|
||||||
find_boot_image
|
find_boot_image
|
||||||
|
@ -170,9 +170,9 @@ rm -rf \
|
|||||||
$MODPATH/system/placeholder $MODPATH/customize.sh \
|
$MODPATH/system/placeholder $MODPATH/customize.sh \
|
||||||
$MODPATH/README.md $MODPATH/.git* 2>/dev/null
|
$MODPATH/README.md $MODPATH/.git* 2>/dev/null
|
||||||
|
|
||||||
##############
|
#############
|
||||||
# Finalizing
|
# Finalizing
|
||||||
##############
|
#############
|
||||||
|
|
||||||
cd /
|
cd /
|
||||||
$BOOTMODE || recovery_cleanup
|
$BOOTMODE || recovery_cleanup
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
#########################################
|
############################################
|
||||||
#
|
#
|
||||||
# Magisk General Utility Functions
|
# Magisk General Utility Functions
|
||||||
# by topjohnwu
|
# by topjohnwu
|
||||||
#
|
#
|
||||||
#########################################
|
############################################
|
||||||
|
|
||||||
#MAGISK_VERSION_STUB
|
#MAGISK_VERSION_STUB
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user