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

Commit 746b2012 authored by Tatsuyuki Ishi's avatar Tatsuyuki Ishi
Browse files

Pick up fastboot serial from $FASTBOOT_SERIAL

This allows running the script with a network fastboot device.

Test: none
Change-Id: I6d092d3b4b2d4a3454aed73b18844db864c71bdd
parent d37f814a
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -35,6 +35,15 @@ log_message() {
  echo "$(date '+%Y-%m-%d %H:%M:%S') - $message" >> "$log_file" # Append to log file with timestamp
}

# Wrap fastboot to pick up the preferred serial from environment. adb already honors $ANDROID_SERIAL.
fastboot() {
  if [ -z "$FASTBOOT_SERIAL" ]; then
    command fastboot "$@"
  else
    command fastboot -s "$FASTBOOT_SERIAL" "$@"
  fi
}

# Function to check for create_snapshot and build if needed
ensure_create_snapshot() {
  if ! command -v create_snapshot &> /dev/null; then