rentgendroid/pre_android/preconf/install_cert.sh
migueldar a4c63e5ad4 created new image to improve waiting times
Reviewers: kuba-orlik

Subscribers: kuba-orlik

Differential Revision: https://hub.sealcode.org/D1364
2024-03-06 08:45:48 +01:00

46 lines
750 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
#here may be the issue with the bypass (start)
adb wait-for-device
adb reboot
adb wait-for-device
adb root
#(end)
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