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

Commit d09e5260 authored by Tatsuyuki Ishi's avatar Tatsuyuki Ishi
Browse files

Add a flag to reboot to fastbootd (userspace fastboot)

For our use userspace fastboot is faster in terms of network / disk
stack.

Test: none
Change-Id: I58e38ed71c34aa7b9a07efc1c5af3a6b4ce5d787
parent 746b2012
Loading
Loading
Loading
Loading
+14 −1
Original line number Diff line number Diff line
@@ -136,6 +136,7 @@ EOF
skip_static_partitions=0
boot_snapshot=0
flash_bootloader=1
userspace_fastboot=0
wipe_flag=0
help_flag=0

@@ -154,6 +155,9 @@ for arg in "$@"; do
    --boot_snapshot)
      boot_snapshot=1
      ;;
    --userspace_fastboot)
      userspace_fastboot=1
      ;;
    --help)
      help_flag=1
      ;;
@@ -170,6 +174,11 @@ if ((help_flag)); then
  exit 0
fi

if (( flash_bootloader && userspace_fastboot )); then
  echo "Bootloader cannot be flashed with userspace fastboot"
  exit 1
fi

rm -rf $HOST_PATH

adb wait-for-device
@@ -236,7 +245,11 @@ if (( skip_static_partitions )); then
  adb reboot
else
  log_message "Rebooting device to bootloader"
  if (( userspace_fastboot )); then
    adb reboot fastboot
  else
    adb reboot bootloader
  fi
  log_message "Waiting to enter fastboot bootloader"
  flash_static_partitions "$wipe_flag" "$flash_bootloader"
fi