diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index eced39e272838fc10e11b5570738b7ec0fa9f86c..7314c811d912f5c826c7e799446548122a15eda1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,7 +8,6 @@ stages: - publish variables: - CONTAINER_IMAGE: registry.gitlab.e.foundation:5000/e/tools/easy-installer CONTAINER_TAG: stable check-version: @@ -33,10 +32,10 @@ build-docker: variables: DOCKER_DRIVER: overlay2 script: - - docker pull $CONTAINER_IMAGE:$CONTAINER_TAG || true + - docker pull $CI_REGISTRY_IMAGE:$CONTAINER_TAG || true - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.e.foundation:5000 - - docker build --cache-from $CONTAINER_IMAGE:$CONTAINER_TAG -t $CONTAINER_IMAGE:$CONTAINER_TAG . - - docker push $CONTAINER_IMAGE:$CONTAINER_TAG + - docker build --cache-from $CI_REGISTRY_IMAGE:$CONTAINER_TAG -t $CI_REGISTRY_IMAGE:$CONTAINER_TAG . + - docker push $CI_REGISTRY_IMAGE:$CONTAINER_TAG build-ubuntu: image: registry.gitlab.e.foundation:5000/e/tools/easy-installer:stable diff --git a/README.md b/README.md index dbb7d04c469aeabaa809c81f7161af4fc5ca9082..3f94cc035f66d5bf3c2255b9abf5d80b1dbf5842 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,11 @@ Community: - Porrumentzio - Piero - GunChleoc +<<<<<<< HEAD +- Volker +======= +- ff2u +>>>>>>> c52c1e5db7926d546c6eda664bde8d4557b6e6f3 Reviewer - Alexandre diff --git a/flash-scripts/linux/fp4_install-from-fastboot.sh b/flash-scripts/linux/fp4_install-from-fastboot.sh new file mode 100755 index 0000000000000000000000000000000000000000..f8db3c33038349cf04249891510c7b395a97efc8 --- /dev/null +++ b/flash-scripts/linux/fp4_install-from-fastboot.sh @@ -0,0 +1,367 @@ +#!/bin/bash + +# Copyright (C) 2020 - Author: Ingo; update and adoption to FP4, 2022 by ff2u +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Parameter +# $1: ARCHIVE_PATH path to the /e/ archive to flash +# $2: FASTBOOT_FOLDER_PATH: the path where runnable fastboot is stored +# $3: JAVA_FOLDER_PATH: the path where runnable jar is stored (to unpack ZIP file) + +# Exit status +# - 0 : /e/ installed +# - 1 : user data wipe failed +# - 2 : flashing of a partition failed +# - 4 : setting slot failed +# - 5 : flashing of a secure partition failed +# - 101 : ARCHIVE_PATH missing +# - 102 : archive could not be unpacked + +ARCHIVE_PATH=$1 +ARCHIVE_FOLDER_PATH=$(dirname "$1")"/" +FASTBOOT_FOLDER_PATH=$2 +FASTBOOT_PATH=${FASTBOOT_FOLDER_PATH}"fastboot" +JAVA_FOLDER_PATH=$3 +JAR_PATH=${JAVA_FOLDER_PATH}"/bin/jar" + +echo "archive path : $ARCHIVE_PATH" +echo "archive folder path : $ARCHIVE_FOLDER_PATH" +echo "fastboot path : $FASTBOOT_PATH" +echo "jar path : $JAR_PATH" + +if [ -z "$ARCHIVE_PATH" ] +then + exit 101 +fi + +cd "$ARCHIVE_FOLDER_PATH" + +sleep 1 + +if ! "$JAR_PATH" -x -v -f "$ARCHIVE_PATH" ; +then exit 102 ; fi + +echo "unpacked archive" + +sleep 1 + +echo "=== Flash slot a" + +echo "== start with one critical slot to check if critical is unlocked" + +if ! "$FASTBOOT_PATH" flash xbl_config_a xbl_config.img ; then exit 5 ; fi + +echo "flashed config" + +sleep 1 + +echo "== flash uncritical slots" + +if ! "$FASTBOOT_PATH" flash bluetooth_a bluetooth.img ; then exit 2 ; fi + +echo "flashed bluetooth" + +sleep 1 + +if ! "$FASTBOOT_PATH" flash dsp_a dsp.img ; then exit 2 ; fi + +echo "flashed dsp" + +sleep 1 + +if ! "$FASTBOOT_PATH" flash modem_a modem.img ; then exit 2 ; fi + +echo "flashed modem" + +sleep 1 + +if ! "$FASTBOOT_PATH" flash boot_a boot.img ; then exit 2 ; fi + +echo "flashed boot" + +sleep 1 + +if ! "$FASTBOOT_PATH" flash recovery_a recovery.img ; then exit 2 ; fi + +echo "flashed recovery" + +sleep 1 + +if ! "$FASTBOOT_PATH" flash dtbo_a dtbo.img ; then exit 2 ; fi + +echo "flashed dtbo" + +sleep 1 + +if ! "$FASTBOOT_PATH" flash vbmeta_system_a vbmeta_system.img ; then exit 2 ; fi + +echo "flashed vbmeta_system" + +sleep 1 + +if ! "$FASTBOOT_PATH" flash vbmeta_a vbmeta.img ; then exit 2 ; fi + +echo "flashed vbmeta" + +sleep 1 + +if ! "$FASTBOOT_PATH" flash featenabler_a featenabler.img ; then exit 2 ; fi + +echo "flashed featenabler" + +sleep 1 + +if ! "$FASTBOOT_PATH" flash core_nhlos_a core_nhlos.img ; then exit 2 ; fi + +echo "flashed core_nhlos" + +sleep 1 + +echo "=== Flash critical slots" + +if ! "$FASTBOOT_PATH" flash devcfg_a devcfg.img ; then exit 5 ; fi + +echo "flashed devcfg" + +sleep 1 + +if ! "$FASTBOOT_PATH" flash xbl_a xbl.img ; then exit 5 ; fi + +echo "flashed xbl" + +sleep 1 + +if ! "$FASTBOOT_PATH" flash tz_a tz.img ; then exit 5 ; fi + +echo "flashed tz" + +sleep 1 + +if ! "$FASTBOOT_PATH" flash hyp_a hyp.img ; then exit 5 ; fi + +echo "flashed hyp" + +sleep 1 + +if ! "$FASTBOOT_PATH" flash keymaster_a keymaster.img ; then exit 5 ; fi + +echo "flashed keymaster" + +sleep 1 + +if ! "$FASTBOOT_PATH" flash abl_a abl.img ; then exit 5 ; fi + +echo "flashed abl" + +sleep 1 + +if ! "$FASTBOOT_PATH" flash aop_a aop.img ; then exit 5 ; fi + +echo "flashed aop" + +sleep 1 + +if ! "$FASTBOOT_PATH" flash imagefv_a imagefv.img ; then exit 5 ; fi + +echo "flashed imagefv" + +sleep 1 + +if ! "$FASTBOOT_PATH" flash multiimgoem_a multiimgoem.img ; then exit 5 ; fi + +echo "flashed multiimgoem" + +sleep 1 + +if ! "$FASTBOOT_PATH" flash qupfw_a qupfw.img ; then exit 5 ; fi + +echo "flashed qupfw" + +sleep 1 + +if ! "$FASTBOOT_PATH" flash uefisecapp_a uefisecapp.img ; then exit 5 ; fi + +echo "flashed uefisecapp" + +sleep 1 + +echo "=== Flash slot b" + +echo "== start with one critical slot to check if critical is unlocked" + +if ! "$FASTBOOT_PATH" flash xbl_config_b xbl_config.img ; then exit 5 ; fi + +echo "flashed config" + +sleep 1 + +echo "== flash uncritical slots" + +if ! "$FASTBOOT_PATH" flash bluetooth_b bluetooth.img ; then exit 2 ; fi + +echo "flashed bluetooth" + +sleep 1 + +if ! "$FASTBOOT_PATH" flash dsp_b dsp.img ; then exit 2 ; fi + +echo "flashed dsp" + +sleep 1 + +if ! "$FASTBOOT_PATH" flash modem_b modem.img ; then exit 2 ; fi + +echo "flashed modem" + +sleep 1 + +if ! "$FASTBOOT_PATH" flash boot_b boot.img ; then exit 2 ; fi + +echo "flashed boot" + +sleep 1 + +if ! "$FASTBOOT_PATH" flash recovery_b recovery.img ; then exit 2 ; fi + +echo "flashed recovery" + +sleep 1 + +if ! "$FASTBOOT_PATH" flash dtbo_b dtbo.img ; then exit 2 ; fi + +echo "flashed dtbo" + +sleep 1 + +if ! "$FASTBOOT_PATH" flash vbmeta_system_b vbmeta_system.img ; then exit 2 ; fi + +echo "flashed vbmeta_system" + +sleep 1 + +if ! "$FASTBOOT_PATH" flash vbmeta_b vbmeta.img ; then exit 2 ; fi + +echo "flashed vbmeta" + +sleep 1 + +if ! "$FASTBOOT_PATH" flash featenabler_b featenabler.img ; then exit 2 ; fi + +echo "flashed featenabler" + +sleep 1 + +if ! "$FASTBOOT_PATH" flash core_nhlos_b core_nhlos.img ; then exit 2 ; fi + +echo "flashed core_nhlos" + +sleep 1 + +echo "=== Flash critical slots" + +if ! "$FASTBOOT_PATH" flash devcfg_b devcfg.img ; then exit 5 ; fi + +echo "flashed devcfg" + +sleep 1 + +if ! "$FASTBOOT_PATH" flash xbl_b xbl.img ; then exit 5 ; fi + +echo "flashed xbl" + +sleep 1 + +if ! "$FASTBOOT_PATH" flash tz_b tz.img ; then exit 5 ; fi + +echo "flashed tz" + +sleep 1 + +if ! "$FASTBOOT_PATH" flash hyp_b hyp.img ; then exit 5 ; fi + +echo "flashed hyp" + +sleep 1 + +if ! "$FASTBOOT_PATH" flash keymaster_b keymaster.img ; then exit 5 ; fi + +echo "flashed keymaster" + +sleep 1 + +if ! "$FASTBOOT_PATH" flash abl_b abl.img ; then exit 5 ; fi + +echo "flashed abl" + +sleep 1 + +if ! "$FASTBOOT_PATH" flash aop_b aop.img ; then exit 5 ; fi + +echo "flashed aop" + +sleep 1 + +if ! "$FASTBOOT_PATH" flash imagefv_b imagefv.img ; then exit 5 ; fi + +echo "flashed imagefv" + +sleep 1 + +if ! "$FASTBOOT_PATH" flash multiimgoem_b multiimgoem.img ; then exit 5 ; fi + +echo "flashed multiimgoem" + +sleep 1 + +if ! "$FASTBOOT_PATH" flash qupfw_b qupfw.img ; then exit 5 ; fi + +echo "flashed qupfw" + +sleep 1 + +if ! "$FASTBOOT_PATH" flash uefisecapp_b uefisecapp.img ; then exit 5 ; fi + +echo "flashed uefisecapp" + +sleep 1 + +echo "=== Flash common slot" + +if ! "$FASTBOOT_PATH" flash super super.img ; then exit 2 ; fi + +echo "flashed super" + +sleep 1 + +echo "=== Wipe user data and meta data in 5 seconds..." + +sleep 3 + +if ! "$FASTBOOT_PATH" erase userdata ; then exit 1 ; fi + +sleep 1 + +if ! "$FASTBOOT_PATH" erase metadata ; then exit 1 ; fi + +echo "user and meta data wiped" + +sleep 3 + +echo "Select slot a for booting..." + +if ! "$FASTBOOT_PATH" --set-active=a ; then exit 4 ; fi + +echo "boot from slot a selected" + diff --git a/flash-scripts/linux/fp4_lock.sh b/flash-scripts/linux/fp4_lock.sh new file mode 100755 index 0000000000000000000000000000000000000000..acb95124aa3f9e98a7fc735e7a73bd7f24dc87da --- /dev/null +++ b/flash-scripts/linux/fp4_lock.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +# Copyright (C) 2020 ECORP SAS - Author: Vincent Bourgmayer +# Updated ff2u +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Parameter + +# $1: ADB_FOLDER_PATH: the path where runnable adb is stored + +# Exit status +# - 0 : success +# - 1 : Error +# - 102 : locking the bootloader failed + +FASTBOOT_FOLDER_PATH=$1 +FASTBOOT_PATH=${FASTBOOT_FOLDER_PATH}"fastboot" + +# Lock the bootloader +if ! "$FASTBOOT_PATH" flashing lock ; +then exit 102 ; fi + +#Then we wait that it left this state +while [ "$($FASTBOOT_PATH devices | grep -q fastboot; echo $?)" = 0 ] +do + sleep 1s +done diff --git a/flash-scripts/linux/fp4_lock_critical.sh b/flash-scripts/linux/fp4_lock_critical.sh new file mode 100755 index 0000000000000000000000000000000000000000..fb26198ee78bc4bb4556ce3b418426a76b159ee8 --- /dev/null +++ b/flash-scripts/linux/fp4_lock_critical.sh @@ -0,0 +1,48 @@ +#!/bin/bash + +# Copyright (C) 2020 ECORP SAS - Author: Vincent Bourgmayer +# Updated ff2u +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Parameter + +# $1: ADB_FOLDER_PATH: the path where runnable adb is stored + +# Exit status +# - 0 : success +# - 1 : Error +# - 102 : locking the bootloader failed + +FASTBOOT_FOLDER_PATH=$1 +FASTBOOT_PATH=${FASTBOOT_FOLDER_PATH}"fastboot" + +# Lock the bootloader + +if [ "$($FASTBOOT_PATH flashing lock_critical; echo $?)" = 1 ] +then + if [ "$($FASTBOOT_PATH flashing lock_critical 2>&1 | grep -q "Device already : locked!"; echo $?)" = 0 ] + then + echo "Critical partitions already locked" + else + echo "OEM-lock fails" + exit 10 + fi +fi + +#Then we wait that it left this state +while [ "$($FASTBOOT_PATH devices | grep -q fastboot; echo $?)" = 0 ] +do + sleep 1s +done diff --git a/flash-scripts/linux/fp4_oem-unlock-critical.sh b/flash-scripts/linux/fp4_oem-unlock-critical.sh new file mode 100755 index 0000000000000000000000000000000000000000..b3102ad497ef568ab064a8ff3a10f90271acffb2 --- /dev/null +++ b/flash-scripts/linux/fp4_oem-unlock-critical.sh @@ -0,0 +1,42 @@ +#!/bin/bash + +# Copyright (C) 2020 - Author: Ingo; update and adoption to FP4, 2022 by ff2u +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Parameter +# $1: The folder where fastboot runnable is stored + +# Exit status +# - 0 : OEM unlocked on device +# - 10 : fastboot error + +FASTBOOT_FOLDER_PATH=$1 +FASTBOOT_PATH=${FASTBOOT_FOLDER_PATH}"fastboot" + +echo "fastboot path: $FASTBOOT_PATH" + +if [ "$($FASTBOOT_PATH flashing unlock_critical; echo $?)" = 1 ] +then + if [ "$($FASTBOOT_PATH flashing unlock_critical 2>&1 | grep -q "Device already : unlocked!"; echo $?)" = 0 ] + then + echo "Critical partitions already unlocked" + else + echo "OEM-unlock fails" + exit 10 + fi +fi + +sleep 10s +echo "OEM unlocked" diff --git a/flash-scripts/linux/fp4_oem-unlock.sh b/flash-scripts/linux/fp4_oem-unlock.sh new file mode 100755 index 0000000000000000000000000000000000000000..7bbfc49c58607ed2413be4279bfde6dda9228c1a --- /dev/null +++ b/flash-scripts/linux/fp4_oem-unlock.sh @@ -0,0 +1,44 @@ +#!/bin/bash + +# Copyright (C) 2020 - Author: Ingo; update and adoption to FP4, 2022 by ff2u +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Parameter +# $1: The folder where fastboot runnable is stored + +# Exit status +# - 0 : OEM unlocked on device +# - 10 : fastboot error + +FASTBOOT_FOLDER_PATH=$1 +FASTBOOT_PATH=${FASTBOOT_FOLDER_PATH}"fastboot" + +echo "fastboot path: $FASTBOOT_PATH" + +if [ "$($FASTBOOT_PATH getvar unlocked 2>&1 | grep -q yes; echo $?)" = 0 ] +then + echo "Device already unlocked" +else + if [ "$($FASTBOOT_PATH flashing unlock; echo $?)" = 1 ] + then + echo "OEM-unlock fails" + exit 10 + fi + sleep 10s + echo "OEM unlocked" +fi + + + diff --git a/flash-scripts/windows/fp4_install-from-fastboot.bat b/flash-scripts/windows/fp4_install-from-fastboot.bat new file mode 100755 index 0000000000000000000000000000000000000000..ace9bb99b0fd9325f656bf9912105b29a33180ea --- /dev/null +++ b/flash-scripts/windows/fp4_install-from-fastboot.bat @@ -0,0 +1,419 @@ +:: Copyright (C) 2020 - Author: Ingo; update and adoption to FP4, 2022 by ff2u +:: Copyright (C) 2020 ECORP SAS - Author: Vincent Bourgmayer +:: +:: This program is free software: you can redistribute it and/or modify +:: it under the terms of the GNU General Public License as published by +:: the Free Software Foundation, either version 3 of the License, or +:: (at your option) any later version. +:: +:: This program is distributed in the hope that it will be useful, +:: but WITHOUT ANY WARRANTY; without even the implied warranty of +:: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +:: GNU General Public License for more details. +:: +:: You should have received a copy of the GNU General Public License +:: along with this program. If not, see . + +:: Parameter +:: $1: ARCHIVE_PATH path to the /e/ archive to flash +:: $2: FASTBOOT_FOLDER_PATH: the path where runnable fastboot is stored +:: $3: JAVA_FOLDER_PATH: the path where runnable jar is stored (to unpack ZIP file) + +:: Exit status +:: - 0 : /e/ installed +:: - 1 : user data wipe failed +:: - 2 : flashing of a partition failed +:: - 4 : setting slot failed +:: - 5 : flashing of a secure partition failed +:: - 101 : ARCHIVE_PATH missing +:: - 102 : archive could not be unpacked + +set ARCHIVE_PATH=%~1 +set FASTBOOT_FOLDER_PATH=%~2 +set FASTBOOT_PATH="%FASTBOOT_FOLDER_PATH%fastboot" +set JAVA_FOLDER_PATH=%~3 +set JAR_PATH="%JAVA_FOLDER_PATH%\bin\jar" + +if not defined %ARCHIVE_PATH ( + exit /b 101 +) + +for %%a in ("%ARCHIVE_PATH%") do ( + set ARCHIVE_NAME="%%~na" +) + +for %%a in ("%ARCHIVE_PATH%") do ( + set ARCHIVE_FOLDER_PATH="%%~dpa" +) + +echo "archive path : "%ARCHIVE_PATH% +echo "archive folder path : "%ARCHIVE_FOLDER_PATH% +echo "fastboot path : "%FASTBOOT_PATH% +echo "jar path : "%JAR_PATH% + +cd "%ARCHIVE_FOLDER_PATH%" + +timeout 1 >nul 2>&1 + +%JAR_PATH% -x -v -f "%ARCHIVE_PATH%" +if errorLevel 1 ( exit /b 102 ) +echo "unpacked archive" + +timeout 1 >nul 2>&1 + +echo "=== Flash alot a" + +echo "== start with one critical slot to check if critical is unlocked" + +%FASTBOOT_PATH% flash xbl_config_a xbl_config.img +if errorLevel 1 ( exit /b 5 ) +echo "flashed config" + +timeout 1 >nul 2>&1 + +echo "== flash uncritical slots" + +%FASTBOOT_PATH% flash bluetooth_a bluetooth.img +if errorLevel 1 ( exit /b 2 ) + +echo "flashed bluetooth" + +timeout 1 >nul 2>&1 + +%FASTBOOT_PATH% flash dsp_a dsp.img +if errorLevel 1 ( exit /b 2 ) + +echo "flashed dsp" + +timeout 1 >nul 2>&1 + +%FASTBOOT_PATH% flash modem_a modem.img +if errorLevel 1 ( exit /b 2 ) + +echo "flashed modem" + +timeout 1 >nul 2>&1 + +%FASTBOOT_PATH% flash boot_a boot.img +if errorLevel 1 ( exit /b 2 ) + +echo "flashed boot" + +timeout 1 >nul 2>&1 + +%FASTBOOT_PATH% flash recovery_a recovery.img +if errorLevel 1 ( exit /b 2 ) + +echo "flashed recovery" + +timeout 1 >nul 2>&1 + +%FASTBOOT_PATH% flash dtbo_a dtbo.img +if errorLevel 1 ( exit /b 2 ) + +echo "flashed dtbo" + +timeout 1 >nul 2>&1 + +%FASTBOOT_PATH% flash vbmeta_system_a vbmeta_system.img +if errorLevel 1 ( exit /b 2 ) + +echo "flashed vbmeta_system" + +timeout 1 >nul 2>&1 + +%FASTBOOT_PATH% flash vbmeta_a vbmeta.img +if errorLevel 1 ( exit /b 2 ) + +echo "flashed vbmeta" + +timeout 1 >nul 2>&1 + +%FASTBOOT_PATH% flash featenabler_a featenabler.img +if errorLevel 1 ( exit /b 2 ) + +echo "flashed featenabler" + +timeout 1 >nul 2>&1 + +%FASTBOOT_PATH% flash core_nhlos_a core_nhlos.img +if errorLevel 1 ( exit /b 2 ) + +echo "flashed core_nhlos" + +timeout 1 >nul 2>&1 + +echo "=== Flash critical slots" + +%FASTBOOT_PATH% flash devcfg_a devcfg.img +if errorLevel 1 ( exit /b 5 ) + +echo "flashed devcfg" + +timeout 1 >nul 2>&1 + +%FASTBOOT_PATH% flash xbl_a xbl.img +if errorLevel 1 ( exit /b 5 ) + +echo "flashed xbl" + +timeout 1 >nul 2>&1 + +%FASTBOOT_PATH% flash tz_a tz.img +if errorLevel 1 ( exit /b 5 ) + +echo "flashed tz" + +timeout 1 >nul 2>&1 + +%FASTBOOT_PATH% flash hyp_a hyp.img +if errorLevel 1 ( exit /b 5 ) + +echo "flashed hyp" + +timeout 1 >nul 2>&1 + +%FASTBOOT_PATH% flash keymaster_a keymaster.img +if errorLevel 1 ( exit /b 5 ) + +echo "flashed keymaster" + +timeout 1 >nul 2>&1 + +%FASTBOOT_PATH% flash abl_a abl.img +if errorLevel 1 ( exit /b 5 ) + +echo "flashed abl" + +timeout 1 >nul 2>&1 + +%FASTBOOT_PATH% flash aop_a aop.img +if errorLevel 1 ( exit /b 5 ) + +echo "flashed aop" + +timeout 1 >nul 2>&1 + +%FASTBOOT_PATH% flash imagefv_a imagefv.img +if errorLevel 1 ( exit /b 5 ) + +echo "flashed imagefv" + +timeout 1 >nul 2>&1 + +%FASTBOOT_PATH% flash multiimgoem_a multiimgoem.img +if errorLevel 1 ( exit /b 5 ) + +echo "flashed multiimgoem" + +timeout 1 >nul 2>&1 + +%FASTBOOT_PATH% flash qupfw_a qupfw.img +if errorLevel 1 ( exit /b 5 ) + +echo "flashed qupfw" + +timeout 1 >nul 2>&1 + +%FASTBOOT_PATH% flash uefisecapp_a uefisecapp.img +if errorLevel 1 ( exit /b 5 ) + +echo "flashed uefisecapp" + +timeout 1 >nul 2>&1 + +echo "=== Flash slot b" + +echo "== start with one critical slot to check if critical is unlocked" + +%FASTBOOT_PATH% flash xbl_config_b xbl_config.img +if errorLevel 1 ( exit /b 5 ) + +echo "flashed config" + +timeout 1 >nul 2>&1 + +echo "== flash uncritical slots" + +%FASTBOOT_PATH% flash bluetooth_b bluetooth.img +if errorLevel 1 ( exit /b 2 ) + +echo "flashed bluetooth" + +timeout 1 >nul 2>&1 + +%FASTBOOT_PATH% flash dsp_b dsp.img +if errorLevel 1 ( exit /b 2 ) + +echo "flashed dsp" + +timeout 1 >nul 2>&1 + +%FASTBOOT_PATH% flash modem_b modem.img +if errorLevel 1 ( exit /b 2 ) + +echo "flashed modem" + +timeout 1 >nul 2>&1 + +%FASTBOOT_PATH% flash boot_b boot.img +if errorLevel 1 ( exit /b 2 ) + +echo "flashed boot" + +timeout 1 >nul 2>&1 + +%FASTBOOT_PATH% flash recovery_b recovery.img +if errorLevel 1 ( exit /b 2 ) + +echo "flashed recovery" + +timeout 1 >nul 2>&1 + +%FASTBOOT_PATH% flash dtbo_b dtbo.img +if errorLevel 1 ( exit /b 2 ) + +echo "flashed dtbo" + +timeout 1 >nul 2>&1 + +%FASTBOOT_PATH% flash vbmeta_system_b vbmeta_system.img +if errorLevel 1 ( exit /b 2 ) + +echo "flashed vbmeta_system" + +timeout 1 >nul 2>&1 + +%FASTBOOT_PATH% flash vbmeta_b vbmeta.img +if errorLevel 1 ( exit /b 2 ) + +echo "flashed vbmeta" + +timeout 1 >nul 2>&1 + +%FASTBOOT_PATH% flash featenabler_b featenabler.img +if errorLevel 1 ( exit /b 2 ) + +echo "flashed featenabler" + +timeout 1 >nul 2>&1 + +%FASTBOOT_PATH% flash core_nhlos_b core_nhlos.img +if errorLevel 1 ( exit /b 2 ) + +echo "flashed core_nhlos" + +timeout 1 >nul 2>&1 + +echo "=== Flash critical slots" + +%FASTBOOT_PATH% flash devcfg_b devcfg.img +if errorLevel 1 ( exit /b 5 ) + +echo "flashed devcfg" + +timeout 1 >nul 2>&1 + +%FASTBOOT_PATH% flash xbl_b xbl.img +if errorLevel 1 ( exit /b 5 ) + +echo "flashed xbl" + +timeout 1 >nul 2>&1 + +%FASTBOOT_PATH% flash tz_b tz.img +if errorLevel 1 ( exit /b 5 ) + +echo "flashed tz" + +timeout 1 >nul 2>&1 + +%FASTBOOT_PATH% flash hyp_b hyp.img +if errorLevel 1 ( exit /b 5 ) + +echo "flashed hyp" + +timeout 1 >nul 2>&1 + +%FASTBOOT_PATH% flash keymaster_b keymaster.img +if errorLevel 1 ( exit /b 5 ) + +echo "flashed keymaster" + +timeout 1 >nul 2>&1 + +%FASTBOOT_PATH% flash abl_b abl.img +if errorLevel 1 ( exit /b 5 ) + +echo "flashed abl" + +timeout 1 >nul 2>&1 + +%FASTBOOT_PATH% flash aop_b aop.img +if errorLevel 1 ( exit /b 5 ) + +echo "flashed aop" + +timeout 1 >nul 2>&1 + +%FASTBOOT_PATH% flash imagefv_b imagefv.img +if errorLevel 1 ( exit /b 5 ) + +echo "flashed imagefv" + +timeout 1 >nul 2>&1 + +%FASTBOOT_PATH% flash multiimgoem_b multiimgoem.img +if errorLevel 1 ( exit /b 5 ) + +echo "flashed multiimgoem" + +timeout 1 >nul 2>&1 + +%FASTBOOT_PATH% flash qupfw_b qupfw.img +if errorLevel 1 ( exit /b 5 ) + +echo "flashed qupfw" + +timeout 1 >nul 2>&1 + +%FASTBOOT_PATH% flash uefisecapp_b uefisecapp.img +if errorLevel 1 ( exit /b 5 ) + +echo "flashed uefisecapp" + +timeout 1 >nul 2>&1 + +echo "=== Flash common slot" + +%FASTBOOT_PATH% flash super super.img +if errorLevel 1 ( exit /b 2 ) + +echo "flashed super" + +timeout 1 >nul 2>&1 + +echo "=== Wipe user data and meta data in 5 seconds..." + +timeout 5 >nul 2>&1 + +%FASTBOOT_PATH% erase userdata +if errorLevel 1 ( exit /b 1 ) + +timeout 1 >nul 2>&1 + +%FASTBOOT_PATH% erase metadata +if errorLevel 1 ( exit /b 1 ) + +echo "user and meta data wiped" + +timeout 5 >nul 2>&1 + +%FASTBOOT_PATH% --set-active=a +if errorLevel 1 ( exit /b 4 ) + +echo "boot from slot a selected" + +timeout 1 >nul 2>&1 + +exit /b 0 diff --git a/flash-scripts/windows/fp4_lock.bat b/flash-scripts/windows/fp4_lock.bat new file mode 100755 index 0000000000000000000000000000000000000000..a18a828efac4419092d53bdf786e4a5afc2e369d --- /dev/null +++ b/flash-scripts/windows/fp4_lock.bat @@ -0,0 +1,44 @@ +:: Copyright (C) 2020 - Author: Ingo; update and adoption to FP4, 2022 by ff2u +:: Copyright (C) 2020 ECORP SAS - Author: Vincent Bourgmayer +:: +:: This program is free software: you can redistribute it and/or modify +:: it under the terms of the GNU General Public License as published by +:: the Free Software Foundation, either version 3 of the License, or +:: (at your option) any later version. +:: +:: This program is distributed in the hope that it will be useful, +:: but WITHOUT ANY WARRANTY; without even the implied warranty of +:: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +:: GNU General Public License for more details. +:: +:: You should have received a copy of the GNU General Public License +:: along with this program. If not, see . + +:: Parameter +:: $1: The folder where fastboot runnable is stored + +:: Exit status +:: - 0 : success +:: - 1 : Error +:: - 102 : locking the bootloader failed + +set FASTBOOT_FOLDER_PATH=%~1 +set FASTBOOT_PATH="%FASTBOOT_FOLDER_PATH%fastboot" +echo "FASTBOOT path:"%FASTBOOT_PATH% + +%FASTBOOT_PATH% flashing lock + +if errorLevel 1 ( + echo "flashing lock fails" + exit /b 102 +) + +:wait-leave-fastboot +%FASTBOOT_PATH% devices 2>Nul | findstr fastboot +if %errorLevel% == 0 ( + ping 127.0.0.1 -n 2 -w 1000 >NUL + goto :wait-leave-fastboot +) + + +exit /b 0 diff --git a/flash-scripts/windows/fp4_lock_critical.bat b/flash-scripts/windows/fp4_lock_critical.bat new file mode 100755 index 0000000000000000000000000000000000000000..abbf6cb07611ecefbebb67848a03c901c64292f7 --- /dev/null +++ b/flash-scripts/windows/fp4_lock_critical.bat @@ -0,0 +1,49 @@ +:: Copyright (C) 2020 - Author: Ingo; update and adoption to FP4, 2022 by ff2u +:: Copyright (C) 2020 ECORP SAS - Author: Vincent Bourgmayer +:: +:: This program is free software: you can redistribute it and/or modify +:: it under the terms of the GNU General Public License as published by +:: the Free Software Foundation, either version 3 of the License, or +:: (at your option) any later version. +:: +:: This program is distributed in the hope that it will be useful, +:: but WITHOUT ANY WARRANTY; without even the implied warranty of +:: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +:: GNU General Public License for more details. +:: +:: You should have received a copy of the GNU General Public License +:: along with this program. If not, see . + +:: Parameter +:: $1: The folder where fastboot runnable is stored + +:: Exit status +:: - 0 : success +:: - 1 : Error +:: - 102 : locking the bootloader failed + +set FASTBOOT_FOLDER_PATH=%~1 +set FASTBOOT_PATH="%FASTBOOT_FOLDER_PATH%fastboot" +echo "FASTBOOT path:"%FASTBOOT_PATH% + +%FASTBOOT_PATH% flashing lock_critical + +if errorLevel 1 ( + %FASTBOOT_PATH% flashing lock_critical 2>&1 | findstr locked + if errorlevel 0 ( + echo "Critical partitions already locked" + ) else ( + echo "flashing lock critical fails" + exit /b 10 + ) +) + +:wait-leave-fastboot +%FASTBOOT_PATH% devices 2>Nul | findstr fastboot +if %errorLevel% == 0 ( + ping 127.0.0.1 -n 2 -w 1000 >NUL + goto :wait-leave-fastboot +) + + +exit /b 0 diff --git a/flash-scripts/windows/fp4_oem-unlock-critical.bat b/flash-scripts/windows/fp4_oem-unlock-critical.bat new file mode 100755 index 0000000000000000000000000000000000000000..55638af82dee1b59946c7ac24873be2b4aa67502 --- /dev/null +++ b/flash-scripts/windows/fp4_oem-unlock-critical.bat @@ -0,0 +1,43 @@ +:: Copyright (C) 2020 - Author: Ingo; update and adoption to FP4, 2022 by ff2u +:: Copyright (C) 2020 ECORP SAS - Author: Vincent Bourgmayer +:: +:: This program is free software: you can redistribute it and/or modify +:: it under the terms of the GNU General Public License as published by +:: the Free Software Foundation, either version 3 of the License, or +:: (at your option) any later version. +:: +:: This program is distributed in the hope that it will be useful, +:: but WITHOUT ANY WARRANTY; without even the implied warranty of +:: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +:: GNU General Public License for more details. +:: +:: You should have received a copy of the GNU General Public License +:: along with this program. If not, see . + +:: Parameter +:: $1: The folder where fastboot runnable is stored + +:: Exit status +:: - 0 : OEM unlocked on device +:: - 10 : fastboot error + +set FASTBOOT_FOLDER_PATH=%~1 +set FASTBOOT_PATH="%FASTBOOT_FOLDER_PATH%fastboot" +echo "FASTBOOT path:"%FASTBOOT_PATH% + +%FASTBOOT_PATH% flashing unlock_critical + +if errorLevel 1 ( + %FASTBOOT_PATH% flashing unlock_critical 2>&1 | findstr unlocked + if errorlevel 0 ( + echo "Critical partitions already unlocked" + ) else ( + echo "flashing unlock critical fails" + exit /b 10 + ) +) + +timeout 10 >nul +echo "flashing critiical unlocked" + +exit /b 0 diff --git a/flash-scripts/windows/fp4_oem-unlock.bat b/flash-scripts/windows/fp4_oem-unlock.bat new file mode 100755 index 0000000000000000000000000000000000000000..29e14d0249efe5ea6ab16119377d91f777cfabcb --- /dev/null +++ b/flash-scripts/windows/fp4_oem-unlock.bat @@ -0,0 +1,47 @@ +:: Copyright (C) 2020 - Author: Ingo; update and adoption to FP4, 2022 by ff2u +:: Copyright (C) 2020 ECORP SAS - Author: Vincent Bourgmayer +:: +:: This program is free software: you can redistribute it and/or modify +:: it under the terms of the GNU General Public License as published by +:: the Free Software Foundation, either version 3 of the License, or +:: (at your option) any later version. +:: +:: This program is distributed in the hope that it will be useful, +:: but WITHOUT ANY WARRANTY; without even the implied warranty of +:: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +:: GNU General Public License for more details. +:: +:: You should have received a copy of the GNU General Public License +:: along with this program. If not, see . + +:: Parameter +:: $1: The folder where fastboot runnable is stored + +:: Exit status +:: - 0 : OEM unlocked on device +:: - 10 : fastboot error + +set FASTBOOT_FOLDER_PATH=%~1 +set FASTBOOT_PATH="%FASTBOOT_FOLDER_PATH%fastboot" +echo "FASTBOOT path:"%FASTBOOT_PATH% + +%FASTBOOT_PATH% getvar unlocked 2>&1 | findstr yes +if errorLevel 1 ( + + %FASTBOOT_PATH% flashing unlock + + if errorLevel 1 ( + echo "flashing unlock fails" + exit /b 10 + ) + +else ( + echo "Device already unlocked" + ) + +) + +timeout 10 >nul +echo "flashing unlocked" + +exit /b 0 diff --git a/src/main/java/ecorp/easy/installer/helpers/DeviceHelper.java b/src/main/java/ecorp/easy/installer/helpers/DeviceHelper.java index 52193b9df873eb4632b7f24cb70bdb98fe5dc010..cef15e37de4b3c0d4c3739a68dca9fa610ec8e4a 100644 --- a/src/main/java/ecorp/easy/installer/helpers/DeviceHelper.java +++ b/src/main/java/ecorp/easy/installer/helpers/DeviceHelper.java @@ -50,6 +50,7 @@ public class DeviceHelper { put("FP3", "0008"); put("GS290", "0009"); put("Teracube_2e", "0011"); + put("FP4", "0012"); }}; /** @@ -121,4 +122,4 @@ public class DeviceHelper { return flashingProcess; } -} \ No newline at end of file +} diff --git a/src/main/resources/images/FP4_bootscreen_warning-2.png b/src/main/resources/images/FP4_bootscreen_warning-2.png new file mode 100644 index 0000000000000000000000000000000000000000..9cf46deb29250f12206cfece6e8e24358bc3e983 Binary files /dev/null and b/src/main/resources/images/FP4_bootscreen_warning-2.png differ diff --git a/src/main/resources/images/FP4_developer_options.png b/src/main/resources/images/FP4_developer_options.png new file mode 100644 index 0000000000000000000000000000000000000000..c3e13620c453b5d06b3bd69dca2a232b6ed1b618 Binary files /dev/null and b/src/main/resources/images/FP4_developer_options.png differ diff --git a/src/main/resources/images/FP4_fastboot_mode.png b/src/main/resources/images/FP4_fastboot_mode.png new file mode 100644 index 0000000000000000000000000000000000000000..22034b40fed7f106fedfcffc34ebc488f9884712 Binary files /dev/null and b/src/main/resources/images/FP4_fastboot_mode.png differ diff --git a/src/main/resources/images/FP4_get_imei.png b/src/main/resources/images/FP4_get_imei.png new file mode 100644 index 0000000000000000000000000000000000000000..c60bdbfb8c165dce10f4d0a63964ed5bb8ace012 Binary files /dev/null and b/src/main/resources/images/FP4_get_imei.png differ diff --git a/src/main/resources/images/FP4_input_verify-code.png b/src/main/resources/images/FP4_input_verify-code.png new file mode 100644 index 0000000000000000000000000000000000000000..a4bb3181d3cd000eada2b2a8d0c624f2fd6e7c86 Binary files /dev/null and b/src/main/resources/images/FP4_input_verify-code.png differ diff --git a/src/main/resources/images/FP4_lock_bootloader-2.png b/src/main/resources/images/FP4_lock_bootloader-2.png new file mode 100644 index 0000000000000000000000000000000000000000..6766d49e276c3092c97bea372cdc50ea61d880f7 Binary files /dev/null and b/src/main/resources/images/FP4_lock_bootloader-2.png differ diff --git a/src/main/resources/images/FP4_oem_unlocking.png b/src/main/resources/images/FP4_oem_unlocking.png new file mode 100644 index 0000000000000000000000000000000000000000..35f57664a3bc06dafccd2dd5bd80b24d310416b2 Binary files /dev/null and b/src/main/resources/images/FP4_oem_unlocking.png differ diff --git a/src/main/resources/images/FP4_options_menu-2.png b/src/main/resources/images/FP4_options_menu-2.png new file mode 100644 index 0000000000000000000000000000000000000000..0ecfdb2e057402a28be616715957a04eddab367f Binary files /dev/null and b/src/main/resources/images/FP4_options_menu-2.png differ diff --git a/src/main/resources/images/FP4_prepare_fastboot_mode.png b/src/main/resources/images/FP4_prepare_fastboot_mode.png new file mode 100644 index 0000000000000000000000000000000000000000..a8070ab9e2ee6e5de70b5f4846afd833545a22cc Binary files /dev/null and b/src/main/resources/images/FP4_prepare_fastboot_mode.png differ diff --git a/src/main/resources/images/FP4_rejoinBootloader.png b/src/main/resources/images/FP4_rejoinBootloader.png new file mode 100644 index 0000000000000000000000000000000000000000..f3cce05fda3e8c1926f12972235566e86d0226a4 Binary files /dev/null and b/src/main/resources/images/FP4_rejoinBootloader.png differ diff --git a/src/main/resources/images/FP4_select_lock_bootloader.png b/src/main/resources/images/FP4_select_lock_bootloader.png new file mode 100644 index 0000000000000000000000000000000000000000..ee9bdde91d14ac408c03728d9b5d5b81aa2a3392 Binary files /dev/null and b/src/main/resources/images/FP4_select_lock_bootloader.png differ diff --git a/src/main/resources/images/FP4_select_unlock_bootloader.png b/src/main/resources/images/FP4_select_unlock_bootloader.png new file mode 100644 index 0000000000000000000000000000000000000000..7a9982036b32e75a8cd1a71b0564b07c15b32840 Binary files /dev/null and b/src/main/resources/images/FP4_select_unlock_bootloader.png differ diff --git a/src/main/resources/images/FP4_select_unlock_bootloader_2.png b/src/main/resources/images/FP4_select_unlock_bootloader_2.png new file mode 100644 index 0000000000000000000000000000000000000000..bf1c3342359e8caa3caac8e58a95cce8ea64df25 Binary files /dev/null and b/src/main/resources/images/FP4_select_unlock_bootloader_2.png differ diff --git a/src/main/resources/images/FP4_serial.png b/src/main/resources/images/FP4_serial.png new file mode 100644 index 0000000000000000000000000000000000000000..1be7da5df047e9ab51d626d95a84e14391bd4471 Binary files /dev/null and b/src/main/resources/images/FP4_serial.png differ diff --git a/src/main/resources/images/FP4_unlock_form.png b/src/main/resources/images/FP4_unlock_form.png new file mode 100644 index 0000000000000000000000000000000000000000..01318a4e5622cfc0db63ddc29bfef37ac0d7da5f Binary files /dev/null and b/src/main/resources/images/FP4_unlock_form.png differ diff --git a/src/main/resources/instructions/imageName_en_EN_0012.properties b/src/main/resources/instructions/imageName_en_EN_0012.properties new file mode 100644 index 0000000000000000000000000000000000000000..60b2b85581b980432b5941c4bfcb8bbd3b20a99a --- /dev/null +++ b/src/main/resources/instructions/imageName_en_EN_0012.properties @@ -0,0 +1,40 @@ +# Copyright 2019-2020 - ECORP SAS + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +install_instr_get_specific_UnlockCode2_FP4=FP4_get_imei.png +install_instr_get_specific_UnlockCode3_FP4=FP4_serial.png +install_instr_get_specific_UnlockCode4_FP4=FP4_unlock_form.png + +install_instr_activate_unlocking1_FP4=FP4_developer_options.png +install_instr_activate_unlocking2_FP4=FP4_oem_unlocking.png +install_instr_activate_unlocking4_FP4=FP4_input_verify-code.png + +install_instr_selectUnlockBootloader_FP4=FP4_select_unlock_bootloader.png +install_instr_unlockBootloader_FP4=FP4_select_unlock_bootloader_2.png +install_instr_rejoinBootloader_FP4=FP4_rejoinBootloader.png + +install_instr_prepareFastboot_FP4=FP4_prepare_fastboot_mode.png +install_instr_startFastboot_FP4=FP4_fastboot_mode.png + +install_instr_startFastboot=FP3_bootloader_mode.png +install_instr_selectUnlockBootloader=FP3_select_unlock_bootloader.png +install_instr_unlockBootloader=FP3_unlock_bootloader-2.png +install_instr_bootWarning=FP4_bootscreen_warning-2.png +install_instr_turnOffAgain=FP3_bootloader_mode.png +install_instr_selectLockBootloader_FP4=FP4_select_lock_bootloader.png +install_instr_lockBootloader=FP4_lock_bootloader-2.png +install_instr_startFastbootFromOptions=FP4_options_menu-2.png +install_instr_waitFastbootmodeDetected=FP3_fastboot_mode.png + diff --git a/src/main/resources/lang/translation.properties b/src/main/resources/lang/translation.properties index bef4c3ad0589ffe0ad9e3740d3d376421a06e8a8..c56e34ed5172839df33b5a736d3febf999a0535c 100644 --- a/src/main/resources/lang/translation.properties +++ b/src/main/resources/lang/translation.properties @@ -123,8 +123,46 @@ install_instr_selectUnlockBootloader=Select "UNLOCK BOOTLOADER" with "Volume" bu install_instr_unlockBootloader=Confirm with "Power" button. After that the phone will reboot automatically install_instr_selectLockBootloader=Select "LOCK BOOTLOADER" with "Volume" button install_instr_lockBootloader=Confirm with "Power" button. After that the phone will reboot automatically -install_instr_bootWarning= On the boot warning screen, you have 5 seconds to press "Volume Down", to enter options menu. +install_instr_bootWarning=On the boot warning screen, you have 5 seconds to press "Volume Down", to enter options menu. install_instr_ifYouMissedTimeout=If you missed it, don't panic! Restart in Fastboot mode : turn off device then keep pressing "Power" & "Volume Down". +##FP4 +#stepTitles +stepTitle_get_specific_UnlockCode_FP4=Get your personal unlock code\n(https://support.fairphone.com/hc/en-us/articles/4405858258961-FP4-Manage-the-bootloader) +stepTitle_activate_unlocking_FP4=Activate Unlocking +stepTitle2On7_2_FP4=OEM-Unlock-Step-2. Please wait... +stepTitle_unlockbootloader_FP4=Unlock the bootloader and then reboot the device into fastboot mode to unlock more partitions (Unlocking, step 1/2) +stepTitle_unlock_critical_FP4=Unlock more partitions and then reboot the device into fastboot mode to allow flashing of the files (Unlocking, step 2/2) +stepTitle_StartInFastbootFP4=Start the device in fastboot mode +install_instr_eosInstall_FP4=/e/-installation is starting. This takes several minutes... +install_title_lockBootloader_critical_FP4=Lock extended partitions of the bootloader +#install_instructions +install_instr_readAllWarning_FP4=Please read the next steps before you continue the installation with "Next". +install_instr_get_specific_UnlockCode1_FP4=Update to the latest operating system version (https://support.fairphone.com/hc/en-us/articles/4405865187217).\nOtherwise the following steps may not work. +install_instr_get_specific_UnlockCode2_FP4=Find the IMEI 1 of your device via the software: go to Settings → About phone → scroll down to IMEI (SIM slot 1) +install_instr_get_specific_UnlockCode3_FP4=Find your device's serial number via the software: go to Settings → About phone → Model & Hardware → Serial number: Ie. 357801234567890 +install_instr_get_specific_UnlockCode4_FP4=Type in IMEI and serial number on page\nhttps://www.fairphone.com/en/bootloader-unlocking-code-for-fairphone-3/\nto get your personal unlock code. +install_instr_get_specific_UnlockCode5_FP4=Note the unlock code down. You'll need it later. +install_instr_get_specific_UnlockCode6_FP4=If you encounter an error, try:\n* again at a later time\n* with another browser\n* on another device\n* to type the correct identifiers again, you could have entered a typo +# +install_instr_activate_unlocking1_FP4=Go to Settings → System → Advanced → Developer options +install_instr_activate_unlocking2_FP4=Scroll down until you find OEM unlocking and set the toggle to On +install_instr_activate_unlocking3_FP4=The device then can ask you to re-enter your chosen PIN, password, or pattern for unlocking the lock screen of your Fairphone. +install_instr_activate_unlocking4_FP4=Enter the unlock code you noted down earlier and press Enable +install_instr_activate_unlocking5_FP4=Possibility for Unlocking is now enabled. +# +install_instr_selectUnlockBootloader_FP4=Select „UNLOCK THE BOOTLOADER“ with the volume keys +install_instr_unlockBootloader_FP4=Confirmm with the power key. After that the phone reboots automatically. +install_instr_rejoinBootloader_FP4=Release the power button immediately when the phone reboots (1), then press the volume down button directly (2). Keep it pressed until the fastboot screen appears again. You have about 3 seconds for this process during the reboot. +# +install_instr_ifYouMissedTimeout_FP4=If you missed it, then no panic! Restart your device again into the fastboot mode:\nPull USB cable off, turn off your device, keep "volume down" key pressed and connect the USB cable again; wait until you're back to fastboot mode (green "START" sign appears). +install_instr_turnOff=Disconnect USB-C cable and turn off FP4 +install_instr_prepareFastboot_FP4=When the phone is completely off, press and hold the "Volume Down" button and reconnect the USB cable. +install_instr_startFastboot_FP4=Wait until a green "START" appears (the "Start" selection alternates with other indicators). Then the FP4 is in fastboot mode. +script_error_oemUnlock_10_FP4=Unlock failed or FP4 is already unlocked. +install_instr_oemUnlock_2_FP4=OEM unlocking 2nd step (unlocking additionally locked system areas, "unlock_critical") +install_instr_selectLockBootloader_FP4=Select "LOCK BOOTLOADER" with the volume key to lock the bootloader. Locking the bootloader must be done twice (Normal and Extended partitions). +# +script_error_locking=Error while locking bootloader ## General install_title_Log=Log install_btn_sendLog=Send to support @@ -217,6 +255,8 @@ script_error_installFromRecovery_102 = Can't locate the required file script_error_installFromFastboot_1 = Could not wipe user data script_error_installFromFastboot_2 = Flashing of one partition failed script_error_installFromFastboot_3 = Could not lock the bootloader +script_error_installFromFastboot_4 = Setting boot slot has failed +script_error_installFromFastboot_5 = Flashing of one critical partition failed script_error_installFromFastboot_101 = No /e/ install archive provided script_error_installFromFastboot_102 = Could not unpack /e/ install archive script_error_waitReboot_10 = No device's serial number provided diff --git a/src/main/resources/lang/translation_de.properties b/src/main/resources/lang/translation_de.properties index f9b52762240ebeb354a51481f9cf93ea91170dcf..997e45b01bcdfe6ac4440f08a2ff5293ff1af766 100644 --- a/src/main/resources/lang/translation_de.properties +++ b/src/main/resources/lang/translation_de.properties @@ -78,6 +78,43 @@ download_lbl_noInternet=Keine Internet-Verbindung download_lbl_complete=Das Herunterladen war erfolgreich, du kannst nun /e/-OS auf dein Smartphone installieren! download_lbl_bePatient=Das kann einige Zeit dauern, bitte habe etwas Geduld. download_lbl_download=Wir laden nun die erforderlichen Dateien auf deinen Computer herunter +##FP4 +#stepTitles +stepTitle_get_specific_UnlockCode_FP4=Ermittle Deinen persönlichen Entsperr-Code\n(https://support.fairphone.com/hc/en-us/articles/4405858258961-FP4-Manage-the-bootloader) +stepTitle_activate_unlocking_FP4=Aktiviere das Entsperren +stepTitle2On7_2_FP4=OEM-Entsperrung-Schritt-2. Bitte warten... +stepTitle_unlockbootloader_FP4=Entsperre den Bootloader und starte das Gerät anschließend neu in den Fastboot-Modus, um weitere Partitienen zu entsperren (Entsperren, Schritt 1/2) +stepTitle_unlock_critical_FP4=Entsperre weitere Partitionen und starte das Gerät anschließend neu in den Fastboot-Modus, um das Flashen der Dateien zu ermöglichen (Entsperren, Schritt 2/2) +stepTitle_StartInFastbootFP4=Starte das Gerät in den Fastboot-Modus +install_instr_eosInstall_FP4=/e/-Installation beginnt. Dies dauert mehrere Minuten... +install_title_lockBootloader_critical_FP4=Erweiterte Partitionen des Bootloaders sperren +#install_instructions +install_instr_readAllWarning_FP4=Lese bitte zuerst die nächsten Schritte durch, bevor Du mit "Weiter" die Installation fortsetzt +install_instr_get_specific_UnlockCode1_FP4=Aktualisiere auf die neueste Betriebssytem-Version (https://support.fairphone.com/hc/en-us/articles/4405865187217).\nSonst funktionieren die nachfolgenden Schritte möglicherweise nicht. +install_instr_get_specific_UnlockCode2_FP4=Ermittle die IMEI 1 Deines Geräts über die Software: Gehe zu Einstellungen → Über das Telefon → blättere nach unten zu IMEI (SIM-Slot 1) +install_instr_get_specific_UnlockCode3_FP4=Ermittle die Seriennummer Deines Geräts über die Software: Gehe zu Einstellungen → Über das Telefon → Modell & Hardware → Seriennummer: z. B. 357801234567890 +install_instr_get_specific_UnlockCode4_FP4=Gib IMEI und Seriennummer auf der Seite\nhttps://www.fairphone.com/en/bootloader-unlocking-code-for-fairphone-3/\nein, um Deinen persönlichen Entsperr-Code zu erhalten. +install_instr_get_specific_UnlockCode5_FP4=Notiere Dir den Entsperrcode. Du benötigst ihn später. +install_instr_get_specific_UnlockCode6_FP4=Falls ein Fehler auftritt versuche es:\n* nochmals später\n* mit einem anderen Browser\n* auf einem anderen Computer\n* nochmals neu einzugeben; vielleicht hast Du Dich vertippt +# +install_instr_activate_unlocking1_FP4=Gehe zu Einstellungen → System → Erweitert → Entwickleroptionen +install_instr_activate_unlocking2_FP4=Scrolle nach unten, bist Du "OEM-Entsperrung" findest und aktiviere den Regler +install_instr_activate_unlocking3_FP4=Das Gerät kann Dich dann auffordern, Deine gewählte PIN, Dein Kennwort oder Dein Muster erneut einzugeben, um den Sperrbildschirm Deines Fairphones zu entsperren. +install_instr_activate_unlocking4_FP4=Gebe den Freischaltcode ein, den Du zuvor notiert hast, und wähle "Aktivieren" +install_instr_activate_unlocking5_FP4=Die Entsperr-Möglichkeit ist jetzt aktiviert. +# +install_instr_selectUnlockBootloader_FP4=Wähle „UNLOCK THE BOOTLOADER“ mit der Lautstärketaste +install_instr_unlockBootloader_FP4=Bestätige mit der Einschaltetaste. Danach wird das Telefon automatisch neu gestartet. +install_instr_rejoinBootloader_FP4=Lasse die Einschalttaste sofort los (1), wenn das Telefon neu startet. Drücke dann direkt die "Lautstärke leiser"-Taste (2). Lasse sie gedrückt, bis wieder der Fastboot-Bildschirm erscheint. Für diesen Vorgang bleiben Dir im Verlauf des Neustarts etwa 3 Sekunden. +# +install_instr_ifYouMissedTimeout_FP4=Wenn du es verpasst hast, keine Panik! Starte neu in den Fastboot-Modus:\nZiehe das USB-Kabel ab, schalte dein Gerät aus, halte die „Lautstärke leiser“-Taste gedrückt und verbinde gleichzeitig das USB-Kabel. Warte, bis Du wieder im Fastboot-Modus bist (grünes „START“ erscheint). +install_instr_turnOff=USB-C-Kabel abziehen und FP4 ausschalten +install_instr_prepareFastboot_FP4=Wenn das Telefon komplett aus ist die "Lautstärke leiser"-Taste drücken und gedrückt lassen und das USB-Kabel wieder anstecken. +install_instr_startFastboot_FP4=Warten, bis ein grünes „START“ erscheint (die Auswahl "Start" wechselt mit anderen Anzeigen ab). Dann ist das FP4 im Fastboot-Modus. +script_error_oemUnlock_10_FP4=Unlock fehlgeschlagen oder FP4 ist bereits entsperrt. +install_instr_oemUnlock_2_FP4=OEM-Entsperrung 2. Schritt (Entsperrung zusäztlich gesperrter Systembereiche, "unlock_critical") +install_instr_selectLockBootloader_FP4=Wähle „LOCK BOOTLOADER“ mit der Lautstärketaste, um den Bootloader wieder zu sperren. Das Sperren des Bootloaders muss 2x durchgeführt werden (Normale und erweiterte Partitionen) +##General #Download download_mTitle=Herunterladen von /e/OS und den notwendigen Dateien detect_btn_tryWithAnotherDevice=Versuche es mit einem anderen Gerät @@ -127,6 +164,8 @@ script_error_waitReboot_101=Die Instruktionen können nicht auf dem Gerät ausge script_error_waitReboot_10=Die Seriennummer des Gerätes ist nicht angegeben script_error_installFromFastboot_102=Das /e/-Installationsarchiv konnte nicht entpackt werden script_error_installFromFastboot_101=Kein /e/-Installationsarchiv bereitgestellt +script_error_installFromFastboot_5=Das Flashen einer der critical-Partitionen ist fehlgeschlagen +script_error_installFromFastboot_4=Das Setzen des Boot-Slot ist fehlgeschlagen script_error_installFromFastboot_3=Der Bootloader konnte nicht gesperrt werden script_error_installFromFastboot_2=Das Flashen einer der Partitionen ist fehlgeschlagen script_error_installFromFastboot_1=Die Benutzerdaten konnten nicht gelöscht werden @@ -143,6 +182,7 @@ script_error_serialNumber_missing=Die Seriennummer des Gerätes ist nicht angege script_error_installFromRecovery_3=Während der Installation ist ein Fehler aufgetreten script_error_installFromRecovery_2=Die benötigte Datei kann nicht auf das Gerät übertragen werden script_error_waitDownload_1=Es kann kein Gerät im Download-Modus gefunden werden +script_error_locking=Fehler beim Sperren des Bootloaders install_instr_unlockingOem=Der Easy-Installer führt die „OEM-Entsperrung“ durch install_instr_pressVolUpToAcceptOEMUnlocking=Drücke „Lautstärke lauter“ um die „OEM-Entsperrung“ zuzulassen install_instr_rebootingOnBootloader=Dein Gerät wird automatisch in den Bootloader-Modus neustarten diff --git a/src/main/resources/yaml/FP4_flash.yml b/src/main/resources/yaml/FP4_flash.yml new file mode 100644 index 0000000000000000000000000000000000000000..504afe1b461c10671b112175fc48d1bd230a3701 --- /dev/null +++ b/src/main/resources/yaml/FP4_flash.yml @@ -0,0 +1,177 @@ +## Copyright 2021 - ECORP SAS + +## This program is free software: you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation, either version 3 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. + +## You should have received a copy of the GNU General Public License +## along with this program. If not, see . +## Author: Vincent Bourgmayer +--- +stepsCount: 10 +steps: + f0: + type: custom + stepNumber: 1 + nextStepKey: f1 + titleKey: stepTitle_get_specific_UnlockCode_FP4 + instructions: + - install_instr_get_specific_UnlockCode1_FP4 + - install_instr_get_specific_UnlockCode2_FP4 + - install_instr_get_specific_UnlockCode3_FP4 + - install_instr_get_specific_UnlockCode4_FP4 + - install_instr_get_specific_UnlockCode5_FP4 + - install_instr_get_specific_UnlockCode6_FP4 + f1: + type: custom + stepNumber: 2 + nextStepKey: f2 + titleKey: stepTitle_activate_unlocking_FP4 + instructions: + - install_instr_activate_unlocking1_FP4 + - install_instr_activate_unlocking2_FP4 + - install_instr_activate_unlocking3_FP4 + - install_instr_activate_unlocking4_FP4 + - install_instr_activate_unlocking5_FP4 + f2: + type: custom-executable + stepNumber: 3 + nextStepKey: f3 + titleKey: stepTitle_StartInFastbootFP4 + titleIcon: icon-download.png + instructions: + - install_instr_readAllWarning_FP4 + - install_instr_turnOff + - install_instr_prepareFastboot_FP4 + - install_instr_startFastboot_FP4 + - install_instr_waitFastbootmodeDetected + script: wait-fastboot + parameters: + fastboot_folder_path: ${ADB_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 1: script_error_waitFastboot_1 + f3: + type: load + stepNumber: 4 + nextStepKey: f4 + titleKey: stepTitle2On7 + instructions: + - install_instr_oemUnlock + averageTime: 3 + script: fp4_oem-unlock + parameters: + fastboot_folder_path: ${ADB_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 10: script_error_oemUnlock_10 + f4: + type: custom-executable + stepNumber: 5 + nextStepKey: f5 + titleKey: stepTitle_unlockbootloader_FP4 + titleIconName: icon-download.png + instructions: + - install_instr_readAllWarning_FP4 + - install_instr_selectUnlockBootloader_FP4 + - install_instr_unlockBootloader_FP4 + - install_instr_rejoinBootloader_FP4 + - install_instr_ifYouMissedTimeout_FP4 + script: wait-fastboot-unlocked + parameters: + fastboot_folder_path: ${ADB_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 1: script_error_waitFastboot_1 + f5: + type: custom-executable + stepNumber: 6 + nextStepKey: f6 + titleKey: stepTitle_unlock_critical_FP4 + titleIconName: icon-download.png + instructions: + - install_instr_readAllWarning_FP4 + - install_instr_selectUnlockBootloader_FP4 + - install_instr_unlockBootloader_FP4 + - install_instr_rejoinBootloader_FP4 + - install_instr_ifYouMissedTimeout_FP4 + script: fp4_oem-unlock-critical + parameters: + fastboot_folder_path: ${ADB_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 10: script_error_oemUnlock_10 + f6: + type: load + stepNumber: 7 + nextStepKey: f7 + titleKey: stepTitle6On7 + instructions: + - install_instr_eosInstall_FP4 + averageTime: 300 + script: fp4_install-from-fastboot + parameters: + archive_path: ${ARCHIVE_PATH} + fastboot_folder_path: ${ADB_FOLDER_PATH} + java_folder_path: ${JAVA_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 1: script_error_installFromFastboot_1 + 2: script_error_installFromFastboot_2 + 3: script_error_installFromFastboot_3 + 4: script_error_installFromFastboot_4 + 5: script_error_installFromFastboot_5 + 101: script_error_installFromFastboot_101 + 102: script_error_installFromFastboot_102 + f7: + type: askAccount + stepNumber: 8 + nextStepKey: f8 + f8: + type: custom-executable + stepNumber: 9 + nextStepKey: f9 + titleKey: install_title_lockBootloader + titleIconName: icon-download.png + instructions: + - install_instr_readAllWarning_FP4 + - install_instr_selectLockBootloader_FP4 + - install_instr_lockBootloader + - install_instr_rejoinBootloader_FP4 + - install_instr_ifYouMissedTimeout_FP4 + script: fp4_lock + parameters: + fastboot_folder_path: ${ADB_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 102: script_error_locking + f9: + type: custom-executable + stepNumber: 10 + nextStepKey: end + titleKey: install_title_lockBootloader_critical_FP4 + titleIconName: icon-download.png + instructions: + - install_instr_selectLockBootloader_FP4 + - install_instr_lockBootloader + script: fp4_lock_critical + parameters: + fastboot_folder_path: ${ADB_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 1: script_error_unknown + 102: script_error_locking + diff --git a/src/main/resources/yaml/FP4_fs.yml b/src/main/resources/yaml/FP4_fs.yml new file mode 100644 index 0000000000000000000000000000000000000000..890f5f6d1fea6196082a4940dab43061694dee6d --- /dev/null +++ b/src/main/resources/yaml/FP4_fs.yml @@ -0,0 +1,20 @@ +## Copyright 2019-2020 - ECORP SAS + +## This program is free software: you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation, either version 3 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. + +## You should have received a copy of the GNU General Public License +## along with this program. If not, see . +## Author: Vincent Bourgmayer +--- +sources: + rom: + url: https://images.ecloud.global/stable/FP4/IMG-e-latest-FP4.zip + filePath: IMG-e-latest-FP4.zip