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

Commit 48b19b04 authored by Rohit Sekhar's avatar Rohit Sekhar
Browse files

Merge branch '407-issue-GS290_ship_everything' into 'master'

GS290: Update installation procedure

Closes #407

See merge request e/tools/easy-installer!150
parents e7dfbec8 71f57a1a
Loading
Loading
Loading
Loading
+103 −15
Original line number Diff line number Diff line
@@ -27,11 +27,22 @@
# - 1 : generic error
# - 10: can't unpack system.img
# - 11: can't wipe data
# - 12: can't flash boot
# - 13: can't flash recovery
# - 14: can't flash system
# - 15: can't flash lk
# - 16: can't flash logo
# - 12: can't flash system
# - 13: can't flash vendor
# - 14: can't flash boot
# - 15: can't flash dtbo
# - 16: can't flash recovery
# - 17: can't flash logo
# - 18: can't flash md1dsp
# - 19: can't flash md1img
# - 20: can't flash spmfw
# - 21: can't flash lk
# - 22: can't flash lk2
# - 23: can't flash sspm_1
# - 24: can't flash sspm_2
# - 25: can't flash tee1
# - 26: can't flash tee2
# - 27: can't flash preloader
# - 101 : DEVICE_ID missing
# - 102 : ARCHIVE_PATH missing
# - 103 : fastboot folder path missing
@@ -97,37 +108,114 @@ echo "user data wiped"
sleep 5

# Flash the device
if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash --disable-verity --disable-verification boot boot.img
if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash system system.img
then
  exit 12
fi
sleep 1
echo "Flashed boot"
echo "Flashed system"

if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash recovery recovery-e-latest-GS290.img
if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash vendor vendor-sparsed.img
then
  exit 13
fi
sleep 1
echo "Flashed recovery"
echo "Flashed vendor"

if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash system system.img
if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash boot boot.img
then
  exit 14
fi
sleep 1
echo "Flashed system"
echo "Flashed boot"

if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash lk lk.img
if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash dtbo dtbo.img
then
  exit 15
fi
sleep 1
echo "Flashed lk"
echo "Flashed dtbo"

if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash logo logo.bin
if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash recovery recovery.img
then
  exit 16
fi
sleep 1
echo "Flashed recovery"

if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash logo logo.img
then
  exit 17
fi
sleep 1
echo "Flashed logo"

if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash md1dsp md1dsp.img
then
  exit 18
fi
sleep 1
echo "Flashed md1dsp"

if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash md1img md1img.img
then
  exit 19
fi
sleep 1
echo "Flashed md1img"

if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash spmfw spmfw.img
then
  exit 20
fi
sleep 1
echo "Flashed spmfw"

if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash lk lk.img
then
  exit 21
fi
sleep 1
echo "Flashed lk"

if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash lk2 lk.img
then
  exit 22
fi
sleep 1
echo "Flashed lk2"

if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash sspm_1 sspm.img
then
  exit 23
fi
sleep 1
echo "Flashed sspm_1"

if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash sspm_2 sspm.img
then
  exit 24
fi
sleep 1
echo "Flashed sspm_2"

if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash tee1 tee.img
then
  exit 25
fi
sleep 1
echo "Flashed tee1"

if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash tee2 tee.img
then
  exit 26
fi
sleep 1
echo "Flashed tee2"

if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash preloader preloader.img
then
  exit 27
fi
sleep 1
echo "Flashed preloader"
+80 −23
Original line number Diff line number Diff line
@@ -25,11 +25,22 @@
:: - 1 : generic error
:: - 10: can't unpack system.img
:: - 11: can't wipe data
:: - 12: can't flash boot
:: - 13: can't flash recovery
:: - 14: can't flash system
:: - 15: can't flash lk
:: - 16: can't flash logo
:: - 12: can't flash system
:: - 13: can't flash vendor
:: - 14: can't flash boot
:: - 15: can't flash dtbo
:: - 16: can't flash recovery
:: - 17: can't flash logo
:: - 18: can't flash md1dsp
:: - 19: can't flash md1img
:: - 20: can't flash spmfw
:: - 21: can't flash lk
:: - 22: can't flash lk2
:: - 23: can't flash sspm_1
:: - 24: can't flash sspm_2
:: - 25: can't flash tee1
:: - 26: can't flash tee2
:: - 27: can't flash preloader
:: - 101 : DEVICE_ID missing
:: - 102 : ARCHIVE_PATH missing
:: - 103 : fastboot folder path missing
@@ -66,51 +77,97 @@ for %%a in ("%ARCHIVE_PATH%") do (
	set ARCHIVE_FOLDER_PATH=%%~dpa"
	echo %ARCHIVE_FOLDER_PATH%
)
:: unzip for system.img
:: unzip all images
cd "%ARCHIVE_FOLDER_PATH%"

%JAR_PATH% -x -v -f "%ARCHIVE_PATH%"
if errorLevel 1 ( exit /b 10 )

echo "unpacked archive"

timeout 1 >nul 2>&1

%FASTBOOT_PATH% -w
if errorLevel 1 ( exit /b 11 )

echo "user data wiped"

timeout 5 >nul 2>&1

%FASTBOOT_PATH% -s %DEVICE_ID% flash --disable-verity --disable-verification boot boot.img
:: Flash the device
%FASTBOOT_PATH% -s %DEVICE_ID% flash system system.img
if errorLevel 1 ( exit /b 12 )
timeout 1 >nul 2>&1
echo "Flashed system"

%FASTBOOT_PATH% -s %DEVICE_ID% flash vendor vendor-sparsed.img
if errorLevel 1 ( exit /b 13 )
timeout 1 >nul 2>&1
echo "Flashed vendor"

%FASTBOOT_PATH% -s %DEVICE_ID% flash boot boot.img
if errorLevel 1 ( exit /b 14 )
timeout 1 >nul 2>&1
echo "Flashed boot"

%FASTBOOT_PATH% -s %DEVICE_ID% flash recovery recovery-e-latest-GS290.img
if errorLevel 1 ( exit /b 13 )
%FASTBOOT_PATH% -s %DEVICE_ID% flash dtbo dtbo.img
if errorLevel 1 ( exit /b 15 )
timeout 1 >nul 2>&1
echo "Flashed dtbo"

%FASTBOOT_PATH% -s %DEVICE_ID% flash recovery recovery.img
if errorLevel 1 ( exit /b 16 )
timeout 1 >nul 2>&1
echo "Flashed recovery"

%FASTBOOT_PATH% -s %DEVICE_ID% flash system system.img
if errorLevel 1 ( exit /b 14 )
%FASTBOOT_PATH% -s %DEVICE_ID% flash logo logo.img
if errorLevel 1 ( exit /b 17 )
timeout 1 >nul 2>&1
echo "Flashed logo"

%FASTBOOT_PATH% -s %DEVICE_ID% flash md1dsp md1dsp.img
if errorLevel 1 ( exit /b 18 )
timeout 1 >nul 2>&1
echo "Flashed system"
echo "Flashed md1dsp"

%FASTBOOT_PATH% -s %DEVICE_ID% flash lk lk.img
if errorLevel 1 ( exit /b 15 )
%FASTBOOT_PATH% -s %DEVICE_ID% flash md1img md1img.img
if errorLevel 1 ( exit /b 19 )
timeout 1 >nul 2>&1
echo "Flashed md1img"

%FASTBOOT_PATH% -s %DEVICE_ID% flash spmfw spmfw.img
if errorLevel 1 ( exit /b 20 )
timeout 1 >nul 2>&1
echo "Flashed spmfw"

%FASTBOOT_PATH% -s %DEVICE_ID% flash lk lk.img
if errorLevel 1 ( exit /b 21 )
timeout 1 >nul 2>&1
echo "Flashed lk"

%FASTBOOT_PATH% -s %DEVICE_ID% flash logo logo.bin
if errorLevel 1 ( exit /b 16 )
%FASTBOOT_PATH% -s %DEVICE_ID% flash lk2 lk.img
if errorLevel 1 ( exit /b 22 )
timeout 1 >nul 2>&1
echo "Flashed lk2"

%FASTBOOT_PATH% -s %DEVICE_ID% flash sspm_1 sspm.img
if errorLevel 1 ( exit /b 23 )
timeout 1 >nul 2>&1
echo "Flashed sspm_1"

%FASTBOOT_PATH% -s %DEVICE_ID% flash sspm_2 sspm.img
if errorLevel 1 ( exit /b 24 )
timeout 1 >nul 2>&1
echo "Flashed logo"
echo "Flashed sspm_2"

%FASTBOOT_PATH% -s %DEVICE_ID% flash tee1 tee.img
if errorLevel 1 ( exit /b 25 )
timeout 1 >nul 2>&1
echo "Flashed tee1"

%FASTBOOT_PATH% -s %DEVICE_ID% flash tee2 tee.img
if errorLevel 1 ( exit /b 26 )
timeout 1 >nul 2>&1
echo "Flashed tee2"

%FASTBOOT_PATH% -s %DEVICE_ID% flash preloader preloader.img
if errorLevel 1 ( exit /b 27 )
timeout 1 >nul 2>&1
echo "Flashed preloader"

exit /b 0
+13 −1
Original line number Diff line number Diff line
@@ -230,15 +230,27 @@ script_error_cantRebootBootloader= Failed to reboot into bootloader
script_error_cantUnpackSources=Failed to unpack /e/ sources
script_error_cantWipeData=Failed to wipe data
script_error_cantFlashBoot=Failed to flash Boot partition
script_error_cantFlashDtbo=Failed to flash dtbo partition
script_error_cantFlashRecovery=Failed to flash Recovery
script_error_cantFlashLogo=Failed to flash logo partition
script_error_cantFlashMd1dsp=Failed to flash md1dsp partition
script_error_cantFlashMd1img=Failed to flash md1img partition
script_error_cantFlashSpmfw=Failed to flash spmfw partition
script_error_cantFlashLk=Failed to flash lk partition
script_error_cantFlashLk2=Failed to flash lk2 partition
script_error_cantFlashSspm_1=Failed to flash sspm_1 partition
script_error_cantFlashSspm_2=Failed to flash sspm_2 partition
script_error_cantFlashTee1=Failed to flash tee1 partition
script_error_cantFlashTee2=Failed to flash tee2 partition
script_error_cantFlashPreloader=Failed to flash preloader partition
script_error_cantFlashVbmeta=Failed to flash vb meta partition
script_error_cantFlashVbmeta_system=Failed to flash vb meta system partition
script_error_cantFlashVBmeta_vendor=Failed to flash vb Meta vendor partition
script_error_cantRebootToFastboot=Failed to reboot into fastboot mode
script_error_cantFlashSystem=Failed to flash system partition
script_error_cantFlashproduct=Failed to flash product partition 
script_error_cantFlashVendor=Failed to flash vendor partition
script_error_cantrebootFromFasboot= Failed to reboot from fastboot
script_error_cantRebootToFastboot=Failed to reboot into fastboot mode
java_error_unknow= The installation encounter an internal error
flash_process_cancelled=The installation process has been cancelled

+32 −33
Original line number Diff line number Diff line
@@ -14,24 +14,12 @@
## along with this program.  If not, see <https://www.gnu.org/licenses/>.
## Author: Vincent Bourgmayer
---
stepsCount: 7
stepsCount: 6
steps:
    f0:
        type: custom
        stepNumber: 1
        nextStepKey: f1
        titleKey: stepTitle_checkDeviceUptodate
        titleIconName: icon-download.png
        instructions:
          - install_instr_connectTowifi
          - install_instr_GS290_accessSystemSettings
          - install_instr_GS290_accessSystemUpdate
          - install_instr_update_stockrom
          - install_instr_continueIfDeviceUpToDate
    f1:
        type: custom
        stepNumber: 2
        nextStepKey: f2
        titleKey: stepTitle_enableOemUnlock
        titleIconName: icon-download.png
        instructions:
@@ -40,10 +28,10 @@ steps:
          - install_instr_enableOEMUnlocking
          - install_instr_acceptOEMUnlockWarning
          - install_instr_onceDoneThenContinue
    f2:
    f1:
        type: load
        stepNumber: 3
        nextStepKey: f3
        stepNumber: 2
        nextStepKey: f2
        titleKey: stepTitle_rebootBootloader
        instructions:
          - install_instr_rebootingOnBootloader
@@ -59,10 +47,10 @@ steps:
            10: script_error_cantRebootBootloader
            101: script_error_serialNumber_missing
            102: script_error_fastboot_path_missing
    f3:
    f2:
        type: custom-executable
        stepNumber: 4
        nextStepKey: f4
        stepNumber: 3
        nextStepKey: f3
        titleKey: stepTitle_oemUnlock
        titleIconName: icon-download.png
        instructions:
@@ -81,10 +69,10 @@ steps:
            101: script_error_serialNumber_missing
            102: script_error_fastboot_path_missing

    f4:
    f3:
        type: load
        stepNumber: 5
        nextStepKey: f5
        stepNumber: 4
        nextStepKey: f4
        titleKey: stepTitle_installOS
        instructions:
            - install_instr_eosInstall
@@ -101,21 +89,32 @@ steps:
          1: script_error_unknown
          10: script_error_cantUnpackSources
          11: script_error_cantWipeData
          12: script_error_cantFlashBoot
          13: script_error_cantFlashRecovery
          14: script_error_cantFlashsystem
          15: script_error_cantFlashLk
          16: script_error_cantFlashLogo
          12: script_error_cantFlashSystem
          13: script_error_cantFlashVendor
          14: script_error_cantFlashBoot
          15: script_error_cantFlashDtbo
          16: script_error_cantFlashRecovery
          17: script_error_cantFlashLogo
          18: script_error_cantFlashMd1dsp
          19: script_error_cantFlashMd1img
          20: script_error_cantFlashSpmfw
          21: script_error_cantFlashLk
          22: script_error_cantFlashLk2
          23: script_error_cantFlashSspm_1
          24: script_error_cantFlashSspm_2
          25: script_error_cantFlashTee1
          26: script_error_cantFlashTee2
          27: script_error_cantFlashPreloader
          101: script_error_serialNumber_missing
          102: script_error_installFromFastboot_102
          103: script_error_fastboot_path_missing
    f5:
    f4:
        type: askAccount
        stepNumber: 6
        nextStepKey: f6
    f6:
        stepNumber: 5
        nextStepKey: f5
    f5:
        type: custom-executable
        stepNumber: 7
        stepNumber: 6
        nextStepKey: end
        titleKey: stepTitle_rebootDevice
        titleIconName: icon-download.png
+0 −12
Original line number Diff line number Diff line
@@ -18,15 +18,3 @@ sources:
  rom:
    url: https://images.ecloud.global/stable/GS290/IMG-e-latest-GS290.zip
    filePath: IMG-e-latest-GS290.zip
  boot.img:
    url: https://images.ecloud.global/stable/GS290/boot.img
    filePath: boot.img
  lk.img:
    url: https://images.ecloud.global/stable/GS290/lk.img
    filePath: lk.img
  logo.bin:
    url: https://images.ecloud.global/stable/GS290/logo.bin
    filePath: logo.bin
  recovery:
    url: https://images.ecloud.global/stable/GS290/recovery-e-latest-GS290.img
    filePath: recovery-e-latest-GS290.img