-
Notifications
You must be signed in to change notification settings - Fork 7
/
unlock.sh
25 lines (19 loc) · 894 Bytes
/
unlock.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash
# Function to execute ADB commands
execute_adb_command() {
adb shell "$1"
}
# Run ADB commands
execute_adb_command "settings put global setup_wizard_has_run 1"
execute_adb_command "settings put secure user_setup_complete 1"
execute_adb_command "content insert --uri content://settings/secure --bind name:s:DEVICE_PROVISIONED --bind value:i:1"
execute_adb_command "content insert --uri content://settings/secure --bind name:s:user_setup_complete --bind value:i:1"
execute_adb_command "content insert --uri content://settings/secure --bind name:s:INSTALL_NON_MARKET_APPS --bind value:i:1"
execute_adb_command "am start -c android.intent.category.HOME -a android.intent.action.MAIN"
# Wait for 5 seconds
sleep 5
execute_adb_command "am start -n com.android.settings/com.android.settings.Settings"
# Wait for 5 seconds
sleep 5
# Reboot the device
execute_adb_command "reboot"