Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 37921491 authored by Mark Salyzyn's avatar Mark Salyzyn
Browse files

adb-remount-test: try to fixup device after reboot (recovery)

If device records a boot failure, the device could enter recovery
mode.  If so, try another reboot to see if the device will heal.

Test: adb-remount-test.sh
Bug: 132070014
Change-Id: I4bee37e11f6344ab1ce176233d7d4e50df132cd7
parent 30afd8b9
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -1001,8 +1001,16 @@ diff ${tempdir}/libc.so ${tempdir}/libc.so.fromdevice > /dev/null ||

echo "${GREEN}[ RUN      ]${NORMAL} reboot to confirm content persistent" >&2

fixup_from_recovery() {
  inRecovery || return 1
  echo "${ORANGE}[    ERROR ]${NORMAL} Device in recovery" >&2
  adb reboot
  adb_wait 2m
}

adb_reboot &&
  adb_wait 2m ||
  fixup_from_recovery ||
  die "reboot after override content added failed `usb_status`"

if ${overlayfs_needed}; then
@@ -1110,6 +1118,7 @@ else
    die "can not reboot out of fastboot"
  echo "${ORANGE}[  WARNING ]${NORMAL} adb after fastboot"
  adb_wait 2m ||
    fixup_from_recovery ||
    die "did not reboot after flash `usb_status`"
  if ${overlayfs_needed}; then
    adb_root &&