From 3ca6335720dcdac093675ac9e612282b24e3d546 Mon Sep 17 00:00:00 2001 From: Jackeagle Date: Thu, 27 Jun 2024 23:17:02 -0400 Subject: [PATCH] flash-scripts: Add adb usb command before sideload - Some devices require this commmand for sideload to work. Signed-off-by: Jackeagle --- flash-scripts/linux/install-from-e-recovery.sh | 3 +++ flash-scripts/windows/install-from-e-recovery.bat | 2 ++ 2 files changed, 5 insertions(+) diff --git a/flash-scripts/linux/install-from-e-recovery.sh b/flash-scripts/linux/install-from-e-recovery.sh index 28ce53b8..23900a28 100755 --- a/flash-scripts/linux/install-from-e-recovery.sh +++ b/flash-scripts/linux/install-from-e-recovery.sh @@ -50,6 +50,9 @@ fi # Build fastboot and adb commands ADB_CMD=${FASTBOOT_FOLDER_PATH}"adb" +# Some devices require adb usb command to switch to sideload mode +"$ADB_CMD" usb +sleep 5 "$ADB_CMD" sideload ${ARCHIVE_FILE} ret=${?} diff --git a/flash-scripts/windows/install-from-e-recovery.bat b/flash-scripts/windows/install-from-e-recovery.bat index 74e12acc..c3b16705 100644 --- a/flash-scripts/windows/install-from-e-recovery.bat +++ b/flash-scripts/windows/install-from-e-recovery.bat @@ -30,6 +30,8 @@ SET ARCHIVE_FILE=%~2 SET FASTBOOT_FOLDER_PATH=%~3 SET ADB_CMD="%FASTBOOT_FOLDER_PATH%adb" +%ADB_CMD% -s %DEVICE_ID% "usb" +sleep 5 %ADB_CMD% -s %DEVICE_ID% "sideload" "%ARCHIVE_FILE%" if errorlevel==0 ( echo "Sideload OK" -- GitLab