Initial push
This commit is contained in:
parent
1effac6bf8
commit
a01d3e7cc2
1993 changed files with 106354 additions and 0 deletions
108
scripts/A-Team-Magisk.sh
Executable file
108
scripts/A-Team-Magisk.sh
Executable file
|
|
@ -0,0 +1,108 @@
|
|||
#!/system/bin/sh
|
||||
|
||||
#
|
||||
# Copyright 2019-Present A-Team Digital Solutions
|
||||
#
|
||||
# A-Team Magisk Initial Setup Script
|
||||
|
||||
LOCK_FILE="/data/local/tmp/Lock.a-team"
|
||||
LOCK_FILE_1="/data/local/tmp/Lock-1.a-team"
|
||||
|
||||
# If Lock File Exists, Exit (prevents re-running after first boot)
|
||||
if [ -f "$LOCK_FILE" ]; then
|
||||
exit
|
||||
|
||||
else
|
||||
|
||||
sleep 25
|
||||
|
||||
# Wait For Setup To Complete Before Proceeding
|
||||
while [ "$(settings get global device_provisioned)" -ne 1 ]; do
|
||||
sleep 5
|
||||
done
|
||||
|
||||
while true; do
|
||||
current_focus=$(dumpsys window | grep mCurrentFocus)
|
||||
|
||||
if echo "$current_focus" | grep -q -E 'Keyguard|StatusBar|NotificationShade|null'; then
|
||||
echo "Still locked, waiting..."
|
||||
sleep 1
|
||||
else
|
||||
echo "Device is unlocked!"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# Set Screen Brightness
|
||||
settings put system screen_brightness 255
|
||||
su -c settings put system screen_brightness 255
|
||||
settings put system screen_brightness 255
|
||||
|
||||
# Set Screen Timeout to 30 Minutes
|
||||
settings put system screen_off_timeout 1800000
|
||||
su -c settings put system screen_off_timeout 1800000
|
||||
settings put system screen_off_timeout 1800000
|
||||
|
||||
# Install Nova Launcher
|
||||
pm install -r "/system/A-Team/Apps/NovaLauncher.apk"
|
||||
|
||||
sleep 1
|
||||
|
||||
# Install Magisk Manager
|
||||
pm install -r "/system/A-Team/Apps/Magisk.apk"
|
||||
|
||||
sleep 5
|
||||
|
||||
## Setup Magisk
|
||||
# Spawn Magisk Manager
|
||||
am start -n com.topjohnwu.magisk/com.topjohnwu.magisk.ui.MainActivity
|
||||
sleep 15
|
||||
# Allow Notifications
|
||||
input keyevent 23
|
||||
sleep 0.5
|
||||
input keyevent 23
|
||||
sleep 0.5
|
||||
# Down To Cancel
|
||||
input keyevent 20
|
||||
sleep 0.5
|
||||
# Enter To Cancel
|
||||
input keyevent 23
|
||||
sleep 0.5
|
||||
# Enter To Hide Nag
|
||||
input keyevent 23
|
||||
sleep 0.5
|
||||
# Enter To Install
|
||||
input keyevent 23
|
||||
sleep 0.5
|
||||
# Down 2x To Direct Install
|
||||
input keyevent 20
|
||||
sleep 0.5
|
||||
input keyevent 20
|
||||
sleep 0.5
|
||||
# Enter To Select Direct Install
|
||||
input keyevent 23
|
||||
sleep 0.5
|
||||
# Right To Let's Go
|
||||
input keyevent 22
|
||||
sleep 0.5
|
||||
# Enter To Flash
|
||||
input keyevent 23
|
||||
sleep 0.5
|
||||
|
||||
sleep 1
|
||||
|
||||
# Create Lock File So Script Doesn't Run Again
|
||||
touch "$LOCK_FILE"
|
||||
|
||||
sleep 1
|
||||
|
||||
# Create Lock File So Script Runs
|
||||
touch "$LOCK_FILE_1"
|
||||
|
||||
# Sleep 20 Seconds
|
||||
sleep 20
|
||||
|
||||
# Auto Reboot
|
||||
reboot
|
||||
|
||||
fi
|
||||
Loading…
Reference in a new issue