Commit 0b70bd2b authored by osm0sis's avatar osm0sis Committed by John Wu

scripts: make remaining header/section dividers uniform

- match other recent formatting updates from topjohnwu
parent 84ecba46
......@@ -26,9 +26,9 @@ trampoline() {
fi
ui_print() { $BOOTMODE && log -t Magisk -- "$1" || echo -e "ui_print $1\nui_print" >> /proc/self/fd/$OUTFD; }
ui_print "************************"
ui_print "* Magisk addon.d failed"
ui_print "************************"
ui_print "***********************"
ui_print " Magisk addon.d failed"
ui_print "***********************"
ui_print "! Cannot find Magisk binaries - was data wiped or not decrypted?"
ui_print "! Reflash OTA from decrypted recovery or reflash Magisk"
exit 1
......
#!/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!"
......
#!/usr/bin/env bash
################################################################
#####################################################################
# AVD Magisk Setup
################################################################
#####################################################################
#
# This script will setup an environment with minimal Magisk that
# 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.
# Build binaries with `./build.py binary` before running this script.
#
################################################################
#####################################################################
abort() {
echo "$@"
......
......@@ -6,9 +6,9 @@
#
############################################
############################################
##############
# Preparation
############################################
##############
COMMONDIR=$INSTALLER/common
APK=$COMMONDIR/magisk.apk
......@@ -30,9 +30,9 @@ fi
setup_flashable
############################################
############
# Detection
############################################
############
PRETTY_VER=$MAGISK_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
remove_system_su
############################################
##############
# Environment
############################################
##############
ui_print "- Constructing environment"
......@@ -83,9 +83,9 @@ fi
$BOOTMODE || recovery_actions
############################################
#####################
# Boot/DTBO Patching
############################################
#####################
install_magisk
......
......@@ -6,9 +6,9 @@
#
############################################
############################################
##############
# Preparation
############################################
##############
# This path should work in any cases
TMPDIR=/dev/tmp
......@@ -51,9 +51,9 @@ $DATA_DE || abort "! Cannot access /data, please uninstall with Magisk Manager"
$BOOTMODE || recovery_actions
run_migrations
############################################
############
# Uninstall
############################################
############
get_flags
find_boot_image
......
......@@ -170,9 +170,9 @@ rm -rf \
$MODPATH/system/placeholder $MODPATH/customize.sh \
$MODPATH/README.md $MODPATH/.git* 2>/dev/null
##############
#############
# Finalizing
##############
#############
cd /
$BOOTMODE || recovery_cleanup
......
#########################################
############################################
#
# Magisk General Utility Functions
# by topjohnwu
#
#########################################
############################################
#MAGISK_VERSION_STUB
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment