mirror of
https://github.com/chenxiaolong/avbroot.git
synced 2026-07-03 14:05:11 +02:00
53e0e30c86
The module helps reduce the chance of OEM unlocking being disabled, whether by the user or by some OS's initial setup wizard. It works by running some Java code at boot, which connects to the `OemLockService` binder service and calls `setOemUnlockAllowedByUser(true)`, the same as what the Settings app does. Fixes: #8 Issue: #84 Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
34 lines
612 B
Bash
34 lines
612 B
Bash
#!/sbin/sh
|
|
|
|
#################
|
|
# Initialization
|
|
#################
|
|
|
|
umask 022
|
|
|
|
# echo before loading util_functions
|
|
ui_print() { echo "$1"; }
|
|
|
|
require_new_magisk() {
|
|
ui_print "*******************************"
|
|
ui_print " Please install Magisk v20.4+! "
|
|
ui_print "*******************************"
|
|
exit 1
|
|
}
|
|
|
|
#########################
|
|
# Load util_functions.sh
|
|
#########################
|
|
|
|
OUTFD=$2
|
|
ZIPFILE=$3
|
|
|
|
mount /data 2>/dev/null
|
|
|
|
[ -f /data/adb/magisk/util_functions.sh ] || require_new_magisk
|
|
. /data/adb/magisk/util_functions.sh
|
|
[ $MAGISK_VER_CODE -lt 20400 ] && require_new_magisk
|
|
|
|
install_module
|
|
exit 0
|