44 lines
695 B
Bash
44 lines
695 B
Bash
wait-for-offline() {
|
|
while [ $(adb devices | grep offline | wc -l) -eq 0 ]; do
|
|
sleep 0.1
|
|
done
|
|
}
|
|
|
|
adb wait-for-device
|
|
adb root
|
|
|
|
wait-for-offline
|
|
adb wait-for-device
|
|
adb shell avbctl disable-verification
|
|
|
|
adb wait-for-device
|
|
adb reboot
|
|
|
|
adb wait-for-device
|
|
adb root
|
|
|
|
wait-for-offline
|
|
adb wait-for-device
|
|
adb remount
|
|
|
|
adb wait-for-device
|
|
adb reboot
|
|
|
|
adb wait-for-device
|
|
adb root
|
|
|
|
wait-for-offline
|
|
adb wait-for-device
|
|
adb remount
|
|
|
|
adb wait-for-device
|
|
adb push /$1 /system/etc/security/cacerts
|
|
adb shell chmod 664 /system/etc/security/cacerts/$1
|
|
adb reboot
|
|
|
|
#wait for complete boot
|
|
adb wait-for-device
|
|
while [ "$(adb shell getprop sys.boot_completed | tr -d '\r')" != "1" ]; do
|
|
sleep 1
|
|
done
|