diff --git a/flash-scripts/linux/Teracube_2e-install-from-bootloader.sh b/flash-scripts/linux/Teracube_2e-install-from-bootloader.sh index 67e9cf51f555f20e5c3d36eebcdcebe40f6e9b36..55c8392c51815fd80e9fe5daacea138ab299f436 100755 --- a/flash-scripts/linux/Teracube_2e-install-from-bootloader.sh +++ b/flash-scripts/linux/Teracube_2e-install-from-bootloader.sh @@ -23,22 +23,32 @@ # Exit status -# - 0 : device flashed -# - 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 vbmeta -# - 15: can't flash vbmeta_system -# - 16: can't flash vbmeta_vendor -# - 17: can't reboot on fastboot -# - 18: can't flash system -# - 19: can't flash product -# - 20: can't flash vendor +# - 0 : Device flashed successfully +# - 1 : Generic error +# - 10: Error unpacking system.img +# - 11: Error wiping data +# - 12: Error flashing preloader +# - 13: Error flashing lk +# - 14: Error flashing md1img +# - 15: Error flashing logo +# - 16: Error flashing scp1 +# - 17: Error flashing scp2 +# - 18: Error flashing spmfw +# - 19: Error flashing sspm_1 +# - 20: Error flashing sspm_2 +# - 21: Error flashing tee1 +# - 22: Error flashing tee2 +# - 23: Error flashing boot +# - 24: Error flashing dtbo +# - 25: Error flashing recovery +# - 26: Error flashing vbmeta +# - 27: Error flashing vbmeta_system +# - 28: Error flashing vbmeta_vendor +# - 29: Error flashing super # - 101 : DEVICE_ID missing # - 102 : ARCHIVE_PATH missing -# - 103 : fastboot folder path missing +# - 103 : Fastboot folder path missing +# - 104 : Java folder path missing DEVICE_ID=$1 ARCHIVE_PATH=$2 @@ -83,7 +93,7 @@ ARCHIVE_FOLDER_PATH=$(dirname "$ARCHIVE_PATH")"/" cd "$ARCHIVE_FOLDER_PATH" || exit 104 if ! "$JAR_PATH" -x -v -f "$ARCHIVE_PATH" ; -then +then exit 10 fi @@ -92,8 +102,8 @@ echo "unpacked archive" sleep 1 # Wipe user data -if ! "$FASTBOOT_PATH" -w ; -then +if ! "$FASTBOOT_PATH" erase userdata ; +then exit 11 fi @@ -101,66 +111,110 @@ echo "user data wiped" sleep 5 # Flash the device -if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash boot boot.img -then +if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash preloader preloader_zirconia.bin ; then exit 12 fi sleep 1 -echo "Flashed boot" +echo "Flashed preloader" -if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash recovery recovery.img -then +if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash lk lk.img ; then exit 13 fi sleep 1 -echo "Flashed recovery" +echo "Flashed lk" -if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash vbmeta vbmeta.img -then +if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash md1img md1img.img ; then exit 14 fi sleep 1 -echo "Flashed vbmeta" +echo "Flashed md1img" -if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash vbmeta_system vbmeta_system.img -then +if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash logo logo.bin ; then exit 15 fi sleep 1 -echo "Flashed vbmeta_system" +echo "Flashed logo" -if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash vbmeta_vendor vbmeta_vendor.img -then +if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash scp1 scp.img ; then exit 16 fi sleep 1 -echo "Flashed vbmeta_vendor" - +echo "Flashed scp1" -if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" reboot fastboot -then +if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash scp2 scp.img ; then exit 17 fi -sleep 6 -echo "Rebooted on fastboot" +sleep 1 +echo "Flashed scp2" -if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash system system.img -then +if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash spmfw spmfw.img ; then exit 18 fi sleep 1 -echo "Flashed system" +echo "Flashed spmfw" -if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash product product.img -then +if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash sspm_1 sspm.img ; then exit 19 fi sleep 1 -echo "Flashed product" +echo "Flashed sspm_1" -if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash vendor vendor.img -then +if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash sspm_2 sspm.img ; then exit 20 fi sleep 1 -echo "Flashed vendor" \ No newline at end of file +echo "Flashed sspm_2" + +if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash tee1 tee.img ; then + exit 21 +fi +sleep 1 +echo "Flashed tee1" + +if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash tee2 tee.img ; then + exit 22 +fi +sleep 1 +echo "Flashed tee2" + +if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash boot boot.img ; then + exit 23 +fi +sleep 1 +echo "Flashed boot" + +if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash dtbo dtbo.img ; then + exit 24 +fi +sleep 1 +echo "Flashed dtbo" + +if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash recovery recovery.img ; then + exit 25 +fi +sleep 1 +echo "Flashed recovery" + +if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash vbmeta vbmeta.img ; then + exit 26 +fi +sleep 1 +echo "Flashed vbmeta" + +if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash vbmeta_system vbmeta_system.img ; then + exit 27 +fi +sleep 1 +echo "Flashed vbmeta_system" + +if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash vbmeta_vendor vbmeta_vendor.img ; then + exit 28 +fi +sleep 1 +echo "Flashed vbmeta_vendor" + +if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash super super.img ; then + exit 29 +fi +sleep 1 +echo "Flashed super" diff --git a/flash-scripts/linux/emerald-flashingLock.sh b/flash-scripts/linux/emerald-flashingLock.sh index 4973c8c0c93070f95aab3576ac1a61b024ee30ee..6e3a5d1b15b803898b884e54e477528ac2ea2a91 100755 --- a/flash-scripts/linux/emerald-flashingLock.sh +++ b/flash-scripts/linux/emerald-flashingLock.sh @@ -45,8 +45,8 @@ fi FASTBOOT_PATH=${FASTBOOT_FOLDER_PATH}"fastboot" # Lock bootloader -if ! ${FASTBOOT_PATH} flashing lock ; -then +if ! ${FASTBOOT_PATH} -s $DEVICE_ID flashing lock ; +then exit 2 fi diff --git a/flash-scripts/linux/emerald-install-from-bootloader.sh b/flash-scripts/linux/emerald-install-from-bootloader.sh index 6d4ea2df119b90c918ad74c1679b1c3c920288b0..385375fabb8919580281aa5cb6fa7811f639c8b9 100755 --- a/flash-scripts/linux/emerald-install-from-bootloader.sh +++ b/flash-scripts/linux/emerald-install-from-bootloader.sh @@ -29,14 +29,14 @@ # - 11: can't wipe userdata # - 12: can't wipe metadata # - 13: can't active partition -# - 20-30 : see partition_name index below +# - 20-34 : see partition_name index below # - 101 : DEVICE_ID missing # - 102 : ARCHIVE_PATH missing # - 103 : fastboot folder path missing -partition_name=(boot_a dtbo_a vbmeta_a vbmeta_system_a vbmeta_vendor_a super lk_a logo preloader_a) -partition_image=(boot.img dtbo.img vbmeta.img vbmeta_system.img vbmeta_vendor.img super.img lk.img logo-verified.bin preloader_yk673v6_lwg62_64.bin) -partition_error=(20 21 22 23 24 25 26 27 28) +partition_name=(boot_a dtbo_a vbmeta_a vbmeta_system_a vbmeta_vendor_a super lk_a logo preloader_a tee_a gz_a sspm_a scp_a spmfw_a md1img_a) +partition_image=(boot.img dtbo.img vbmeta.img vbmeta_system.img vbmeta_vendor.img super.img lk.img logo.bin preloader_emerald.bin tee.img gz.img sspm.img scp.img spmfw.img md1img.img) +partition_error=(20 21 22 23 24 25 26 27 28 29 30 31 32 33 34) DEVICE_ID=$1 ARCHIVE_PATH=$2 @@ -80,7 +80,7 @@ ARCHIVE_FOLDER_PATH=$(dirname "$ARCHIVE_PATH")"/" cd "$ARCHIVE_FOLDER_PATH" || exit 104 if ! "$JAR_PATH" -x -v -f "$ARCHIVE_PATH" ; -then +then exit 10 fi @@ -90,21 +90,13 @@ sleep 1 # Wipe user data if ! "$FASTBOOT_PATH" erase userdata ; -then +then exit 11 fi echo "user data wiped" sleep 5 -if ! "$FASTBOOT_PATH" format md_udc ; -then - exit 12 -fi - -echo "format md_udc" -sleep 5 - #Flash partition for i in ${!partition_name[@]}; do if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash ${partition_name[$i]} ${partition_image[$i]} @@ -116,8 +108,7 @@ for i in ${!partition_name[@]}; do done -if ! "$FASTBOOT_PATH" --set-active=a ; -then +if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" --set-active=a ; +then exit 13 fi - diff --git a/flash-scripts/linux/emerald-wait-reboot-from-fastboot.sh b/flash-scripts/linux/emerald-wait-reboot-from-fastboot.sh index 99b92318967ea3d7221a208503641bbeaf5c2ad4..9c2c0f624e4691186541057cc46c66c35b955788 100755 --- a/flash-scripts/linux/emerald-wait-reboot-from-fastboot.sh +++ b/flash-scripts/linux/emerald-wait-reboot-from-fastboot.sh @@ -47,4 +47,4 @@ fi while [ "$($FASTBOOT_PATH devices | grep -q fastboot; echo $?)" = 0 ] do sleep 1 -done \ No newline at end of file +done diff --git a/flash-scripts/windows/Teracube_2e-install-from-bootloader.bat b/flash-scripts/windows/Teracube_2e-install-from-bootloader.bat index 2e88f79c7a46c43c992bb620b2d7271870c99b51..33a199d322d02e6d2800307ef81f3f195f60da72 100755 --- a/flash-scripts/windows/Teracube_2e-install-from-bootloader.bat +++ b/flash-scripts/windows/Teracube_2e-install-from-bootloader.bat @@ -19,24 +19,34 @@ :: $3: fastboot folder path :: $4: Java folder path - :: Exit status -:: - 0 : device flashed -:: - 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 vbmeta -:: - 15: can't flash vbmeta_systel -:: - 16: can't flash vbmeta_vendor -:: - 17: can't reboot to fastboot -:: - 18: can't flash system -:: - 19: can't flash product -:: - 20: can't flash vendor +:: - 0 : Device flashed successfully +:: - 1 : Generic error +:: - 10: Error unpacking system.img +:: - 11: Error wiping user data +:: - 12: Error flashing preloader +:: - 13: Error flashing lk +:: - 14: Error flashing md1img +:: - 15: Error flashing logo +:: - 16: Error flashing scp1 +:: - 17: Error flashing scp2 +:: - 18: Error flashing spmfw +:: - 19: Error flashing sspm_1 +:: - 20: Error flashing sspm_2 +:: - 21: Error flashing tee1 +:: - 22: Error flashing tee2 +:: - 23: Error flashing boot +:: - 24: Error flashing dtbo +:: - 25: Error flashing recovery +:: - 26: Error flashing vbmeta +:: - 27: Error flashing vbmeta_system +:: - 28: Error flashing vbmeta_vendor +:: - 29: Error flashing super +:: - 30: Error rebooting to system :: - 101 : DEVICE_ID missing :: - 102 : ARCHIVE_PATH missing -:: - 103 : fastboot folder path missing +:: - 103 : FASTBOOT_FOLDER_PATH missing +:: - 104 : JAVA_FOLDER_PATH missing set DEVICE_ID="%1" set ARCHIVE_PATH=%~2 @@ -80,62 +90,117 @@ echo "unpacked archive" ping 127.0.0.1 -n 1 -w 10000 >NUL -%FASTBOOT_PATH% -w +%FASTBOOT_PATH% erase userdata if errorLevel 1 ( exit /b 11 ) echo "user data wiped" ping 127.0.0.1 -n 5 -w 10000 >NUL -%FASTBOOT_PATH% -s %DEVICE_ID% flash boot boot.img +%FASTBOOT_PATH% -s %DEVICE_ID% flash preloader preloader_zirconia.bin if errorLevel 1 ( exit /b 12 ) ping 127.0.0.1 -n 1 -w 10000 >NUL -echo "Flashed boot" +echo "Flashed preloader" -%FASTBOOT_PATH% -s %DEVICE_ID% flash recovery recovery.img +%FASTBOOT_PATH% -s %DEVICE_ID% flash lk lk.img if errorLevel 1 ( exit /b 13 ) ping 127.0.0.1 -n 1 -w 10000 >NUL -echo "Flashed recovery" +echo "Flashed lk" -%FASTBOOT_PATH% -s %DEVICE_ID% flash vbmeta vbmeta.img +%FASTBOOT_PATH% -s %DEVICE_ID% flash md1img md1img.img if errorLevel 1 ( exit /b 14 ) ping 127.0.0.1 -n 1 -w 10000 >NUL -echo "Flashed vbmeta" +echo "Flashed md1img" -%FASTBOOT_PATH% -s %DEVICE_ID% flash vbmeta_system vbmeta_system.img +%FASTBOOT_PATH% -s %DEVICE_ID% flash logo logo.bin if errorLevel 1 ( exit /b 15 ) ping 127.0.0.1 -n 1 -w 10000 >NUL -echo "Flashed vbmeta_system" +echo "Flashed logo" -%FASTBOOT_PATH% -s %DEVICE_ID% flash vbmeta_vendor vbmeta_vendor.img +%FASTBOOT_PATH% -s %DEVICE_ID% flash scp1 scp.img if errorLevel 1 ( exit /b 16 ) ping 127.0.0.1 -n 1 -w 10000 >NUL -echo "Flashed vbmeta_vendor" +echo "Flashed scp1" + +%FASTBOOT_PATH% -s %DEVICE_ID% flash scp2 scp.img +if errorLevel 1 ( exit /b 17 ) -%FASTBOOT_PATH% -s %DEVICE_ID% reboot fastboot -ping 127.0.0.1 -n 6 -w 10000 >NUL -echo "Rebooted on fastboot" +ping 127.0.0.1 -n 1 -w 10000 >NUL +echo "Flashed scp2" -%FASTBOOT_PATH% -s %DEVICE_ID% flash system system.img +%FASTBOOT_PATH% -s %DEVICE_ID% flash spmfw spmfw.img if errorLevel 1 ( exit /b 18 ) ping 127.0.0.1 -n 1 -w 10000 >NUL -echo "Flashed vbmeta_vendor" +echo "Flashed spmfw" -%FASTBOOT_PATH% -s %DEVICE_ID% flash product product.img +%FASTBOOT_PATH% -s %DEVICE_ID% flash sspm_1 sspm.img if errorLevel 1 ( exit /b 19 ) ping 127.0.0.1 -n 1 -w 10000 >NUL -echo "Flashed product" +echo "Flashed sspm_1" -%FASTBOOT_PATH% -s %DEVICE_ID% flash vendor vendor.img +%FASTBOOT_PATH% -s %DEVICE_ID% flash sspm_2 sspm.img if errorLevel 1 ( exit /b 20 ) ping 127.0.0.1 -n 1 -w 10000 >NUL -echo "Flashed vendor" -exit /b 0 \ No newline at end of file +echo "Flashed sspm_2" + +%FASTBOOT_PATH% -s %DEVICE_ID% flash tee1 tee.img +if errorLevel 1 ( exit /b 21 ) + +ping 127.0.0.1 -n 1 -w 10000 >NUL +echo "Flashed tee1" + +%FASTBOOT_PATH% -s %DEVICE_ID% flash tee2 tee.img +if errorLevel 1 ( exit /b 22 ) + +ping 127.0.0.1 -n 1 -w 10000 >NUL +echo "Flashed tee2" + +%FASTBOOT_PATH% -s %DEVICE_ID% flash boot boot.img +if errorLevel 1 ( exit /b 23 ) + +ping 127.0.0.1 -n 1 -w 10000 >NUL +echo "Flashed boot" + +%FASTBOOT_PATH% -s %DEVICE_ID% flash dtbo dtbo.img +if errorLevel 1 ( exit /b 24 ) + +ping 127.0.0.1 -n 1 -w 10000 >NUL +echo "Flashed dtbo" + +%FASTBOOT_PATH% -s %DEVICE_ID% flash recovery recovery.img +if errorLevel 1 ( exit /b 25 ) + +ping 127.0.0.1 -n 1 -w 10000 >NUL +echo "Flashed recovery" + +%FASTBOOT_PATH% -s %DEVICE_ID% flash vbmeta vbmeta.img +if errorLevel 1 ( exit /b 26 ) + +ping 127.0.0.1 -n 1 -w 10000 >NUL +echo "Flashed vbmeta" + +%FASTBOOT_PATH% -s %DEVICE_ID% flash vbmeta_system vbmeta_system.img +if errorLevel 1 ( exit /b 27 ) + +ping 127.0.0.1 -n 1 -w 10000 >NUL +echo "Flashed vbmeta_system" + +%FASTBOOT_PATH% -s %DEVICE_ID% flash vbmeta_vendor vbmeta_vendor.img +if errorLevel 1 ( exit /b 28 ) + +ping 127.0.0.1 -n 1 -w 10000 >NUL +echo "Flashed vbmeta_vendor" + +%FASTBOOT_PATH% -s %DEVICE_ID% flash super super.img +if errorLevel 1 ( exit /b 29 ) + +ping 127.0.0.1 -n 1 -w 10000 >NUL +echo "Flashed super" diff --git a/flash-scripts/windows/emerald-install-from-bootloader.bat b/flash-scripts/windows/emerald-install-from-bootloader.bat index 232c4881bf6d927fff2adadac079380bb6a624c6..8f0dc79973de69d68182016bfbfeb94ad0223ece 100755 --- a/flash-scripts/windows/emerald-install-from-bootloader.bat +++ b/flash-scripts/windows/emerald-install-from-bootloader.bat @@ -29,12 +29,12 @@ :: - 11: can't wipe userdata :: - 12: can't wipe metadata :: - 13: can't active partition -:: - 20-30 : see partition_name index below +:: - 20-34 : see partition_name index below :: - 101 : DEVICE_ID missing :: - 102 : ARCHIVE_PATH missing :: - 103 : fastboot folder path missing -SET partition_name[0]=boot_a +SET partition_name[0]=boot_a SET partition_name[1]=dtbo_a SET partition_name[2]=vbmeta_a SET partition_name[3]=vbmeta_system_a @@ -43,26 +43,44 @@ SET partition_name[5]=super SET partition_name[6]=lk_a SET partition_name[7]=logo SET partition_name[8]=preloader_a - -SET partition_image[0]=boot.img -SET partition_image[1]=dtbo.img -SET partition_image[2]=vbmeta.img -SET partition_image[3]=vbmeta_system.img -SET partition_image[4]=vbmeta_vendor.img -SET partition_image[5]=super.img -SET partition_image[6]=lk.img -SET partition_image[7]=logo-verified.img -SET partition_image[8]=preloader_yk673v6_lwg62_64.img - -SET partition_error[0]=20 -SET partition_error[1]=21 -SET partition_error[2]=22 -SET partition_error[3]=23 -SET partition_error[4]=24 -SET partition_error[5]=25 -SET partition_error[6]=26 -SET partition_error[7]=27 -SET partition_error[8]=28 +SET partition_name[9]=tee_a +SET partition_name[10]=gz_a +SET partition_name[11]=sspm_a +SET partition_name[12]=scp_a +SET partition_name[13]=spmfw_a +SET partition_name[14]=md1img_a + +SET partition_image[0]=boot.img +SET partition_image[1]=dtbo.img +SET partition_image[2]=vbmeta.img +SET partition_image[3]=vbmeta_system.img +SET partition_image[4]=vbmeta_vendor.img +SET partition_image[5]=super.img +SET partition_image[6]=lk.img +SET partition_image[7]=logo.bin +SET partition_image[8]=preloader_emerald.img +SET partition_image[9]=tee.img +SET partition_image[10]=gz.img +SET partition_image[11]=sspm.img +SET partition_image[12]=scp.img +SET partition_image[13]=spmfw.img +SET partition_image[14]=md1img.img + +SET partition_error[0]=20 +SET partition_error[1]=21 +SET partition_error[2]=22 +SET partition_error[3]=23 +SET partition_error[4]=24 +SET partition_error[5]=25 +SET partition_error[6]=26 +SET partition_error[7]=27 +SET partition_error[8]=28 +SET partition_error[9]=29 +SET partition_error[10]=30 +SET partition_error[11]=31 +SET partition_error[12]=32 +SET partition_error[13]=33 +SET partition_error[14]=34 SET DEVICE_ID=%~1 SET ARCHIVE_PATH=%~2 @@ -123,7 +141,7 @@ timeout 5 >nul 2>&1 )) :: Activate -%FASTBOOT_PATH% --set-active=a +%FASTBOOT_PATH% -s %DEVICE_ID% --set-active=a if errorLevel 1 ( exit /b 13 ) echo "set acivated" -timeout 5 >nul 2>&1 \ No newline at end of file +timeout 5 >nul 2>&1 diff --git a/src/main/resources/yaml/Teracube_2e_fs.yml b/src/main/resources/yaml/Teracube_2e_fs.yml index 41f90507df0ed62a02f693e752bfabf538048550..33ee33e9c899d51124745c86969bb85e46bdb311 100644 --- a/src/main/resources/yaml/Teracube_2e_fs.yml +++ b/src/main/resources/yaml/Teracube_2e_fs.yml @@ -16,5 +16,5 @@ --- sources: rom: - url: https://images.ecloud.global/stable/2e/IMG-e-latest-2e.zip - filePath: IMG-e-latest-2e.zip + url: https://images.ecloud.global/stable/zirconia/IMG-e-latest-s-zirconia.zip + filePath: IMG-e-latest-s-zirconia.zip diff --git a/src/main/resources/yaml/emerald_fs.yml b/src/main/resources/yaml/emerald_fs.yml index b1c12e0679d7a0403656eb2fa60305b81017e449..ef2dcbe3cd07401f4e2a0a408ba184e35e721371 100644 --- a/src/main/resources/yaml/emerald_fs.yml +++ b/src/main/resources/yaml/emerald_fs.yml @@ -16,5 +16,5 @@ --- sources: rom: - url: https://images.ecloud.global/stable/emerald/IMG-e-latest-emerald.zip - filePath: IMG-e-latest-emerald.zip + url: https://images.ecloud.global/stable/emerald/IMG-e-latest-s-emerald.zip + filePath: IMG-e-latest-s-emerald.zip