Possibly wrong syntax in Windows Script used for Teracube 2e (emerald) in Easy-Installer
- /e/ version: Latest Teracube 2e build
- Device model(s): Teracube 2e
- Device rooted: no
Summary
More than one user reported on the forum that they cannot flash their Teracube 2e (emerald) with the easy-installer on Windows.
See https://community.e.foundation/t/teracube-stuck-in-bootloader-while-flashing-easy-installer/44025 or https://community.e.foundation/t/installation-issue-with-easy-installer-for-teracube-2e/43613
The problem
Steps to reproduce
Try to flash emerald on Windows.
What is the current behavior?
The installer is able to download the image ZIP, perform the bootloader unlock and unpack the ZIP, but flashing the partitions does not work.
The log contains the following error:
fastboot: error: cannot load '%partition_image[0]%': No such file or directory
To me this seems like the variable doesn't get substituted with its actual value.
What is the expected correct behavior?
Flashing the partitions should work.
Technical informations
Relevant logs (adb logcat
)
Relevant screenshots
Solutions
Workaround
No workaround for using the easy-installer. A user could try the manual method if they feel comfortable with it (unlikely when they want to use the installer).
Possible fixes
I think the problem is in line 127 of https://gitlab.e.foundation/e/devices/easy-installer/-/blob/master/flash-scripts/windows/emerald-install-from-bootloader.bat
Not having a Teracube 2e myself I can't test it, but stripping down the script to just echo things instead of executing them, I guess it should work if the for-loop was changed to
(for /L %%i in (0,1,10) do (
setlocal enableDelayedExpansion
%FASTBOOT_PATH% -s %DEVICE_ID% flash !partition_name[%%i]! !partition_image[%%i]!
if errorLevel 1 ( exit /b !partition_error[%%i]! )
timeout 1 >nul 2>&1
call echo "Flashed %%partition_name[%%i]%% "
))
Checklist
-
License -
Translations -
Documentation -
Test plan