From df374aecb6c6c816de5b3a29c798dfad614668a1 Mon Sep 17 00:00:00 2001 From: Frank PREEL Date: Wed, 4 May 2022 17:58:47 +0200 Subject: [PATCH 01/53] Functional S9 S9plus Macos + Win11 --- flash-scripts/linux/install-e-recovery.sh | 63 ++++++++ .../linux/install-from-e-recovery.sh | 59 +++++++ flash-scripts/linux/wait-download.sh | 5 +- flash-scripts/linux/wait-e-reboot.sh | 52 ++++++ .../linux/wait-e-recovery-sideload.sh | 44 +++++ flash-scripts/windows/install-e-recovery.bat | 48 ++++++ .../windows/install-from-e-recovery.bat | 50 ++++++ flash-scripts/windows/wait-e-reboot.bat | 40 +++++ .../windows/wait-e-recovery-sideload.bat | 41 +++++ .../ecorp/easy/installer/AppConstants.java | 12 +- .../ecorp/easy/installer/EasyInstaller.java | 62 ++++++- .../installer/tasks/CommandExecutionTask.java | 46 ++++-- .../easy/installer/tasks/DownloadTask.java | 57 ++++--- .../instructions/imageName.properties | 10 +- .../resources/lang/translation.properties | 18 +++ .../resources/lang/translation_de.properties | 14 +- src/main/resources/yaml/star2lte_flash.yml | 149 +++-------------- src/main/resources/yaml/star2lte_fs.yml | 18 +-- src/main/resources/yaml/starlte_flash.yml | 151 +++--------------- src/main/resources/yaml/starlte_fs.yml | 18 +-- 20 files changed, 621 insertions(+), 336 deletions(-) create mode 100644 flash-scripts/linux/install-e-recovery.sh create mode 100644 flash-scripts/linux/install-from-e-recovery.sh create mode 100644 flash-scripts/linux/wait-e-reboot.sh create mode 100644 flash-scripts/linux/wait-e-recovery-sideload.sh create mode 100644 flash-scripts/windows/install-e-recovery.bat create mode 100644 flash-scripts/windows/install-from-e-recovery.bat create mode 100644 flash-scripts/windows/wait-e-reboot.bat create mode 100644 flash-scripts/windows/wait-e-recovery-sideload.bat diff --git a/flash-scripts/linux/install-e-recovery.sh b/flash-scripts/linux/install-e-recovery.sh new file mode 100644 index 00000000..91c9a0b5 --- /dev/null +++ b/flash-scripts/linux/install-e-recovery.sh @@ -0,0 +1,63 @@ +#!/bin/bash + +# Copyright (C) 2022 ECORP SAS - Author: Frank Preel +# +# 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: FASTBOOT_PATH +# $2: E_IMAGE_PATH need twrp path +# Exit status +# - 0 : Recovery installed +# - 101 : FASTBOOT_PATH missing +# - 102 : E_IMAGE_PATH missing + +FASTBOOT_PATH=$1 +E_IMAGE_PATH=$2 + +if [ -z "$FASTBOOT_PATH" ] +then + echo "Fastboot path is empty" + exit 101 +fi + +if [ -z "$E_IMAGE_PATH" ] +then + echo "E Image path is empty" + exit 102 +fi + +#"$FASTBOOT_CMD" reboot bootloader +#sleep 10 + +# Build fastboot and adb commands +FASTBOOT_CMD=${FASTBOOT_PATH}"fastboot" +ADB_CMD=${FASTBOOT_PATH}"adb" + +# Wipe user data +if ! "$FASTBOOT_CMD" erase userdata ; +then + exit 11 +fi + +echo "user data wiped" +sleep 1 + +if ! "$FASTBOOT_CMD" erase metadata ; +then + exit 12 +fi + + +"$FASTBOOT_CMD" flash boot ${E_IMAGE_PATH} diff --git a/flash-scripts/linux/install-from-e-recovery.sh b/flash-scripts/linux/install-from-e-recovery.sh new file mode 100644 index 00000000..bc6a1603 --- /dev/null +++ b/flash-scripts/linux/install-from-e-recovery.sh @@ -0,0 +1,59 @@ +#!/bin/bash + +# Copyright (C) 2022 ECORP SAS - Author: Frank Preel +# +# 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: DEVICE_ID device id +# $2: ARCHIVE_PATH path to archive +# $3: fastboot folder path + + +# Exit status +# - 0 : device flashed +# - 1 : generic error + +DEVICE_ID=$1 +ARCHIVE_FILE=$2 +FASTBOOT_FOLDER_PATH=$3 + +# Check serial number has been provided +if [ -z "$DEVICE_ID" ] +then + exit 101 +fi + +# check path to rom has been provided +if [ -z "$ARCHIVE_FILE" ] +then + exit 102 +fi + +#check path to adb/fasboot has been provided +if [ -z "$FASTBOOT_FOLDER_PATH" ] +then + exit 103 +fi + +# Build fastboot and adb commands +ADB_CMD=${FASTBOOT_FOLDER_PATH}"adb" + +"$ADB_CMD" sideload ${ARCHIVE_FILE} +ret=${?} + +echo "adb sideload retuns = "${ret} +# ret = 0 if adb command is fine, 1 on error + +exit ${ret} diff --git a/flash-scripts/linux/wait-download.sh b/flash-scripts/linux/wait-download.sh index 8ff8483d..d4315ad0 100755 --- a/flash-scripts/linux/wait-download.sh +++ b/flash-scripts/linux/wait-download.sh @@ -2,6 +2,7 @@ # Copyright (C) 2019 ECORP SAS - Author: Romain Hunault # Copyright (C) 2020 ECORP SAS - Author: Vincent Bourgmayer +# Copyright (C) 2022 ECORP SAS - Author: Frank Preel # # 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 @@ -32,8 +33,8 @@ echo "Heimdall path: $HEIMDALL_PATH" while [ "$($HEIMDALL_PATH detect > /dev/null 2>&1; echo $?)" = 1 ] do - sleep 1s + sleep 1 done -sleep 5s +sleep 5 echo "Download mode detected" \ No newline at end of file diff --git a/flash-scripts/linux/wait-e-reboot.sh b/flash-scripts/linux/wait-e-reboot.sh new file mode 100644 index 00000000..20917988 --- /dev/null +++ b/flash-scripts/linux/wait-e-reboot.sh @@ -0,0 +1,52 @@ +#!/bin/bash + +# Copyright (C) 2022 ECORP SAS - Author: Romain Hunault +# +# 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: DEVICE_ID Device we are waiting for reboot +# $2: ADB_FOLDER_PATH: the path where runnable adb is stored + +# Exit status +# - 0 : success +# - 1 : Error +# - 10 : DEVICE_ID is missing +# - 101 : device with DEVICE_ID is not detected + +DEVICE_ID=$1 +ADB_FOLDER_PATH=$2 + +ADB_PATH=${ADB_FOLDER_PATH}"adb" + +echo "ADB path: $ADB_PATH" + +if [ -z "$DEVICE_ID" ] +then + exit 10 +fi + + +#1 On check that device is in recovery mode +if ! "$ADB_PATH" -s "$DEVICE_ID" get-state 2>&1 | grep "recovery" +then + echo "Device not detected in recovery" + exit 101 +fi + +#Then we wait that it left this state +while "$ADB_PATH" -s "$DEVICE_ID" get-state 2> /dev/null +do + sleep 1 +done \ No newline at end of file diff --git a/flash-scripts/linux/wait-e-recovery-sideload.sh b/flash-scripts/linux/wait-e-recovery-sideload.sh new file mode 100644 index 00000000..f0be174e --- /dev/null +++ b/flash-scripts/linux/wait-e-recovery-sideload.sh @@ -0,0 +1,44 @@ +#!/bin/bash + +# Copyright (C) 2022 ECORP SAS - Author: Frank Preel +# +# 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: DEVICE_ID ID of the device to wait +# $2: ADB_FOLDER_PATH: the path where runnable adb is stored + +# Exit status +# - 0 : success +# - 101 : adb wait sideload failed + +DEVICE_ID=$1 +ADB_FOLDER_PATH=$2 + +if [ -z "$DEVICE_ID" ] +then + exit 101 +fi + +ADB_PATH=${ADB_FOLDER_PATH}"adb" + +echo "waiting for recovery" +if "$ADB_PATH" -s "$DEVICE_ID" wait-for-sideload +then + echo "device found in recovery" + exit 0 +else + echo "device not detected in recovery" + exit 101 +fi diff --git a/flash-scripts/windows/install-e-recovery.bat b/flash-scripts/windows/install-e-recovery.bat new file mode 100644 index 00000000..e83c0f78 --- /dev/null +++ b/flash-scripts/windows/install-e-recovery.bat @@ -0,0 +1,48 @@ +#!/bin/bash + +# Copyright (C) 2022 ECORP SAS - Author: Frank Preel +# +# 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: FASTBOOT_PATH +# $2: E_IMAGE_PATH need twrp path +# Exit status +# - 0 : Recovery installed +# - 101 : FASTBOOT_PATH missing +# - 102 : E_IMAGE_PATH missing + +@echo off + +SET FASTBOOT_PATH=%~1 +SET %~1E_IMAGE_PATH=%~2 +IF "-z" "%FASTBOOT_PATH%" ( + echo "Fastboot path is empty" + exit "101" +) +IF "-z" "%E_IMAGE_PATH%" ( + echo "E Image path is empty" + exit "102" +) +SET FASTBOOT_CMD=%FASTBOOT_PATH%"fastboot" +SET %FASTBOOT_PATH%ADB_CMD=%FASTBOOT_PATH%"adb" +IF ! "%FASTBOOT_CMD%" "erase" "userdata" ( + exit "11" +) +echo "user data wiped" +sleep "1" +IF ! "%FASTBOOT_CMD%" "erase" "metadata" ( + exit "12" +) +"$FASTBOOT_CMD" "flash" "boot" "%E_IMAGE_PATH%" diff --git a/flash-scripts/windows/install-from-e-recovery.bat b/flash-scripts/windows/install-from-e-recovery.bat new file mode 100644 index 00000000..5b4f5d96 --- /dev/null +++ b/flash-scripts/windows/install-from-e-recovery.bat @@ -0,0 +1,50 @@ +@echo off + +:: Copyright (C) 2022 ECORP SAS - Author: Frank Preel + +:: 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: DEVICE_ID device id +:: $2: ARCHIVE_PATH path to archive +:: $3: fastboot folder path + + +:: Exit status +:: - 0 : device flashed +:: - 1 : generic error + +SET DEVICE_ID=%~1 +SET ARCHIVE_FILE=%~2 +SET FASTBOOT_FOLDER_PATH=%~3 + +::IF "-z" "%DEVICE_ID%" ( +:: exit "101" +::) +::IF "-z" "%ARCHIVE_FILE%" ( +:: exit "102" +::) +::IF "-z" "%FASTBOOT_FOLDER_PATH%" ( +:: exit "103" +::) + +SET ADB_CMD="%FASTBOOT_FOLDER_PATH%adb" +"%ADB_CMD%" "sideload" "%ARCHIVE_FILE%" +if not errorlevel 1 ( + echo "Sideload OK" + exit /b 0 +) ELSE ( + echo "Sideload fails" + exit /b 1 +) diff --git a/flash-scripts/windows/wait-e-reboot.bat b/flash-scripts/windows/wait-e-reboot.bat new file mode 100644 index 00000000..eddccb41 --- /dev/null +++ b/flash-scripts/windows/wait-e-reboot.bat @@ -0,0 +1,40 @@ +@echo off + +:: Copyright (C) 2022 ECORP SAS - Author: Romain Hunault + +:: 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: DEVICE_ID Device we are waiting for reboot +:: $2: ADB_FOLDER_PATH: the path where runnable adb is stored + +:: Exit status +:: - 0 : success +:: - 1 : Error +:: - 10 : DEVICE_ID is missing +:: - 101 : device with DEVICE_ID is not detected + + +SET DEVICE_ID=%~1 +SET ADB_FOLDER_PATH=%~2 +SET ADB_PATH="%ADB_FOLDER_PATH% adb" +echo "ADB path: %ADB_PATH%" +::IF "-z" "%DEVICE_ID%" ( +:: exit "10" +::) +::IF REM UNKNOWN: {"type":"Pipeline","commands":[{"type":"Command","name":{"text":"!","type":"Word"},"suffix":[{"text":"\"$ADB_PATH\"","expansion":[{"loc":{"start":1,"end":9},"parameter":"ADB_PATH","type":"ParameterExpansion"}],"type":"Word"},{"text":"-s","type":"Word"},{"text":"\"$DEVICE_ID\"","expansion":[{"loc":{"start":1,"end":10},"parameter":"DEVICE_ID","type":"ParameterExpansion"}],"type":"Word"},{"text":"get-state","type":"Word"},{"type":"Redirect","op":{"text":">&","type":"greatand"},"file":{"text":"1","type":"Word"},"numberIo":{"text":"2","type":"io_number"}}]},{"type":"Command","name":{"text":"grep","type":"Word"},"suffix":[{"text":"recovery","type":"Word"}]}]} ( +:: echo "Device not detected in recovery" +:: exit "101" +::) +::REM UNKNOWN: {"type":"While","clause":{"type":"CompoundList","commands":[{"type":"Command","name":{"text":"\"$ADB_PATH\"","expansion":[{"loc":{"start":1,"end":9},"parameter":"ADB_PATH","type":"ParameterExpansion"}],"type":"Word"},"suffix":[{"text":"-s","type":"Word"},{"text":"\"$DEVICE_ID\"","expansion":[{"loc":{"start":1,"end":10},"parameter":"DEVICE_ID","type":"ParameterExpansion"}],"type":"Word"},{"text":"get-state","type":"Word"},{"type":"Redirect","op":{"text":">","type":"great"},"file":{"text":"/dev/null","type":"Word"},"numberIo":{"text":"2","type":"io_number"}}]}]},"do":{"type":"CompoundList","commands":[{"type":"Command","name":{"text":"sleep","type":"Word"},"suffix":[{"text":"1","type":"Word"}]}]}} \ No newline at end of file diff --git a/flash-scripts/windows/wait-e-recovery-sideload.bat b/flash-scripts/windows/wait-e-recovery-sideload.bat new file mode 100644 index 00000000..84786429 --- /dev/null +++ b/flash-scripts/windows/wait-e-recovery-sideload.bat @@ -0,0 +1,41 @@ +@echo off + +:: Copyright (C) 2022 ECORP SAS - Author: Frank Preel + +:: 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: DEVICE_ID ID of the device to wait +:: $2: ADB_FOLDER_PATH: the path where runnable adb is stored + +:: Exit status +:: - 0 : success +:: - 101 : adb wait sideload failed + +SET DEVICE_ID=%~1 +SET ADB_FOLDER_PATH=%~2 + +SET ADB_PATH=%ADB_FOLDER_PATH%adb +echo "waiting for recovery" + +echo %ADB_PATH% -s %DEVICE_ID% wait-for-sideload + +%ADB_PATH% -s %DEVICE_ID% wait-for-sideload +if not errorlevel 1 ( + echo "device found in recovery" + exit /b 0 +) ELSE ( + echo "device not detected in recovery" + exit /b 101 +) diff --git a/src/main/java/ecorp/easy/installer/AppConstants.java b/src/main/java/ecorp/easy/installer/AppConstants.java index 2929c0d9..d21872d2 100644 --- a/src/main/java/ecorp/easy/installer/AppConstants.java +++ b/src/main/java/ecorp/easy/installer/AppConstants.java @@ -174,10 +174,14 @@ public abstract class AppConstants { * @return */ public static String getRootPath(){ - if(System.getProperty("IDE", null) != null) - return Paths.get("").toAbsolutePath().toString()+Separator; - else - return JavaHome+Separator+"bin"+Separator; + String rootPath = JavaHome+Separator+"bin"+Separator; + if(System.getProperty("IDE", null) != null) { + rootPath = Paths.get("").toAbsolutePath().toString()+Separator; + } + if (rootPath.indexOf(" ")>0){ //K1ZFP set quote to full path + rootPath = "\"" + rootPath + "\""; + } + return rootPath; } /** diff --git a/src/main/java/ecorp/easy/installer/EasyInstaller.java b/src/main/java/ecorp/easy/installer/EasyInstaller.java index c7cd361e..b25cf59e 100644 --- a/src/main/java/ecorp/easy/installer/EasyInstaller.java +++ b/src/main/java/ecorp/easy/installer/EasyInstaller.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2020 - ECORP SAS + * Copyright 2019-2022 - 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 @@ -18,24 +18,30 @@ package ecorp.easy.installer; import static ecorp.easy.installer.AppConstants.JavaHome; import static ecorp.easy.installer.AppConstants.OsName; -import ecorp.easy.installer.controllers.MainWindowController; + +import java.net.URL; import java.nio.file.Paths; import java.util.Locale; import java.util.ResourceBundle; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import ecorp.easy.installer.controllers.MainWindowController; import javafx.application.Application; -import static javafx.application.Application.launch; import javafx.fxml.FXMLLoader; +import javafx.fxml.Initializable; import javafx.scene.Parent; import javafx.scene.Scene; +import javafx.scene.control.MenuBar; +import javafx.scene.control.MenuItem; import javafx.scene.text.Font; import javafx.stage.Screen; import javafx.stage.Stage; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; /** * this is the entry point of the software - * @author Vincent Bourgmayer + * @authors Vincent Bourgmayer, Frank Preel */ public class EasyInstaller extends Application { private final static Logger logger = LoggerFactory.getLogger(EasyInstaller.class); @@ -50,7 +56,22 @@ public class EasyInstaller extends Application { */ @Override public void start(Stage stage) throws Exception { - logger.debug("\nOS name = {}\nJava Home = {}\nCurrent working dir = {}\nADB folder path = {}", OsName, JavaHome, Paths.get("").toAbsolutePath().toString(), AppConstants.getADBFolderPath()); + + /* DEBUG FP + TODO Remove + Command command = new Command("/Users/frankpreel/Documents/ESPRI/git_repos/Easy Installer/bin/adb/adb"); + command.addParameter("1", "devices"); + command.addParameter("2", "-l"); + + CommandExecutionTask task = new CommandExecutionTask(command); + + task.run(); //I feel like it lacks something... but it work in test + + CommandExecutionResult result = task.get(); + */ + + + logger.debug("\nOS name = {}\nJava Home = {}\nCurrent working dir = {}\nADB folder path = {}", OsName, JavaHome, Paths.get("").toAbsolutePath().toString(), AppConstants.getADBFolderPath()); Locale currentLocale= Locale.getDefault(); i18n = ResourceBundle.getBundle("lang.translation", currentLocale); @@ -58,14 +79,39 @@ public class EasyInstaller extends Application { logger.debug("language = {}, country = {} ", currentLocale.getLanguage(), currentLocale.getCountry()); //Load main view - FXMLLoader loader = new FXMLLoader(getClass().getResource(FXML_PATH+"mainWindow.fxml")); + URL r = getClass().getResource(FXML_PATH+"mainWindow.fxml"); + FXMLLoader loader = new FXMLLoader(r); loader.setResources(i18n); Parent root = loader.load() ; controller = loader.getController(); + + //Defines some properties Scene scene = new Scene(root); + stage.setTitle(i18n.getString("appTitle")+AppConstants.APP_VERSION); + + + + + + /* + try { + MenuBar mb = (MenuBar) root.getChildrenUnmodifiable().get(1); + if( System.getProperty("os.name","UNKNOWN").equals("Mac OS X")) { + logger.debug("Detected Mac OS."); + mb.setUseSystemMenuBar(true); + + + + } else { + mb.setVisible(false); + } + } catch (Exception e) { + logger.debug("Error - cannot find menu bar"); + }*/ + stage.setScene(scene); stage.setResizable(true); diff --git a/src/main/java/ecorp/easy/installer/tasks/CommandExecutionTask.java b/src/main/java/ecorp/easy/installer/tasks/CommandExecutionTask.java index 992b2683..5c0671fe 100644 --- a/src/main/java/ecorp/easy/installer/tasks/CommandExecutionTask.java +++ b/src/main/java/ecorp/easy/installer/tasks/CommandExecutionTask.java @@ -23,7 +23,10 @@ import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; +import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; +import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; import javafx.concurrent.Task; @@ -151,7 +154,7 @@ public class CommandExecutionTask extends Task { * @return ProcessBuilder instance containing the full command to run */ protected ProcessBuilder getProcessBuilder(){ - final ProcessBuilder pb = new ProcessBuilder(getFullCmd().split(" ")); + final ProcessBuilder pb = new ProcessBuilder(getFullCmd()); pb.redirectErrorStream(true); return pb; } @@ -161,34 +164,47 @@ public class CommandExecutionTask extends Task { * the full command to be run * @return String the full command */ - protected String getFullCmd(){ - final StringBuilder sb = new StringBuilder(); + private final String[] getFullCmd(){ + ArrayList rtn = new ArrayList(10); // Prepare base of the command String cmdBase = command.getCommandBase(); + final StringBuilder _cmdBase = new StringBuilder(); if(AppConstants.isWindowsOs()){ - cmdBase = "cmd.exe /c \"\""+cmdBase+"\""; - } - sb.append(cmdBase); + rtn.add("cmd.exe"); + rtn.add("/c"); + _cmdBase.append("\""); + _cmdBase.append("\""); + _cmdBase.append(cmdBase.replaceAll("\"", "")); + _cmdBase.append("\""); + //rtn.add("\""+_cmdBase+"\""); + } else + rtn.add(cmdBase); updateParameters(); //Add the parameters - if(command.getParameters() != null && !command.getParameters().isEmpty()){ - command.getParameters().values().forEach((param) -> { - if(AppConstants.isWindowsOs()){ - param = "\""+param+"\""; - } - sb.append(" ").append(param); + final Map parameters = command.getParameters(); + if(parameters != null && !parameters.isEmpty()){ + parameters.values().forEach((param) -> { + if(AppConstants.isWindowsOs()){ + _cmdBase.append(" \""); + _cmdBase.append(param.replaceAll("\"", "")); + _cmdBase.append("\""); + } else { + rtn.add(param); + } + }); } // Close the full command if(AppConstants.isWindowsOs()){ - sb.append("\""); + _cmdBase.append("\""); + rtn.add(_cmdBase.toString()); } - logger.debug("getFullCmd(), full command = {}", sb.toString()); - return sb.toString(); + logger.debug("getFullCmd(), full command = {}", rtn.toString()); + return Arrays.copyOf(rtn.toArray(), rtn.size(), String[].class); } diff --git a/src/main/java/ecorp/easy/installer/tasks/DownloadTask.java b/src/main/java/ecorp/easy/installer/tasks/DownloadTask.java index eaa4a5e8..235dc2f1 100644 --- a/src/main/java/ecorp/easy/installer/tasks/DownloadTask.java +++ b/src/main/java/ecorp/easy/installer/tasks/DownloadTask.java @@ -56,16 +56,25 @@ public class DownloadTask extends Task{ /** * Constant size */ - private static final long[] CST_SIZE = {1024, 1024*1024, 1024*1024*1024, 1024*1024*1024*1024}; + private static final long[] CST_SIZE = {1, 1024, 1024*1024, 1024*1024*1024, 1024*1024*1024*1024}; /** * Constants units */ - private static final String[] CST_UNITS = {"KB", "MB", "GB", "TB"}; + private static final String[] CST_UNITS = {"B", "KB", "MB", "GB", "TB"}; + + + private static final DecimalFormat[] CST_FORMAT = { + new DecimalFormat("#0"), + new DecimalFormat("##0"), + new DecimalFormat("#,##0"), + new DecimalFormat("#,##0.00"), + new DecimalFormat("#,##0.000") + }; final private ResourceBundle i18n; final private String targetUrl; final private String fileName; - + /** * COnstruction of the download task * @param targetUrl the web path to the resource @@ -219,9 +228,10 @@ public class DownloadTask extends Task{ logger.debug("full file size = {}", fullFileSize); //Update UI - final String formattedFileSize = formatFileSize(fullFileSize); //used for UI + final int unitIndex = getDownloadUnit(fullFileSize); + final String formattedFileSize = formatFileSize(fullFileSize, unitIndex); //used for UI updateProgress(-1, fullFileSize); - updateMessage(formatFileSize(previouslyDownloadedAmount)+" / "+formattedFileSize ); + updateMessage(formatFileSize(previouslyDownloadedAmount, unitIndex)+" / "+formattedFileSize ); boolean downloaded = false; @@ -236,13 +246,14 @@ public class DownloadTask extends Task{ timeoutThread.start(); long downloadAmount = previouslyDownloadedAmount; + while ( rbc.isOpen() && !isCancelled() && ! downloaded ){ final long precedentAmount = downloadAmount; - downloadAmount += fos.getChannel().transferFrom(rbc,downloadAmount,1 << 18); + downloadAmount += fos.getChannel().transferFrom(rbc,downloadAmount,1 << 20); //~1MB if(precedentAmount == downloadAmount){ //it means nothing had been downloaded - logger.warn("precedent amount = downloaded amount"); + logger.warn("precedent amount = downloaded amount"); downloaded = false; rbc.close(); connect.disconnect(); @@ -250,7 +261,7 @@ public class DownloadTask extends Task{ timeoutRunnable.amountIncreased(); //delay the timeout updateProgress(downloadAmount, fullFileSize); - updateMessage( formatFileSize(downloadAmount)+" / "+formattedFileSize); + updateMessage( formatFileSize(downloadAmount, unitIndex)+" / "+formattedFileSize); fos.flush(); downloaded = (downloadAmount == fullFileSize); @@ -265,20 +276,30 @@ public class DownloadTask extends Task{ } /** - * Format file size to use correct size name (mb, gb, ...) - * @todo definitively should be in the UI - * @param value the file size formatted witht the good size category - * @return + * Get the download file unit index (mb, gb, ...) (1,2...) + * @param value the file size + * @return the index */ - public String formatFileSize(final double value){ - double size; - for (int i = 0; i < 3; i++) { + private final int getDownloadUnit(final double value){ + double size = 0; + for (int i = 0; i < CST_SIZE.length; i++) { size=value/CST_SIZE[i]; if (size <= 1024) { - return new DecimalFormat("#,##0.#").format(size) + " " + CST_UNITS[i] ; - } + return i; + } } - return null; + return -1; + } + + /** + * Format file size to use correct size name (mb, gb, ...) + * @todo definitively should be in the UI + * @param value the file size + * @param unitIndex info about unit + * @return + */ + private final String formatFileSize(final double value, final int unitIndex){ + return CST_FORMAT[unitIndex].format(value/CST_SIZE[unitIndex]) + " " + CST_UNITS[unitIndex] ; } diff --git a/src/main/resources/instructions/imageName.properties b/src/main/resources/instructions/imageName.properties index f1f30bed..29085357 100644 --- a/src/main/resources/instructions/imageName.properties +++ b/src/main/resources/instructions/imageName.properties @@ -33,4 +33,12 @@ install_instr_swipeForOk=TWRP_toEXT3_swipe.png install_instr_backX2=TWRP_tapback.png install_instr_resizeFs=TWRP_resizeFS.png #install_instr_tapRebootSystem -install_instr_doNotInstall=TWRP_doNotInstall.png \ No newline at end of file +install_instr_doNotInstall=TWRP_doNotInstall.png +install_instr_startRec_pressPowerBixbyVolUp_e_reco=galaxyS9_Recovery_mode_400px.png +install_instr_e_recovery_factory_reset=install_instr_e_recovery_factory_reset.png +install_instr_e_recovery_factory_reset_format_data=install_instr_e_recovery_factory_reset_format_data.png +install_instr_e_recovery_factory_reset_format_data_validate=install_instr_e_recovery_factory_reset_format_data_validate.png +install_instr_e_recovery_back=install_instr_e_recovery_back.png +install_instr_e_recovery_apply_update=install_instr_e_recovery_apply_update.png +install_instr_e_recovery_apply_update_from_adb=install_instr_e_recovery_apply_update_from_adb.png +install_instr_e_recovery_reboot=install_instr_e_recovery_reboot.png \ No newline at end of file diff --git a/src/main/resources/lang/translation.properties b/src/main/resources/lang/translation.properties index bef4c3ad..6f326869 100644 --- a/src/main/resources/lang/translation.properties +++ b/src/main/resources/lang/translation.properties @@ -170,6 +170,7 @@ install_instr_enableOEMUnlock=enable 'OEM unlock' install_instr_acceptFactoryReset= You'll have to keep pressing "Power" & "Bixby" & "Volume Down" until you reach "Download mode" once your device is off. When you're ready, accept Factory Reset. install_instr_startDl_pressPowerBixbyVolDown= Keep pressing simultaneously "Power" & "Bixby" & "Volume Down" until a blue screen appear to access Download Mode install_instr_startRec_pressPowerBixbyVolUp= Keep pressing simultaneously "Power" & "Bixby" & "Volume Up" until 'teamwin' screen appears +install_instr_startRec_pressPowerBixbyVolUp_e_reco= Keep pressing simultaneously "Power" & "Bixby" & "Volume Up" until 'E Revovery' screen appears install_instr_leaveDl_pressPowerBixbyVolDown= Keep pressing simultaneously "Power" & "Bixby" & "Volume Down" until device turns off install_instr_update_stockrom= Update your device to the latest version install_instr_connectTowifi= Connect your device to Wi-fi @@ -184,8 +185,23 @@ install_instr_waitInstallStartAuto = Please wait, installation will start automa install_instr_onceDeviceRebootThenContinue = Your device will reboot automatically. Once it's done, you can click on continue install_instr_rebootingOnBootloader=Your device will reboot automatically on bootloader mode install_instr_pressVolUpToAcceptOEMUnlocking = Press "Volume up" to accept OEM unlocking +install_instr_pressVolDownToAcceptOEMUnlocking = Press "Volume down" to accept OEM unlocking install_instr_unlockingOem= Easy-installer is unlocking OEM install_instr_waitFastbootmodeDetected = The next step will start automatically once your device in fastboot mode will be detected. If it takes longer than 30 seconds, please check our FAQ by clicking on the "Need help" button +install_instr_choose_e_recovery_select= On the device by using Up or Down volume keys, select "Recovery Mode" option. +install_instr_choose_e_recovery_validate= Validate with Power +install_instr_choose_e_recovery_validate_wait_for_result= After a while the device will reboot in recovery mode." +install_instr_e_recovery_apply_update= Select "Apply update" +install_instr_e_recovery_apply_update_from_adb= "Select "Apply update from ADB" +install_instr_e_recovery_apply_update_from_adb_wait_for_result= The installation is in progress, be patient +install_instr_e_recovery_factory_reset= Select "Factory reset" +install_instr_e_recovery_factory_reset_format_data= Select "Format data/factory reset" +install_instr_e_recovery_factory_reset_cache= Select "Format cache partiton" +install_instr_e_recovery_factory_reset_system= Select "Format system partiton" +install_instr_e_recovery_factory_reset_format_data_validate= Accept the warning by selecting "Format data" +install_instr_e_recovery_factory_reset_validate= Accept the warning by selecting "Yes" +install_instr_e_recovery_back= Select "Back", on the top left corner +install_instr_e_recovery_reboot= Select "Reboot system now" install_instr_openSettingsThenDevOptions = Open "Settings" then "Developer options" install_instr_disableAutoUpdateSystem= Disable "Auto update system" @@ -209,6 +225,7 @@ script_error_installRecovery_101=Can't install TWRP script_error_waitRecovery_1 = Can't mount the "system" folder script_error_waitRecovery_101 = No device's serial number provided script_error_waitRecovery_102 = Error while waiting for device to start in recovery +script_error_waitSideload_101 = Error while waiting for device to start in sideload script_error_installFromRecovery_1 = Can't process the installation script_error_installFromRecovery_2 = Can't push the required file on the device script_error_installFromRecovery_3 = An error happened during the installation @@ -219,6 +236,7 @@ script_error_installFromFastboot_2 = Flashing of one partition failed script_error_installFromFastboot_3 = Could not lock the bootloader script_error_installFromFastboot_101 = No /e/ install archive provided script_error_installFromFastboot_102 = Could not unpack /e/ install archive +script_error_installFromSideload = Could not install /e/ from eRecovery script_error_waitReboot_10 = No device's serial number provided script_error_waitReboot_101 = Can't run instruction on the device script_error_waitRebootFromFastboot_101 = Can't run instruction on the device diff --git a/src/main/resources/lang/translation_de.properties b/src/main/resources/lang/translation_de.properties index a52faeaa..f9b52762 100644 --- a/src/main/resources/lang/translation_de.properties +++ b/src/main/resources/lang/translation_de.properties @@ -249,7 +249,7 @@ stepTitle_beforeInstallation=Vor der Installation stepTitle_enableOemUnlock="OEM-Entsperrung" aktivieren stepTitle_installOS=/e/-Installation stepTitle_resizeDataPartition=Größe der Datenpartition ändern -all_lbl_tryAgain=Nochmal versuchen +all_lbl_tryAgain=Versuche es nochmals # new translation askAccount_string={{mustardpepper}} detect_lbl_redisplayAllowUsbDebugingMsg=Wenn du keine solche Nachricht siehst: stecke dein Gerät aus und wieder ein\nDie Nachricht wird wieder erscheinen @@ -296,15 +296,3 @@ script_error_cantFlashBoot=Fehler beim Flashen der Boot-Partition script_error_cantWipeData=Fehler beim Löschen der Daten script_error_cantUnpackSources=Fehler beim Entpacker der /e/-Quellen script_error_cantRebootBootloader=Fehler beim Starten (booten) in den Bootloader -script_error_cantFlashLogo=Das Flashen der Logo-Partition ist fehlgeschlagen -script_error_cantFlashMd1img=Das Flashen der md1img-Partition ist fehlgeschlagen -script_error_cantFlashSpmfw=Das Flashen der spmfw-Partition ist fehlgeschlagen -script_error_cantFlashLk=Das Flashen der lk-Partition ist fehlgeschlagen -script_error_cantFlashLk2=Das Flashen der lk2-Partition ist fehlgeschlagen -script_error_cantFlashSspm_2=Das Flashen der sspm_2-Partition ist fehlgeschlagen -script_error_cantFlashTee1=Das Flashen der tee1-Partition ist fehlgeschlagen -script_error_cantFlashTee2=Das Flashen der tee2-Partition ist fehlgeschlagen -script_error_cantFlashDtbo=Das Flashen der dtbo-Partition ist fehlgeschlagen -script_error_cantFlashMd1dsp=Das Flashen der md1dsp-Partition ist fehlgeschlagen -script_error_cantFlashSspm_1=Das Flashen der sspm_1-Partition ist fehlgeschlagen -script_error_cantFlashPreloader=Das Flashen der Preloader-Partition ist fehlgeschlagen diff --git a/src/main/resources/yaml/star2lte_flash.yml b/src/main/resources/yaml/star2lte_flash.yml index 585e873c..605c739b 100644 --- a/src/main/resources/yaml/star2lte_flash.yml +++ b/src/main/resources/yaml/star2lte_flash.yml @@ -1,4 +1,4 @@ -## Copyright 2021 - ECORP SAS +## Copyright 202-2022 - 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 @@ -12,9 +12,9 @@ ## You should have received a copy of the GNU General Public License ## along with this program. If not, see . -## Author: Vincent Bourgmayer +## Author: Vincent Bourgmayer, Frank Preel --- -stepsCount: 11 +stepsCount: 7 steps: f0: type: custom @@ -73,151 +73,50 @@ steps: titleKey: stepTitle5On7 instructions: - install_instr_leaveDl_pressPowerBixbyVolDown - - install_instr_startRec_pressPowerBixbyVolUp - - install_instr_keepReadOnly + - install_instr_startRec_pressPowerBixbyVolUp_e_reco + - install_instr_e_recovery_factory_reset + - install_instr_e_recovery_factory_reset_format_data + - install_instr_e_recovery_factory_reset_format_data_validate + - install_instr_e_recovery_back + - install_instr_e_recovery_apply_update + - install_instr_e_recovery_apply_update_from_adb titleKeyIconName: icon-download.png - script: wait-recovery + script: wait-e-recovery-sideload parameters: device_id: ${DEVICE_ID} adb_folder_path: ${ADB_FOLDER_PATH} okCodes: 0: ~ koCodes: - 1: script_error_waitRecovery_1 - 101: script_error_waitRecovery_101 - 102: script_error_waitRecovery_102 + 101: script_error_waitSideload_101 f4: - type: custom-executable + type: load stepNumber: 5 nextStepKey: f5 - titleKey: stepTitle5On7 + titleKey: install_instr_eosInstall instructions: - - install_instr_tapWipe - - install_instr_tapFormatData - - install_instr_writeYes - - install_instr_validate - - install_instr_backX3 - - install_instr_tapReboot - - install_instr_tapRebootRecovery - - install_instr_doNotInstall - titleKeyIconName: icon-download.png - script: wait-reboot + - install_instr_eosInstall + averageTime: 150 + script: install-from-e-recovery parameters: device_id: ${DEVICE_ID} + archive_path: ${ARCHIVE_PATH} adb_folder_path: ${ADB_FOLDER_PATH} okCodes: 0: ~ koCodes: - 1: script_error_unknown - 10: script_error_waitReboot_10 - 101: script_error_waitReboot_101 + 1: script_error_installFromSideload f5: - type: custom-executable + type: askAccount stepNumber: 6 nextStepKey: f6 - titleKey: stepTitle5On7 - instructions: - - install_instr_swipeTwrp - titleKeyIconName: icon-download.png - script: wait-recovery - parameters: - device_id: ${DEVICE_ID} - adb_folder_path: ${ADB_FOLDER_PATH} - okCodes: - 0: ~ - koCodes: - 1: script_error_waitRecovery_1 - 101: script_error_waitRecovery_101 - 102: script_error_waitRecovery_102 f6: - type: load + type: custom stepNumber: 7 - nextStepKey: f7 - titleKey: install_instr_patchInstall - instructions: - - install_instr_patchInstall - averageTime: 55 - script: install-from-recovery - parameters: - device_id: ${DEVICE_ID} - archive_path: ${SOURCES_PATH}no-verity-opt-encrypt-samsung-1.0.zip - adb_folder_path: ${ADB_FOLDER_PATH} - okCodes: - 0: ~ - koCodes: - 1: script_error_installFromRecovery_1 - 2: script_error_installFromRecovery_2 - 3: script_error_installFromRecovery_3 - 101: script_error_installFromRecovery_101 - 102: script_error_installFromRecovery_102 - f7: - type: load - stepNumber: 8 - nextStepKey: f8 - titleKey: install_instr_vendorInstall - instructions: - - install_instr_vendorInstall - averageTime: 65 - script: install-from-recovery - parameters: - device_id: ${DEVICE_ID} - archive_path: ${SOURCES_PATH}VENDOR-27_ARI9.zip - adb_folder_path: ${ADB_FOLDER_PATH} - okCodes: - 0: ~ - koCodes: - 1: script_error_installFromRecovery_1 - 2: script_error_installFromRecovery_2 - 3: script_error_installFromRecovery_3 - 101: script_error_installFromRecovery_101 - 102: script_error_installFromRecovery_102 - f8: - type: load - stepNumber: 9 - nextStepKey: f9 - titleKey: install_instr_eosInstall - instructions: - - install_instr_eosInstall - averageTime: 440 - script: install-from-recovery - parameters: - device_id: ${DEVICE_ID} - archive_path: ${ARCHIVE_PATH} - adb_folder_path: ${ADB_FOLDER_PATH} - okCodes: - 0: ~ - koCodes: - 1: script_error_installFromRecovery_1 - 2: script_error_installFromRecovery_2 - 3: script_error_installFromRecovery_3 - 101: script_error_installFromRecovery_101 - 102: script_error_installFromRecovery_102 - f9: - type: askAccount - stepNumber: 10 - nextStepKey: f10 - f10: - type: custom-executable - stepNumber: 11 nextStepKey: end titleKey: stepTitle7On7 instructions: - - install_instr_tapWipe - - install_instr_tapAdvancedWipe - - install_instr_tickData - - install_instr_tapRepairChangeFs - - install_instr_resizeFs - - install_instr_swipeForOk - - install_instr_tapRebootSystem - - install_instr_doNotInstall + - install_instr_e_recovery_back + - install_instr_e_recovery_reboot + - eAccount_lbl_alreadyAccount titleKeyIconName: icon-download.png - script: wait-reboot - parameters: - device_id: ${DEVICE_ID} - adb_folder_path: ${ADB_FOLDER_PATH} - okCodes: - 0: ~ - koCodes: - 1: script_error_unknown - 10: script_error_waitReboot_10 - 101: script_error_waitReboot_101 diff --git a/src/main/resources/yaml/star2lte_fs.yml b/src/main/resources/yaml/star2lte_fs.yml index e036cd17..85c12ffd 100644 --- a/src/main/resources/yaml/star2lte_fs.yml +++ b/src/main/resources/yaml/star2lte_fs.yml @@ -1,4 +1,4 @@ -## Copyright 2019-2021 - ECORP SAS +## Copyright 2019-2022 - 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 @@ -12,18 +12,12 @@ ## You should have received a copy of the GNU General Public License ## along with this program. If not, see . -## Author: Vincent Bourgmayer +## Authors: Vincent Bourgmayer, Frank Preel --- sources: rom: - url: https://images.ecloud.global/stable/star2lte/e-latest-star2lte.zip - filePath: e-latest-star2lte.zip + url: https://images.ecloud.global/stable/star2lte/e-0.23-q-20220401175185-stable-star2lte.zip + filePath: e-0.23-q-20220401175185-stable-star2lte.zip twrp: - url: https://images.ecloud.global/stable/twrp/star2lte/twrp-3.2.3-0-star2lte.img - filePath: twrp-3.2.3-0-star2lte.img - f2: - url: https://images.ecloud.global/stable/vendors/VENDOR-27_ARI9.zip - filePath: VENDOR-27_ARI9.zip - f3: - url: https://images.ecloud.global/stable/patch/no-verity-opt-encrypt-samsung-1.0.zip - filePath: no-verity-opt-encrypt-samsung-1.0.zip \ No newline at end of file + url: https://images.ecloud.global/stable/star2lte/recovery-e-0.23-q-20220401175185-stable-star2lte.img + filePath: recovery-e-0.23-q-20220401175185-stable-star2lte.img diff --git a/src/main/resources/yaml/starlte_flash.yml b/src/main/resources/yaml/starlte_flash.yml index 585e873c..97c30be1 100644 --- a/src/main/resources/yaml/starlte_flash.yml +++ b/src/main/resources/yaml/starlte_flash.yml @@ -1,4 +1,4 @@ -## Copyright 2021 - ECORP SAS +## Copyright 202-2022 - 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 @@ -12,9 +12,9 @@ ## You should have received a copy of the GNU General Public License ## along with this program. If not, see . -## Author: Vincent Bourgmayer +## Author: Vincent Bourgmayer, Frank Preel --- -stepsCount: 11 +stepsCount: 7 steps: f0: type: custom @@ -73,151 +73,50 @@ steps: titleKey: stepTitle5On7 instructions: - install_instr_leaveDl_pressPowerBixbyVolDown - - install_instr_startRec_pressPowerBixbyVolUp - - install_instr_keepReadOnly + - install_instr_startRec_pressPowerBixbyVolUp_e_reco + - install_instr_e_recovery_factory_reset + - install_instr_e_recovery_factory_reset_format_data + - install_instr_e_recovery_factory_reset_format_data_validate + - install_instr_e_recovery_back + - install_instr_e_recovery_apply_update + - install_instr_e_recovery_apply_update_from_adb titleKeyIconName: icon-download.png - script: wait-recovery + script: wait-e-recovery-sideload parameters: device_id: ${DEVICE_ID} adb_folder_path: ${ADB_FOLDER_PATH} okCodes: 0: ~ koCodes: - 1: script_error_waitRecovery_1 - 101: script_error_waitRecovery_101 - 102: script_error_waitRecovery_102 + 101: script_error_waitSideload_101 f4: - type: custom-executable + type: load stepNumber: 5 nextStepKey: f5 - titleKey: stepTitle5On7 + titleKey: install_instr_eosInstall instructions: - - install_instr_tapWipe - - install_instr_tapFormatData - - install_instr_writeYes - - install_instr_validate - - install_instr_backX3 - - install_instr_tapReboot - - install_instr_tapRebootRecovery - - install_instr_doNotInstall - titleKeyIconName: icon-download.png - script: wait-reboot + - install_instr_eosInstall + averageTime: 150 + script: install-from-e-recovery parameters: device_id: ${DEVICE_ID} + archive_path: ${ARCHIVE_PATH} adb_folder_path: ${ADB_FOLDER_PATH} okCodes: 0: ~ koCodes: - 1: script_error_unknown - 10: script_error_waitReboot_10 - 101: script_error_waitReboot_101 + 1: script_error_installFromSideload f5: - type: custom-executable + type: askAccount stepNumber: 6 nextStepKey: f6 - titleKey: stepTitle5On7 - instructions: - - install_instr_swipeTwrp - titleKeyIconName: icon-download.png - script: wait-recovery - parameters: - device_id: ${DEVICE_ID} - adb_folder_path: ${ADB_FOLDER_PATH} - okCodes: - 0: ~ - koCodes: - 1: script_error_waitRecovery_1 - 101: script_error_waitRecovery_101 - 102: script_error_waitRecovery_102 f6: - type: load + type: custom stepNumber: 7 - nextStepKey: f7 - titleKey: install_instr_patchInstall - instructions: - - install_instr_patchInstall - averageTime: 55 - script: install-from-recovery - parameters: - device_id: ${DEVICE_ID} - archive_path: ${SOURCES_PATH}no-verity-opt-encrypt-samsung-1.0.zip - adb_folder_path: ${ADB_FOLDER_PATH} - okCodes: - 0: ~ - koCodes: - 1: script_error_installFromRecovery_1 - 2: script_error_installFromRecovery_2 - 3: script_error_installFromRecovery_3 - 101: script_error_installFromRecovery_101 - 102: script_error_installFromRecovery_102 - f7: - type: load - stepNumber: 8 - nextStepKey: f8 - titleKey: install_instr_vendorInstall - instructions: - - install_instr_vendorInstall - averageTime: 65 - script: install-from-recovery - parameters: - device_id: ${DEVICE_ID} - archive_path: ${SOURCES_PATH}VENDOR-27_ARI9.zip - adb_folder_path: ${ADB_FOLDER_PATH} - okCodes: - 0: ~ - koCodes: - 1: script_error_installFromRecovery_1 - 2: script_error_installFromRecovery_2 - 3: script_error_installFromRecovery_3 - 101: script_error_installFromRecovery_101 - 102: script_error_installFromRecovery_102 - f8: - type: load - stepNumber: 9 - nextStepKey: f9 - titleKey: install_instr_eosInstall - instructions: - - install_instr_eosInstall - averageTime: 440 - script: install-from-recovery - parameters: - device_id: ${DEVICE_ID} - archive_path: ${ARCHIVE_PATH} - adb_folder_path: ${ADB_FOLDER_PATH} - okCodes: - 0: ~ - koCodes: - 1: script_error_installFromRecovery_1 - 2: script_error_installFromRecovery_2 - 3: script_error_installFromRecovery_3 - 101: script_error_installFromRecovery_101 - 102: script_error_installFromRecovery_102 - f9: - type: askAccount - stepNumber: 10 - nextStepKey: f10 - f10: - type: custom-executable - stepNumber: 11 nextStepKey: end titleKey: stepTitle7On7 instructions: - - install_instr_tapWipe - - install_instr_tapAdvancedWipe - - install_instr_tickData - - install_instr_tapRepairChangeFs - - install_instr_resizeFs - - install_instr_swipeForOk - - install_instr_tapRebootSystem - - install_instr_doNotInstall - titleKeyIconName: icon-download.png - script: wait-reboot - parameters: - device_id: ${DEVICE_ID} - adb_folder_path: ${ADB_FOLDER_PATH} - okCodes: - 0: ~ - koCodes: - 1: script_error_unknown - 10: script_error_waitReboot_10 - 101: script_error_waitReboot_101 + - install_instr_e_recovery_back + - install_instr_e_recovery_reboot + - eAccount_lbl_alreadyAccount + titleKeyIconName: icon-download.png \ No newline at end of file diff --git a/src/main/resources/yaml/starlte_fs.yml b/src/main/resources/yaml/starlte_fs.yml index d9a906d9..935a04d1 100644 --- a/src/main/resources/yaml/starlte_fs.yml +++ b/src/main/resources/yaml/starlte_fs.yml @@ -1,4 +1,4 @@ -## Copyright 2019-2021 - ECORP SAS +## Copyright 2019-2022 - 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 @@ -12,18 +12,12 @@ ## You should have received a copy of the GNU General Public License ## along with this program. If not, see . -## Author: Vincent Bourgmayer +## Authors: Vincent Bourgmayer, Frank Preel --- sources: rom: - url: https://images.ecloud.global/stable/starlte/e-latest-starlte.zip - filePath: e-latest-starlte.zip + url: https://images.ecloud.global/stable/starlte/e-0.23-q-20220401175185-stable-starlte.zip + filePath: e-0.23-q-20220401175185-stable-starlte.zip twrp: - url: https://images.ecloud.global/stable/twrp/starlte/twrp-3.2.3-0-starlte.img - filePath: twrp-3.2.3-0-starlte.img - f2: - url: https://images.ecloud.global/stable/vendors/VENDOR-27_ARI9.zip - filePath: VENDOR-27_ARI9.zip - f3: - url: https://images.ecloud.global/stable/patch/no-verity-opt-encrypt-samsung-1.0.zip - filePath: no-verity-opt-encrypt-samsung-1.0.zip + url: https://images.ecloud.global/stable/starlte/recovery-e-0.23-q-20220401175185-stable-starlte.img + filePath: recovery-e-0.23-q-20220401175185-stable-starlte.img -- GitLab From 0cb32b12a79b252336e01cca63d1d3001665610c Mon Sep 17 00:00:00 2001 From: frankpreel Date: Fri, 6 May 2022 06:58:39 +0200 Subject: [PATCH 02/53] Begin emrald development --- .../easy/installer/helpers/DeviceHelper.java | 1 + src/main/resources/yaml/emerald_flash.yml | 127 ++++++++++++++++++ src/main/resources/yaml/emerald_fs.yml | 20 +++ 3 files changed, 148 insertions(+) create mode 100644 src/main/resources/yaml/emerald_flash.yml create mode 100644 src/main/resources/yaml/emerald_fs.yml diff --git a/src/main/java/ecorp/easy/installer/helpers/DeviceHelper.java b/src/main/java/ecorp/easy/installer/helpers/DeviceHelper.java index 52193b9d..b5724e00 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("emerald", "0012"); //Teracube A10 }}; /** diff --git a/src/main/resources/yaml/emerald_flash.yml b/src/main/resources/yaml/emerald_flash.yml new file mode 100644 index 00000000..a28d9b5b --- /dev/null +++ b/src/main/resources/yaml/emerald_flash.yml @@ -0,0 +1,127 @@ +## Copyright 2022 - 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: Frank Preel +--- +stepsCount: 6 +steps: + f0: + type: custom + stepNumber: 1 + nextStepKey: f1 + titleKey: stepTitle_enableOemUnlock + titleIconName: icon-download.png + instructions: + - install_instr_openSettings + - install_instr_searchOEM + - install_instr_enableOEMUnlocking + - install_instr_acceptOEMUnlockWarning + - install_instr_onceDoneThenContinue + f1: + type: load + stepNumber: 2 + nextStepKey: f2 + titleKey: stepTitle_rebootBootloader + instructions: + - install_instr_rebootingOnBootloader + averageTime: 12 + script: reboot-fastboot + parameters: + device_id: ${DEVICE_ID} + fastboot_folder_path: ${ADB_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 1: script_error_unknown + 10: script_error_cantRebootBootloader + 101: script_error_serialNumber_missing + 102: script_error_fastboot_path_missing + f2: + type: custom-executable + stepNumber: 3 + nextStepKey: f3 + titleKey: stepTitle_oemUnlock + titleIconName: icon-download.png + instructions: + - install_instr_pressVolDownToAcceptOEMUnlocking + - install_instr_unlockingOem + - install_instr_waitInstallStartAuto + script: emerald-flashingUnlock + parameters: + device_id: ${DEVICE_ID} + fastboot_folder_path: ${ADB_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 1: script_error_unknown + 2: script_error_fastboot_flashingUnlock_failed + 101: script_error_serialNumber_missing + 102: script_error_fastboot_path_missing + + f3: + type: load + stepNumber: 4 + nextStepKey: f4 + titleKey: stepTitle_installOS + instructions: + - install_instr_eosInstall + averageTime: 200 + script: emerald-install-from-bootloader + parameters: + device_id: ${DEVICE_ID} + archive_path: ${ARCHIVE_PATH} + fastboot_folder_path: ${ADB_FOLDER_PATH} + java_folder_path: ${JAVA_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 1: script_error_unknown + 10: script_error_cantUnpackSources + 11: script_error_cantWipeData + 12: script_error_cantWipeData + 20: script_error_cantFlashGz_a + 21: script_error_cantFlashLk_a + 22: script_error_cantFlashMd1img_a + 23: script_error_cantFlashScp_a + 24: script_error_cantFlashSpmfw_a + 25: script_error_cantFlashSspm_a + 26: script_error_cantFlashTee_a + 27: script_error_cantFlashBoot_a + 28: script_error_cantFlashDtbo_a + 29: script_error_cantFlashVbmeta_a + 30: script_error_cantFlashSuper + 101: script_error_serialNumber_missing + 102: script_error_installFromFastboot_102 + 103: script_error_fastboot_path_missing + f4: + type: askAccount + stepNumber: 5 + nextStepKey: f5 + f5: + type: custom-executable + stepNumber: 6 + nextStepKey: end + titleKey: stepTitle_rebootDevice + titleIconName: icon-download.png + instructions: + - install_instr_onceDeviceRebootThenContinue + script: emerald-wait-reboot-from-fastboot + parameters: + fastboot_folder_path: ${ADB_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 1: script_error_unknown + 10: script_error_cantrebootFromFasboot + 101: script_error_noDeviceFoundInFastboot diff --git a/src/main/resources/yaml/emerald_fs.yml b/src/main/resources/yaml/emerald_fs.yml new file mode 100644 index 00000000..b1c12e06 --- /dev/null +++ b/src/main/resources/yaml/emerald_fs.yml @@ -0,0 +1,20 @@ +## Copyright 2022 - 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: Frank Preel +--- +sources: + rom: + url: https://images.ecloud.global/stable/emerald/IMG-e-latest-emerald.zip + filePath: IMG-e-latest-emerald.zip -- GitLab From de34e4c051728cc1da3474c77be97b08c81b26ec Mon Sep 17 00:00:00 2001 From: Frank Preel Date: Fri, 6 May 2022 15:17:47 +0200 Subject: [PATCH 03/53] Functionnal linux version --- flash-scripts/linux/emerald-flashingUnlock.sh | 53 ++++++++ .../linux/emerald-install-from-bootloader.sh | 120 ++++++++++++++++++ .../emerald-wait-reboot-from-fastboot.sh | 50 ++++++++ .../resources/lang/translation.properties | 11 ++ 4 files changed, 234 insertions(+) create mode 100755 flash-scripts/linux/emerald-flashingUnlock.sh create mode 100755 flash-scripts/linux/emerald-install-from-bootloader.sh create mode 100755 flash-scripts/linux/emerald-wait-reboot-from-fastboot.sh diff --git a/flash-scripts/linux/emerald-flashingUnlock.sh b/flash-scripts/linux/emerald-flashingUnlock.sh new file mode 100755 index 00000000..88442b5f --- /dev/null +++ b/flash-scripts/linux/emerald-flashingUnlock.sh @@ -0,0 +1,53 @@ +#!/bin/bash + +# Copyright (C) 2022 ECORP SAS - Author: Frank Preel +# +# 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: device id +# $2: fastboot folder path + +# Exit status +# - 0 : bootloader locked +# - 1 : unknown error +# - 2 : Flashing unlocked failed +# - 101 : $DEVICE_ID missing +# - 102 : $FASTBOOT_FOLDER_PATH is missing + +DEVICE_ID=$1 +FASTBOOT_FOLDER_PATH=$2 + +# check serial number has been provided +if [ -z "$DEVICE_ID" ] +then + exit 101 +fi + +# Check fastboot parent folder path has been provided +if [ -z "$FASTBOOT_FOLDER_PATH" ] +then + exit 102 +fi + +# Build fastboot path +FASTBOOT_PATH=${FASTBOOT_FOLDER_PATH}"fastboot" + +# Unlock bootloader +if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flashing unlock +then + exit 2 +fi + +sleep 1 diff --git a/flash-scripts/linux/emerald-install-from-bootloader.sh b/flash-scripts/linux/emerald-install-from-bootloader.sh new file mode 100755 index 00000000..6fd529b5 --- /dev/null +++ b/flash-scripts/linux/emerald-install-from-bootloader.sh @@ -0,0 +1,120 @@ +#!/bin/bash + +# Copyright (C) 2022 ECORP SAS - Author: Frank Preel +# +# 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: DEVICE_ID device id +# $2: ARCHIVE_PATH path to archive +# $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 userdata +# - 11: can't wipe metadata +# - 20-30 : see partition_name index below +# - 101 : DEVICE_ID missing +# - 102 : ARCHIVE_PATH missing +# - 103 : fastboot folder path missing + +partition_name=(gz_a lk_a md1img_a scp_a spmfw_a sspm_a tee_a boot_a dtbo_a vbmeta_a super) +partition_image=(gz.img lk.img md1img.img scp.img spmfw.img sspm.img tee.img boot.img dtbo.img vbmeta.img super.img) +partition_error=(20 21 22 23 24 25 26 27 28 29 30) + +DEVICE_ID=$1 +ARCHIVE_PATH=$2 +FASTBOOT_FOLDER_PATH=$3 +JAVA_FOLDER_PATH=$4 + +# Check serial number has been provided +if [ -z "$DEVICE_ID" ] +then + exit 101 +fi + +# check path to rom has been provided +if [ -z "$ARCHIVE_PATH" ] +then + exit 102 +fi + +#check path to adb/fasboot has been provided +if [ -z "$FASTBOOT_FOLDER_PATH" ] +then + exit 103 +fi + +# Check java folder has been provided +if [ -z "$JAVA_FOLDER_PATH" ] +then + exit 104 +fi + +# Build fastboot path +FASTBOOT_PATH=${FASTBOOT_FOLDER_PATH}"fastboot" + +# Build java jar path +JAR_PATH=${JAVA_FOLDER_PATH}"/bin/jar" + +# Build archive folder path +ARCHIVE_FOLDER_PATH=$(dirname "$ARCHIVE_PATH")"/" + +# unzip for system.img +cd "$ARCHIVE_FOLDER_PATH" || exit 104 + +if ! "$JAR_PATH" -x -v -f "$ARCHIVE_PATH" ; +then + exit 10 +fi + +echo "unpacked archive" + +sleep 1 + + +# Wipe user data +if ! "$FASTBOOT_PATH" erase userdata ; +then + exit 11 +fi + +echo "user data wiped" +sleep 5 + +if ! "$FASTBOOT_PATH" erase metadata ; +then + exit 12 +fi + +echo "meta data wiped" +sleep 5 + +#Flash partition +for i in ${!partition_name[@]}; do + if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash ${partition_name[$i]} ${partition_image[$i]} + then + exit ${partition_error[$i]} + fi + sleep 1 + echo "Flased ${partition_name[$i]}" +done + + +"$FASTBOOT_PATH" --set-active=a + diff --git a/flash-scripts/linux/emerald-wait-reboot-from-fastboot.sh b/flash-scripts/linux/emerald-wait-reboot-from-fastboot.sh new file mode 100755 index 00000000..b11780c2 --- /dev/null +++ b/flash-scripts/linux/emerald-wait-reboot-from-fastboot.sh @@ -0,0 +1,50 @@ +#!/bin/bash + +# Copyright (C) 2022 ECORP SAS - Author: Frank Preel +# +# 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 : unknown error +# - 10 : fastboot reboot command failed +# - 101 : no device found in fastboot + +FASTBOOT_FOLDER_PATH=$1 +FASTBOOT_PATH=${FASTBOOT_FOLDER_PATH}"fastboot" + +echo "fastboot path: $FASTBOOT_PATH" + +#check that device is in recovery mode +if ! "$FASTBOOT_PATH" devices 2>&1 | grep "fastboot" +then + echo "Device not detected in fastboot" + exit 101 +fi + +# Reboot the device +if ! "$FASTBOOT_PATH" reboot +then + exit 10 +fi + +#Then we wait that it left this state +while [ "$($FASTBOOT_PATH devices | grep -q fastboot; echo $?)" = 0 ] +do + sleep 1s +done \ No newline at end of file diff --git a/src/main/resources/lang/translation.properties b/src/main/resources/lang/translation.properties index 6f326869..38ac954f 100644 --- a/src/main/resources/lang/translation.properties +++ b/src/main/resources/lang/translation.properties @@ -267,6 +267,17 @@ script_error_cantFlashVBmeta_vendor=Failed to flash vb Meta vendor partition 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_cantFlashGz_a=Failed to flash gz_a partition +script_error_cantFlashLk_a=Failed to flash lk_a partition +script_error_cantFlashScp_a=Failed to flash scp_a partiton +script_error_cantFlashMd1img_a=Failed to flash md1img_a partition +script_error_cantFlashSpmfw_a =Failed to flash spmfw_a partition +script_error_cantFlashSspm_a =Failed to flash sspm_a partition +script_error_cantFlashTee_a =Failed to flash tee_a partition +script_error_cantFlashBoot_a =Failed to flash boot_a partition +script_error_cantFlashDtbo_a =Failed to flash dtbo_a partition +script_error_cantFlashVbmeta_a =Failed to flash vbmeta_a partition +script_error_cantFlashSuper =Failed to flash super 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 -- GitLab From f66418ff33701d9d4c37800f6f14f563204861ad Mon Sep 17 00:00:00 2001 From: Frank Preel Date: Fri, 6 May 2022 16:57:01 +0200 Subject: [PATCH 04/53] Temporary commit to test bat files. Warning this contains debug code. The flash is fake. --- .../windows/emerald-flashingUnlock.bat | 44 ++++++++ .../emerald-install-from-bootloader.bat | 102 ++++++++++++++++++ .../emerald-wait-reboot-from-fastboot.bat | 55 ++++++++++ 3 files changed, 201 insertions(+) create mode 100755 flash-scripts/windows/emerald-flashingUnlock.bat create mode 100755 flash-scripts/windows/emerald-install-from-bootloader.bat create mode 100755 flash-scripts/windows/emerald-wait-reboot-from-fastboot.bat diff --git a/flash-scripts/windows/emerald-flashingUnlock.bat b/flash-scripts/windows/emerald-flashingUnlock.bat new file mode 100755 index 00000000..1c479cf6 --- /dev/null +++ b/flash-scripts/windows/emerald-flashingUnlock.bat @@ -0,0 +1,44 @@ +@echo off + +:: Coyright (C) 2022 ECORP SAS - Author: Frank Preel + +:: 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: device id +:: $2: fastboot folder path + +:: Exit status +:: - 0 : bootloader locked +:: - 1 : unknown error +:: - 2 : Flashing unlocked failed +:: - 101 : $DEVICE_ID missing +:: - 102 : $FASTBOOT_FOLDER_PATH is missing + + +SET DEVICE_ID=%~1 +SET FASTBOOT_FOLDER_PATH=%~2 + +IF not defined "%DEVICE_ID%" ( + exit /b 101 +) +IF not defined "%FASTBOOT_FOLDER_PATH%" ( + exit /b 102 +) + +SET FASTBOOT_PATH=%FASTBOOT_FOLDER_PATH%"fastboot" +IF ! "%FASTBOOT_PATH%" "-s" "%DEVICE_ID%" "flashing" "unlock" ( + exit /b 2 +) +timeout 1 >nul 2>&1 diff --git a/flash-scripts/windows/emerald-install-from-bootloader.bat b/flash-scripts/windows/emerald-install-from-bootloader.bat new file mode 100755 index 00000000..78dd2539 --- /dev/null +++ b/flash-scripts/windows/emerald-install-from-bootloader.bat @@ -0,0 +1,102 @@ +@echo off + +:: Coyright (C) 2022 ECORP SAS - Author: Frank Preel + +:: 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: DEVICE_ID device id +:: $2: ARCHIVE_PATH path to archive +:: $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 userdata +:: - 11: can't wipe metadata +:: - 20-30 : see partition_name index below +:: - 101 : DEVICE_ID missing +:: - 102 : ARCHIVE_PATH missing +:: - 103 : fastboot folder path missing + +partition_name=gz_a lk_a md1img_a scp_a spmfw_a sspm_a tee_a boot_a dtbo_a vbmeta_a super +partition_image=gz.img lk.img md1img.img scp.img spmfw.img sspm.img tee.img boot.img dtbo.img vbmeta.img super.img +partition_error=20 21 22 23 24 25 26 27 28 29 30 + +SET DEVICE_ID=%~1 +SET ARCHIVE_PATH=%~2 +SET FASTBOOT_FOLDER_PATH=%~3 +SET JAVA_FOLDER_PATH=%~4 + +IF not defined "%DEVICE_ID%" ( + exit /b 101 +) +IF not defined "%ARCHIVE_PATH%" ( + exit /b 102 +) +IF not defined "%FASTBOOT_FOLDER_PATH%" ( + exit /b 103 +) +IF not defined "%JAVA_FOLDER_PATH%" ( + exit /b 104 +) + +:: Build fastboot path +SET FASTBOOT_PATH=%FASTBOOT_FOLDER_PATH%"fastboot" + +:: Build java jar path +SET JAR_PATH=%JAVA_FOLDER_PATH%"/bin/jar" + +:: Build archive folder path +for %%a in ("%ARCHIVE_PATH%") do ( + set ARCHIVE_FOLDER_PATH=%%~dpa" + echo %ARCHIVE_FOLDER_PATH% +) + +:: unzip for system.img +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 + + +:: Wipe user data +%FASTBOOT_PATH% erase userdata +if errorLevel 1 ( exit /b 11 ) +echo "user data wiped" +timeout 5 >nul 2>&1 + +:: Wipe meta data +%FASTBOOT_PATH% erase userdata +if errorLevel 1 ( exit /b 12 ) +echo "meta data wiped" +timeout 5 >nul 2>&1 + +:: Flash partition +for /l %%i in (%partition_name%) do ( + echo "........................................................WARNING WARNING WARNING......................................................................................" + echo "........................................................THE FLASH IS COOMMENTED FOR DEBUG......................................................................................" + echo %%i + echo %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 + echo "Flashed !partition_name[%%i]!" +) + +%FASTBOOT_PATH% --set-active=a + diff --git a/flash-scripts/windows/emerald-wait-reboot-from-fastboot.bat b/flash-scripts/windows/emerald-wait-reboot-from-fastboot.bat new file mode 100755 index 00000000..d7cf1b12 --- /dev/null +++ b/flash-scripts/windows/emerald-wait-reboot-from-fastboot.bat @@ -0,0 +1,55 @@ +@echo off + +:: Coyright (C) 2022 ECORP SAS - Author: Frank Preel + +:: 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 : unknown error +:: - 10 : fastboot reboot command failed +:: - 101 : no device found in fastboot + +SET FASTBOOT_FOLDER_PATH=%~1 +SET FASTBOOT_PATH=%FASTBOOT_FOLDER_PATH%"fastboot" + +echo "fastboot path: %FASTBOOT_PATH%" + +:: check that device is in recovery mode +%FASTBOOT_PATH% devices 2>&1 | findstr fastboot +if %errorLevel% NEQ 0 ( + echo "Device not detected in fastboot" + exit /b 101 +) + +:: Reboot the device +%FASTBOOT_PATH% reboot +if %errorlevel% NEQ 0 ( exit /b 10 ) + +:: Then we wait that it left this state + +:fastboot_detect +%FASTBOOT_PATH% devices 2>&1 | findstr fastboot +if %errorLevel% EQU 0 ( + ping 127.0.0.1 -n 2 -w 1000 >NUL + goto :fastboot_detect +) else (exit /b 0) + +call :fastboot_detect + +exit /b 0 -- GitLab From d14a494c2affd63a049489fb621b5cbaad561812 Mon Sep 17 00:00:00 2001 From: frankpreel Date: Fri, 6 May 2022 22:57:02 +0200 Subject: [PATCH 05/53] Fix bat syntax --- .../windows/emerald-flashingUnlock.bat | 13 ++-- .../emerald-install-from-bootloader.bat | 63 ++++++++++++++----- .../gs290-wait-reboot-from-fastboot.bat | 2 + flash-scripts/windows/reboot-fastboot.bat | 2 + 4 files changed, 57 insertions(+), 23 deletions(-) diff --git a/flash-scripts/windows/emerald-flashingUnlock.bat b/flash-scripts/windows/emerald-flashingUnlock.bat index 1c479cf6..ddd1db8e 100755 --- a/flash-scripts/windows/emerald-flashingUnlock.bat +++ b/flash-scripts/windows/emerald-flashingUnlock.bat @@ -30,15 +30,16 @@ SET DEVICE_ID=%~1 SET FASTBOOT_FOLDER_PATH=%~2 -IF not defined "%DEVICE_ID%" ( +IF not defined %DEVICE_ID ( exit /b 101 ) -IF not defined "%FASTBOOT_FOLDER_PATH%" ( +IF not defined %FASTBOOT_FOLDER_PATH ( exit /b 102 ) -SET FASTBOOT_PATH=%FASTBOOT_FOLDER_PATH%"fastboot" -IF ! "%FASTBOOT_PATH%" "-s" "%DEVICE_ID%" "flashing" "unlock" ( - exit /b 2 -) +SET FASTBOOT_PATH="%FASTBOOT_FOLDER_PATH%fastboot" +%FASTBOOT_PATH% -s %DEVICE_ID% flashing unlock +if errorlevel 1 ( exit /b 2 ) + timeout 1 >nul 2>&1 +exit /b 0 diff --git a/flash-scripts/windows/emerald-install-from-bootloader.bat b/flash-scripts/windows/emerald-install-from-bootloader.bat index 78dd2539..be287ed0 100755 --- a/flash-scripts/windows/emerald-install-from-bootloader.bat +++ b/flash-scripts/windows/emerald-install-from-bootloader.bat @@ -33,33 +33,65 @@ :: - 102 : ARCHIVE_PATH missing :: - 103 : fastboot folder path missing -partition_name=gz_a lk_a md1img_a scp_a spmfw_a sspm_a tee_a boot_a dtbo_a vbmeta_a super -partition_image=gz.img lk.img md1img.img scp.img spmfw.img sspm.img tee.img boot.img dtbo.img vbmeta.img super.img -partition_error=20 21 22 23 24 25 26 27 28 29 30 +SET partition_name[0]=gz_a +SET partition_name[1]=lk_a +SET partition_name[2]=md1img_a +SET partition_name[3]=scp_a +SET partition_name[4]=spmfw_a +SET partition_name[5]=sspm_a +SET partition_name[6]=tee_a +SET partition_name[7]=boot_a +SET partition_name[8]=dtbo_a +SET partition_name[9]=vbmeta_a +SET partition_name[10]=super + +SET partition_image[0]=gz.img +SET partition_image[1]=lk.img +SET partition_image[2]=md1img.img +SET partition_image[3]=scp.img +SET partition_image[4]=spmfw.img +SET partition_image[5]=sspm.img +SET partition_image[6]=tee.img +SET partition_image[7]=boot.img +SET partition_image[8]=dtbo.img +SET partition_image[9]=vbmeta.img +SET partition_image[10]=super.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 DEVICE_ID=%~1 SET ARCHIVE_PATH=%~2 SET FASTBOOT_FOLDER_PATH=%~3 SET JAVA_FOLDER_PATH=%~4 -IF not defined "%DEVICE_ID%" ( +IF not defined %DEVICE_ID ( exit /b 101 ) -IF not defined "%ARCHIVE_PATH%" ( +IF not defined %ARCHIVE_PATH ( exit /b 102 ) -IF not defined "%FASTBOOT_FOLDER_PATH%" ( +IF not defined %FASTBOOT_FOLDER_PATH ( exit /b 103 ) -IF not defined "%JAVA_FOLDER_PATH%" ( +IF not defined %JAVA_FOLDER_PATH ( exit /b 104 ) :: Build fastboot path -SET FASTBOOT_PATH=%FASTBOOT_FOLDER_PATH%"fastboot" +SET FASTBOOT_PATH="%FASTBOOT_FOLDER_PATH%fastboot" :: Build java jar path -SET JAR_PATH=%JAVA_FOLDER_PATH%"/bin/jar" +SET JAR_PATH="%JAVA_FOLDER_PATH%/bin/jar" :: Build archive folder path for %%a in ("%ARCHIVE_PATH%") do ( @@ -88,15 +120,12 @@ echo "meta data wiped" timeout 5 >nul 2>&1 :: Flash partition -for /l %%i in (%partition_name%) do ( - echo "........................................................WARNING WARNING WARNING......................................................................................" - echo "........................................................THE FLASH IS COOMMENTED FOR DEBUG......................................................................................" - echo %%i - echo %FASTBOOT_PATH% -s %DEVICE_ID% flash !partition_name[%%i]! !partition_image[%%i]! - if errorLevel 1 ( exit /b !partition_error[%%i]! ) +(for /L %%i in (0,1,10) do ( + %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 - echo "Flashed !partition_name[%%i]!" -) + call echo "Flashed %%partition_name[%%i]%% " +)) %FASTBOOT_PATH% --set-active=a diff --git a/flash-scripts/windows/gs290-wait-reboot-from-fastboot.bat b/flash-scripts/windows/gs290-wait-reboot-from-fastboot.bat index 99dc45aa..42c4e1c6 100755 --- a/flash-scripts/windows/gs290-wait-reboot-from-fastboot.bat +++ b/flash-scripts/windows/gs290-wait-reboot-from-fastboot.bat @@ -1,3 +1,5 @@ +@echo off + :: Copyright (C) 2021 ECORP SAS - Author: Vincent Bourgmayer :: :: This program is free software: you can redistribute it and/or modify diff --git a/flash-scripts/windows/reboot-fastboot.bat b/flash-scripts/windows/reboot-fastboot.bat index b425fac7..d2175397 100755 --- a/flash-scripts/windows/reboot-fastboot.bat +++ b/flash-scripts/windows/reboot-fastboot.bat @@ -1,3 +1,5 @@ +@echo off + :: Copyright (C) 2021 ECORP SAS - Author: Vincent Bourgmayer :: :: This program is free software: you can redistribute it and/or modify -- GitLab From a45664edd3b4d5ca0518126254c29cf5888a147f Mon Sep 17 00:00:00 2001 From: Frank Preel Date: Mon, 9 May 2022 22:00:40 +0200 Subject: [PATCH 06/53] Use stable Q URL --- .../ecorp/easy/installer/EasyInstaller.java | 18 ++---------------- src/main/resources/yaml/star2lte_fs.yml | 8 ++++---- src/main/resources/yaml/starlte_fs.yml | 8 ++++---- 3 files changed, 10 insertions(+), 24 deletions(-) diff --git a/src/main/java/ecorp/easy/installer/EasyInstaller.java b/src/main/java/ecorp/easy/installer/EasyInstaller.java index b25cf59e..e6b48705 100644 --- a/src/main/java/ecorp/easy/installer/EasyInstaller.java +++ b/src/main/java/ecorp/easy/installer/EasyInstaller.java @@ -56,21 +56,7 @@ public class EasyInstaller extends Application { */ @Override public void start(Stage stage) throws Exception { - - /* DEBUG FP - TODO Remove - Command command = new Command("/Users/frankpreel/Documents/ESPRI/git_repos/Easy Installer/bin/adb/adb"); - command.addParameter("1", "devices"); - command.addParameter("2", "-l"); - - CommandExecutionTask task = new CommandExecutionTask(command); - - task.run(); //I feel like it lacks something... but it work in test - - CommandExecutionResult result = task.get(); - */ - - + logger.debug("\nOS name = {}\nJava Home = {}\nCurrent working dir = {}\nADB folder path = {}", OsName, JavaHome, Paths.get("").toAbsolutePath().toString(), AppConstants.getADBFolderPath()); Locale currentLocale= Locale.getDefault(); @@ -150,4 +136,4 @@ public class EasyInstaller extends Application { // Save file controller.onStop(); } -} \ No newline at end of file +} diff --git a/src/main/resources/yaml/star2lte_fs.yml b/src/main/resources/yaml/star2lte_fs.yml index 85c12ffd..108074e3 100644 --- a/src/main/resources/yaml/star2lte_fs.yml +++ b/src/main/resources/yaml/star2lte_fs.yml @@ -16,8 +16,8 @@ --- sources: rom: - url: https://images.ecloud.global/stable/star2lte/e-0.23-q-20220401175185-stable-star2lte.zip - filePath: e-0.23-q-20220401175185-stable-star2lte.zip + url: https://images.ecloud.global/stable/star2lte/e-latest-q-star2lte.zip + filePath: e-latest-q-star2lte.zip twrp: - url: https://images.ecloud.global/stable/star2lte/recovery-e-0.23-q-20220401175185-stable-star2lte.img - filePath: recovery-e-0.23-q-20220401175185-stable-star2lte.img + url: https://images.ecloud.global/stable/star2lte/recovery-e-latest-q-star2lte.img + filePath: recovery-e-latest-q-star2lte.img diff --git a/src/main/resources/yaml/starlte_fs.yml b/src/main/resources/yaml/starlte_fs.yml index 935a04d1..c31c7eb2 100644 --- a/src/main/resources/yaml/starlte_fs.yml +++ b/src/main/resources/yaml/starlte_fs.yml @@ -16,8 +16,8 @@ --- sources: rom: - url: https://images.ecloud.global/stable/starlte/e-0.23-q-20220401175185-stable-starlte.zip - filePath: e-0.23-q-20220401175185-stable-starlte.zip + url: https://images.ecloud.global/stable/starlte/e-latest-q-starlte.zip + filePath: e-latest-q-starlte.zip twrp: - url: https://images.ecloud.global/stable/starlte/recovery-e-0.23-q-20220401175185-stable-starlte.img - filePath: recovery-e-0.23-q-20220401175185-stable-starlte.img + url: https://images.ecloud.global/stable/starlte/recovery-e-latest-q-starlte.img + filePath: recovery-e-latest-q-starlte.img -- GitLab From 9585f479300d6b70000d1cae0de7eb0e128c0e1c Mon Sep 17 00:00:00 2001 From: Frank Preel Date: Mon, 9 May 2022 22:08:24 +0200 Subject: [PATCH 07/53] Update readme & versions --- README.md | 12 +++++++++++- pkg/arch/PKGBUILD | 2 +- snap/snapcraft.yaml | 2 +- src/main/java/ecorp/easy/installer/AppConstants.java | 5 +++-- windows-installer-mui.nsi | 2 +- 5 files changed, 17 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index dbb7d04c..e5b45ac8 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Members: - Vincent - Arnau - Manoj - +- Frank Community: - Ingo @@ -37,9 +37,19 @@ Reviewer developer: - [Vincent Bourgmayer](vincent.bourgmayer@e.email) +- Frank Preel - Israel Yago pereira ## Changelogs +### v0.14.0 (candidate) +- Update Readme +- Update version number to v0.14.0 +- Use of the same unit (Mb, Gb..) on the download progress bar +- Add Android Q support for the model below + - star2lte + - starlte +-Add emerald support + ### v0.13.4-beta (current - unreleased) - Fix Ubuntu build's docker image - by Israel & Omer Akram & Nicolas - Refactor classes related to script execution diff --git a/pkg/arch/PKGBUILD b/pkg/arch/PKGBUILD index a05adab7..5dfae96a 100644 --- a/pkg/arch/PKGBUILD +++ b/pkg/arch/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: efoundation # Maintainer: steadfasterX pkgname=easy-installer -pkgver=0.13.4 +pkgver=0.14.0 pkgrel=1 pkgdesc="The Easy Installer is a desktop application which helps users install Android /e/ (https://doc.e.foundation/what-s-e) on supported devices." arch=('x86_64') diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 7629ce79..bf716906 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -1,5 +1,5 @@ name: easy-installer -version: 'v0.13.4-beta' +version: 'v0.14.0' summary: Easy installation of /e/ OS - the Google-free Android-based mobile OS description: | The /e/ OS Installer has been created to make the installation of diff --git a/src/main/java/ecorp/easy/installer/AppConstants.java b/src/main/java/ecorp/easy/installer/AppConstants.java index d21872d2..e1b12dfb 100644 --- a/src/main/java/ecorp/easy/installer/AppConstants.java +++ b/src/main/java/ecorp/easy/installer/AppConstants.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2021 - ECORP SAS + * Copyright 2019-2022 - 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 @@ -23,10 +23,11 @@ import java.nio.file.Paths; * @TODO make all final static field with uppercase or lowcase but not a mix of both * @author Vincent Bourgmayer * @author Omer Akram + * @author Frank Preel */ public abstract class AppConstants { - public final static String APP_VERSION = "v0.13.4-beta"; + public final static String APP_VERSION = "v0.14.0"; public final static String Separator = FileSystems.getDefault().getSeparator(); public final static String OsName = System.getProperty("os.name"); public final static String JavaHome = System.getProperty("java.home"); diff --git a/windows-installer-mui.nsi b/windows-installer-mui.nsi index dcf50a79..2a2aa807 100644 --- a/windows-installer-mui.nsi +++ b/windows-installer-mui.nsi @@ -9,7 +9,7 @@ #-------------------------------- RequestExecutionLevel admin #if 'user' then it can't install in C:\Program files !define MUI_ICON "buildSrc/windows/easy-installer.ico" -!define appVersion "v0.13.4-beta" +!define appVersion "v0.14.0" Name "Easy-installer ${appVersion}" # define installation directory InstallDir "$PROGRAMFILES64\easy-installer" -- GitLab From f70b69e56b318209af0d58396fc3b8d4c989b25b Mon Sep 17 00:00:00 2001 From: Frank Preel Date: Tue, 10 May 2022 09:09:45 +0200 Subject: [PATCH 08/53] Fix wrong permissions --- flash-scripts/linux/install-e-recovery.sh | 0 flash-scripts/linux/install-from-e-recovery.sh | 0 flash-scripts/linux/wait-e-reboot.sh | 0 flash-scripts/linux/wait-e-recovery-sideload.sh | 0 4 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 flash-scripts/linux/install-e-recovery.sh mode change 100644 => 100755 flash-scripts/linux/install-from-e-recovery.sh mode change 100644 => 100755 flash-scripts/linux/wait-e-reboot.sh mode change 100644 => 100755 flash-scripts/linux/wait-e-recovery-sideload.sh diff --git a/flash-scripts/linux/install-e-recovery.sh b/flash-scripts/linux/install-e-recovery.sh old mode 100644 new mode 100755 diff --git a/flash-scripts/linux/install-from-e-recovery.sh b/flash-scripts/linux/install-from-e-recovery.sh old mode 100644 new mode 100755 diff --git a/flash-scripts/linux/wait-e-reboot.sh b/flash-scripts/linux/wait-e-reboot.sh old mode 100644 new mode 100755 diff --git a/flash-scripts/linux/wait-e-recovery-sideload.sh b/flash-scripts/linux/wait-e-recovery-sideload.sh old mode 100644 new mode 100755 -- GitLab From 97d67efd6b6f7dac712c52fe3575ae01f371bf0d Mon Sep 17 00:00:00 2001 From: Frank Preel Date: Tue, 10 May 2022 10:58:53 +0200 Subject: [PATCH 09/53] French translation and En typo. I guess the recovery is always in English language (to be verified) thus eRecovery menu item still in english language --- .../resources/lang/translation.properties | 4 +-- .../lang/translation_fr_FR.properties | 33 +++++++++++++++++++ 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/src/main/resources/lang/translation.properties b/src/main/resources/lang/translation.properties index 38ac954f..842c7212 100644 --- a/src/main/resources/lang/translation.properties +++ b/src/main/resources/lang/translation.properties @@ -190,9 +190,9 @@ install_instr_unlockingOem= Easy-installer is unlocking OEM install_instr_waitFastbootmodeDetected = The next step will start automatically once your device in fastboot mode will be detected. If it takes longer than 30 seconds, please check our FAQ by clicking on the "Need help" button install_instr_choose_e_recovery_select= On the device by using Up or Down volume keys, select "Recovery Mode" option. install_instr_choose_e_recovery_validate= Validate with Power -install_instr_choose_e_recovery_validate_wait_for_result= After a while the device will reboot in recovery mode." +install_instr_choose_e_recovery_validate_wait_for_result= After a while the device will reboot in recovery mode. install_instr_e_recovery_apply_update= Select "Apply update" -install_instr_e_recovery_apply_update_from_adb= "Select "Apply update from ADB" +install_instr_e_recovery_apply_update_from_adb= Select "Apply update from ADB" install_instr_e_recovery_apply_update_from_adb_wait_for_result= The installation is in progress, be patient install_instr_e_recovery_factory_reset= Select "Factory reset" install_instr_e_recovery_factory_reset_format_data= Select "Format data/factory reset" diff --git a/src/main/resources/lang/translation_fr_FR.properties b/src/main/resources/lang/translation_fr_FR.properties index e6285bc0..135bc3c1 100644 --- a/src/main/resources/lang/translation_fr_FR.properties +++ b/src/main/resources/lang/translation_fr_FR.properties @@ -169,6 +169,8 @@ script_error_installFromRecovery_3=Une erreur s'est produite lors de l'installat script_error_installFromRecovery_2=Impossible de pousser le fichier requis sur l'appareil script_error_installFromRecovery_1=Impossible de procéder à l'installation script_error_waitRecovery_102=Erreur dans l'attente du démarrage de l'appareil en mode de récupération +script_error_waitSideload_101 =Erreur dans l'attente du démarrage de l'appareil en mode sideload + script_error_waitRecovery_101=Le numéro de série de l'appareil n'est pas fourni script_error_waitRecovery_1=Impossible de monter le dossier « système » script_error_installRecovery_101=Impossible d'installer TWRP @@ -255,6 +257,8 @@ stepTitle_verifyHeimdall=Vérifier Heimdall stepTitle3On7FP3=Déverrouiller le Bootloader et redémarrer l'appareil en Fastboot mode script_error_waitRebootFromFastboot_101=L'instruction n'a pas pu être lancée sur l'appareil script_error_installFromFastboot_102=L'archive d'installation de /e/ n'a pas pu être décompressée +script_error_installFromSideload = Impossible d'installer /e/ depuis eRecovery + script_error_installFromFastboot_101=Pas d'archive d'installation de /e/ fournie script_error_installFromFastboot_3=Le bootloader n'a pas pu être verrouillé script_error_installFromFastboot_2=Le flashage d'une des partitions a échoué @@ -281,6 +285,7 @@ script_error_fastboot_flashingUnlock_failed=Impossible de déverouiller le flash script_error_fastboot_path_missing=Aucun chemin vers l'outil fastboot n'a été fourni script_error_serialNumber_missing=Aucun numéro de série fourni install_instr_pressVolUpToAcceptOEMUnlocking=Appuyez sur "volume +" pour accepter le dévérouillage OEM +install_instr_pressVolDownToAcceptOEMUnlocking = Appuyez sur "Volume -" pour accepter le dévérouillage OEM install_instr_rebootingOnBootloader=Votre téléphone va redémarrer automatiquement sur le mode bootloader install_instr_onceDeviceRebootThenContinue=Votre téléphone va redémarrer automatiquement. Une fois que c'est fait, vous pouvez cliquer sur continuer install_instr_waitInstallStartAuto=Veuillez patienter, l'installation va démarrer automatiquement @@ -296,6 +301,22 @@ install_instr_update_stockrom=Mettez votre appareil à jour vers la version la p detect_lbl_redisplayAllowUsbDebugingMsg=Si vous ne voyez pas ce genre de message : débranchez puis rebranchez votre téléphone\n Le message s'affichera à nouveau detect_lbl_acceptComputerFingerprint=Si vous voyez, sur votre téléphone, un message comme sur l'image ci-dessous :\n Cochez la case "Toujours autoriser sur cet ordinateur" et appuyez sur le bouton "OK"\nensuite cliquez sur le bouton "Essayez encore" ci-dessous install_instr_waitFastbootmodeDetected=La prochaine étape va démarrer automatiquement dès que votre téléphone sera détecté en mode fastboot. Si cela prend plus que 30 secondes, veuillez vérifier notre FAQ en cliquant sur le bouton "besoin d'aide" + +install_instr_choose_e_recovery_select= Sur le téléphone sélectionner l'option "Recovery Mode". +install_instr_choose_e_recovery_validate= Validez en appuyant sur la touche Power. +install_instr_choose_e_recovery_validate_wait_for_result= Le téléphone va rebooter en mode recovery au boot d'un certain temps. +install_instr_e_recovery_apply_update= Selectionnez "Apply update" +install_instr_e_recovery_apply_update_from_adb= Selectionnez "Apply update from ADB" +install_instr_e_recovery_apply_update_from_adb_wait_for_result= Soyez patient, l'installation est en cours de progression. +install_instr_e_recovery_factory_reset= Selectionnez "Factory reset" +install_instr_e_recovery_factory_reset_format_data= Selectionnez "Format data/factory reset" +install_instr_e_recovery_factory_reset_cache= Selectionnez "Format cache partiton" +install_instr_e_recovery_factory_reset_system= Selectionnez "Format system partiton" +install_instr_e_recovery_factory_reset_format_data_validate= Acceptez l'avertissement en sélectionnant "Format data" +install_instr_e_recovery_factory_reset_validate= Acceptez l'avertissement en sélectionnant "Yes" +install_instr_e_recovery_back= Selectionnez "Back", en haut à gauche de l'écran +install_instr_e_recovery_reboot= Selectionnez "Reboot system now" + checkDriverInstall_advice=Si ce n'est pas le cas, veuillez suivre cette documentation : checkDriverInstall_question=Avez-vous installé les pilotes pour votre téléphone ? # Check windows driver installation @@ -303,3 +324,15 @@ checkDriverInstall_mTitle=Vérification de l'installation des drivers install_instr_waitRecoveryInstallStartAuto=veuillez patienter, l' installation du /e/ recovery va débuter automatiquement install_instr_leaveBootloader_holdPower=Maintenir le bouton "Alimentation" pressé jusqu'à ce que le téléphone s'éteigne (~12 secondes) script_error_cantFlashRecovery= + +script_error_cantFlashGz_a=Erreur de flash gz_a partition +script_error_cantFlashLk_a=Erreur de flash lk_a partition +script_error_cantFlashScp_a=Erreur de flash scp_a partiton +script_error_cantFlashMd1img_a=Erreur de flash md1img_a partition +script_error_cantFlashSpmfw_a =Erreur de flash spmfw_a partition +script_error_cantFlashSspm_a =Erreur de flash sspm_a partition +script_error_cantFlashTee_a =Erreur de flash tee_a partition +script_error_cantFlashBoot_a =Erreur de flash boot_a partition +script_error_cantFlashDtbo_a =Erreur de flash dtbo_a partition +script_error_cantFlashVbmeta_a =Erreur de flash vbmeta_a partition +script_error_cantFlashSuper =Erreur de flash super partition -- GitLab From 0f429d5c01fb4171fc6eb8cebfabe3cd3789f458 Mon Sep 17 00:00:00 2001 From: frankpreel Date: Tue, 10 May 2022 13:14:17 +0200 Subject: [PATCH 10/53] Add missing zadig.exe binary. Warning, by reading the install driver documentation (https://doc.e.foundation/easy-installer-faq) the process does *not* explain how to use zadig --- build.gradle | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build.gradle b/build.gradle index 216d5dfb..e98557a7 100644 --- a/build.gradle +++ b/build.gradle @@ -147,6 +147,11 @@ tasks.jlink { from('buildSrc/windows/heimdall') into("${buildDir}/image/${appLauncher}-${windowsPlatform}/bin") include 'heimdall.exe', 'libusb-1.0.dll', 'libgcc_s_seh-1.dll', 'libstdc++-6.dll', 'libwinpthread-1.dll', 'wdi-simple.exe' + } + copy { + from('buildSrc/windows/heimdall/Drivers') + into("${buildDir}/image/${appLauncher}-${windowsPlatform}/bin") + include 'zadig.exe' } copy { from('buildSrc/windows/adb') -- GitLab From 04c347f77bef7ef11ff61c25e817824c8b1ae183 Mon Sep 17 00:00:00 2001 From: frankpreel Date: Tue, 10 May 2022 13:14:56 +0200 Subject: [PATCH 11/53] Typo --- flash-scripts/windows/wait-e-recovery-sideload.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flash-scripts/windows/wait-e-recovery-sideload.bat b/flash-scripts/windows/wait-e-recovery-sideload.bat index 84786429..668fc8f2 100644 --- a/flash-scripts/windows/wait-e-recovery-sideload.bat +++ b/flash-scripts/windows/wait-e-recovery-sideload.bat @@ -26,7 +26,7 @@ SET DEVICE_ID=%~1 SET ADB_FOLDER_PATH=%~2 -SET ADB_PATH=%ADB_FOLDER_PATH%adb +SET ADB_PATH="%ADB_FOLDER_PATH%adb" echo "waiting for recovery" echo %ADB_PATH% -s %DEVICE_ID% wait-for-sideload -- GitLab From bb054ee336d7639923164a28486fca4b6019b723 Mon Sep 17 00:00:00 2001 From: Frank Preel Date: Fri, 13 May 2022 16:08:12 +0200 Subject: [PATCH 12/53] Start hotdogb --- flash-scripts/linux/wait-reboot.sh | 2 +- src/main/resources/yaml/hotdogb_flash.yml | 127 ++++++++++++++++++++++ src/main/resources/yaml/hotdogb_fs.yml | 23 ++++ 3 files changed, 151 insertions(+), 1 deletion(-) create mode 100644 src/main/resources/yaml/hotdogb_flash.yml create mode 100644 src/main/resources/yaml/hotdogb_fs.yml diff --git a/flash-scripts/linux/wait-reboot.sh b/flash-scripts/linux/wait-reboot.sh index c30eff81..cdfbea2a 100755 --- a/flash-scripts/linux/wait-reboot.sh +++ b/flash-scripts/linux/wait-reboot.sh @@ -50,4 +50,4 @@ fi while "$ADB_PATH" -s "$DEVICE_ID" get-state 2> /dev/null do sleep 1 -done \ No newline at end of file +done diff --git a/src/main/resources/yaml/hotdogb_flash.yml b/src/main/resources/yaml/hotdogb_flash.yml new file mode 100644 index 00000000..a28d9b5b --- /dev/null +++ b/src/main/resources/yaml/hotdogb_flash.yml @@ -0,0 +1,127 @@ +## Copyright 2022 - 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: Frank Preel +--- +stepsCount: 6 +steps: + f0: + type: custom + stepNumber: 1 + nextStepKey: f1 + titleKey: stepTitle_enableOemUnlock + titleIconName: icon-download.png + instructions: + - install_instr_openSettings + - install_instr_searchOEM + - install_instr_enableOEMUnlocking + - install_instr_acceptOEMUnlockWarning + - install_instr_onceDoneThenContinue + f1: + type: load + stepNumber: 2 + nextStepKey: f2 + titleKey: stepTitle_rebootBootloader + instructions: + - install_instr_rebootingOnBootloader + averageTime: 12 + script: reboot-fastboot + parameters: + device_id: ${DEVICE_ID} + fastboot_folder_path: ${ADB_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 1: script_error_unknown + 10: script_error_cantRebootBootloader + 101: script_error_serialNumber_missing + 102: script_error_fastboot_path_missing + f2: + type: custom-executable + stepNumber: 3 + nextStepKey: f3 + titleKey: stepTitle_oemUnlock + titleIconName: icon-download.png + instructions: + - install_instr_pressVolDownToAcceptOEMUnlocking + - install_instr_unlockingOem + - install_instr_waitInstallStartAuto + script: emerald-flashingUnlock + parameters: + device_id: ${DEVICE_ID} + fastboot_folder_path: ${ADB_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 1: script_error_unknown + 2: script_error_fastboot_flashingUnlock_failed + 101: script_error_serialNumber_missing + 102: script_error_fastboot_path_missing + + f3: + type: load + stepNumber: 4 + nextStepKey: f4 + titleKey: stepTitle_installOS + instructions: + - install_instr_eosInstall + averageTime: 200 + script: emerald-install-from-bootloader + parameters: + device_id: ${DEVICE_ID} + archive_path: ${ARCHIVE_PATH} + fastboot_folder_path: ${ADB_FOLDER_PATH} + java_folder_path: ${JAVA_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 1: script_error_unknown + 10: script_error_cantUnpackSources + 11: script_error_cantWipeData + 12: script_error_cantWipeData + 20: script_error_cantFlashGz_a + 21: script_error_cantFlashLk_a + 22: script_error_cantFlashMd1img_a + 23: script_error_cantFlashScp_a + 24: script_error_cantFlashSpmfw_a + 25: script_error_cantFlashSspm_a + 26: script_error_cantFlashTee_a + 27: script_error_cantFlashBoot_a + 28: script_error_cantFlashDtbo_a + 29: script_error_cantFlashVbmeta_a + 30: script_error_cantFlashSuper + 101: script_error_serialNumber_missing + 102: script_error_installFromFastboot_102 + 103: script_error_fastboot_path_missing + f4: + type: askAccount + stepNumber: 5 + nextStepKey: f5 + f5: + type: custom-executable + stepNumber: 6 + nextStepKey: end + titleKey: stepTitle_rebootDevice + titleIconName: icon-download.png + instructions: + - install_instr_onceDeviceRebootThenContinue + script: emerald-wait-reboot-from-fastboot + parameters: + fastboot_folder_path: ${ADB_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 1: script_error_unknown + 10: script_error_cantrebootFromFasboot + 101: script_error_noDeviceFoundInFastboot diff --git a/src/main/resources/yaml/hotdogb_fs.yml b/src/main/resources/yaml/hotdogb_fs.yml new file mode 100644 index 00000000..fd37345c --- /dev/null +++ b/src/main/resources/yaml/hotdogb_fs.yml @@ -0,0 +1,23 @@ +## Copyright 2022 - 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: Frank Preel +--- +sources: + rom: + url: https://images.ecloud.global/stable/emerald/IMG-e-latest-emerald.zip + filePath: IMG-e-latest-emerald.zip + twrp: + url: https://images.ecloud.global/stable/twrp/dream2lte/twrp-3.3.1-2-dream2lte.img + filePath: twrp-3.3.1-2-dream2lte.img -- GitLab From eefa8cdd697f74cf1d79fbf04089b46a2ffb1746 Mon Sep 17 00:00:00 2001 From: Frank Preel Date: Tue, 17 May 2022 18:27:48 +0200 Subject: [PATCH 13/53] Functionnal Linux 7T --- .../linux/install-from-e-recovery.sh | 6 + flash-scripts/linux/oneplus-flashingUnlock.sh | 62 +++++ .../ecorp/easy/installer/AppConstants.java | 21 +- .../subcontrollers/DownloadSrcController.java | 3 +- .../easy/installer/helpers/DeviceHelper.java | 3 +- .../easy/installer/utils/ConfigParser.java | 5 +- .../resources/lang/translation.properties | 7 + .../lang/translation_fr_FR.properties | 7 +- src/main/resources/yaml/OnePlus7T_flash.yml | 216 ++++++++++++++++++ .../yaml/{hotdogb_fs.yml => OnePlus7T_fs.yml} | 13 +- src/main/resources/yaml/hotdogb_flash.yml | 127 ---------- 11 files changed, 332 insertions(+), 138 deletions(-) create mode 100755 flash-scripts/linux/oneplus-flashingUnlock.sh create mode 100644 src/main/resources/yaml/OnePlus7T_flash.yml rename src/main/resources/yaml/{hotdogb_fs.yml => OnePlus7T_fs.yml} (60%) delete mode 100644 src/main/resources/yaml/hotdogb_flash.yml diff --git a/flash-scripts/linux/install-from-e-recovery.sh b/flash-scripts/linux/install-from-e-recovery.sh index bc6a1603..28ce53b8 100755 --- a/flash-scripts/linux/install-from-e-recovery.sh +++ b/flash-scripts/linux/install-from-e-recovery.sh @@ -56,4 +56,10 @@ ret=${?} echo "adb sideload retuns = "${ret} # ret = 0 if adb command is fine, 1 on error +if [ ${ret} -lt 2 ] +then + echo "handle adb: failed to read command: Success." + exit 0 +fi + exit ${ret} diff --git a/flash-scripts/linux/oneplus-flashingUnlock.sh b/flash-scripts/linux/oneplus-flashingUnlock.sh new file mode 100755 index 00000000..763b8d2d --- /dev/null +++ b/flash-scripts/linux/oneplus-flashingUnlock.sh @@ -0,0 +1,62 @@ +#!/bin/bash + +# Copyright (C) 2022 ECORP SAS - Author: Frank Preel +# +# 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: device id +# $2: fastboot folder path + +# Exit status +# - 0 : bootloader locked +# - 1 : unknown error +# - 2 : Flashing unlocked failed +# - 101 : $DEVICE_ID missing +# - 102 : $FASTBOOT_FOLDER_PATH is missing + +DEVICE_ID=$1 +FASTBOOT_FOLDER_PATH=$2 + +# check serial number has been provided +if [ -z "$DEVICE_ID" ] +then + exit 101 +fi + +# Check fastboot parent folder path has been provided +if [ -z "$FASTBOOT_FOLDER_PATH" ] +then + exit 102 +fi + +# Build fastboot path +FASTBOOT_PATH=${FASTBOOT_FOLDER_PATH}"fastboot" + +# Unlock bootloader +if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" oem unlock +then + if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" oem unlock 2>&1 | grep "Device already : unlocked" + then + exit 2 + fi + echo "The device is unlocked" + + if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" reboot + then + exit 2 + fi +fi + +sleep 30 diff --git a/src/main/java/ecorp/easy/installer/AppConstants.java b/src/main/java/ecorp/easy/installer/AppConstants.java index e1b12dfb..6f7afe4e 100644 --- a/src/main/java/ecorp/easy/installer/AppConstants.java +++ b/src/main/java/ecorp/easy/installer/AppConstants.java @@ -52,7 +52,24 @@ public abstract class AppConstants { private static String TWRP_IMAGE_PATH; private static String E_ARCHIVE_PATH; private static String DEVICE_MODEL; - + private static String PATCH_PATH; + + /** + * Get the path of patch + * @return can return null if not already setted + */ + public static String getPatchPath() { + return PATCH_PATH; + } + + /** + * Define the path to access patch to flash + * @param eImagePath + */ + public static void setPatchPath(String patchPath) { + PATCH_PATH = patchPath; + } + /** * This methods set the model of the device * @todo remove this @@ -233,4 +250,4 @@ public abstract class AppConstants { public static boolean isWindowsOs(){ return OsName.toLowerCase().contains("win"); } -} \ No newline at end of file +} diff --git a/src/main/java/ecorp/easy/installer/controllers/subcontrollers/DownloadSrcController.java b/src/main/java/ecorp/easy/installer/controllers/subcontrollers/DownloadSrcController.java index 0196865d..a8ed2fc4 100644 --- a/src/main/java/ecorp/easy/installer/controllers/subcontrollers/DownloadSrcController.java +++ b/src/main/java/ecorp/easy/installer/controllers/subcontrollers/DownloadSrcController.java @@ -141,6 +141,7 @@ public class DownloadSrcController extends AbstractSubController { String sourcesFolderPath = AppConstants.getSourcesFolderPath(); CommandExecutionTask.updateCommonParam("TWRP_IMAGE_PATH", sourcesFolderPath+AppConstants.getTwrpImgPath()); CommandExecutionTask.updateCommonParam("ARCHIVE_PATH", sourcesFolderPath+AppConstants.getEArchivePath()); + CommandExecutionTask.updateCommonParam("PATCH_PATH", sourcesFolderPath+AppConstants.getPatchPath()); parentController.disableNextButton(false); } @@ -208,4 +209,4 @@ public class DownloadSrcController extends AbstractSubController { super.failed(); //no sure of its use. } } -} \ No newline at end of file +} diff --git a/src/main/java/ecorp/easy/installer/helpers/DeviceHelper.java b/src/main/java/ecorp/easy/installer/helpers/DeviceHelper.java index b5724e00..45fe31fb 100644 --- a/src/main/java/ecorp/easy/installer/helpers/DeviceHelper.java +++ b/src/main/java/ecorp/easy/installer/helpers/DeviceHelper.java @@ -51,6 +51,7 @@ public class DeviceHelper { put("GS290", "0009"); put("Teracube_2e", "0011"); put("emerald", "0012"); //Teracube A10 + put("OnePlus7T", "0013"); }}; /** @@ -122,4 +123,4 @@ public class DeviceHelper { return flashingProcess; } -} \ No newline at end of file +} diff --git a/src/main/java/ecorp/easy/installer/utils/ConfigParser.java b/src/main/java/ecorp/easy/installer/utils/ConfigParser.java index 0f05b1b8..d7f7f4be 100644 --- a/src/main/java/ecorp/easy/installer/utils/ConfigParser.java +++ b/src/main/java/ecorp/easy/installer/utils/ConfigParser.java @@ -248,9 +248,12 @@ public class ConfigParser { if(key.equals("twrp")){ AppConstants.setTwrpImgPath((String) source.get("filePath")); } + if(key.equals("patch")){ + AppConstants.setPatchPath((String) source.get("filePath")); + } logger.debug("--> url: {}, filePath: {}", source.get("url"), source.get("filePath")); result.put((String) source.get("url"), (String) source.get("filePath")); } return result; } -} \ No newline at end of file +} diff --git a/src/main/resources/lang/translation.properties b/src/main/resources/lang/translation.properties index 842c7212..7ea3a388 100644 --- a/src/main/resources/lang/translation.properties +++ b/src/main/resources/lang/translation.properties @@ -53,8 +53,10 @@ connect_lbl_2=We will automatically detect your phone to install /e/OS. Automati connect_lbl_3=In the next stages, we will help you activate 'Developer mode' if you haven't done it so far. #devMode & debugADB +devMode_mTitle_main=Enable the Developer mode devMode_mTitle=Enable the Developer mode (Part 1) devMode_lbl=Please follow these steps: +devMode_main= Your phone has just been unlocked, it has restarted devMode_instr_settings=Open the 'Settings' menu devMode_instr_build=Type 'Build' in the search bar devMode_instr_tap7=Tap 7 times on 'Build number' @@ -189,6 +191,7 @@ install_instr_pressVolDownToAcceptOEMUnlocking = Press "Volume down" to accept O install_instr_unlockingOem= Easy-installer is unlocking OEM install_instr_waitFastbootmodeDetected = The next step will start automatically once your device in fastboot mode will be detected. If it takes longer than 30 seconds, please check our FAQ by clicking on the "Need help" button install_instr_choose_e_recovery_select= On the device by using Up or Down volume keys, select "Recovery Mode" option. +install_instr_choose_e_recovery_select_details= The selection is made by using the volume keys of the phone. install_instr_choose_e_recovery_validate= Validate with Power install_instr_choose_e_recovery_validate_wait_for_result= After a while the device will reboot in recovery mode. install_instr_e_recovery_apply_update= Select "Apply update" @@ -283,6 +286,9 @@ 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 +#oneplus +install_instr_e_recovery_oneplus_copy_partition= Partition installation + #eAccount eAccount_mTitle=Create your e.email account eAccount_lbl_incitation=Your e.email account is at the center of the /e/OS ecosystem. @@ -356,3 +362,4 @@ stepTitle_enableOemUnlock= Enable OEM unlocking stepTitle_beforeInstallation= Before installation stepTitle_rebootDevice= Reboot device stepTitle_rebootBootloader = Rebooting in bootloader mode +stepTitle_installation = Factory reset and installation diff --git a/src/main/resources/lang/translation_fr_FR.properties b/src/main/resources/lang/translation_fr_FR.properties index 135bc3c1..88a23e1e 100644 --- a/src/main/resources/lang/translation_fr_FR.properties +++ b/src/main/resources/lang/translation_fr_FR.properties @@ -43,6 +43,8 @@ connect_lbl_2=Nous détecterons automatiquement votre téléphone pour installer connect_lbl_3=Dans les prochaines étapes, nous vous aiderons à activer le « mode développeur » si vous ne l'avez pas encore fait. #devMode & debugADB devMode_mTitle=Activer le mode développeur (Partie 1) +devMode_mTitle_main=Activer le mode développeur +devMode_main=Votre téléphone vient d'être dévérouillé, il a rédémarré : devMode_lbl=Veuillez suivre les étapes suivantes : devMode_instr_settings=Ouvrez les « Paramètres » devMode_instr_build=Tapez « Numéro » dans la barre de recherche @@ -227,7 +229,8 @@ all_lbl_tryAgain=Essayer à nouveau # @author Brittny Mendoza - +#oneplus +install_instr_e_recovery_oneplus_select_recovery= Installation de la partition #common view all_lbl_notImplemented=(Pas encore mis en œuvre) @@ -255,6 +258,7 @@ stepTitle_installRecovery=Installer le mode de récupération stepTitle_oemUnlock=Déverrouillage OEM stepTitle_verifyHeimdall=Vérifier Heimdall stepTitle3On7FP3=Déverrouiller le Bootloader et redémarrer l'appareil en Fastboot mode +stepTitle_installation = Réinitialisation d'usine et installation script_error_waitRebootFromFastboot_101=L'instruction n'a pas pu être lancée sur l'appareil script_error_installFromFastboot_102=L'archive d'installation de /e/ n'a pas pu être décompressée script_error_installFromSideload = Impossible d'installer /e/ depuis eRecovery @@ -303,6 +307,7 @@ detect_lbl_acceptComputerFingerprint=Si vous voyez, sur votre téléphone, un me install_instr_waitFastbootmodeDetected=La prochaine étape va démarrer automatiquement dès que votre téléphone sera détecté en mode fastboot. Si cela prend plus que 30 secondes, veuillez vérifier notre FAQ en cliquant sur le bouton "besoin d'aide" install_instr_choose_e_recovery_select= Sur le téléphone sélectionner l'option "Recovery Mode". +install_instr_choose_e_recovery_select_details= La selection se fait en utilisant les touches de volume du téléphone. install_instr_choose_e_recovery_validate= Validez en appuyant sur la touche Power. install_instr_choose_e_recovery_validate_wait_for_result= Le téléphone va rebooter en mode recovery au boot d'un certain temps. install_instr_e_recovery_apply_update= Selectionnez "Apply update" diff --git a/src/main/resources/yaml/OnePlus7T_flash.yml b/src/main/resources/yaml/OnePlus7T_flash.yml new file mode 100644 index 00000000..ebe07760 --- /dev/null +++ b/src/main/resources/yaml/OnePlus7T_flash.yml @@ -0,0 +1,216 @@ +## Copyright 2022 - 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: Frank Preel +--- +stepsCount: 12 +steps: + f0: + type: custom + stepNumber: 1 + nextStepKey: f1 + titleKey: stepTitle_enableOemUnlock + titleIconName: icon-download.png + instructions: + - install_instr_openSettings + - install_instr_searchOEM + - install_instr_enableOEMUnlocking + - install_instr_acceptOEMUnlockWarning + - install_instr_onceDoneThenContinue + f1: + type: load + stepNumber: 2 + nextStepKey: f2 + titleKey: stepTitle_rebootBootloader + instructions: + - install_instr_rebootingOnBootloader + averageTime: 10 + script: reboot-fastboot + parameters: + device_id: ${DEVICE_ID} + fastboot_folder_path: ${ADB_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 1: script_error_unknown + 10: script_error_cantRebootBootloader + 101: script_error_serialNumber_missing + 102: script_error_fastboot_path_missing + f2: + type: load + stepNumber: 3 + nextStepKey: f3 + titleKey: stepTitle_oemUnlock + titleIconName: icon-download.png + averageTime: 25 + instructions: + - install_instr_unlockingOem + script: oneplus-flashingUnlock + parameters: + device_id: ${DEVICE_ID} + fastboot_folder_path: ${ADB_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 1: script_error_unknown + 2: script_error_fastboot_flashingUnlock_failed + 101: script_error_serialNumber_missing + 102: script_error_fastboot_path_missing + f3: + type: custom + stepNumber: 4 + nextStepKey: f4 + titleKey: devMode_mTitle_main + titleIconName: icon-download.png + instructions: + - devMode_main + - devMode_lbl + - devMode_instr_settings + - devMode_instr_build + - devMode_instr_tap7 + - debugADB_instr_settings + - debugADB_instr_search + - debugADB_instr_androidDebug + - debugADB_instr_debugOn + - debugADB_instr_tapeOK + - debugADB_instr_acceptCertificate + f4: + type: load + stepNumber: 5 + nextStepKey: f5 + titleKey: stepTitle_rebootBootloader + instructions: + - install_instr_rebootingOnBootloader + averageTime: 8 + script: reboot-fastboot + parameters: + device_id: ${DEVICE_ID} + fastboot_folder_path: ${ADB_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 1: script_error_unknown + 10: script_error_cantRebootBootloader + 101: script_error_serialNumber_missing + 102: script_error_fastboot_path_missing + f5: + type: load + stepNumber: 6 + nextStepKey: f6 + titleKey: stepTitle4On7 + instructions: + - install_instr_recoveryInstall + averageTime: 3 + script: install-e-recovery + parameters: + fastboot_folder_path: ${ADB_FOLDER_PATH} + twrp_image_path: ${TWRP_IMAGE_PATH} + okCodes: + 0: ~ + koCodes: + 1: script_error_unknown + 101: script_error_installRecovery_101 + f6: + type: custom-executable + stepNumber: 7 + nextStepKey: f7 + titleKey: stepTitle5On7 + instructions: + - install_instr_choose_e_recovery_select + - install_instr_choose_e_recovery_select_details + - install_instr_choose_e_recovery_validate + - install_instr_choose_e_recovery_validate_wait_for_result + - install_instr_e_recovery_apply_update + - install_instr_e_recovery_apply_update_from_adb + - install_instr_e_recovery_apply_update_from_adb_wait_for_result + titleKeyIconName: icon-download.png + script: wait-e-recovery-sideload + parameters: + device_id: ${DEVICE_ID} + adb_folder_path: ${ADB_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 101: script_error_waitSideload_101 + f7: + type: load + stepNumber: 8 + nextStepKey: f8 + titleKey: install_instr_eosInstall + instructions: + - install_instr_e_recovery_oneplus_select_recovery + averageTime: 150 + script: install-from-e-recovery + parameters: + device_id: ${DEVICE_ID} + archive_path: ${PATCH_PATH} + adb_folder_path: ${ADB_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 1: script_error_installFromSideload + f8: + type: custom-executable + stepNumber: 9 + nextStepKey: f9 + titleKey: stepTitle_installation + instructions: + - install_instr_e_recovery_back + - install_instr_e_recovery_factory_reset + - install_instr_e_recovery_factory_reset_format_data + - install_instr_e_recovery_factory_reset_format_data_validate + - install_instr_e_recovery_back + - install_instr_e_recovery_apply_update + - install_instr_e_recovery_apply_update_from_adb + - install_instr_e_recovery_apply_update_from_adb_wait_for_result + titleKeyIconName: icon-download.png + script: wait-e-recovery-sideload + parameters: + device_id: ${DEVICE_ID} + adb_folder_path: ${ADB_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 101: script_error_waitSideload_101 + f9: + type: load + stepNumber: 10 + nextStepKey: f10 + titleKey: install_instr_eosInstall + instructions: + - install_instr_e_recovery_oneplus_select_recovery + averageTime: 150 + script: install-from-e-recovery + parameters: + device_id: ${DEVICE_ID} + archive_path: ${ARCHIVE_PATH} + adb_folder_path: ${ADB_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 1: script_error_installFromSideload + f10: + type: askAccount + stepNumber: 11 + nextStepKey: f11 + f11: + type: custom + stepNumber: 12 + nextStepKey: end + titleKey: stepTitle_rebootDevice + instructions: + - install_instr_e_recovery_back + - install_instr_e_recovery_reboot + - eAccount_lbl_alreadyAccount + titleKeyIconName: icon-download.png diff --git a/src/main/resources/yaml/hotdogb_fs.yml b/src/main/resources/yaml/OnePlus7T_fs.yml similarity index 60% rename from src/main/resources/yaml/hotdogb_fs.yml rename to src/main/resources/yaml/OnePlus7T_fs.yml index fd37345c..b8f827e1 100644 --- a/src/main/resources/yaml/hotdogb_fs.yml +++ b/src/main/resources/yaml/OnePlus7T_fs.yml @@ -16,8 +16,11 @@ --- sources: rom: - url: https://images.ecloud.global/stable/emerald/IMG-e-latest-emerald.zip - filePath: IMG-e-latest-emerald.zip - twrp: - url: https://images.ecloud.global/stable/twrp/dream2lte/twrp-3.3.1-2-dream2lte.img - filePath: twrp-3.3.1-2-dream2lte.img + url: https://images.ecloud.global/dev/hotdogb/e-0.23-r-20220405175826-dev-hotdogb.zip + filePath: e-0.23-r-20220405175826-dev-hotdogb.zip + twrp: + url: https://images.ecloud.global/dev/hotdogb/recovery-e-0.23-r-20220405175826-dev-hotdogb.img + filePath: recovery-e-0.23-r-20220405175826-dev-hotdogb.img + patch: + url: https://images.ecloud.global/dev/hotdogb/e-0.23-r-20220405175826-dev-hotdogb.zip + filePath: e-0.23-r-20220405175826-dev-hotdogb.zip diff --git a/src/main/resources/yaml/hotdogb_flash.yml b/src/main/resources/yaml/hotdogb_flash.yml deleted file mode 100644 index a28d9b5b..00000000 --- a/src/main/resources/yaml/hotdogb_flash.yml +++ /dev/null @@ -1,127 +0,0 @@ -## Copyright 2022 - 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: Frank Preel ---- -stepsCount: 6 -steps: - f0: - type: custom - stepNumber: 1 - nextStepKey: f1 - titleKey: stepTitle_enableOemUnlock - titleIconName: icon-download.png - instructions: - - install_instr_openSettings - - install_instr_searchOEM - - install_instr_enableOEMUnlocking - - install_instr_acceptOEMUnlockWarning - - install_instr_onceDoneThenContinue - f1: - type: load - stepNumber: 2 - nextStepKey: f2 - titleKey: stepTitle_rebootBootloader - instructions: - - install_instr_rebootingOnBootloader - averageTime: 12 - script: reboot-fastboot - parameters: - device_id: ${DEVICE_ID} - fastboot_folder_path: ${ADB_FOLDER_PATH} - okCodes: - 0: ~ - koCodes: - 1: script_error_unknown - 10: script_error_cantRebootBootloader - 101: script_error_serialNumber_missing - 102: script_error_fastboot_path_missing - f2: - type: custom-executable - stepNumber: 3 - nextStepKey: f3 - titleKey: stepTitle_oemUnlock - titleIconName: icon-download.png - instructions: - - install_instr_pressVolDownToAcceptOEMUnlocking - - install_instr_unlockingOem - - install_instr_waitInstallStartAuto - script: emerald-flashingUnlock - parameters: - device_id: ${DEVICE_ID} - fastboot_folder_path: ${ADB_FOLDER_PATH} - okCodes: - 0: ~ - koCodes: - 1: script_error_unknown - 2: script_error_fastboot_flashingUnlock_failed - 101: script_error_serialNumber_missing - 102: script_error_fastboot_path_missing - - f3: - type: load - stepNumber: 4 - nextStepKey: f4 - titleKey: stepTitle_installOS - instructions: - - install_instr_eosInstall - averageTime: 200 - script: emerald-install-from-bootloader - parameters: - device_id: ${DEVICE_ID} - archive_path: ${ARCHIVE_PATH} - fastboot_folder_path: ${ADB_FOLDER_PATH} - java_folder_path: ${JAVA_FOLDER_PATH} - okCodes: - 0: ~ - koCodes: - 1: script_error_unknown - 10: script_error_cantUnpackSources - 11: script_error_cantWipeData - 12: script_error_cantWipeData - 20: script_error_cantFlashGz_a - 21: script_error_cantFlashLk_a - 22: script_error_cantFlashMd1img_a - 23: script_error_cantFlashScp_a - 24: script_error_cantFlashSpmfw_a - 25: script_error_cantFlashSspm_a - 26: script_error_cantFlashTee_a - 27: script_error_cantFlashBoot_a - 28: script_error_cantFlashDtbo_a - 29: script_error_cantFlashVbmeta_a - 30: script_error_cantFlashSuper - 101: script_error_serialNumber_missing - 102: script_error_installFromFastboot_102 - 103: script_error_fastboot_path_missing - f4: - type: askAccount - stepNumber: 5 - nextStepKey: f5 - f5: - type: custom-executable - stepNumber: 6 - nextStepKey: end - titleKey: stepTitle_rebootDevice - titleIconName: icon-download.png - instructions: - - install_instr_onceDeviceRebootThenContinue - script: emerald-wait-reboot-from-fastboot - parameters: - fastboot_folder_path: ${ADB_FOLDER_PATH} - okCodes: - 0: ~ - koCodes: - 1: script_error_unknown - 10: script_error_cantrebootFromFasboot - 101: script_error_noDeviceFoundInFastboot -- GitLab From 77c95c9ca981352d9a1a5463a0d14dce44d73c2d Mon Sep 17 00:00:00 2001 From: frankpreel Date: Wed, 18 May 2022 12:45:35 +0200 Subject: [PATCH 14/53] Functional Windows process --- .../windows/emerald-flashingUnlock.bat | 4 +- flash-scripts/windows/install-e-recovery.bat | 85 ++++++++++--------- .../windows/install-from-e-recovery.bat | 11 ++- .../windows/oneplus-flashingUnlock.bat | 54 ++++++++++++ 4 files changed, 111 insertions(+), 43 deletions(-) create mode 100644 flash-scripts/windows/oneplus-flashingUnlock.bat diff --git a/flash-scripts/windows/emerald-flashingUnlock.bat b/flash-scripts/windows/emerald-flashingUnlock.bat index ddd1db8e..75b2ba9f 100755 --- a/flash-scripts/windows/emerald-flashingUnlock.bat +++ b/flash-scripts/windows/emerald-flashingUnlock.bat @@ -39,7 +39,9 @@ IF not defined %FASTBOOT_FOLDER_PATH ( SET FASTBOOT_PATH="%FASTBOOT_FOLDER_PATH%fastboot" %FASTBOOT_PATH% -s %DEVICE_ID% flashing unlock -if errorlevel 1 ( exit /b 2 ) +if errorlevel 1 ( + exit /b 2 +) timeout 1 >nul 2>&1 exit /b 0 diff --git a/flash-scripts/windows/install-e-recovery.bat b/flash-scripts/windows/install-e-recovery.bat index e83c0f78..78cc8fc1 100644 --- a/flash-scripts/windows/install-e-recovery.bat +++ b/flash-scripts/windows/install-e-recovery.bat @@ -1,48 +1,57 @@ -#!/bin/bash - -# Copyright (C) 2022 ECORP SAS - Author: Frank Preel -# -# 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: FASTBOOT_PATH -# $2: E_IMAGE_PATH need twrp path -# Exit status -# - 0 : Recovery installed -# - 101 : FASTBOOT_PATH missing -# - 102 : E_IMAGE_PATH missing - @echo off +:: !/bin/bash + +:: Copyright (C) 2022 ECORP SAS - Author: Frank Preel + +:: 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: FASTBOOT_PATH +:: $2: E_IMAGE_PATH need twrp path +:: Exit status +:: - 0 : Recovery installed +:: - 101 : FASTBOOT_PATH missing +:: - 102 : E_IMAGE_PATH missing + SET FASTBOOT_PATH=%~1 -SET %~1E_IMAGE_PATH=%~2 -IF "-z" "%FASTBOOT_PATH%" ( +SET E_IMAGE_PATH=%~2 + +IF not defined %FASTBOOT_PATH ( echo "Fastboot path is empty" - exit "101" + exit /b 101 ) -IF "-z" "%E_IMAGE_PATH%" ( + +IF not defined %E_IMAGE_PATH ( echo "E Image path is empty" - exit "102" + exit /b 102 ) -SET FASTBOOT_CMD=%FASTBOOT_PATH%"fastboot" -SET %FASTBOOT_PATH%ADB_CMD=%FASTBOOT_PATH%"adb" -IF ! "%FASTBOOT_CMD%" "erase" "userdata" ( - exit "11" +SET FASTBOOT_CMD="%FASTBOOT_PATH%fastboot" +SET ADB_CMD="%FASTBOOT_PATH%adb" + +%FASTBOOT_CMD% erase userdata +if errorlevel 1 ( + exit /b 11 ) + echo "user data wiped" -sleep "1" -IF ! "%FASTBOOT_CMD%" "erase" "metadata" ( - exit "12" + +timeout 1 >nul 2>&1 + +%FASTBOOT_CMD% erase metadata +if errorlevel 1 ( + exit /b 12 ) -"$FASTBOOT_CMD" "flash" "boot" "%E_IMAGE_PATH%" + +%FASTBOOT_CMD% flash boot %E_IMAGE_PATH% diff --git a/flash-scripts/windows/install-from-e-recovery.bat b/flash-scripts/windows/install-from-e-recovery.bat index 5b4f5d96..cc87ba30 100644 --- a/flash-scripts/windows/install-from-e-recovery.bat +++ b/flash-scripts/windows/install-from-e-recovery.bat @@ -41,10 +41,13 @@ SET FASTBOOT_FOLDER_PATH=%~3 SET ADB_CMD="%FASTBOOT_FOLDER_PATH%adb" "%ADB_CMD%" "sideload" "%ARCHIVE_FILE%" -if not errorlevel 1 ( +if errorlevel==0 ( echo "Sideload OK" exit /b 0 -) ELSE ( - echo "Sideload fails" - exit /b 1 ) +if errorlevel==1 ( + echo "Sideload OK" + exit /b 0 +) +echo "Sideload fails" +exit /b 1 diff --git a/flash-scripts/windows/oneplus-flashingUnlock.bat b/flash-scripts/windows/oneplus-flashingUnlock.bat new file mode 100644 index 00000000..a46ff43d --- /dev/null +++ b/flash-scripts/windows/oneplus-flashingUnlock.bat @@ -0,0 +1,54 @@ +@echo off + +:: Coyright (C) 2022 ECORP SAS - Author: Frank Preel + +:: 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: device id +:: $2: fastboot folder path + +:: Exit status +:: - 0 : bootloader locked +:: - 1 : unknown error +:: - 2 : Flashing unlocked failed +:: - 101 : $DEVICE_ID missing +:: - 102 : $FASTBOOT_FOLDER_PATH is missing + + +SET DEVICE_ID=%~1 +SET FASTBOOT_FOLDER_PATH=%~2 + +IF not defined %DEVICE_ID ( + exit /b 101 +) +IF not defined %FASTBOOT_FOLDER_PATH ( + exit /b 102 +) + +SET FASTBOOT_PATH="%FASTBOOT_FOLDER_PATH%fastboot" +%FASTBOOT_PATH% -s %DEVICE_ID% flashing unlock +if errorlevel 1 ( + %FASTBOOT_PATH% -s %DEVICE_ID% flashing unlock 2>&1 | findstr "Device already : unlocked" + if errorlevel 0 ( + echo "The device is unlocked" + %FASTBOOT_PATH% -s %DEVICE_ID% reboot + timeout 30 >nul 2>&1 + exit /b 0 + ) + exit /b 2 +) + +timeout 30 >nul 2>&1 +exit /b 0 -- GitLab From 22820cd05256004454afb1ef5c28fe989dc876a4 Mon Sep 17 00:00:00 2001 From: Frank Preel Date: Wed, 18 May 2022 17:32:31 +0200 Subject: [PATCH 15/53] Functional 1+8 linux --- flash-scripts/linux/install-e-recovery.sh | 22 +- flash-scripts/linux/oneplus-flashingUnlock.sh | 30 ++- .../easy/installer/helpers/DeviceHelper.java | 1 + .../resources/lang/translation.properties | 1 + .../lang/translation_fr_FR.properties | 1 + src/main/resources/yaml/OnePlus8_flash.yml | 218 ++++++++++++++++++ src/main/resources/yaml/OnePlus8_fs.yml | 26 +++ 7 files changed, 276 insertions(+), 23 deletions(-) create mode 100644 src/main/resources/yaml/OnePlus8_flash.yml create mode 100644 src/main/resources/yaml/OnePlus8_fs.yml diff --git a/flash-scripts/linux/install-e-recovery.sh b/flash-scripts/linux/install-e-recovery.sh index 91c9a0b5..ce789881 100755 --- a/flash-scripts/linux/install-e-recovery.sh +++ b/flash-scripts/linux/install-e-recovery.sh @@ -46,18 +46,18 @@ FASTBOOT_CMD=${FASTBOOT_PATH}"fastboot" ADB_CMD=${FASTBOOT_PATH}"adb" # Wipe user data -if ! "$FASTBOOT_CMD" erase userdata ; -then - exit 11 -fi +#if ! "$FASTBOOT_CMD" erase userdata ; +#then +# exit 11 +#fi -echo "user data wiped" -sleep 1 +#echo "user data wiped" +#sleep 1 -if ! "$FASTBOOT_CMD" erase metadata ; -then - exit 12 -fi +#if ! "$FASTBOOT_CMD" erase metadata ; +#then +# exit 12 +#fi -"$FASTBOOT_CMD" flash boot ${E_IMAGE_PATH} +echo "$FASTBOOT_CMD" flash recovery ${E_IMAGE_PATH} diff --git a/flash-scripts/linux/oneplus-flashingUnlock.sh b/flash-scripts/linux/oneplus-flashingUnlock.sh index 763b8d2d..5c08fcba 100755 --- a/flash-scripts/linux/oneplus-flashingUnlock.sh +++ b/flash-scripts/linux/oneplus-flashingUnlock.sh @@ -44,19 +44,25 @@ fi # Build fastboot path FASTBOOT_PATH=${FASTBOOT_FOLDER_PATH}"fastboot" -# Unlock bootloader -if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" oem unlock -then - if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" oem unlock 2>&1 | grep "Device already : unlocked" - then - exit 2 - fi - echo "The device is unlocked" - - if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" reboot +if [ "$($FASTBOOT_PATH getvar unlocked 2>&1 | grep -q yes; echo $?)" = 1 ] +then + # Unlock bootloader + if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" oem unlock then - exit 2 + exit 2 fi +else + sleep 30 + # Already unlocked use the same way + "$FASTBOOT_PATH" -s "$DEVICE_ID" reboot + exit 0 fi -sleep 30 +while [ "$($FASTBOOT_PATH getvar unlocked 2>&1 | grep -q yes; echo $?)" = 1 ] +do + echo "locked" + sleep 1 +done + +echo "unlock.." +sleep 1 diff --git a/src/main/java/ecorp/easy/installer/helpers/DeviceHelper.java b/src/main/java/ecorp/easy/installer/helpers/DeviceHelper.java index 45fe31fb..346ca1a6 100644 --- a/src/main/java/ecorp/easy/installer/helpers/DeviceHelper.java +++ b/src/main/java/ecorp/easy/installer/helpers/DeviceHelper.java @@ -52,6 +52,7 @@ public class DeviceHelper { put("Teracube_2e", "0011"); put("emerald", "0012"); //Teracube A10 put("OnePlus7T", "0013"); + put("OnePlus8", "0014"); }}; /** diff --git a/src/main/resources/lang/translation.properties b/src/main/resources/lang/translation.properties index 7ea3a388..4efc051c 100644 --- a/src/main/resources/lang/translation.properties +++ b/src/main/resources/lang/translation.properties @@ -123,6 +123,7 @@ install_instr_readAllWarning=Read all instructions before to start install_instr_followOfficialGuidanceAt=Follow official guidance at install_instr_selectUnlockBootloader=Select "UNLOCK BOOTLOADER" with "Volume" button install_instr_unlockBootloader=Confirm with "Power" button. After that the phone will reboot automatically +install_instr_unlockBootloader_already=If your phone is already unlocked, you don't have to do anything. The phone will then restart 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. diff --git a/src/main/resources/lang/translation_fr_FR.properties b/src/main/resources/lang/translation_fr_FR.properties index 88a23e1e..fb2ca371 100644 --- a/src/main/resources/lang/translation_fr_FR.properties +++ b/src/main/resources/lang/translation_fr_FR.properties @@ -245,6 +245,7 @@ install_instr_tapRebootPowerOff=Tapez sur 'Éteindre' install_instr_followOfficialGuidanceAt=Suivez le guide officiel sur install_instr_selectUnlockBootloader=Sélectionnez "UNLOCK BOOTLOADER" avec le bouton "Volume" install_instr_unlockBootloader=Confirmez avec le bouton "Marche/Arrêt". Le téléphone va ensuite redémarrer automatiquement +install_instr_unlockBootloader_already=Si votre téléphone est déjà dévérouillé, vous n'avez rien à faire. Le téléphone va ensuite redémarrer automatiquement install_instr_selectLockBootloader=Sélectionnez "LOCK BOOTLOADER" avec le bouton "Volume" install_instr_lockBootloader=Confirmez avec le bouton "Marche/Arrêt". Le téléphone va ensuite redémarrer automatiquement install_instr_bootWarning=Sur l'écran d'avertissement au démarrage, appuyez sur le bouton "Volume moins" pour entrer dans le menu des options diff --git a/src/main/resources/yaml/OnePlus8_flash.yml b/src/main/resources/yaml/OnePlus8_flash.yml new file mode 100644 index 00000000..4ac402a3 --- /dev/null +++ b/src/main/resources/yaml/OnePlus8_flash.yml @@ -0,0 +1,218 @@ +## Copyright 2022 - 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: Frank Preel +--- +stepsCount: 12 +steps: + f0: + type: custom + stepNumber: 1 + nextStepKey: f1 + titleKey: stepTitle_enableOemUnlock + titleIconName: icon-download.png + instructions: + - install_instr_openSettings + - install_instr_searchOEM + - install_instr_enableOEMUnlocking + - install_instr_acceptOEMUnlockWarning + - install_instr_onceDoneThenContinue + f1: + type: load + stepNumber: 2 + nextStepKey: f2 + titleKey: stepTitle_rebootBootloader + instructions: + - install_instr_rebootingOnBootloader + averageTime: 10 + script: reboot-fastboot + parameters: + device_id: ${DEVICE_ID} + fastboot_folder_path: ${ADB_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 1: script_error_unknown + 10: script_error_cantRebootBootloader + 101: script_error_serialNumber_missing + 102: script_error_fastboot_path_missing + f2: + type: custom-executable + stepNumber: 3 + nextStepKey: f3 + titleKey: stepTitle_oemUnlock + titleIconName: icon-download.png + instructions: + - install_instr_unlockingOem + - install_instr_selectUnlockBootloader + - install_instr_unlockBootloader + - install_instr_unlockBootloader_already + script: oneplus-flashingUnlock + parameters: + device_id: ${DEVICE_ID} + fastboot_folder_path: ${ADB_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 1: script_error_unknown + 2: script_error_fastboot_flashingUnlock_failed + 101: script_error_serialNumber_missing + 102: script_error_fastboot_path_missing + f3: + type: custom + stepNumber: 4 + nextStepKey: f4 + titleKey: devMode_mTitle_main + titleIconName: icon-download.png + instructions: + - devMode_main + - devMode_lbl + - devMode_instr_settings + - devMode_instr_build + - devMode_instr_tap7 + - debugADB_instr_settings + - debugADB_instr_search + - debugADB_instr_androidDebug + - debugADB_instr_debugOn + - debugADB_instr_tapeOK + - debugADB_instr_acceptCertificate + f4: + type: load + stepNumber: 5 + nextStepKey: f5 + titleKey: stepTitle_rebootBootloader + instructions: + - install_instr_rebootingOnBootloader + averageTime: 8 + script: reboot-fastboot + parameters: + device_id: ${DEVICE_ID} + fastboot_folder_path: ${ADB_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 1: script_error_unknown + 10: script_error_cantRebootBootloader + 101: script_error_serialNumber_missing + 102: script_error_fastboot_path_missing + f5: + type: load + stepNumber: 6 + nextStepKey: f6 + titleKey: stepTitle4On7 + instructions: + - install_instr_recoveryInstall + averageTime: 3 + script: install-e-recovery + parameters: + fastboot_folder_path: ${ADB_FOLDER_PATH} + twrp_image_path: ${TWRP_IMAGE_PATH} + okCodes: + 0: ~ + koCodes: + 1: script_error_unknown + 101: script_error_installRecovery_101 + f6: + type: custom-executable + stepNumber: 7 + nextStepKey: f7 + titleKey: stepTitle5On7 + instructions: + - install_instr_choose_e_recovery_select + - install_instr_choose_e_recovery_select_details + - install_instr_choose_e_recovery_validate + - install_instr_choose_e_recovery_validate_wait_for_result + - install_instr_e_recovery_apply_update + - install_instr_e_recovery_apply_update_from_adb + - install_instr_e_recovery_apply_update_from_adb_wait_for_result + titleKeyIconName: icon-download.png + script: wait-e-recovery-sideload + parameters: + device_id: ${DEVICE_ID} + adb_folder_path: ${ADB_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 101: script_error_waitSideload_101 + f7: + type: load + stepNumber: 8 + nextStepKey: f8 + titleKey: install_instr_eosInstall + instructions: + - install_instr_e_recovery_oneplus_select_recovery + averageTime: 150 + script: install-from-e-recovery + parameters: + device_id: ${DEVICE_ID} + archive_path: ${PATCH_PATH} + adb_folder_path: ${ADB_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 1: script_error_installFromSideload + f8: + type: custom-executable + stepNumber: 9 + nextStepKey: f9 + titleKey: stepTitle_installation + instructions: + - install_instr_e_recovery_back + - install_instr_e_recovery_factory_reset + - install_instr_e_recovery_factory_reset_format_data + - install_instr_e_recovery_factory_reset_format_data_validate + - install_instr_e_recovery_back + - install_instr_e_recovery_apply_update + - install_instr_e_recovery_apply_update_from_adb + - install_instr_e_recovery_apply_update_from_adb_wait_for_result + titleKeyIconName: icon-download.png + script: wait-e-recovery-sideload + parameters: + device_id: ${DEVICE_ID} + adb_folder_path: ${ADB_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 101: script_error_waitSideload_101 + f9: + type: load + stepNumber: 10 + nextStepKey: f10 + titleKey: install_instr_eosInstall + instructions: + - install_instr_e_recovery_oneplus_select_recovery + averageTime: 150 + script: install-from-e-recovery + parameters: + device_id: ${DEVICE_ID} + archive_path: ${ARCHIVE_PATH} + adb_folder_path: ${ADB_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 1: script_error_installFromSideload + f10: + type: askAccount + stepNumber: 11 + nextStepKey: f11 + f11: + type: custom + stepNumber: 12 + nextStepKey: end + titleKey: stepTitle_rebootDevice + instructions: + - install_instr_e_recovery_back + - install_instr_e_recovery_reboot + - eAccount_lbl_alreadyAccount + titleKeyIconName: icon-download.png diff --git a/src/main/resources/yaml/OnePlus8_fs.yml b/src/main/resources/yaml/OnePlus8_fs.yml new file mode 100644 index 00000000..007c6082 --- /dev/null +++ b/src/main/resources/yaml/OnePlus8_fs.yml @@ -0,0 +1,26 @@ +## Copyright 2022 - 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: Frank Preel +--- +sources: + rom: + url: https://images.ecloud.global/dev/instantnoodle/e-0.23-r-20220405175826-dev-instantnoodle.zip + filePath: e-0.23-r-20220405175826-dev-instantnoodle.zip + twrp: + url: https://images.ecloud.global/dev/instantnoodle/recovery-e-0.23-r-20220405175826-dev-instantnoodle.img + filePath: recovery-e-0.23-r-20220405175826-dev-instantnoodle.img + patch: + url: https://images.ecloud.global/dev/instantnoodle/e-0.23-r-20220405175826-dev-instantnoodle.zip + filePath: e-0.23-r-20220405175826-dev-instantnoodle.zip -- GitLab From ddf3a231109b1438f5c5e6a5ce1c8defb67c18bc Mon Sep 17 00:00:00 2001 From: Frank Preel Date: Wed, 18 May 2022 17:39:11 +0200 Subject: [PATCH 16/53] 1+7T better process --- src/main/resources/yaml/OnePlus7T_flash.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/resources/yaml/OnePlus7T_flash.yml b/src/main/resources/yaml/OnePlus7T_flash.yml index ebe07760..4ac402a3 100644 --- a/src/main/resources/yaml/OnePlus7T_flash.yml +++ b/src/main/resources/yaml/OnePlus7T_flash.yml @@ -48,14 +48,16 @@ steps: 101: script_error_serialNumber_missing 102: script_error_fastboot_path_missing f2: - type: load + type: custom-executable stepNumber: 3 nextStepKey: f3 titleKey: stepTitle_oemUnlock titleIconName: icon-download.png - averageTime: 25 instructions: - install_instr_unlockingOem + - install_instr_selectUnlockBootloader + - install_instr_unlockBootloader + - install_instr_unlockBootloader_already script: oneplus-flashingUnlock parameters: device_id: ${DEVICE_ID} -- GitLab From 146b1cfd67eb3e69b46df78fbe2f80ebcbc3fe0e Mon Sep 17 00:00:00 2001 From: Frank Preel Date: Wed, 18 May 2022 17:57:40 +0200 Subject: [PATCH 17/53] Windows & typo fix --- flash-scripts/linux/install-e-recovery.sh | 3 +- flash-scripts/windows/install-e-recovery.bat | 22 ++++++------- .../windows/oneplus-flashingUnlock.bat | 31 ++++++++++++------- 3 files changed, 31 insertions(+), 25 deletions(-) diff --git a/flash-scripts/linux/install-e-recovery.sh b/flash-scripts/linux/install-e-recovery.sh index ce789881..b31a2a0d 100755 --- a/flash-scripts/linux/install-e-recovery.sh +++ b/flash-scripts/linux/install-e-recovery.sh @@ -59,5 +59,4 @@ ADB_CMD=${FASTBOOT_PATH}"adb" # exit 12 #fi - -echo "$FASTBOOT_CMD" flash recovery ${E_IMAGE_PATH} +"$FASTBOOT_CMD" flash recovery ${E_IMAGE_PATH} diff --git a/flash-scripts/windows/install-e-recovery.bat b/flash-scripts/windows/install-e-recovery.bat index 78cc8fc1..9fac9a3c 100644 --- a/flash-scripts/windows/install-e-recovery.bat +++ b/flash-scripts/windows/install-e-recovery.bat @@ -40,18 +40,16 @@ IF not defined %E_IMAGE_PATH ( SET FASTBOOT_CMD="%FASTBOOT_PATH%fastboot" SET ADB_CMD="%FASTBOOT_PATH%adb" -%FASTBOOT_CMD% erase userdata -if errorlevel 1 ( - exit /b 11 -) - -echo "user data wiped" +:: %FASTBOOT_CMD% erase userdata +:: if errorlevel 1 ( +:: exit /b 11 +:: ) -timeout 1 >nul 2>&1 +:: timeout 1 >nul 2>&1 -%FASTBOOT_CMD% erase metadata -if errorlevel 1 ( - exit /b 12 -) +:: %FASTBOOT_CMD% erase metadata +:: if errorlevel 1 ( +:: exit /b 12 +:: ) -%FASTBOOT_CMD% flash boot %E_IMAGE_PATH% +%FASTBOOT_CMD% flash recovery %E_IMAGE_PATH% diff --git a/flash-scripts/windows/oneplus-flashingUnlock.bat b/flash-scripts/windows/oneplus-flashingUnlock.bat index a46ff43d..46cc5bd6 100644 --- a/flash-scripts/windows/oneplus-flashingUnlock.bat +++ b/flash-scripts/windows/oneplus-flashingUnlock.bat @@ -38,17 +38,26 @@ IF not defined %FASTBOOT_FOLDER_PATH ( ) SET FASTBOOT_PATH="%FASTBOOT_FOLDER_PATH%fastboot" -%FASTBOOT_PATH% -s %DEVICE_ID% flashing unlock -if errorlevel 1 ( - %FASTBOOT_PATH% -s %DEVICE_ID% flashing unlock 2>&1 | findstr "Device already : unlocked" - if errorlevel 0 ( - echo "The device is unlocked" - %FASTBOOT_PATH% -s %DEVICE_ID% reboot - timeout 30 >nul 2>&1 - exit /b 0 - ) - exit /b 2 + +%FASTBOOT_PATH% -s %DEVICE_ID% flashing unlock 2>&1 | findstr yes +if errorlevel 0 ( + echo "The device is unlocked" + %FASTBOOT_PATH% -s %DEVICE_ID% reboot + timeout 30 >nul 2>&1 + exit /b 0 +) else ( + %FASTBOOT_PATH% -s %DEVICE_ID% flashing unlock + if errorlevel 1 ( + exit /b 2 ) -timeout 30 >nul 2>&1 +:fastboot_detect +%FASTBOOT_PATH% getvar unlocked 2>&1 | findstr yes +if errorLevel 1 ( + timeout 2 >nul 2>&1 + goto :fastboot_detect +) + +call fastboot_detect + exit /b 0 -- GitLab From ff7e5264eefc061f7319991d85881b9a4855b3ed Mon Sep 17 00:00:00 2001 From: frankpreel Date: Wed, 18 May 2022 18:24:04 +0200 Subject: [PATCH 18/53] Typo --- flash-scripts/windows/oneplus-flashingUnlock.bat | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/flash-scripts/windows/oneplus-flashingUnlock.bat b/flash-scripts/windows/oneplus-flashingUnlock.bat index 46cc5bd6..27ba4901 100644 --- a/flash-scripts/windows/oneplus-flashingUnlock.bat +++ b/flash-scripts/windows/oneplus-flashingUnlock.bat @@ -39,21 +39,22 @@ IF not defined %FASTBOOT_FOLDER_PATH ( SET FASTBOOT_PATH="%FASTBOOT_FOLDER_PATH%fastboot" -%FASTBOOT_PATH% -s %DEVICE_ID% flashing unlock 2>&1 | findstr yes +%FASTBOOT_PATH% getvar unlocked 2>&1 | findstr "yes" if errorlevel 0 ( echo "The device is unlocked" %FASTBOOT_PATH% -s %DEVICE_ID% reboot timeout 30 >nul 2>&1 exit /b 0 ) else ( + echo "The device is locked" %FASTBOOT_PATH% -s %DEVICE_ID% flashing unlock - if errorlevel 1 ( - exit /b 2 + if errorlevel 1 ( exit /b 2) ) :fastboot_detect -%FASTBOOT_PATH% getvar unlocked 2>&1 | findstr yes +%FASTBOOT_PATH% getvar unlocked 2>&1 | findstr "yes" if errorLevel 1 ( + echo "..." timeout 2 >nul 2>&1 goto :fastboot_detect ) -- GitLab From 247a4a287f537fb0b2d6c072ea0d84709adc759a Mon Sep 17 00:00:00 2001 From: Frank Preel Date: Fri, 20 May 2022 12:24:41 +0200 Subject: [PATCH 19/53] Model detection by forking similar device --- .../easy/installer/helpers/DeviceHelper.java | 1 + src/main/resources/yaml/sunfish_flash.yml | 218 ++++++++++++++++++ src/main/resources/yaml/sunfish_fs.yml | 26 +++ 3 files changed, 245 insertions(+) create mode 100644 src/main/resources/yaml/sunfish_flash.yml create mode 100644 src/main/resources/yaml/sunfish_fs.yml diff --git a/src/main/java/ecorp/easy/installer/helpers/DeviceHelper.java b/src/main/java/ecorp/easy/installer/helpers/DeviceHelper.java index 346ca1a6..a84e61aa 100644 --- a/src/main/java/ecorp/easy/installer/helpers/DeviceHelper.java +++ b/src/main/java/ecorp/easy/installer/helpers/DeviceHelper.java @@ -53,6 +53,7 @@ public class DeviceHelper { put("emerald", "0012"); //Teracube A10 put("OnePlus7T", "0013"); put("OnePlus8", "0014"); + put("sunfish", "0015"); }}; /** diff --git a/src/main/resources/yaml/sunfish_flash.yml b/src/main/resources/yaml/sunfish_flash.yml new file mode 100644 index 00000000..4ac402a3 --- /dev/null +++ b/src/main/resources/yaml/sunfish_flash.yml @@ -0,0 +1,218 @@ +## Copyright 2022 - 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: Frank Preel +--- +stepsCount: 12 +steps: + f0: + type: custom + stepNumber: 1 + nextStepKey: f1 + titleKey: stepTitle_enableOemUnlock + titleIconName: icon-download.png + instructions: + - install_instr_openSettings + - install_instr_searchOEM + - install_instr_enableOEMUnlocking + - install_instr_acceptOEMUnlockWarning + - install_instr_onceDoneThenContinue + f1: + type: load + stepNumber: 2 + nextStepKey: f2 + titleKey: stepTitle_rebootBootloader + instructions: + - install_instr_rebootingOnBootloader + averageTime: 10 + script: reboot-fastboot + parameters: + device_id: ${DEVICE_ID} + fastboot_folder_path: ${ADB_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 1: script_error_unknown + 10: script_error_cantRebootBootloader + 101: script_error_serialNumber_missing + 102: script_error_fastboot_path_missing + f2: + type: custom-executable + stepNumber: 3 + nextStepKey: f3 + titleKey: stepTitle_oemUnlock + titleIconName: icon-download.png + instructions: + - install_instr_unlockingOem + - install_instr_selectUnlockBootloader + - install_instr_unlockBootloader + - install_instr_unlockBootloader_already + script: oneplus-flashingUnlock + parameters: + device_id: ${DEVICE_ID} + fastboot_folder_path: ${ADB_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 1: script_error_unknown + 2: script_error_fastboot_flashingUnlock_failed + 101: script_error_serialNumber_missing + 102: script_error_fastboot_path_missing + f3: + type: custom + stepNumber: 4 + nextStepKey: f4 + titleKey: devMode_mTitle_main + titleIconName: icon-download.png + instructions: + - devMode_main + - devMode_lbl + - devMode_instr_settings + - devMode_instr_build + - devMode_instr_tap7 + - debugADB_instr_settings + - debugADB_instr_search + - debugADB_instr_androidDebug + - debugADB_instr_debugOn + - debugADB_instr_tapeOK + - debugADB_instr_acceptCertificate + f4: + type: load + stepNumber: 5 + nextStepKey: f5 + titleKey: stepTitle_rebootBootloader + instructions: + - install_instr_rebootingOnBootloader + averageTime: 8 + script: reboot-fastboot + parameters: + device_id: ${DEVICE_ID} + fastboot_folder_path: ${ADB_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 1: script_error_unknown + 10: script_error_cantRebootBootloader + 101: script_error_serialNumber_missing + 102: script_error_fastboot_path_missing + f5: + type: load + stepNumber: 6 + nextStepKey: f6 + titleKey: stepTitle4On7 + instructions: + - install_instr_recoveryInstall + averageTime: 3 + script: install-e-recovery + parameters: + fastboot_folder_path: ${ADB_FOLDER_PATH} + twrp_image_path: ${TWRP_IMAGE_PATH} + okCodes: + 0: ~ + koCodes: + 1: script_error_unknown + 101: script_error_installRecovery_101 + f6: + type: custom-executable + stepNumber: 7 + nextStepKey: f7 + titleKey: stepTitle5On7 + instructions: + - install_instr_choose_e_recovery_select + - install_instr_choose_e_recovery_select_details + - install_instr_choose_e_recovery_validate + - install_instr_choose_e_recovery_validate_wait_for_result + - install_instr_e_recovery_apply_update + - install_instr_e_recovery_apply_update_from_adb + - install_instr_e_recovery_apply_update_from_adb_wait_for_result + titleKeyIconName: icon-download.png + script: wait-e-recovery-sideload + parameters: + device_id: ${DEVICE_ID} + adb_folder_path: ${ADB_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 101: script_error_waitSideload_101 + f7: + type: load + stepNumber: 8 + nextStepKey: f8 + titleKey: install_instr_eosInstall + instructions: + - install_instr_e_recovery_oneplus_select_recovery + averageTime: 150 + script: install-from-e-recovery + parameters: + device_id: ${DEVICE_ID} + archive_path: ${PATCH_PATH} + adb_folder_path: ${ADB_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 1: script_error_installFromSideload + f8: + type: custom-executable + stepNumber: 9 + nextStepKey: f9 + titleKey: stepTitle_installation + instructions: + - install_instr_e_recovery_back + - install_instr_e_recovery_factory_reset + - install_instr_e_recovery_factory_reset_format_data + - install_instr_e_recovery_factory_reset_format_data_validate + - install_instr_e_recovery_back + - install_instr_e_recovery_apply_update + - install_instr_e_recovery_apply_update_from_adb + - install_instr_e_recovery_apply_update_from_adb_wait_for_result + titleKeyIconName: icon-download.png + script: wait-e-recovery-sideload + parameters: + device_id: ${DEVICE_ID} + adb_folder_path: ${ADB_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 101: script_error_waitSideload_101 + f9: + type: load + stepNumber: 10 + nextStepKey: f10 + titleKey: install_instr_eosInstall + instructions: + - install_instr_e_recovery_oneplus_select_recovery + averageTime: 150 + script: install-from-e-recovery + parameters: + device_id: ${DEVICE_ID} + archive_path: ${ARCHIVE_PATH} + adb_folder_path: ${ADB_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 1: script_error_installFromSideload + f10: + type: askAccount + stepNumber: 11 + nextStepKey: f11 + f11: + type: custom + stepNumber: 12 + nextStepKey: end + titleKey: stepTitle_rebootDevice + instructions: + - install_instr_e_recovery_back + - install_instr_e_recovery_reboot + - eAccount_lbl_alreadyAccount + titleKeyIconName: icon-download.png diff --git a/src/main/resources/yaml/sunfish_fs.yml b/src/main/resources/yaml/sunfish_fs.yml new file mode 100644 index 00000000..007c6082 --- /dev/null +++ b/src/main/resources/yaml/sunfish_fs.yml @@ -0,0 +1,26 @@ +## Copyright 2022 - 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: Frank Preel +--- +sources: + rom: + url: https://images.ecloud.global/dev/instantnoodle/e-0.23-r-20220405175826-dev-instantnoodle.zip + filePath: e-0.23-r-20220405175826-dev-instantnoodle.zip + twrp: + url: https://images.ecloud.global/dev/instantnoodle/recovery-e-0.23-r-20220405175826-dev-instantnoodle.img + filePath: recovery-e-0.23-r-20220405175826-dev-instantnoodle.img + patch: + url: https://images.ecloud.global/dev/instantnoodle/e-0.23-r-20220405175826-dev-instantnoodle.zip + filePath: e-0.23-r-20220405175826-dev-instantnoodle.zip -- GitLab From bdc52b363ea82fcb51db79d297bdce93ca5dd5d8 Mon Sep 17 00:00:00 2001 From: Frank Preel Date: Fri, 20 May 2022 15:52:26 +0200 Subject: [PATCH 20/53] Functionnal Linux process --- .../linux/install-e-recovery-boot.sh | 64 +++++++++++ flash-scripts/linux/pixel-flashingUnlock.sh | 65 +++++++++++ src/main/resources/yaml/sunfish_flash.yml | 106 +++--------------- src/main/resources/yaml/sunfish_fs.yml | 11 +- 4 files changed, 149 insertions(+), 97 deletions(-) create mode 100755 flash-scripts/linux/install-e-recovery-boot.sh create mode 100755 flash-scripts/linux/pixel-flashingUnlock.sh diff --git a/flash-scripts/linux/install-e-recovery-boot.sh b/flash-scripts/linux/install-e-recovery-boot.sh new file mode 100755 index 00000000..1e09a9c4 --- /dev/null +++ b/flash-scripts/linux/install-e-recovery-boot.sh @@ -0,0 +1,64 @@ +#!/bin/bash + +# Copyright (C) 2022 ECORP SAS - Author: Frank Preel +# +# 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: FASTBOOT_PATH +# $2: E_IMAGE_PATH need twrp path +# Exit status +# - 0 : Recovery installed +# - 101 : FASTBOOT_PATH missing +# - 102 : E_IMAGE_PATH missing + +#This script performs the same kind of job like `install-e-recovery` on the boot partion (rather than recovery patition) + +FASTBOOT_PATH=$1 +E_IMAGE_PATH=$2 + +if [ -z "$FASTBOOT_PATH" ] +then + echo "Fastboot path is empty" + exit 101 +fi + +if [ -z "$E_IMAGE_PATH" ] +then + echo "E Image path is empty" + exit 102 +fi + +#"$FASTBOOT_CMD" reboot bootloader +#sleep 10 + +# Build fastboot and adb commands +FASTBOOT_CMD=${FASTBOOT_PATH}"fastboot" +ADB_CMD=${FASTBOOT_PATH}"adb" + +# Wipe user data +#if ! "$FASTBOOT_CMD" erase userdata ; +#then +# exit 11 +#fi + +#echo "user data wiped" +#sleep 1 + +#if ! "$FASTBOOT_CMD" erase metadata ; +#then +# exit 12 +#fi + +"$FASTBOOT_CMD" flash boot ${E_IMAGE_PATH} diff --git a/flash-scripts/linux/pixel-flashingUnlock.sh b/flash-scripts/linux/pixel-flashingUnlock.sh new file mode 100755 index 00000000..9bdd6d1a --- /dev/null +++ b/flash-scripts/linux/pixel-flashingUnlock.sh @@ -0,0 +1,65 @@ +#!/bin/bash + +# Copyright (C) 2022 ECORP SAS - Author: Frank Preel +# +# 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: device id +# $2: fastboot folder path + +# Exit status +# - 0 : bootloader locked +# - 1 : unknown error +# - 2 : Flashing unlocked failed +# - 101 : $DEVICE_ID missing +# - 102 : $FASTBOOT_FOLDER_PATH is missing + +DEVICE_ID=$1 +FASTBOOT_FOLDER_PATH=$2 + +# check serial number has been provided +if [ -z "$DEVICE_ID" ] +then + exit 101 +fi + +# Check fastboot parent folder path has been provided +if [ -z "$FASTBOOT_FOLDER_PATH" ] +then + exit 102 +fi + +# Build fastboot path +FASTBOOT_PATH=${FASTBOOT_FOLDER_PATH}"fastboot" + +if [ "$($FASTBOOT_PATH getvar unlocked 2>&1 | grep -q yes; echo $?)" = 1 ] +then + # Unlock bootloader + if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flashing unlock + then + exit 2 + fi +else + exit 0 +fi + +while [ "$($FASTBOOT_PATH getvar unlocked 2>&1 | grep -q yes; echo $?)" = 1 ] +do + echo "locked" + sleep 1 +done + +echo "unlock.." +sleep 1 diff --git a/src/main/resources/yaml/sunfish_flash.yml b/src/main/resources/yaml/sunfish_flash.yml index 4ac402a3..b8cba20f 100644 --- a/src/main/resources/yaml/sunfish_flash.yml +++ b/src/main/resources/yaml/sunfish_flash.yml @@ -14,7 +14,7 @@ ## along with this program. If not, see . ## Author: Frank Preel --- -stepsCount: 12 +stepsCount: 8 steps: f0: type: custom @@ -57,8 +57,7 @@ steps: - install_instr_unlockingOem - install_instr_selectUnlockBootloader - install_instr_unlockBootloader - - install_instr_unlockBootloader_already - script: oneplus-flashingUnlock + script: pixel-flashingUnlock parameters: device_id: ${DEVICE_ID} fastboot_folder_path: ${ADB_FOLDER_PATH} @@ -70,51 +69,14 @@ steps: 101: script_error_serialNumber_missing 102: script_error_fastboot_path_missing f3: - type: custom + type: load stepNumber: 4 nextStepKey: f4 - titleKey: devMode_mTitle_main - titleIconName: icon-download.png - instructions: - - devMode_main - - devMode_lbl - - devMode_instr_settings - - devMode_instr_build - - devMode_instr_tap7 - - debugADB_instr_settings - - debugADB_instr_search - - debugADB_instr_androidDebug - - debugADB_instr_debugOn - - debugADB_instr_tapeOK - - debugADB_instr_acceptCertificate - f4: - type: load - stepNumber: 5 - nextStepKey: f5 - titleKey: stepTitle_rebootBootloader - instructions: - - install_instr_rebootingOnBootloader - averageTime: 8 - script: reboot-fastboot - parameters: - device_id: ${DEVICE_ID} - fastboot_folder_path: ${ADB_FOLDER_PATH} - okCodes: - 0: ~ - koCodes: - 1: script_error_unknown - 10: script_error_cantRebootBootloader - 101: script_error_serialNumber_missing - 102: script_error_fastboot_path_missing - f5: - type: load - stepNumber: 6 - nextStepKey: f6 titleKey: stepTitle4On7 instructions: - install_instr_recoveryInstall averageTime: 3 - script: install-e-recovery + script: install-e-recovery-boot parameters: fastboot_folder_path: ${ADB_FOLDER_PATH} twrp_image_path: ${TWRP_IMAGE_PATH} @@ -123,52 +85,16 @@ steps: koCodes: 1: script_error_unknown 101: script_error_installRecovery_101 - f6: + f4: type: custom-executable - stepNumber: 7 - nextStepKey: f7 + stepNumber: 5 + nextStepKey: f5 titleKey: stepTitle5On7 instructions: - install_instr_choose_e_recovery_select - install_instr_choose_e_recovery_select_details - install_instr_choose_e_recovery_validate - install_instr_choose_e_recovery_validate_wait_for_result - - install_instr_e_recovery_apply_update - - install_instr_e_recovery_apply_update_from_adb - - install_instr_e_recovery_apply_update_from_adb_wait_for_result - titleKeyIconName: icon-download.png - script: wait-e-recovery-sideload - parameters: - device_id: ${DEVICE_ID} - adb_folder_path: ${ADB_FOLDER_PATH} - okCodes: - 0: ~ - koCodes: - 101: script_error_waitSideload_101 - f7: - type: load - stepNumber: 8 - nextStepKey: f8 - titleKey: install_instr_eosInstall - instructions: - - install_instr_e_recovery_oneplus_select_recovery - averageTime: 150 - script: install-from-e-recovery - parameters: - device_id: ${DEVICE_ID} - archive_path: ${PATCH_PATH} - adb_folder_path: ${ADB_FOLDER_PATH} - okCodes: - 0: ~ - koCodes: - 1: script_error_installFromSideload - f8: - type: custom-executable - stepNumber: 9 - nextStepKey: f9 - titleKey: stepTitle_installation - instructions: - - install_instr_e_recovery_back - install_instr_e_recovery_factory_reset - install_instr_e_recovery_factory_reset_format_data - install_instr_e_recovery_factory_reset_format_data_validate @@ -185,13 +111,13 @@ steps: 0: ~ koCodes: 101: script_error_waitSideload_101 - f9: + f5: type: load - stepNumber: 10 - nextStepKey: f10 + stepNumber: 6 + nextStepKey: f6 titleKey: install_instr_eosInstall instructions: - - install_instr_e_recovery_oneplus_select_recovery + - install_instr_eosInstall averageTime: 150 script: install-from-e-recovery parameters: @@ -202,13 +128,13 @@ steps: 0: ~ koCodes: 1: script_error_installFromSideload - f10: + f6: type: askAccount - stepNumber: 11 - nextStepKey: f11 - f11: + stepNumber: 7 + nextStepKey: f7 + f7: type: custom - stepNumber: 12 + stepNumber: 8 nextStepKey: end titleKey: stepTitle_rebootDevice instructions: diff --git a/src/main/resources/yaml/sunfish_fs.yml b/src/main/resources/yaml/sunfish_fs.yml index 007c6082..3cf0671c 100644 --- a/src/main/resources/yaml/sunfish_fs.yml +++ b/src/main/resources/yaml/sunfish_fs.yml @@ -16,11 +16,8 @@ --- sources: rom: - url: https://images.ecloud.global/dev/instantnoodle/e-0.23-r-20220405175826-dev-instantnoodle.zip - filePath: e-0.23-r-20220405175826-dev-instantnoodle.zip + url: https://images.ecloud.global/dev/sunfish/e-0.23-r-20220405175826-dev-sunfish.zip + filePath: e-0.23-r-20220405175826-dev-sunfish.zip twrp: - url: https://images.ecloud.global/dev/instantnoodle/recovery-e-0.23-r-20220405175826-dev-instantnoodle.img - filePath: recovery-e-0.23-r-20220405175826-dev-instantnoodle.img - patch: - url: https://images.ecloud.global/dev/instantnoodle/e-0.23-r-20220405175826-dev-instantnoodle.zip - filePath: e-0.23-r-20220405175826-dev-instantnoodle.zip + url: https://images.ecloud.global/dev/sunfish/recovery-e-0.23-r-20220405175826-dev-sunfish.img + filePath: recovery-e-0.23-r-20220405175826-dev-sunfish.img -- GitLab From c12fc4e174473034630bcbe98903eb8636a55bb1 Mon Sep 17 00:00:00 2001 From: Frank Preel Date: Fri, 20 May 2022 16:34:36 +0200 Subject: [PATCH 21/53] Pixel process for windows --- .../windows/install-e-recovery-boot.bat | 55 ++++++++++++++++ .../windows/oneplus-flashingUnlock.bat | 2 +- .../windows/pixel-flashingUnlock.bat | 63 +++++++++++++++++++ 3 files changed, 119 insertions(+), 1 deletion(-) create mode 100644 flash-scripts/windows/install-e-recovery-boot.bat create mode 100644 flash-scripts/windows/pixel-flashingUnlock.bat diff --git a/flash-scripts/windows/install-e-recovery-boot.bat b/flash-scripts/windows/install-e-recovery-boot.bat new file mode 100644 index 00000000..1965aa4e --- /dev/null +++ b/flash-scripts/windows/install-e-recovery-boot.bat @@ -0,0 +1,55 @@ +@echo off + +:: !/bin/bash + +:: Copyright (C) 2022 ECORP SAS - Author: Frank Preel + +:: 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: FASTBOOT_PATH +:: $2: E_IMAGE_PATH need twrp path +:: Exit status +:: - 0 : Recovery installed +:: - 101 : FASTBOOT_PATH missing +:: - 102 : E_IMAGE_PATH missing + +SET FASTBOOT_PATH=%~1 +SET E_IMAGE_PATH=%~2 + +IF not defined %FASTBOOT_PATH ( + echo "Fastboot path is empty" + exit /b 101 +) + +IF not defined %E_IMAGE_PATH ( + echo "E Image path is empty" + exit /b 102 +) +SET FASTBOOT_CMD="%FASTBOOT_PATH%fastboot" +SET ADB_CMD="%FASTBOOT_PATH%adb" + +:: %FASTBOOT_CMD% erase userdata +:: if errorlevel 1 ( +:: exit /b 11 +:: ) + +:: timeout 1 >nul 2>&1 + +:: %FASTBOOT_CMD% erase metadata +:: if errorlevel 1 ( +:: exit /b 12 +:: ) + +%FASTBOOT_CMD% flash boot %E_IMAGE_PATH% diff --git a/flash-scripts/windows/oneplus-flashingUnlock.bat b/flash-scripts/windows/oneplus-flashingUnlock.bat index 27ba4901..f1e327ef 100644 --- a/flash-scripts/windows/oneplus-flashingUnlock.bat +++ b/flash-scripts/windows/oneplus-flashingUnlock.bat @@ -47,7 +47,7 @@ if errorlevel 0 ( exit /b 0 ) else ( echo "The device is locked" - %FASTBOOT_PATH% -s %DEVICE_ID% flashing unlock + %FASTBOOT_PATH% -s %DEVICE_ID% oem unlock if errorlevel 1 ( exit /b 2) ) diff --git a/flash-scripts/windows/pixel-flashingUnlock.bat b/flash-scripts/windows/pixel-flashingUnlock.bat new file mode 100644 index 00000000..cf1a04ef --- /dev/null +++ b/flash-scripts/windows/pixel-flashingUnlock.bat @@ -0,0 +1,63 @@ +@echo off + +:: Coyright (C) 2022 ECORP SAS - Author: Frank Preel + +:: 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: device id +:: $2: fastboot folder path + +:: Exit status +:: - 0 : bootloader locked +:: - 1 : unknown error +:: - 2 : Flashing unlocked failed +:: - 101 : $DEVICE_ID missing +:: - 102 : $FASTBOOT_FOLDER_PATH is missing + + +SET DEVICE_ID=%~1 +SET FASTBOOT_FOLDER_PATH=%~2 + +IF not defined %DEVICE_ID ( + exit /b 101 +) +IF not defined %FASTBOOT_FOLDER_PATH ( + exit /b 102 +) + +SET FASTBOOT_PATH="%FASTBOOT_FOLDER_PATH%fastboot" + +%FASTBOOT_PATH% getvar unlocked 2>&1 | findstr "yes" +if errorlevel 0 ( + echo "The device is unlocked" + timeout 1 >nul 2>&1 + exit /b 0 +) else ( + echo "The device is locked" + %FASTBOOT_PATH% -s %DEVICE_ID% flashing unlock + if errorlevel 1 ( exit /b 2) +) + +:fastboot_detect +%FASTBOOT_PATH% getvar unlocked 2>&1 | findstr "yes" +if errorLevel 1 ( + echo "..." + timeout 2 >nul 2>&1 + goto :fastboot_detect +) + +call fastboot_detect + +exit /b 0 -- GitLab From a281e10af2c563a7171ca5bf435892548f94cebc Mon Sep 17 00:00:00 2001 From: Frank Preel Date: Mon, 23 May 2022 08:57:49 +0200 Subject: [PATCH 22/53] Add an image (empty by default) to reserve a space systematically to avoid text shifts --- .../CustomExecutableController.java | 3 ++- src/main/resources/images/empty.png | Bin 0 -> 9329 bytes 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 src/main/resources/images/empty.png diff --git a/src/main/java/ecorp/easy/installer/controllers/stepControllers/CustomExecutableController.java b/src/main/java/ecorp/easy/installer/controllers/stepControllers/CustomExecutableController.java index 4dfe1915..01ac8112 100644 --- a/src/main/java/ecorp/easy/installer/controllers/stepControllers/CustomExecutableController.java +++ b/src/main/java/ecorp/easy/installer/controllers/stepControllers/CustomExecutableController.java @@ -170,7 +170,8 @@ public class CustomExecutableController extends StepControllerHUC;ND%}n0wT(N;q>|L+?jLlcW3U8lT4B~Yd`B*Ydw4IJ$ZLxOpJ8dSom2$AP}3r zo|YL1L_-CEXz7?40n5jtMnw>a^IDLF4aE%O4E+A0Acz3$3 z-weD=Yp*W$0#N_iWSVPj$$a)-a{X^OK<{hp>wBhRNH*NQ}-g^Cfk)kJY z+5lQyi2D|cw0b)#xw+#$_vp#$u8LFLTk7(++VbZ+Pv%hEqfv{IH_J+?f=#dhPe-ir z6r08C9~z-Qb6$Hac1DLU$3)oWpYEdO1aWZhehsf@avQ1eEIHNWr0F!W+4z%$?kiX= z8pK{__Y2;9zn8i?#XWmy>e0I|uUS-YFJ|O4OoXSscKk)fcT?(B!@lkS({~*y~_?Q$AqwI z0ZyS?S@>+^lUSakWky?hQ_l*OGDgxgi=d1HH@kOP&@=0f-=H}`@R7zbqp@f{(>pP#Tdvc@rST3EoqCy;O8k>GoImAwO zk?vAHQ54jA(J1%JfY15>>!y{Uf~(IQ9qZECh0HiUe$g zOa?pCMUJ&@dR&7pA3u8K=zMcb%Vvj0%A5)a>g@iUmx)%;R8-o5BuCB8e35h&ggn1> za>s~1<61WF0+u;ul>3o6S>JEY0+#h6>O&%566c!q(YyTo&tpxSjpG>(BM)(Di|Hqe zSlY2jp4ONAn4dpNYU{(bOU^lvx=XKcUB7KXk}OEJ3T8_z9JC-qs)mPCpU99te0qJT z)b}kq!STGY%2vOJ58d_+1zdiTE}w7Zf@|uR*7Ik35R0Cjketftn|G`(;D?6fOeUT$ z)#8gX{l|Q3YVOx5d8vi$f!&wm)76stkFMJfDx|MtnTseQ{AX!r4Jlg69?YQ1k<_ti z=M8>TTv}WW$|dTt zs$%@S*mUOAPZk1gs&5F5U(lsHwQ+pv$pq>O&+*z%AL55c1~GbWk1qN@wBVi~QXk!< zzACe^T1nIHws`5P|8O{e${k-*B~_cA;lL-hVMwtus49yQ7}#uYcT-t*F32JT*_`T{ zEQ~ViQjSb`{?n%WYBPP~_ulnnIf1&TtY_a0`o-3kcV-k99b3OooxaUGe0#{ST2x_S zRDD*7XOW+zF7hx2TO0IsCZ@c!{(JIji+kNtDx}f3phpgyiA=T4U7d`voV0fs#X=*V zeBqg`G21e*A1;~Ce(W#8aN0I~W5D(jO)hI<-I!zw|E9a@%6Jh~sKR(V%ZEdU^tEm{ zE2=gshZc;}UMlaZ)R993y{U>53#mfXHOt4GT0#`WEr@>5x;WO5a_T;7Q&`PiZ2cvH zkS@6Z=}Vkcmzj%gwXc{wQ@<3|oZG9yBOMG}9_7rIcoH9EG|cxBamr&oAIoIoPYXy3 z?UXNdjk`>?n%Cy8yrC>Mu=Siy?Tq4dJ+v*YWmZoYu=9*?D3zK^cO7(ZlBsPA&cL`LdhyHHRWiDEl=VKFOB_a_S;kK zJ3RP!IZg2@bFwrWt&p7*8{_Jku=zQWl~$cN`htj2CUxN(pt{G~432Tr;%jAI&URK( z>N(tmMl%w)euiafrsULQPMo(@v}mk7ZPVbSHWKOpgCTYbcHnw zPPq6ZN-6PDreJpqi%z~(4ZLX5ish#WMvhNT{F~*X7+ao#Z7x)=ZC;I=Ina~rcsEc^ zOPpUdJu31{4`TbOyn*PPVBPsaFggR_YB&pLoh@Iw8Iy=Tbhb7od)T1*N?QCRZ2&1 z6@9K92-M*r-2s1|qIvnSIStu7@#6ZH<72kR%V+z{4l z5s{RKG~HnNT6X=#N~A^fcVesVmy9JZ3QkauMWYnG&CSH_t{!RKd6+GQ#>S-X**U!S zYFNl&uXCV~g&7OIQ@mWfa>uoxwn(PM{N54J8t<(Z`HvlY9|Sv^C!V*S)ZZ>p_ryge zb_8m3F+|t)(Zm!8PW#tOh+eB$IvU72!jmZDF+2Kt?Xdc3KF&A&Ax?qcCUs4kIw*;q z1%c3}ffvI`DJv50}6bvu7A(%ARD`N?46M)rzPD?Ps3;#D^`5ijf=51nYxNF%yf>UF?Uq4}Tg$AA;; z;+G1RQR*ke&n$7Fqafq0>eKm}0WVIKfE@V4^q*|=mnJ%h>A49_V~eZX@Ej*Om2~|p zFbZED-6^e;9=Xllh+LT)=pSHtBlI(tKh5XGr|s_sw9}6I%ogwa^9*U3R3l$i=@-_2 z+748=$MVLNaXv9nH+Ws%ST-aweq+Ej+zb_RO{_Ycr)}Ks_BFWF3-ne4o$Pjh?~Nnx z7$TWRysp-Fh|e>3b{sJ?^b!5V{#5u!<5@P)b0b~GlNsm9O|^%K7d#6cX4?@R-?E4j zyf<<)JWrP&F+8OC22>SB<+9XlDy{IHh!Y!?h||)l zuMI@&WyRc-DA!{pkwWh^kW^Ckr(@8j$q`#Q3nkyl;-0NVo{9)Qsr z_l(e|pOa=?1L>-shgRv%zAET5&M=jtoW3R>URuMY=CX;KaZHu&Zgxwgj|ejVx)#=a zc83;zs6rT{f*coLSFceU96qzgo2wmE_&~=Y+o9F+$(n{!QtaV1Mg1BHl?9_AGUKe6 z6yl;)wfWbeh@29f!(1`{0Yx8+?OD+N^tUYT_o@_q3c>ZYJi68cKP(4{S!zlbQJx&WVq?I+%Vz(eY;tD%INZFotjRG>2 z(5KqOc-RIR&M36kJIG9!^$VmJp#3c5U1?r6Mzm2bMGc+FmNmLNOC0FyLP^Di$$Dip zdolYaRu;s^Fu%5bxhowIRGWCwQegT1lzvPz4gB;kGwRXilmwS*$BOGA7WVHG43@qQ z^JUIoU&_8DOjOgb=Ubwc9~bfy3!IO4FQ_T~Y~~%Tn>ubvy7`omN#6es!|+oJ52xOO z%_)BU&Y-AUUFwsq5%5z64@5U4N(MJ836j_A`BOVwnR>!}2CTCqxb@zd4;Zy5oV67D zq~|BEEvv|o@_hc7-Xke1C0MShmXi4n-TSX?Swagk_smk87^sM?#?7Qv?u*Hq|CjqSP2>s4E zRD4%hQc{jFzt}U$+aIglK4)@C)mbq@I+!&kyn88%(IteKydjsD$MUuF(>TyHgDEC5 zG$I-Nk-~a(y~c;+BfA&|yrV9EDTFIrqqf{N`z2blklw$i zicIk{(cKg+_o=fB%IEB*j-H@9o-**<_=42kA8a~7!xYnpCKz@1A=|@2!txJm4>iPI zyU(_4WeZ>6WiMH{%U{=1kvvLQHk79>2jSBhx-K|suZBRp?zc_%(p56gSX zp?B%l$$6dha-rA#$-Dig4C8VqjJa8tr97|T^3)8J*m6^P!%33kg-7wSUVQ>eLZ;`o z&DAM-=i`zH%B)ptbvpE>v&qZeK?0a^c2;VBuDeXbT~L~mfoI^lL6 zx@V8s1{ZRF_mJK&IbQPO{COqG$IYp7(`1=gt`|2>9fb>_Sk-ZPZ0WXTDJRE@*b00x=+BmeXlIQ zwvt0wQXqFq6b!BFf0ozX6kZspeK(ZOa6MLTk1>6gN$5v^=IkxG_10clHG>UU z4xw>v);Nc7p>KAtr*O8YSJugTV+B2M*|D#Q!*JcY{bx(&>|*TCV7K(9hZ;>91DB_} zKcWS14Hr3-%EwuE3^C>2BH{hcsaf_Ia@&Q&XSnWRhHl99C^-aZ<3fkh2b@sFcP{9e z#hszeeo`qyXTKdCA8w>c2?zp38zls()t8&_6m_GUyc_Soa~)M~m?B~3Odt)vc(SGm z`>C-djWlB8#y2*bMxa5qHJ5)-m{Icm-Bm3qtbx_t_Kl?78^!KgM?NFxOxXm~ ze$nz;c%hay7t{H?NGo`lxFcuR^5Kx(ha!n*!ZQlr*{=pKwCjq6Ftn()(ugkWr5Z;E z$Yxoe@fN>%|I_Q^N${RrF#FD}Le=%Oc8;DPSI@FC6PM4`1*wb;?>fxZC)IR+Df1s~ zxVydAr^a+RKc#;oCQY{R(#Rb6*tG-Zo5+OE->f~dtk8%ToRm))hbx3?bFujzyfkXSI)lF_=r6!%~K1uP97fy}x zMP7O-h_FF@EZ!2}_CG~<>%9=h)LHn-h;D;W-zeS1W90l0(K`5e;hs|-V|=^ME1YLg z69pD5|K6ybXV>+3r0H?)Tkw-c1;v4(pKHqK3rDJqQ_{1$zkjQobzQ$;Enl?qo^!tI$__CD`!Fh4iK36*@{!T^*j>V>b|w zk2>`Dj$IMmUa*!?p3ou{WbUNSS7v91&Nes_IJT29nN=kA=6nOgBN%d!(|xEYc`L$XDbM=;NP+L49&n>rhtfhd?=buPz(%x%FHT(W(>4ui=K zaq7B4@R0&TRE>2}qxg=RsoNJtnp@@Nz*z-90XUPeF+8t`_3?sYa6Zm>Xn+?HII{qO zl+^-=7_0}L0(Qo`61-JJR_dEXzyzF%h&9p>Zb(Gq-3WR?B)oZ$kp(u$1B=3msHw6j z2PgsrUU&)y9N^{YO;!w05jo&h1g`hZFcI(pgyNwhVq<6mM*EQPU|Fav6b{i2Aow9f zR9V2vB%F()nU>CP6u>tX5jP5js0f4k`};%v&q94jt}q!C3I&5BURKtRZW-V{s# z#G5R-Pw^{<7M_eH5r`Cmk2iRq6XWdTOHmOK0mi|<=jTNQ?&g6lHU^gPd&&Mz|juO3{Up)C1LT}et2(+=wB&t*gyPN&aT0#5PZ5`%C-x!{}?AXpSi79xv5VIT?^86*U$ zfJ5L=2)VO3S^Qt9^u5Uxj5ij)PX&-e2>=fQhruBf6yzaz86*-S>x@uhg#)NiF0w9gc{~OpC+{K$kwszP5R@}g0fI-#!Esmx zoQ#ai*#jyZR#C@?t8kia}4MfR{d>jAu>VIBfq%{VUf$Qs5tf|Lv~- zZ*sBxdBcPE27U$k1Gh8ZxrQ2nzjCh-&}b8VH2U{{Zb2Z4q~IhKy%*|&ubi4p@?Sj{ z(H2Blh_mL2#M@mJv0$#!e87G>B}C&^l-R3RrbLLscDao&@zU_nb4yNoHFd$v3~tB# zmwTtK^2i7YZhe?+Xq{AQe)|wHbU2=_#Dy=-!mRD1_0=rvEAVT~5!dv)2IsV7*m_od zIfR{7xRg7;|B@}5$9l4C1X8eej0! zgs`Z3546{PbaSiRtHua8@Ff=b?pB?Kuj>chyZ0&~?5Eee>8JPFsm&kRIjQ}p(4>5j zVQ4w?v+O?kkKy6=IX>N=OB)gfn84>83w**N(HASV#ukNEmOn3letY)w&kzuwJ}ELD zQVa!dO&Oif>1u)Y_MbToMYjOUA)=lw83bbG+JDjXPloIQMkb2Bp*GVj0}mUc#JH!v zC6%Y?~GgUdhT2N{ny=7FF2rM+r5LXZB!&h$C%2|h!5Aj zWn!F=UOlW9U8GS)3o!nVAKUO3M?kxoz7q*i%PGE!NB+lz2Lw5Hd?%vK!vwF3f;g$5 zmswh6MD-<_{YxQG`P?4aiNl#AY?KbX3A&~Na_&*9a2j6V1`z+P=-U@R*g9>eth^O! z+!S_lDpHefUP;dHrR%*oX8-lS#rS{CN!@s{I-#WGy#%0Nm^eqU<3SnoCM1h@1zyPC`GtF~eE@xt1d)IB-DFnXUmoiGX z!QAK}81}`|XN-4a(q?MAf%?Q^F6)y4!;Ww2HV!*l!>PXB1A acM`@qP1a|w9NypOK>FH7T4kCSBmM)+Ijlzj literal 0 HcmV?d00001 -- GitLab From 0880900b2662f964451ae2e4cfc6f02ed3d9df25 Mon Sep 17 00:00:00 2001 From: Frank Preel Date: Mon, 23 May 2022 13:57:01 +0200 Subject: [PATCH 23/53] Functionnal process linux --- src/main/java/ecorp/easy/installer/helpers/DeviceHelper.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/ecorp/easy/installer/helpers/DeviceHelper.java b/src/main/java/ecorp/easy/installer/helpers/DeviceHelper.java index a84e61aa..58cf16f4 100644 --- a/src/main/java/ecorp/easy/installer/helpers/DeviceHelper.java +++ b/src/main/java/ecorp/easy/installer/helpers/DeviceHelper.java @@ -54,6 +54,7 @@ public class DeviceHelper { put("OnePlus7T", "0013"); put("OnePlus8", "0014"); put("sunfish", "0015"); + put("flame", "0016"); }}; /** -- GitLab From 4ff9356a2cd9124e53b71de7c51d59c646b28b08 Mon Sep 17 00:00:00 2001 From: Frank Preel Date: Mon, 23 May 2022 13:57:30 +0200 Subject: [PATCH 24/53] Functionnal process linux --- src/main/resources/yaml/flame_flash.yml | 144 ++++++++++++++++++++++++ src/main/resources/yaml/flame_fs.yml | 23 ++++ 2 files changed, 167 insertions(+) create mode 100644 src/main/resources/yaml/flame_flash.yml create mode 100644 src/main/resources/yaml/flame_fs.yml diff --git a/src/main/resources/yaml/flame_flash.yml b/src/main/resources/yaml/flame_flash.yml new file mode 100644 index 00000000..b8cba20f --- /dev/null +++ b/src/main/resources/yaml/flame_flash.yml @@ -0,0 +1,144 @@ +## Copyright 2022 - 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: Frank Preel +--- +stepsCount: 8 +steps: + f0: + type: custom + stepNumber: 1 + nextStepKey: f1 + titleKey: stepTitle_enableOemUnlock + titleIconName: icon-download.png + instructions: + - install_instr_openSettings + - install_instr_searchOEM + - install_instr_enableOEMUnlocking + - install_instr_acceptOEMUnlockWarning + - install_instr_onceDoneThenContinue + f1: + type: load + stepNumber: 2 + nextStepKey: f2 + titleKey: stepTitle_rebootBootloader + instructions: + - install_instr_rebootingOnBootloader + averageTime: 10 + script: reboot-fastboot + parameters: + device_id: ${DEVICE_ID} + fastboot_folder_path: ${ADB_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 1: script_error_unknown + 10: script_error_cantRebootBootloader + 101: script_error_serialNumber_missing + 102: script_error_fastboot_path_missing + f2: + type: custom-executable + stepNumber: 3 + nextStepKey: f3 + titleKey: stepTitle_oemUnlock + titleIconName: icon-download.png + instructions: + - install_instr_unlockingOem + - install_instr_selectUnlockBootloader + - install_instr_unlockBootloader + script: pixel-flashingUnlock + parameters: + device_id: ${DEVICE_ID} + fastboot_folder_path: ${ADB_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 1: script_error_unknown + 2: script_error_fastboot_flashingUnlock_failed + 101: script_error_serialNumber_missing + 102: script_error_fastboot_path_missing + f3: + type: load + stepNumber: 4 + nextStepKey: f4 + titleKey: stepTitle4On7 + instructions: + - install_instr_recoveryInstall + averageTime: 3 + script: install-e-recovery-boot + parameters: + fastboot_folder_path: ${ADB_FOLDER_PATH} + twrp_image_path: ${TWRP_IMAGE_PATH} + okCodes: + 0: ~ + koCodes: + 1: script_error_unknown + 101: script_error_installRecovery_101 + f4: + type: custom-executable + stepNumber: 5 + nextStepKey: f5 + titleKey: stepTitle5On7 + instructions: + - install_instr_choose_e_recovery_select + - install_instr_choose_e_recovery_select_details + - install_instr_choose_e_recovery_validate + - install_instr_choose_e_recovery_validate_wait_for_result + - install_instr_e_recovery_factory_reset + - install_instr_e_recovery_factory_reset_format_data + - install_instr_e_recovery_factory_reset_format_data_validate + - install_instr_e_recovery_back + - install_instr_e_recovery_apply_update + - install_instr_e_recovery_apply_update_from_adb + - install_instr_e_recovery_apply_update_from_adb_wait_for_result + titleKeyIconName: icon-download.png + script: wait-e-recovery-sideload + parameters: + device_id: ${DEVICE_ID} + adb_folder_path: ${ADB_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 101: script_error_waitSideload_101 + f5: + type: load + stepNumber: 6 + nextStepKey: f6 + titleKey: install_instr_eosInstall + instructions: + - install_instr_eosInstall + averageTime: 150 + script: install-from-e-recovery + parameters: + device_id: ${DEVICE_ID} + archive_path: ${ARCHIVE_PATH} + adb_folder_path: ${ADB_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 1: script_error_installFromSideload + f6: + type: askAccount + stepNumber: 7 + nextStepKey: f7 + f7: + type: custom + stepNumber: 8 + nextStepKey: end + titleKey: stepTitle_rebootDevice + instructions: + - install_instr_e_recovery_back + - install_instr_e_recovery_reboot + - eAccount_lbl_alreadyAccount + titleKeyIconName: icon-download.png diff --git a/src/main/resources/yaml/flame_fs.yml b/src/main/resources/yaml/flame_fs.yml new file mode 100644 index 00000000..da7188ee --- /dev/null +++ b/src/main/resources/yaml/flame_fs.yml @@ -0,0 +1,23 @@ +## Copyright 2022 - 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: Frank Preel +--- +sources: + rom: + url: https://images.ecloud.global/dev/flame/e-0.23-r-20220404175826-dev-flame.zip + filePath: e-0.23-r-20220404175826-dev-flame.zip + twrp: + url: https://images.ecloud.global/dev/flame/recovery-e-0.23-r-20220404175826-dev-flame.img + filePath: recovery-e-0.23-r-20220404175826-dev-flame.img -- GitLab From 4a9f4ccbc0f8e1a44f44ebaebbb512ef67e077d4 Mon Sep 17 00:00:00 2001 From: Frank Preel Date: Mon, 23 May 2022 15:31:33 +0200 Subject: [PATCH 25/53] Functionnal linux process --- .../easy/installer/helpers/DeviceHelper.java | 1 + src/main/resources/yaml/coral_flash.yml | 144 ++++++++++++++++++ src/main/resources/yaml/coral_fs.yml | 24 +++ 3 files changed, 169 insertions(+) create mode 100644 src/main/resources/yaml/coral_flash.yml create mode 100644 src/main/resources/yaml/coral_fs.yml diff --git a/src/main/java/ecorp/easy/installer/helpers/DeviceHelper.java b/src/main/java/ecorp/easy/installer/helpers/DeviceHelper.java index 58cf16f4..23db5e40 100644 --- a/src/main/java/ecorp/easy/installer/helpers/DeviceHelper.java +++ b/src/main/java/ecorp/easy/installer/helpers/DeviceHelper.java @@ -55,6 +55,7 @@ public class DeviceHelper { put("OnePlus8", "0014"); put("sunfish", "0015"); put("flame", "0016"); + put("coral", "0017"); }}; /** diff --git a/src/main/resources/yaml/coral_flash.yml b/src/main/resources/yaml/coral_flash.yml new file mode 100644 index 00000000..b8cba20f --- /dev/null +++ b/src/main/resources/yaml/coral_flash.yml @@ -0,0 +1,144 @@ +## Copyright 2022 - 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: Frank Preel +--- +stepsCount: 8 +steps: + f0: + type: custom + stepNumber: 1 + nextStepKey: f1 + titleKey: stepTitle_enableOemUnlock + titleIconName: icon-download.png + instructions: + - install_instr_openSettings + - install_instr_searchOEM + - install_instr_enableOEMUnlocking + - install_instr_acceptOEMUnlockWarning + - install_instr_onceDoneThenContinue + f1: + type: load + stepNumber: 2 + nextStepKey: f2 + titleKey: stepTitle_rebootBootloader + instructions: + - install_instr_rebootingOnBootloader + averageTime: 10 + script: reboot-fastboot + parameters: + device_id: ${DEVICE_ID} + fastboot_folder_path: ${ADB_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 1: script_error_unknown + 10: script_error_cantRebootBootloader + 101: script_error_serialNumber_missing + 102: script_error_fastboot_path_missing + f2: + type: custom-executable + stepNumber: 3 + nextStepKey: f3 + titleKey: stepTitle_oemUnlock + titleIconName: icon-download.png + instructions: + - install_instr_unlockingOem + - install_instr_selectUnlockBootloader + - install_instr_unlockBootloader + script: pixel-flashingUnlock + parameters: + device_id: ${DEVICE_ID} + fastboot_folder_path: ${ADB_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 1: script_error_unknown + 2: script_error_fastboot_flashingUnlock_failed + 101: script_error_serialNumber_missing + 102: script_error_fastboot_path_missing + f3: + type: load + stepNumber: 4 + nextStepKey: f4 + titleKey: stepTitle4On7 + instructions: + - install_instr_recoveryInstall + averageTime: 3 + script: install-e-recovery-boot + parameters: + fastboot_folder_path: ${ADB_FOLDER_PATH} + twrp_image_path: ${TWRP_IMAGE_PATH} + okCodes: + 0: ~ + koCodes: + 1: script_error_unknown + 101: script_error_installRecovery_101 + f4: + type: custom-executable + stepNumber: 5 + nextStepKey: f5 + titleKey: stepTitle5On7 + instructions: + - install_instr_choose_e_recovery_select + - install_instr_choose_e_recovery_select_details + - install_instr_choose_e_recovery_validate + - install_instr_choose_e_recovery_validate_wait_for_result + - install_instr_e_recovery_factory_reset + - install_instr_e_recovery_factory_reset_format_data + - install_instr_e_recovery_factory_reset_format_data_validate + - install_instr_e_recovery_back + - install_instr_e_recovery_apply_update + - install_instr_e_recovery_apply_update_from_adb + - install_instr_e_recovery_apply_update_from_adb_wait_for_result + titleKeyIconName: icon-download.png + script: wait-e-recovery-sideload + parameters: + device_id: ${DEVICE_ID} + adb_folder_path: ${ADB_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 101: script_error_waitSideload_101 + f5: + type: load + stepNumber: 6 + nextStepKey: f6 + titleKey: install_instr_eosInstall + instructions: + - install_instr_eosInstall + averageTime: 150 + script: install-from-e-recovery + parameters: + device_id: ${DEVICE_ID} + archive_path: ${ARCHIVE_PATH} + adb_folder_path: ${ADB_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 1: script_error_installFromSideload + f6: + type: askAccount + stepNumber: 7 + nextStepKey: f7 + f7: + type: custom + stepNumber: 8 + nextStepKey: end + titleKey: stepTitle_rebootDevice + instructions: + - install_instr_e_recovery_back + - install_instr_e_recovery_reboot + - eAccount_lbl_alreadyAccount + titleKeyIconName: icon-download.png diff --git a/src/main/resources/yaml/coral_fs.yml b/src/main/resources/yaml/coral_fs.yml new file mode 100644 index 00000000..64099252 --- /dev/null +++ b/src/main/resources/yaml/coral_fs.yml @@ -0,0 +1,24 @@ +## Copyright 2022 - 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: Frank Preel +--- +sources: + rom: + url: https://images.ecloud.global/dev/coral/e-0.23-r-20220404175826-dev-coral.zip + filePath: e-0.23-r-20220404175826-dev-coral.zip + twrp: + url: https://images.ecloud.global/dev/coral/recovery-e-0.23-r-20220404175826-dev-coral.img + filePath: recovery-e-0.23-r-20220404175826-dev-coral.img + -- GitLab From 0f49e3c41d44a13393e39804b83b8b06dc00626c Mon Sep 17 00:00:00 2001 From: Frank Preel Date: Mon, 23 May 2022 17:31:01 +0200 Subject: [PATCH 26/53] Temporary configuration for OnePlus8Pro --- .../easy/installer/helpers/DeviceHelper.java | 1 + src/main/resources/yaml/OnePlus8Pro_flash.yml | 218 ++++++++++++++++++ src/main/resources/yaml/OnePlus8Pro_fs.yml | 26 +++ 3 files changed, 245 insertions(+) create mode 100644 src/main/resources/yaml/OnePlus8Pro_flash.yml create mode 100644 src/main/resources/yaml/OnePlus8Pro_fs.yml diff --git a/src/main/java/ecorp/easy/installer/helpers/DeviceHelper.java b/src/main/java/ecorp/easy/installer/helpers/DeviceHelper.java index 23db5e40..3bf5cd2a 100644 --- a/src/main/java/ecorp/easy/installer/helpers/DeviceHelper.java +++ b/src/main/java/ecorp/easy/installer/helpers/DeviceHelper.java @@ -56,6 +56,7 @@ public class DeviceHelper { put("sunfish", "0015"); put("flame", "0016"); put("coral", "0017"); + put("keyword", "0018"); }}; /** diff --git a/src/main/resources/yaml/OnePlus8Pro_flash.yml b/src/main/resources/yaml/OnePlus8Pro_flash.yml new file mode 100644 index 00000000..4ac402a3 --- /dev/null +++ b/src/main/resources/yaml/OnePlus8Pro_flash.yml @@ -0,0 +1,218 @@ +## Copyright 2022 - 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: Frank Preel +--- +stepsCount: 12 +steps: + f0: + type: custom + stepNumber: 1 + nextStepKey: f1 + titleKey: stepTitle_enableOemUnlock + titleIconName: icon-download.png + instructions: + - install_instr_openSettings + - install_instr_searchOEM + - install_instr_enableOEMUnlocking + - install_instr_acceptOEMUnlockWarning + - install_instr_onceDoneThenContinue + f1: + type: load + stepNumber: 2 + nextStepKey: f2 + titleKey: stepTitle_rebootBootloader + instructions: + - install_instr_rebootingOnBootloader + averageTime: 10 + script: reboot-fastboot + parameters: + device_id: ${DEVICE_ID} + fastboot_folder_path: ${ADB_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 1: script_error_unknown + 10: script_error_cantRebootBootloader + 101: script_error_serialNumber_missing + 102: script_error_fastboot_path_missing + f2: + type: custom-executable + stepNumber: 3 + nextStepKey: f3 + titleKey: stepTitle_oemUnlock + titleIconName: icon-download.png + instructions: + - install_instr_unlockingOem + - install_instr_selectUnlockBootloader + - install_instr_unlockBootloader + - install_instr_unlockBootloader_already + script: oneplus-flashingUnlock + parameters: + device_id: ${DEVICE_ID} + fastboot_folder_path: ${ADB_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 1: script_error_unknown + 2: script_error_fastboot_flashingUnlock_failed + 101: script_error_serialNumber_missing + 102: script_error_fastboot_path_missing + f3: + type: custom + stepNumber: 4 + nextStepKey: f4 + titleKey: devMode_mTitle_main + titleIconName: icon-download.png + instructions: + - devMode_main + - devMode_lbl + - devMode_instr_settings + - devMode_instr_build + - devMode_instr_tap7 + - debugADB_instr_settings + - debugADB_instr_search + - debugADB_instr_androidDebug + - debugADB_instr_debugOn + - debugADB_instr_tapeOK + - debugADB_instr_acceptCertificate + f4: + type: load + stepNumber: 5 + nextStepKey: f5 + titleKey: stepTitle_rebootBootloader + instructions: + - install_instr_rebootingOnBootloader + averageTime: 8 + script: reboot-fastboot + parameters: + device_id: ${DEVICE_ID} + fastboot_folder_path: ${ADB_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 1: script_error_unknown + 10: script_error_cantRebootBootloader + 101: script_error_serialNumber_missing + 102: script_error_fastboot_path_missing + f5: + type: load + stepNumber: 6 + nextStepKey: f6 + titleKey: stepTitle4On7 + instructions: + - install_instr_recoveryInstall + averageTime: 3 + script: install-e-recovery + parameters: + fastboot_folder_path: ${ADB_FOLDER_PATH} + twrp_image_path: ${TWRP_IMAGE_PATH} + okCodes: + 0: ~ + koCodes: + 1: script_error_unknown + 101: script_error_installRecovery_101 + f6: + type: custom-executable + stepNumber: 7 + nextStepKey: f7 + titleKey: stepTitle5On7 + instructions: + - install_instr_choose_e_recovery_select + - install_instr_choose_e_recovery_select_details + - install_instr_choose_e_recovery_validate + - install_instr_choose_e_recovery_validate_wait_for_result + - install_instr_e_recovery_apply_update + - install_instr_e_recovery_apply_update_from_adb + - install_instr_e_recovery_apply_update_from_adb_wait_for_result + titleKeyIconName: icon-download.png + script: wait-e-recovery-sideload + parameters: + device_id: ${DEVICE_ID} + adb_folder_path: ${ADB_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 101: script_error_waitSideload_101 + f7: + type: load + stepNumber: 8 + nextStepKey: f8 + titleKey: install_instr_eosInstall + instructions: + - install_instr_e_recovery_oneplus_select_recovery + averageTime: 150 + script: install-from-e-recovery + parameters: + device_id: ${DEVICE_ID} + archive_path: ${PATCH_PATH} + adb_folder_path: ${ADB_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 1: script_error_installFromSideload + f8: + type: custom-executable + stepNumber: 9 + nextStepKey: f9 + titleKey: stepTitle_installation + instructions: + - install_instr_e_recovery_back + - install_instr_e_recovery_factory_reset + - install_instr_e_recovery_factory_reset_format_data + - install_instr_e_recovery_factory_reset_format_data_validate + - install_instr_e_recovery_back + - install_instr_e_recovery_apply_update + - install_instr_e_recovery_apply_update_from_adb + - install_instr_e_recovery_apply_update_from_adb_wait_for_result + titleKeyIconName: icon-download.png + script: wait-e-recovery-sideload + parameters: + device_id: ${DEVICE_ID} + adb_folder_path: ${ADB_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 101: script_error_waitSideload_101 + f9: + type: load + stepNumber: 10 + nextStepKey: f10 + titleKey: install_instr_eosInstall + instructions: + - install_instr_e_recovery_oneplus_select_recovery + averageTime: 150 + script: install-from-e-recovery + parameters: + device_id: ${DEVICE_ID} + archive_path: ${ARCHIVE_PATH} + adb_folder_path: ${ADB_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 1: script_error_installFromSideload + f10: + type: askAccount + stepNumber: 11 + nextStepKey: f11 + f11: + type: custom + stepNumber: 12 + nextStepKey: end + titleKey: stepTitle_rebootDevice + instructions: + - install_instr_e_recovery_back + - install_instr_e_recovery_reboot + - eAccount_lbl_alreadyAccount + titleKeyIconName: icon-download.png diff --git a/src/main/resources/yaml/OnePlus8Pro_fs.yml b/src/main/resources/yaml/OnePlus8Pro_fs.yml new file mode 100644 index 00000000..46337831 --- /dev/null +++ b/src/main/resources/yaml/OnePlus8Pro_fs.yml @@ -0,0 +1,26 @@ +## Copyright 2022 - 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: Frank Preel +--- +sources: + rom: + url: https://images.ecloud.global/dev/instantnoodlep/e-0.23-r-20220514185543-dev-instantnoodlep.zip + filePath: e-0.23-r-20220514185543-dev-instantnoodlep.zip + twrp: + url: https://images.ecloud.global/dev/instantnoodlep/recovery-e-0.23-r-20220514185543-dev-instantnoodlep.img + filePath: recovery-e-0.23-r-20220514185543-dev-instantnoodlep.img + patch: + url: https://images.ecloud.global/dev/instantnoodlep/e-0.23-r-20220514185543-dev-instantnoodlep.zip + filePath: e-0.23-r-20220514185543-dev-instantnoodlep.zip -- GitLab From 837372bd93a4ec99f31f4d2f04ada6045bf6d8a1 Mon Sep 17 00:00:00 2001 From: frankpreel Date: Wed, 25 May 2022 10:34:16 +0200 Subject: [PATCH 27/53] MSWindows process --- .../windows/oneplus-flashingUnlock.bat | 20 ++++++++++--------- .../windows/pixel-flashingUnlock.bat | 2 +- src/main/resources/yaml/OnePlus8Pro_flash.yml | 2 +- src/main/resources/yaml/OnePlus8Pro_fs.yml | 12 +++++------ 4 files changed, 19 insertions(+), 17 deletions(-) diff --git a/flash-scripts/windows/oneplus-flashingUnlock.bat b/flash-scripts/windows/oneplus-flashingUnlock.bat index f1e327ef..74fc6be1 100644 --- a/flash-scripts/windows/oneplus-flashingUnlock.bat +++ b/flash-scripts/windows/oneplus-flashingUnlock.bat @@ -40,25 +40,27 @@ IF not defined %FASTBOOT_FOLDER_PATH ( SET FASTBOOT_PATH="%FASTBOOT_FOLDER_PATH%fastboot" %FASTBOOT_PATH% getvar unlocked 2>&1 | findstr "yes" -if errorlevel 0 ( +if %errorlevel% == 0 ( echo "The device is unlocked" - %FASTBOOT_PATH% -s %DEVICE_ID% reboot - timeout 30 >nul 2>&1 + ping 192.0.2.1 -n 1 -w 10000 >nul + %FASTBOOT_PATH% reboot exit /b 0 ) else ( echo "The device is locked" - %FASTBOOT_PATH% -s %DEVICE_ID% oem unlock + %FASTBOOT_PATH% flashing unlock if errorlevel 1 ( exit /b 2) + echo "Unlocked..." ) :fastboot_detect -%FASTBOOT_PATH% getvar unlocked 2>&1 | findstr "yes" -if errorLevel 1 ( - echo "..." - timeout 2 >nul 2>&1 +ping 192.0.2.1 -n 1 -w 500 >nul +%FASTBOOT_PATH% devices 2>&1 | findstr "fastboot" +if %errorLevel% == 0 ( goto :fastboot_detect ) -call fastboot_detect +::call fastboot_detect + +echo "Unlocked continue process" exit /b 0 diff --git a/flash-scripts/windows/pixel-flashingUnlock.bat b/flash-scripts/windows/pixel-flashingUnlock.bat index cf1a04ef..49bc1bb1 100644 --- a/flash-scripts/windows/pixel-flashingUnlock.bat +++ b/flash-scripts/windows/pixel-flashingUnlock.bat @@ -40,7 +40,7 @@ IF not defined %FASTBOOT_FOLDER_PATH ( SET FASTBOOT_PATH="%FASTBOOT_FOLDER_PATH%fastboot" %FASTBOOT_PATH% getvar unlocked 2>&1 | findstr "yes" -if errorlevel 0 ( +if %errorlevel% == 0 ( echo "The device is unlocked" timeout 1 >nul 2>&1 exit /b 0 diff --git a/src/main/resources/yaml/OnePlus8Pro_flash.yml b/src/main/resources/yaml/OnePlus8Pro_flash.yml index 4ac402a3..2afad366 100644 --- a/src/main/resources/yaml/OnePlus8Pro_flash.yml +++ b/src/main/resources/yaml/OnePlus8Pro_flash.yml @@ -156,7 +156,7 @@ steps: script: install-from-e-recovery parameters: device_id: ${DEVICE_ID} - archive_path: ${PATCH_PATH} + patch_path: ${PATCH_PATH} adb_folder_path: ${ADB_FOLDER_PATH} okCodes: 0: ~ diff --git a/src/main/resources/yaml/OnePlus8Pro_fs.yml b/src/main/resources/yaml/OnePlus8Pro_fs.yml index 46337831..f11b3b96 100644 --- a/src/main/resources/yaml/OnePlus8Pro_fs.yml +++ b/src/main/resources/yaml/OnePlus8Pro_fs.yml @@ -16,11 +16,11 @@ --- sources: rom: - url: https://images.ecloud.global/dev/instantnoodlep/e-0.23-r-20220514185543-dev-instantnoodlep.zip - filePath: e-0.23-r-20220514185543-dev-instantnoodlep.zip + url: https://images.ecloud.global/stable/instantnoodlep/e-1.0-r-20220523188155-stable-instantnoodlep.zip + filePath: e-1.0-r-20220523188155-stable-instantnoodlep.zip twrp: - url: https://images.ecloud.global/dev/instantnoodlep/recovery-e-0.23-r-20220514185543-dev-instantnoodlep.img - filePath: recovery-e-0.23-r-20220514185543-dev-instantnoodlep.img + url: https://images.ecloud.global/stable/instantnoodlep/recovery-e-1.0-r-20220523188155-stable-instantnoodlep.img + filePath: recovery-e-1.0-r-20220523188155-stable-instantnoodlep.img patch: - url: https://images.ecloud.global/dev/instantnoodlep/e-0.23-r-20220514185543-dev-instantnoodlep.zip - filePath: e-0.23-r-20220514185543-dev-instantnoodlep.zip + url: https://images.ecloud.global/stable/copy-partitions-20210323_1922.zip + filePath: copy-partitions-20210323_1922.zip -- GitLab From 56c6ff49d466d2943796dc41412fa422285064f3 Mon Sep 17 00:00:00 2001 From: frankpreel Date: Wed, 25 May 2022 10:48:33 +0200 Subject: [PATCH 28/53] Emarald adjustement --- .../subcontrollers/DeviceDetectedController.java | 10 +++++++++- .../easy/installer/tasks/DeviceDetectionTask.java | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/main/java/ecorp/easy/installer/controllers/subcontrollers/DeviceDetectedController.java b/src/main/java/ecorp/easy/installer/controllers/subcontrollers/DeviceDetectedController.java index 916cb4c7..bdff37e3 100644 --- a/src/main/java/ecorp/easy/installer/controllers/subcontrollers/DeviceDetectedController.java +++ b/src/main/java/ecorp/easy/installer/controllers/subcontrollers/DeviceDetectedController.java @@ -106,11 +106,19 @@ public class DeviceDetectedController extends AbstractSubController{ return; } - if("Teracube_2e".equals(phone.getAdbDevice()) || "2e".equals(phone.getAdbDevice())){ + if("2e".equals(phone.getAdbDevice())){ displayIncompatibleDeviceFound(phone.getAdbModel()); return; } + if("emerald".equals(phone.getAdbDevice()) || + "Teracube_2e".equals(phone.getAdbDevice()) ){ + final String serial = phone.getSerialNo(); + if ( ! serial.startsWith("202111") ) { + displayIncompatibleDeviceFound(phone.getAdbModel()); + return; + } + } //If device is unauthorized if(!phone.isAdbAuthorized()){ displayUnauthorizedDeviceFound(); diff --git a/src/main/java/ecorp/easy/installer/tasks/DeviceDetectionTask.java b/src/main/java/ecorp/easy/installer/tasks/DeviceDetectionTask.java index 0226c61e..b5d64f8b 100644 --- a/src/main/java/ecorp/easy/installer/tasks/DeviceDetectionTask.java +++ b/src/main/java/ecorp/easy/installer/tasks/DeviceDetectionTask.java @@ -146,7 +146,7 @@ public class DeviceDetectionTask extends Task{ }else if(stringPart.contains("device:")){ logger.debug(" \"device\" keyword has been found"); String device = stringPart.substring("device:".length() ); - if(device.equals("2e")) device ="Teracube_2e"; + if(device.equals("Teracube_2e")) device ="emerald"; //if(device.equals("k63v2_64_bsp")) device="GS290"; //bad idea. Device not really compatible. result.setAdbDevice(device); } -- GitLab From 9ef0129c7306520ccb49556fe8651731167748c8 Mon Sep 17 00:00:00 2001 From: Frank Preel Date: Wed, 25 May 2022 14:19:54 +0200 Subject: [PATCH 29/53] MacOs compatibility --- flash-scripts/linux/emerald-wait-reboot-from-fastboot.sh | 2 +- flash-scripts/linux/fp3_oem-unlock.sh | 2 +- flash-scripts/linux/gs290-wait-reboot-from-fastboot.sh | 2 +- flash-scripts/linux/reboot-fastboot.sh | 4 ++-- flash-scripts/linux/verify-heimdall.sh | 2 +- flash-scripts/linux/wait-fastboot-unlocked.sh | 4 ++-- flash-scripts/linux/wait-fastboot.sh | 4 ++-- flash-scripts/linux/wait-reboot-from-fastboot.sh | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/flash-scripts/linux/emerald-wait-reboot-from-fastboot.sh b/flash-scripts/linux/emerald-wait-reboot-from-fastboot.sh index b11780c2..99b92318 100755 --- a/flash-scripts/linux/emerald-wait-reboot-from-fastboot.sh +++ b/flash-scripts/linux/emerald-wait-reboot-from-fastboot.sh @@ -46,5 +46,5 @@ fi #Then we wait that it left this state while [ "$($FASTBOOT_PATH devices | grep -q fastboot; echo $?)" = 0 ] do - sleep 1s + sleep 1 done \ No newline at end of file diff --git a/flash-scripts/linux/fp3_oem-unlock.sh b/flash-scripts/linux/fp3_oem-unlock.sh index 60a90991..c6600442 100755 --- a/flash-scripts/linux/fp3_oem-unlock.sh +++ b/flash-scripts/linux/fp3_oem-unlock.sh @@ -33,5 +33,5 @@ then exit 10 fi -sleep 10s +sleep 10 echo "OEM unlocked" \ No newline at end of file diff --git a/flash-scripts/linux/gs290-wait-reboot-from-fastboot.sh b/flash-scripts/linux/gs290-wait-reboot-from-fastboot.sh index 17621c17..cda72c76 100755 --- a/flash-scripts/linux/gs290-wait-reboot-from-fastboot.sh +++ b/flash-scripts/linux/gs290-wait-reboot-from-fastboot.sh @@ -46,5 +46,5 @@ fi #Then we wait that it left this state while [ "$($FASTBOOT_PATH devices | grep -q fastboot; echo $?)" = 0 ] do - sleep 1s + sleep 1 done \ No newline at end of file diff --git a/flash-scripts/linux/reboot-fastboot.sh b/flash-scripts/linux/reboot-fastboot.sh index 8f11b149..263cc6fb 100755 --- a/flash-scripts/linux/reboot-fastboot.sh +++ b/flash-scripts/linux/reboot-fastboot.sh @@ -55,9 +55,9 @@ fi # Wait device to reboot in fastboot mode while [ "$($FASTBOOT_PATH devices | grep -q fastboot; echo $?)" = 1 ] do - sleep 3s + sleep 3 done #TODO: we should handle the case where this doesn't work -sleep 5s +sleep 5 echo "fastboot mode detected" \ No newline at end of file diff --git a/flash-scripts/linux/verify-heimdall.sh b/flash-scripts/linux/verify-heimdall.sh index dd180a29..db8f35b9 100755 --- a/flash-scripts/linux/verify-heimdall.sh +++ b/flash-scripts/linux/verify-heimdall.sh @@ -37,5 +37,5 @@ then exit 10 fi -sleep 5s +sleep 5 echo "OEM unlocked" \ No newline at end of file diff --git a/flash-scripts/linux/wait-fastboot-unlocked.sh b/flash-scripts/linux/wait-fastboot-unlocked.sh index 3277f371..589008d3 100755 --- a/flash-scripts/linux/wait-fastboot-unlocked.sh +++ b/flash-scripts/linux/wait-fastboot-unlocked.sh @@ -30,8 +30,8 @@ echo "fastboot path: $FASTBOOT_PATH" while [ "$($FASTBOOT_PATH getvar unlocked 2>&1 | grep -q yes; echo $?)" = 1 ] do - sleep 2s + sleep 2 done -sleep 5s +sleep 5 echo "fastboot mode detected, phone is unlocked" \ No newline at end of file diff --git a/flash-scripts/linux/wait-fastboot.sh b/flash-scripts/linux/wait-fastboot.sh index a8dd8b12..b37f02eb 100755 --- a/flash-scripts/linux/wait-fastboot.sh +++ b/flash-scripts/linux/wait-fastboot.sh @@ -30,8 +30,8 @@ echo "fastboot path: $FASTBOOT_PATH" while [ "$($FASTBOOT_PATH devices | grep -q fastboot; echo $?)" = 1 ] do - sleep 1s + sleep 1 done -sleep 5s +sleep 5 echo "fastboot mode detected" \ No newline at end of file diff --git a/flash-scripts/linux/wait-reboot-from-fastboot.sh b/flash-scripts/linux/wait-reboot-from-fastboot.sh index 25d8f093..cb4490b4 100755 --- a/flash-scripts/linux/wait-reboot-from-fastboot.sh +++ b/flash-scripts/linux/wait-reboot-from-fastboot.sh @@ -44,5 +44,5 @@ then exit 102 ; fi #Then we wait that it left this state while [ "$($FASTBOOT_PATH devices | grep -q fastboot; echo $?)" = 0 ] do - sleep 1s + sleep 1 done \ No newline at end of file -- GitLab From cde5a3b59cc3bc2c9a2d5f28210f05db290f8d65 Mon Sep 17 00:00:00 2001 From: Frank Preel Date: Wed, 25 May 2022 14:46:46 +0200 Subject: [PATCH 30/53] Typo fix, If the bootloader is already unlocked the correct process is Vol Down --- src/main/resources/yaml/emerald_flash.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/yaml/emerald_flash.yml b/src/main/resources/yaml/emerald_flash.yml index a28d9b5b..48161c36 100644 --- a/src/main/resources/yaml/emerald_flash.yml +++ b/src/main/resources/yaml/emerald_flash.yml @@ -54,7 +54,7 @@ steps: titleKey: stepTitle_oemUnlock titleIconName: icon-download.png instructions: - - install_instr_pressVolDownToAcceptOEMUnlocking + - install_instr_pressVolUpToAcceptOEMUnlocking - install_instr_unlockingOem - install_instr_waitInstallStartAuto script: emerald-flashingUnlock -- GitLab From 41d4481161ae48125be48ce29ae2fa864d6da6dd Mon Sep 17 00:00:00 2001 From: Frank Preel Date: Wed, 25 May 2022 15:01:24 +0200 Subject: [PATCH 31/53] Test build server --- .gitlab-ci.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f8f2f664..22d9fd81 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -84,6 +84,18 @@ build-windows: - Easy-installer-setup.exe - Easy-installer-setup.exe.sha256sum +build-macos: + image: registry.gitlab.e.foundation/e/devices/easy-installer:stable + stage: build + variables: + GIT_SUBMODULE_STRATEGY: recursive + script: + - ./gradlew jlink + artifacts: + name: "easy-installer-mac" + paths: + - build/image/* + build-aur: image: $CONTAINER_IMAGE/aur:$CONTAINER_TAG stage: build -- GitLab From 60e6b920c8719736afffa120907f4639c67174b6 Mon Sep 17 00:00:00 2001 From: Frank Preel Date: Wed, 25 May 2022 15:18:53 +0200 Subject: [PATCH 32/53] Get only mac folder --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 22d9fd81..fba0a807 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -94,7 +94,7 @@ build-macos: artifacts: name: "easy-installer-mac" paths: - - build/image/* + - build/image/easy-installer-mac/* build-aur: image: $CONTAINER_IMAGE/aur:$CONTAINER_TAG -- GitLab From c456bf09c03d5eccc67d0e58f73371858bf5368f Mon Sep 17 00:00:00 2001 From: Frank Preel Date: Wed, 25 May 2022 16:16:39 +0200 Subject: [PATCH 33/53] Add information and missing key --- src/main/resources/lang/translation.properties | 2 +- src/main/resources/lang/translation_fr_FR.properties | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/resources/lang/translation.properties b/src/main/resources/lang/translation.properties index 4efc051c..1f8f5d3f 100644 --- a/src/main/resources/lang/translation.properties +++ b/src/main/resources/lang/translation.properties @@ -173,7 +173,7 @@ install_instr_enableOEMUnlock=enable 'OEM unlock' install_instr_acceptFactoryReset= You'll have to keep pressing "Power" & "Bixby" & "Volume Down" until you reach "Download mode" once your device is off. When you're ready, accept Factory Reset. install_instr_startDl_pressPowerBixbyVolDown= Keep pressing simultaneously "Power" & "Bixby" & "Volume Down" until a blue screen appear to access Download Mode install_instr_startRec_pressPowerBixbyVolUp= Keep pressing simultaneously "Power" & "Bixby" & "Volume Up" until 'teamwin' screen appears -install_instr_startRec_pressPowerBixbyVolUp_e_reco= Keep pressing simultaneously "Power" & "Bixby" & "Volume Up" until 'E Revovery' screen appears +install_instr_startRec_pressPowerBixbyVolUp_e_reco= Keep pressing simultaneously "Power" & "Bixby" & "Volume Up" until 'E Revovery' screen appears. (Don't give up when the screen goes black) install_instr_leaveDl_pressPowerBixbyVolDown= Keep pressing simultaneously "Power" & "Bixby" & "Volume Down" until device turns off install_instr_update_stockrom= Update your device to the latest version install_instr_connectTowifi= Connect your device to Wi-fi diff --git a/src/main/resources/lang/translation_fr_FR.properties b/src/main/resources/lang/translation_fr_FR.properties index fb2ca371..643c14a6 100644 --- a/src/main/resources/lang/translation_fr_FR.properties +++ b/src/main/resources/lang/translation_fr_FR.properties @@ -271,6 +271,7 @@ script_error_installFromFastboot_1=Les données utilisateur n'ont pas pu être e script_error_waitFastboot_1=Aucun appareil en « fastboot mode » détecté install_instr_leaveDl_pressPowerBixbyVolDown=Continuez d'appuyer simultanément sur les boutons « Marche/Arrêt » & « Bixby » & « Volume moins » jusqu'à ce que l'appareil s'éteigne install_instr_startRec_pressPowerBixbyVolUp=Continuez d'appuyer simultanément sur les boutons « Marche/Arrêt » & « Bixby » & « Volume plus » jusqu'à ce qu'un écran avec la mention « teamwin » apparaisse +install_instr_startRec_pressPowerBixbyVolUp_e_reco= Continuez d'appuyer simultanément sur les boutons « Marche/Arrêt » & « Bixby » & « Volume plus » jusqu'à ce qu'un écran avec la mention « e Recovery » apparaisse (Ne lachez pas quand l'écran deviendra noir) install_instr_startDl_pressPowerBixbyVolDown=Continuez d'appuyer simultanément sur les boutons « Marche/Arrêt » & « Bixby » & « Volume moins » jusqu'à ce qu'un écran bleu apparaisse pour accéder au Mode de Téléchargement install_instr_startFastbootFromOptions=Depuis le menu des options, utilisez « Volume plus/moins » pour sélectionner "Fastboot" et le bouton « Marche/Arrêt » pour confirmer install_instr_startFastboot=Continuez d'appuyer simultanément sur les boutons « Marche/Arrêt » & « Volume moins » jusqu'à ce qu'un écran avec un "START" en vert apparaisse pour accéder au Fastboot Mode -- GitLab From d52278b4e0ecafbf16151a594cf11721ab67ffa2 Mon Sep 17 00:00:00 2001 From: Frank Preel Date: Sun, 29 May 2022 18:41:21 +0200 Subject: [PATCH 34/53] Stable URLs --- src/main/resources/yaml/OnePlus7T_fs.yml | 12 ++++++------ src/main/resources/yaml/OnePlus8Pro_fs.yml | 8 ++++---- src/main/resources/yaml/OnePlus8_fs.yml | 12 ++++++------ src/main/resources/yaml/coral_fs.yml | 8 ++++---- src/main/resources/yaml/flame_fs.yml | 8 ++++---- src/main/resources/yaml/sunfish_fs.yml | 8 ++++---- 6 files changed, 28 insertions(+), 28 deletions(-) diff --git a/src/main/resources/yaml/OnePlus7T_fs.yml b/src/main/resources/yaml/OnePlus7T_fs.yml index b8f827e1..e2c658e1 100644 --- a/src/main/resources/yaml/OnePlus7T_fs.yml +++ b/src/main/resources/yaml/OnePlus7T_fs.yml @@ -16,11 +16,11 @@ --- sources: rom: - url: https://images.ecloud.global/dev/hotdogb/e-0.23-r-20220405175826-dev-hotdogb.zip - filePath: e-0.23-r-20220405175826-dev-hotdogb.zip + url: https://images.ecloud.global/stable/hotdogb/e-latest-r-hotdogb.zip + filePath: e-latest-r-hotdogb.zip twrp: - url: https://images.ecloud.global/dev/hotdogb/recovery-e-0.23-r-20220405175826-dev-hotdogb.img - filePath: recovery-e-0.23-r-20220405175826-dev-hotdogb.img + url: https://images.ecloud.global/stable/hotdogb/recovery-e-latest-r-hotdogb.zip + filePath: recovery-e-latest-r-hotdogb.zip patch: - url: https://images.ecloud.global/dev/hotdogb/e-0.23-r-20220405175826-dev-hotdogb.zip - filePath: e-0.23-r-20220405175826-dev-hotdogb.zip + url: https://images.ecloud.global/stable/copy-partitions-20210323_1922.zip + filePath: copy-partitions-20210323_1922.zip diff --git a/src/main/resources/yaml/OnePlus8Pro_fs.yml b/src/main/resources/yaml/OnePlus8Pro_fs.yml index f11b3b96..d2bb3d8d 100644 --- a/src/main/resources/yaml/OnePlus8Pro_fs.yml +++ b/src/main/resources/yaml/OnePlus8Pro_fs.yml @@ -16,11 +16,11 @@ --- sources: rom: - url: https://images.ecloud.global/stable/instantnoodlep/e-1.0-r-20220523188155-stable-instantnoodlep.zip - filePath: e-1.0-r-20220523188155-stable-instantnoodlep.zip + url: https://images.ecloud.global/stable/instantnoodlep/e-latest-r-instantnoodlep.zip + filePath: e-latest-r-instantnoodlep.zip twrp: - url: https://images.ecloud.global/stable/instantnoodlep/recovery-e-1.0-r-20220523188155-stable-instantnoodlep.img - filePath: recovery-e-1.0-r-20220523188155-stable-instantnoodlep.img + url: https://images.ecloud.global/stable/instantnoodlep/recovery-e-latest-r-instantnoodlep.zip + filePath: recovery-e-latest-r-instantnoodlep.zip patch: url: https://images.ecloud.global/stable/copy-partitions-20210323_1922.zip filePath: copy-partitions-20210323_1922.zip diff --git a/src/main/resources/yaml/OnePlus8_fs.yml b/src/main/resources/yaml/OnePlus8_fs.yml index 007c6082..fc955009 100644 --- a/src/main/resources/yaml/OnePlus8_fs.yml +++ b/src/main/resources/yaml/OnePlus8_fs.yml @@ -16,11 +16,11 @@ --- sources: rom: - url: https://images.ecloud.global/dev/instantnoodle/e-0.23-r-20220405175826-dev-instantnoodle.zip - filePath: e-0.23-r-20220405175826-dev-instantnoodle.zip + url: https://images.ecloud.global/stable/instantnoodle/e-latest-r-instantnoodle.zip + filePath: e-latest-r-instantnoodle.zip twrp: - url: https://images.ecloud.global/dev/instantnoodle/recovery-e-0.23-r-20220405175826-dev-instantnoodle.img - filePath: recovery-e-0.23-r-20220405175826-dev-instantnoodle.img + url: https://images.ecloud.global/stable/instantnoodle/recovery-e-latest-r-instantnoodle.zip + filePath: recovery-e-latest-r-instantnoodle.zip patch: - url: https://images.ecloud.global/dev/instantnoodle/e-0.23-r-20220405175826-dev-instantnoodle.zip - filePath: e-0.23-r-20220405175826-dev-instantnoodle.zip + url: https://images.ecloud.global/stable/copy-partitions-20210323_1922.zip + filePath: copy-partitions-20210323_1922.zip diff --git a/src/main/resources/yaml/coral_fs.yml b/src/main/resources/yaml/coral_fs.yml index 64099252..e606738a 100644 --- a/src/main/resources/yaml/coral_fs.yml +++ b/src/main/resources/yaml/coral_fs.yml @@ -16,9 +16,9 @@ --- sources: rom: - url: https://images.ecloud.global/dev/coral/e-0.23-r-20220404175826-dev-coral.zip - filePath: e-0.23-r-20220404175826-dev-coral.zip + url: https://images.ecloud.global/stable/coral/e-latest-r-coral.zip + filePath: e-latest-r-coral.zip twrp: - url: https://images.ecloud.global/dev/coral/recovery-e-0.23-r-20220404175826-dev-coral.img - filePath: recovery-e-0.23-r-20220404175826-dev-coral.img + url: https://images.ecloud.global/stable/coral/recovery-e-latest-r-coral.zip + filePath: recovery-e-latest-r-coral.zip diff --git a/src/main/resources/yaml/flame_fs.yml b/src/main/resources/yaml/flame_fs.yml index da7188ee..fe450bea 100644 --- a/src/main/resources/yaml/flame_fs.yml +++ b/src/main/resources/yaml/flame_fs.yml @@ -16,8 +16,8 @@ --- sources: rom: - url: https://images.ecloud.global/dev/flame/e-0.23-r-20220404175826-dev-flame.zip - filePath: e-0.23-r-20220404175826-dev-flame.zip + url: https://images.ecloud.global/stable/flame/e-latest-r-flame.zip + filePath: e-latest-r-flame.zip twrp: - url: https://images.ecloud.global/dev/flame/recovery-e-0.23-r-20220404175826-dev-flame.img - filePath: recovery-e-0.23-r-20220404175826-dev-flame.img + url: https://images.ecloud.global/stable/flame/recovery-e-latest-r-flame.zip + filePath: recovery-e-latest-r-flame.zip diff --git a/src/main/resources/yaml/sunfish_fs.yml b/src/main/resources/yaml/sunfish_fs.yml index 3cf0671c..6565f9f4 100644 --- a/src/main/resources/yaml/sunfish_fs.yml +++ b/src/main/resources/yaml/sunfish_fs.yml @@ -16,8 +16,8 @@ --- sources: rom: - url: https://images.ecloud.global/dev/sunfish/e-0.23-r-20220405175826-dev-sunfish.zip - filePath: e-0.23-r-20220405175826-dev-sunfish.zip + url: https://images.ecloud.global/stable/sunfish/e-latest-r-sunfish.zip + filePath: e-latest-r-sunfish.zip twrp: - url: https://images.ecloud.global/dev/sunfish/recovery-e-0.23-r-20220405175826-dev-sunfish.img - filePath: recovery-e-0.23-r-20220405175826-dev-sunfish.img + url: https://images.ecloud.global/stable/sunfish/recovery-e-latest-r-sunfish.zip + filePath: recovery-e-latest-r-sunfish.zip -- GitLab From 42c7c1bd657572cd44e54a2709418316c8ffbf5e Mon Sep 17 00:00:00 2001 From: Frank Preel Date: Mon, 30 May 2022 08:58:28 +0200 Subject: [PATCH 35/53] One plus 7 Pro --- .../easy/installer/helpers/DeviceHelper.java | 2 +- src/main/resources/yaml/OnePlus7Pro_flash.yml | 218 ++++++++++++++++++ src/main/resources/yaml/OnePlus7Pro_fs.yml | 26 +++ 3 files changed, 245 insertions(+), 1 deletion(-) create mode 100644 src/main/resources/yaml/OnePlus7Pro_flash.yml create mode 100644 src/main/resources/yaml/OnePlus7Pro_fs.yml diff --git a/src/main/java/ecorp/easy/installer/helpers/DeviceHelper.java b/src/main/java/ecorp/easy/installer/helpers/DeviceHelper.java index 3bf5cd2a..b4db7789 100644 --- a/src/main/java/ecorp/easy/installer/helpers/DeviceHelper.java +++ b/src/main/java/ecorp/easy/installer/helpers/DeviceHelper.java @@ -56,7 +56,7 @@ public class DeviceHelper { put("sunfish", "0015"); put("flame", "0016"); put("coral", "0017"); - put("keyword", "0018"); + put("keyword", "0018"); //OnePlus 7 Pro }}; /** diff --git a/src/main/resources/yaml/OnePlus7Pro_flash.yml b/src/main/resources/yaml/OnePlus7Pro_flash.yml new file mode 100644 index 00000000..4ac402a3 --- /dev/null +++ b/src/main/resources/yaml/OnePlus7Pro_flash.yml @@ -0,0 +1,218 @@ +## Copyright 2022 - 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: Frank Preel +--- +stepsCount: 12 +steps: + f0: + type: custom + stepNumber: 1 + nextStepKey: f1 + titleKey: stepTitle_enableOemUnlock + titleIconName: icon-download.png + instructions: + - install_instr_openSettings + - install_instr_searchOEM + - install_instr_enableOEMUnlocking + - install_instr_acceptOEMUnlockWarning + - install_instr_onceDoneThenContinue + f1: + type: load + stepNumber: 2 + nextStepKey: f2 + titleKey: stepTitle_rebootBootloader + instructions: + - install_instr_rebootingOnBootloader + averageTime: 10 + script: reboot-fastboot + parameters: + device_id: ${DEVICE_ID} + fastboot_folder_path: ${ADB_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 1: script_error_unknown + 10: script_error_cantRebootBootloader + 101: script_error_serialNumber_missing + 102: script_error_fastboot_path_missing + f2: + type: custom-executable + stepNumber: 3 + nextStepKey: f3 + titleKey: stepTitle_oemUnlock + titleIconName: icon-download.png + instructions: + - install_instr_unlockingOem + - install_instr_selectUnlockBootloader + - install_instr_unlockBootloader + - install_instr_unlockBootloader_already + script: oneplus-flashingUnlock + parameters: + device_id: ${DEVICE_ID} + fastboot_folder_path: ${ADB_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 1: script_error_unknown + 2: script_error_fastboot_flashingUnlock_failed + 101: script_error_serialNumber_missing + 102: script_error_fastboot_path_missing + f3: + type: custom + stepNumber: 4 + nextStepKey: f4 + titleKey: devMode_mTitle_main + titleIconName: icon-download.png + instructions: + - devMode_main + - devMode_lbl + - devMode_instr_settings + - devMode_instr_build + - devMode_instr_tap7 + - debugADB_instr_settings + - debugADB_instr_search + - debugADB_instr_androidDebug + - debugADB_instr_debugOn + - debugADB_instr_tapeOK + - debugADB_instr_acceptCertificate + f4: + type: load + stepNumber: 5 + nextStepKey: f5 + titleKey: stepTitle_rebootBootloader + instructions: + - install_instr_rebootingOnBootloader + averageTime: 8 + script: reboot-fastboot + parameters: + device_id: ${DEVICE_ID} + fastboot_folder_path: ${ADB_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 1: script_error_unknown + 10: script_error_cantRebootBootloader + 101: script_error_serialNumber_missing + 102: script_error_fastboot_path_missing + f5: + type: load + stepNumber: 6 + nextStepKey: f6 + titleKey: stepTitle4On7 + instructions: + - install_instr_recoveryInstall + averageTime: 3 + script: install-e-recovery + parameters: + fastboot_folder_path: ${ADB_FOLDER_PATH} + twrp_image_path: ${TWRP_IMAGE_PATH} + okCodes: + 0: ~ + koCodes: + 1: script_error_unknown + 101: script_error_installRecovery_101 + f6: + type: custom-executable + stepNumber: 7 + nextStepKey: f7 + titleKey: stepTitle5On7 + instructions: + - install_instr_choose_e_recovery_select + - install_instr_choose_e_recovery_select_details + - install_instr_choose_e_recovery_validate + - install_instr_choose_e_recovery_validate_wait_for_result + - install_instr_e_recovery_apply_update + - install_instr_e_recovery_apply_update_from_adb + - install_instr_e_recovery_apply_update_from_adb_wait_for_result + titleKeyIconName: icon-download.png + script: wait-e-recovery-sideload + parameters: + device_id: ${DEVICE_ID} + adb_folder_path: ${ADB_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 101: script_error_waitSideload_101 + f7: + type: load + stepNumber: 8 + nextStepKey: f8 + titleKey: install_instr_eosInstall + instructions: + - install_instr_e_recovery_oneplus_select_recovery + averageTime: 150 + script: install-from-e-recovery + parameters: + device_id: ${DEVICE_ID} + archive_path: ${PATCH_PATH} + adb_folder_path: ${ADB_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 1: script_error_installFromSideload + f8: + type: custom-executable + stepNumber: 9 + nextStepKey: f9 + titleKey: stepTitle_installation + instructions: + - install_instr_e_recovery_back + - install_instr_e_recovery_factory_reset + - install_instr_e_recovery_factory_reset_format_data + - install_instr_e_recovery_factory_reset_format_data_validate + - install_instr_e_recovery_back + - install_instr_e_recovery_apply_update + - install_instr_e_recovery_apply_update_from_adb + - install_instr_e_recovery_apply_update_from_adb_wait_for_result + titleKeyIconName: icon-download.png + script: wait-e-recovery-sideload + parameters: + device_id: ${DEVICE_ID} + adb_folder_path: ${ADB_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 101: script_error_waitSideload_101 + f9: + type: load + stepNumber: 10 + nextStepKey: f10 + titleKey: install_instr_eosInstall + instructions: + - install_instr_e_recovery_oneplus_select_recovery + averageTime: 150 + script: install-from-e-recovery + parameters: + device_id: ${DEVICE_ID} + archive_path: ${ARCHIVE_PATH} + adb_folder_path: ${ADB_FOLDER_PATH} + okCodes: + 0: ~ + koCodes: + 1: script_error_installFromSideload + f10: + type: askAccount + stepNumber: 11 + nextStepKey: f11 + f11: + type: custom + stepNumber: 12 + nextStepKey: end + titleKey: stepTitle_rebootDevice + instructions: + - install_instr_e_recovery_back + - install_instr_e_recovery_reboot + - eAccount_lbl_alreadyAccount + titleKeyIconName: icon-download.png diff --git a/src/main/resources/yaml/OnePlus7Pro_fs.yml b/src/main/resources/yaml/OnePlus7Pro_fs.yml new file mode 100644 index 00000000..ec95547c --- /dev/null +++ b/src/main/resources/yaml/OnePlus7Pro_fs.yml @@ -0,0 +1,26 @@ +## Copyright 2022 - 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: Frank Preel +--- +sources: + rom: + url: https://images.ecloud.global/stable/guacamole/e-latest-r-guacamole.zip + filePath: e-latest-r-guacamole.zip + twrp: + url: https://images.ecloud.global/stable/guacamole/recovery-e-latest-r-guacamole.zip + filePath: recovery-e-latest-r-guacamole.zip + patch: + url: https://images.ecloud.global/stable/copy-partitions-20210323_1922.zip + filePath: copy-partitions-20210323_1922.zip -- GitLab From 9a55eec111656f736a3c5a20f26af30cabc7fa80 Mon Sep 17 00:00:00 2001 From: Frank Preel Date: Mon, 30 May 2022 12:20:29 +0200 Subject: [PATCH 36/53] Typo --- src/main/resources/yaml/OnePlus7Pro_fs.yml | 4 ++-- src/main/resources/yaml/OnePlus7T_fs.yml | 4 ++-- src/main/resources/yaml/OnePlus8Pro_fs.yml | 4 ++-- src/main/resources/yaml/OnePlus8_fs.yml | 4 ++-- src/main/resources/yaml/coral_fs.yml | 4 ++-- src/main/resources/yaml/flame_fs.yml | 4 ++-- src/main/resources/yaml/sunfish_fs.yml | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/main/resources/yaml/OnePlus7Pro_fs.yml b/src/main/resources/yaml/OnePlus7Pro_fs.yml index ec95547c..db6b6d90 100644 --- a/src/main/resources/yaml/OnePlus7Pro_fs.yml +++ b/src/main/resources/yaml/OnePlus7Pro_fs.yml @@ -19,8 +19,8 @@ sources: url: https://images.ecloud.global/stable/guacamole/e-latest-r-guacamole.zip filePath: e-latest-r-guacamole.zip twrp: - url: https://images.ecloud.global/stable/guacamole/recovery-e-latest-r-guacamole.zip - filePath: recovery-e-latest-r-guacamole.zip + url: https://images.ecloud.global/stable/guacamole/recovery-e-latest-r-guacamole.img + filePath: recovery-e-latest-r-guacamole.img patch: url: https://images.ecloud.global/stable/copy-partitions-20210323_1922.zip filePath: copy-partitions-20210323_1922.zip diff --git a/src/main/resources/yaml/OnePlus7T_fs.yml b/src/main/resources/yaml/OnePlus7T_fs.yml index e2c658e1..7dc82044 100644 --- a/src/main/resources/yaml/OnePlus7T_fs.yml +++ b/src/main/resources/yaml/OnePlus7T_fs.yml @@ -19,8 +19,8 @@ sources: url: https://images.ecloud.global/stable/hotdogb/e-latest-r-hotdogb.zip filePath: e-latest-r-hotdogb.zip twrp: - url: https://images.ecloud.global/stable/hotdogb/recovery-e-latest-r-hotdogb.zip - filePath: recovery-e-latest-r-hotdogb.zip + url: https://images.ecloud.global/stable/hotdogb/recovery-e-latest-r-hotdogb.img + filePath: recovery-e-latest-r-hotdogb.img patch: url: https://images.ecloud.global/stable/copy-partitions-20210323_1922.zip filePath: copy-partitions-20210323_1922.zip diff --git a/src/main/resources/yaml/OnePlus8Pro_fs.yml b/src/main/resources/yaml/OnePlus8Pro_fs.yml index d2bb3d8d..7ad379d6 100644 --- a/src/main/resources/yaml/OnePlus8Pro_fs.yml +++ b/src/main/resources/yaml/OnePlus8Pro_fs.yml @@ -19,8 +19,8 @@ sources: url: https://images.ecloud.global/stable/instantnoodlep/e-latest-r-instantnoodlep.zip filePath: e-latest-r-instantnoodlep.zip twrp: - url: https://images.ecloud.global/stable/instantnoodlep/recovery-e-latest-r-instantnoodlep.zip - filePath: recovery-e-latest-r-instantnoodlep.zip + url: https://images.ecloud.global/stable/instantnoodlep/recovery-e-latest-r-instantnoodlep.img + filePath: recovery-e-latest-r-instantnoodlep.img patch: url: https://images.ecloud.global/stable/copy-partitions-20210323_1922.zip filePath: copy-partitions-20210323_1922.zip diff --git a/src/main/resources/yaml/OnePlus8_fs.yml b/src/main/resources/yaml/OnePlus8_fs.yml index fc955009..e6c4854f 100644 --- a/src/main/resources/yaml/OnePlus8_fs.yml +++ b/src/main/resources/yaml/OnePlus8_fs.yml @@ -19,8 +19,8 @@ sources: url: https://images.ecloud.global/stable/instantnoodle/e-latest-r-instantnoodle.zip filePath: e-latest-r-instantnoodle.zip twrp: - url: https://images.ecloud.global/stable/instantnoodle/recovery-e-latest-r-instantnoodle.zip - filePath: recovery-e-latest-r-instantnoodle.zip + url: https://images.ecloud.global/stable/instantnoodle/recovery-e-latest-r-instantnoodle.img + filePath: recovery-e-latest-r-instantnoodle.img patch: url: https://images.ecloud.global/stable/copy-partitions-20210323_1922.zip filePath: copy-partitions-20210323_1922.zip diff --git a/src/main/resources/yaml/coral_fs.yml b/src/main/resources/yaml/coral_fs.yml index e606738a..3d0d6531 100644 --- a/src/main/resources/yaml/coral_fs.yml +++ b/src/main/resources/yaml/coral_fs.yml @@ -19,6 +19,6 @@ sources: url: https://images.ecloud.global/stable/coral/e-latest-r-coral.zip filePath: e-latest-r-coral.zip twrp: - url: https://images.ecloud.global/stable/coral/recovery-e-latest-r-coral.zip - filePath: recovery-e-latest-r-coral.zip + url: https://images.ecloud.global/stable/coral/recovery-e-latest-r-coral.img + filePath: recovery-e-latest-r-coral.img diff --git a/src/main/resources/yaml/flame_fs.yml b/src/main/resources/yaml/flame_fs.yml index fe450bea..9aa9dab0 100644 --- a/src/main/resources/yaml/flame_fs.yml +++ b/src/main/resources/yaml/flame_fs.yml @@ -19,5 +19,5 @@ sources: url: https://images.ecloud.global/stable/flame/e-latest-r-flame.zip filePath: e-latest-r-flame.zip twrp: - url: https://images.ecloud.global/stable/flame/recovery-e-latest-r-flame.zip - filePath: recovery-e-latest-r-flame.zip + url: https://images.ecloud.global/stable/flame/recovery-e-latest-r-flame.img + filePath: recovery-e-latest-r-flame.img diff --git a/src/main/resources/yaml/sunfish_fs.yml b/src/main/resources/yaml/sunfish_fs.yml index 6565f9f4..7c415d4a 100644 --- a/src/main/resources/yaml/sunfish_fs.yml +++ b/src/main/resources/yaml/sunfish_fs.yml @@ -19,5 +19,5 @@ sources: url: https://images.ecloud.global/stable/sunfish/e-latest-r-sunfish.zip filePath: e-latest-r-sunfish.zip twrp: - url: https://images.ecloud.global/stable/sunfish/recovery-e-latest-r-sunfish.zip - filePath: recovery-e-latest-r-sunfish.zip + url: https://images.ecloud.global/stable/sunfish/recovery-e-latest-r-sunfish.img + filePath: recovery-e-latest-r-sunfish.img -- GitLab From 05ebb7e5b79a5fa0d23765c6cd643e9f3a0012a4 Mon Sep 17 00:00:00 2001 From: Vincent Bourgmayer Date: Thu, 2 Jun 2022 12:09:18 +0000 Subject: [PATCH 37/53] Apply 1 suggestion(s) to 1 file(s) --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index e98557a7..d53a6f06 100644 --- a/build.gradle +++ b/build.gradle @@ -148,7 +148,7 @@ tasks.jlink { into("${buildDir}/image/${appLauncher}-${windowsPlatform}/bin") include 'heimdall.exe', 'libusb-1.0.dll', 'libgcc_s_seh-1.dll', 'libstdc++-6.dll', 'libwinpthread-1.dll', 'wdi-simple.exe' } - copy { + copy { from('buildSrc/windows/heimdall/Drivers') into("${buildDir}/image/${appLauncher}-${windowsPlatform}/bin") include 'zadig.exe' -- GitLab From b878da28d5a6f868632e2c4f87f5f8ee688dbe09 Mon Sep 17 00:00:00 2001 From: frankpreel Date: Thu, 2 Jun 2022 14:39:14 +0200 Subject: [PATCH 38/53] Update Readme --- README.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e5b45ac8..3ce3ca39 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,19 @@ developer: - Add Android Q support for the model below - star2lte - starlte --Add emerald support +-Add support for + - Teracube 2e + - Pixel 4 + - Pixel 4XL + - Pixel 4a + - Oneplus 7 + - Oneplus 7Pro + - Oneplus 8 + - Oneplus 8Pro +- MacOS support +- Cosmetic bugfix (386) +- Fix username with spaces issue on Windows +- ### v0.13.4-beta (current - unreleased) - Fix Ubuntu build's docker image - by Israel & Omer Akram & Nicolas -- GitLab From 2956b7415c2b5fd591f96e6fc838204193813510 Mon Sep 17 00:00:00 2001 From: Vincent Bourgmayer Date: Thu, 2 Jun 2022 12:44:11 +0000 Subject: [PATCH 39/53] Apply 1 suggestion(s) to 1 file(s) --- .../ecorp/easy/installer/EasyInstaller.java | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/src/main/java/ecorp/easy/installer/EasyInstaller.java b/src/main/java/ecorp/easy/installer/EasyInstaller.java index e6b48705..2d393e1e 100644 --- a/src/main/java/ecorp/easy/installer/EasyInstaller.java +++ b/src/main/java/ecorp/easy/installer/EasyInstaller.java @@ -77,27 +77,6 @@ public class EasyInstaller extends Application { Scene scene = new Scene(root); stage.setTitle(i18n.getString("appTitle")+AppConstants.APP_VERSION); - - - - - - /* - try { - MenuBar mb = (MenuBar) root.getChildrenUnmodifiable().get(1); - if( System.getProperty("os.name","UNKNOWN").equals("Mac OS X")) { - logger.debug("Detected Mac OS."); - mb.setUseSystemMenuBar(true); - - - - } else { - mb.setVisible(false); - } - } catch (Exception e) { - logger.debug("Error - cannot find menu bar"); - }*/ - stage.setScene(scene); stage.setResizable(true); -- GitLab From e93c61277cf6e39ce7b6ecc787ca5156d07d2dfe Mon Sep 17 00:00:00 2001 From: Vincent Bourgmayer Date: Thu, 2 Jun 2022 12:45:18 +0000 Subject: [PATCH 40/53] Apply 1 suggestion(s) to 1 file(s) --- src/main/java/ecorp/easy/installer/EasyInstaller.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/ecorp/easy/installer/EasyInstaller.java b/src/main/java/ecorp/easy/installer/EasyInstaller.java index 2d393e1e..9dc5986b 100644 --- a/src/main/java/ecorp/easy/installer/EasyInstaller.java +++ b/src/main/java/ecorp/easy/installer/EasyInstaller.java @@ -65,8 +65,8 @@ public class EasyInstaller extends Application { logger.debug("language = {}, country = {} ", currentLocale.getLanguage(), currentLocale.getCountry()); //Load main view - URL r = getClass().getResource(FXML_PATH+"mainWindow.fxml"); - FXMLLoader loader = new FXMLLoader(r); + final URL fxmlPath = getClass().getResource(FXML_PATH+"mainWindow.fxml"); + final FXMLLoader loader = new FXMLLoader(fxmlPath); loader.setResources(i18n); Parent root = loader.load() ; controller = loader.getController(); -- GitLab From 21b3bddb2dd4c32f756b3edd5dbf31104e2ec398 Mon Sep 17 00:00:00 2001 From: Vincent Bourgmayer Date: Thu, 2 Jun 2022 12:46:28 +0000 Subject: [PATCH 41/53] Apply 1 suggestion(s) to 1 file(s) --- src/main/java/ecorp/easy/installer/EasyInstaller.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/main/java/ecorp/easy/installer/EasyInstaller.java b/src/main/java/ecorp/easy/installer/EasyInstaller.java index 9dc5986b..a315c5ad 100644 --- a/src/main/java/ecorp/easy/installer/EasyInstaller.java +++ b/src/main/java/ecorp/easy/installer/EasyInstaller.java @@ -33,8 +33,6 @@ import javafx.fxml.FXMLLoader; import javafx.fxml.Initializable; import javafx.scene.Parent; import javafx.scene.Scene; -import javafx.scene.control.MenuBar; -import javafx.scene.control.MenuItem; import javafx.scene.text.Font; import javafx.stage.Screen; import javafx.stage.Stage; -- GitLab From 1f1762b430a07660d502d5268b13fd9add49de45 Mon Sep 17 00:00:00 2001 From: Vincent Bourgmayer Date: Thu, 2 Jun 2022 13:06:20 +0000 Subject: [PATCH 42/53] Apply 1 suggestion(s) to 1 file(s) --- flash-scripts/windows/wait-e-reboot.bat | 8 -------- 1 file changed, 8 deletions(-) diff --git a/flash-scripts/windows/wait-e-reboot.bat b/flash-scripts/windows/wait-e-reboot.bat index eddccb41..474e53a2 100644 --- a/flash-scripts/windows/wait-e-reboot.bat +++ b/flash-scripts/windows/wait-e-reboot.bat @@ -30,11 +30,3 @@ SET DEVICE_ID=%~1 SET ADB_FOLDER_PATH=%~2 SET ADB_PATH="%ADB_FOLDER_PATH% adb" echo "ADB path: %ADB_PATH%" -::IF "-z" "%DEVICE_ID%" ( -:: exit "10" -::) -::IF REM UNKNOWN: {"type":"Pipeline","commands":[{"type":"Command","name":{"text":"!","type":"Word"},"suffix":[{"text":"\"$ADB_PATH\"","expansion":[{"loc":{"start":1,"end":9},"parameter":"ADB_PATH","type":"ParameterExpansion"}],"type":"Word"},{"text":"-s","type":"Word"},{"text":"\"$DEVICE_ID\"","expansion":[{"loc":{"start":1,"end":10},"parameter":"DEVICE_ID","type":"ParameterExpansion"}],"type":"Word"},{"text":"get-state","type":"Word"},{"type":"Redirect","op":{"text":">&","type":"greatand"},"file":{"text":"1","type":"Word"},"numberIo":{"text":"2","type":"io_number"}}]},{"type":"Command","name":{"text":"grep","type":"Word"},"suffix":[{"text":"recovery","type":"Word"}]}]} ( -:: echo "Device not detected in recovery" -:: exit "101" -::) -::REM UNKNOWN: {"type":"While","clause":{"type":"CompoundList","commands":[{"type":"Command","name":{"text":"\"$ADB_PATH\"","expansion":[{"loc":{"start":1,"end":9},"parameter":"ADB_PATH","type":"ParameterExpansion"}],"type":"Word"},"suffix":[{"text":"-s","type":"Word"},{"text":"\"$DEVICE_ID\"","expansion":[{"loc":{"start":1,"end":10},"parameter":"DEVICE_ID","type":"ParameterExpansion"}],"type":"Word"},{"text":"get-state","type":"Word"},{"type":"Redirect","op":{"text":">","type":"great"},"file":{"text":"/dev/null","type":"Word"},"numberIo":{"text":"2","type":"io_number"}}]}]},"do":{"type":"CompoundList","commands":[{"type":"Command","name":{"text":"sleep","type":"Word"},"suffix":[{"text":"1","type":"Word"}]}]}} \ No newline at end of file -- GitLab From c567a0829c120b8b1e7058b55ce677187e164b03 Mon Sep 17 00:00:00 2001 From: frankpreel Date: Thu, 2 Jun 2022 15:14:26 +0200 Subject: [PATCH 43/53] Apply code review suggestion --- .../installer/tasks/CommandExecutionTask.java | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/main/java/ecorp/easy/installer/tasks/CommandExecutionTask.java b/src/main/java/ecorp/easy/installer/tasks/CommandExecutionTask.java index 5c0671fe..395b1f20 100644 --- a/src/main/java/ecorp/easy/installer/tasks/CommandExecutionTask.java +++ b/src/main/java/ecorp/easy/installer/tasks/CommandExecutionTask.java @@ -165,21 +165,21 @@ public class CommandExecutionTask extends Task { * @return String the full command */ private final String[] getFullCmd(){ - ArrayList rtn = new ArrayList(10); + ArrayList result = new ArrayList(10); // Prepare base of the command String cmdBase = command.getCommandBase(); - final StringBuilder _cmdBase = new StringBuilder(); + final StringBuilder cmdBaseBuilder = new StringBuilder(); if(AppConstants.isWindowsOs()){ - rtn.add("cmd.exe"); - rtn.add("/c"); - _cmdBase.append("\""); - _cmdBase.append("\""); - _cmdBase.append(cmdBase.replaceAll("\"", "")); - _cmdBase.append("\""); - //rtn.add("\""+_cmdBase+"\""); + result.add("cmd.exe"); + result.add("/c"); + cmdBaseBuilder.append("\""); + cmdBaseBuilder.append("\""); + cmdBaseBuilder.append(cmdBase.replaceAll("\"", "")); + cmdBaseBuilder.append("\""); + //result.add("\""+cmdBaseBuilder+"\""); } else - rtn.add(cmdBase); + result.add(cmdBase); updateParameters(); @@ -188,23 +188,23 @@ public class CommandExecutionTask extends Task { if(parameters != null && !parameters.isEmpty()){ parameters.values().forEach((param) -> { if(AppConstants.isWindowsOs()){ - _cmdBase.append(" \""); - _cmdBase.append(param.replaceAll("\"", "")); - _cmdBase.append("\""); + cmdBaseBuilder.append(" \""); + cmdBaseBuilder.append(param.replaceAll("\"", "")); + cmdBaseBuilder.append("\""); } else { - rtn.add(param); + result.add(param); } }); } // Close the full command if(AppConstants.isWindowsOs()){ - _cmdBase.append("\""); - rtn.add(_cmdBase.toString()); + cmdBaseBuilder.append("\""); + result.add(cmdBaseBuilder.toString()); } - logger.debug("getFullCmd(), full command = {}", rtn.toString()); - return Arrays.copyOf(rtn.toArray(), rtn.size(), String[].class); + logger.debug("getFullCmd(), full command = {}", result.toString()); + return Arrays.copyOf(result.toArray(), result.size(), String[].class); } -- GitLab From b1c08a10f1cf4a092ba2fd7fcb6419d1554d6e2a Mon Sep 17 00:00:00 2001 From: Vincent Bourgmayer Date: Thu, 2 Jun 2022 13:54:40 +0000 Subject: [PATCH 44/53] Apply 1 suggestion(s) to 1 file(s) --- flash-scripts/windows/install-from-e-recovery.bat | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/flash-scripts/windows/install-from-e-recovery.bat b/flash-scripts/windows/install-from-e-recovery.bat index cc87ba30..21a313b2 100644 --- a/flash-scripts/windows/install-from-e-recovery.bat +++ b/flash-scripts/windows/install-from-e-recovery.bat @@ -29,16 +29,6 @@ SET DEVICE_ID=%~1 SET ARCHIVE_FILE=%~2 SET FASTBOOT_FOLDER_PATH=%~3 -::IF "-z" "%DEVICE_ID%" ( -:: exit "101" -::) -::IF "-z" "%ARCHIVE_FILE%" ( -:: exit "102" -::) -::IF "-z" "%FASTBOOT_FOLDER_PATH%" ( -:: exit "103" -::) - SET ADB_CMD="%FASTBOOT_FOLDER_PATH%adb" "%ADB_CMD%" "sideload" "%ARCHIVE_FILE%" if errorlevel==0 ( -- GitLab From 4e7be6052e9fdd7ab6aac4d82c2a4ce9c6bcbcda Mon Sep 17 00:00:00 2001 From: Vincent Bourgmayer Date: Thu, 2 Jun 2022 13:55:10 +0000 Subject: [PATCH 45/53] Apply 1 suggestion(s) to 1 file(s) --- flash-scripts/windows/install-e-recovery.bat | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/flash-scripts/windows/install-e-recovery.bat b/flash-scripts/windows/install-e-recovery.bat index 9fac9a3c..2dc3bcbd 100644 --- a/flash-scripts/windows/install-e-recovery.bat +++ b/flash-scripts/windows/install-e-recovery.bat @@ -40,16 +40,5 @@ IF not defined %E_IMAGE_PATH ( SET FASTBOOT_CMD="%FASTBOOT_PATH%fastboot" SET ADB_CMD="%FASTBOOT_PATH%adb" -:: %FASTBOOT_CMD% erase userdata -:: if errorlevel 1 ( -:: exit /b 11 -:: ) - -:: timeout 1 >nul 2>&1 - -:: %FASTBOOT_CMD% erase metadata -:: if errorlevel 1 ( -:: exit /b 12 -:: ) %FASTBOOT_CMD% flash recovery %E_IMAGE_PATH% -- GitLab From a4b59205ee7ac5da700b09a5539e5ff2f7836bfa Mon Sep 17 00:00:00 2001 From: Vincent Bourgmayer Date: Thu, 2 Jun 2022 13:55:33 +0000 Subject: [PATCH 46/53] Apply 1 suggestion(s) to 1 file(s) --- flash-scripts/windows/install-e-recovery-boot.bat | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/flash-scripts/windows/install-e-recovery-boot.bat b/flash-scripts/windows/install-e-recovery-boot.bat index 1965aa4e..da3803bf 100644 --- a/flash-scripts/windows/install-e-recovery-boot.bat +++ b/flash-scripts/windows/install-e-recovery-boot.bat @@ -40,16 +40,5 @@ IF not defined %E_IMAGE_PATH ( SET FASTBOOT_CMD="%FASTBOOT_PATH%fastboot" SET ADB_CMD="%FASTBOOT_PATH%adb" -:: %FASTBOOT_CMD% erase userdata -:: if errorlevel 1 ( -:: exit /b 11 -:: ) - -:: timeout 1 >nul 2>&1 - -:: %FASTBOOT_CMD% erase metadata -:: if errorlevel 1 ( -:: exit /b 12 -:: ) %FASTBOOT_CMD% flash boot %E_IMAGE_PATH% -- GitLab From aed27f57bbcd43e0bb57792d729d66dead58e55f Mon Sep 17 00:00:00 2001 From: Vincent Bourgmayer Date: Thu, 2 Jun 2022 13:55:58 +0000 Subject: [PATCH 47/53] Apply 1 suggestion(s) to 1 file(s) --- flash-scripts/linux/install-e-recovery.sh | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/flash-scripts/linux/install-e-recovery.sh b/flash-scripts/linux/install-e-recovery.sh index b31a2a0d..788e1cb4 100755 --- a/flash-scripts/linux/install-e-recovery.sh +++ b/flash-scripts/linux/install-e-recovery.sh @@ -45,18 +45,5 @@ fi FASTBOOT_CMD=${FASTBOOT_PATH}"fastboot" ADB_CMD=${FASTBOOT_PATH}"adb" -# Wipe user data -#if ! "$FASTBOOT_CMD" erase userdata ; -#then -# exit 11 -#fi - -#echo "user data wiped" -#sleep 1 - -#if ! "$FASTBOOT_CMD" erase metadata ; -#then -# exit 12 -#fi "$FASTBOOT_CMD" flash recovery ${E_IMAGE_PATH} -- GitLab From 8bfc9e509eabd21d1410b1d591192c01d6271f86 Mon Sep 17 00:00:00 2001 From: Vincent Bourgmayer Date: Thu, 2 Jun 2022 13:56:46 +0000 Subject: [PATCH 48/53] Apply 1 suggestion(s) to 1 file(s) --- flash-scripts/linux/install-e-recovery.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/flash-scripts/linux/install-e-recovery.sh b/flash-scripts/linux/install-e-recovery.sh index 788e1cb4..8939c5fb 100755 --- a/flash-scripts/linux/install-e-recovery.sh +++ b/flash-scripts/linux/install-e-recovery.sh @@ -38,8 +38,6 @@ then exit 102 fi -#"$FASTBOOT_CMD" reboot bootloader -#sleep 10 # Build fastboot and adb commands FASTBOOT_CMD=${FASTBOOT_PATH}"fastboot" -- GitLab From 172baa101b1582af946ae1842ecd3a56b839a76d Mon Sep 17 00:00:00 2001 From: Vincent Bourgmayer Date: Thu, 2 Jun 2022 13:56:59 +0000 Subject: [PATCH 49/53] Apply 1 suggestion(s) to 1 file(s) --- flash-scripts/linux/install-e-recovery-boot.sh | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/flash-scripts/linux/install-e-recovery-boot.sh b/flash-scripts/linux/install-e-recovery-boot.sh index 1e09a9c4..f49ce47e 100755 --- a/flash-scripts/linux/install-e-recovery-boot.sh +++ b/flash-scripts/linux/install-e-recovery-boot.sh @@ -47,18 +47,5 @@ fi FASTBOOT_CMD=${FASTBOOT_PATH}"fastboot" ADB_CMD=${FASTBOOT_PATH}"adb" -# Wipe user data -#if ! "$FASTBOOT_CMD" erase userdata ; -#then -# exit 11 -#fi - -#echo "user data wiped" -#sleep 1 - -#if ! "$FASTBOOT_CMD" erase metadata ; -#then -# exit 12 -#fi "$FASTBOOT_CMD" flash boot ${E_IMAGE_PATH} -- GitLab From 74a8bd31924dbc54cc32f5b337c65b611d9bb14e Mon Sep 17 00:00:00 2001 From: Vincent Bourgmayer Date: Thu, 2 Jun 2022 13:57:11 +0000 Subject: [PATCH 50/53] Apply 1 suggestion(s) to 1 file(s) --- flash-scripts/linux/install-e-recovery-boot.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/flash-scripts/linux/install-e-recovery-boot.sh b/flash-scripts/linux/install-e-recovery-boot.sh index f49ce47e..cdc405b5 100755 --- a/flash-scripts/linux/install-e-recovery-boot.sh +++ b/flash-scripts/linux/install-e-recovery-boot.sh @@ -40,8 +40,6 @@ then exit 102 fi -#"$FASTBOOT_CMD" reboot bootloader -#sleep 10 # Build fastboot and adb commands FASTBOOT_CMD=${FASTBOOT_PATH}"fastboot" -- GitLab From fc3b61f400bb43cded462c9391049de74d86cbfd Mon Sep 17 00:00:00 2001 From: frankpreel Date: Thu, 2 Jun 2022 16:13:00 +0200 Subject: [PATCH 51/53] Review fixes --- .../windows/oneplus-flashingUnlock.bat | 6 ++-- flash-scripts/windows/wait-e-reboot.bat | 32 ------------------- 2 files changed, 2 insertions(+), 36 deletions(-) delete mode 100644 flash-scripts/windows/wait-e-reboot.bat diff --git a/flash-scripts/windows/oneplus-flashingUnlock.bat b/flash-scripts/windows/oneplus-flashingUnlock.bat index 74fc6be1..9e3c74ca 100644 --- a/flash-scripts/windows/oneplus-flashingUnlock.bat +++ b/flash-scripts/windows/oneplus-flashingUnlock.bat @@ -55,11 +55,9 @@ if %errorlevel% == 0 ( :fastboot_detect ping 192.0.2.1 -n 1 -w 500 >nul %FASTBOOT_PATH% devices 2>&1 | findstr "fastboot" -if %errorLevel% == 0 ( +if %errorLevel% == 1 ( goto :fastboot_detect -) - -::call fastboot_detect +) echo "Unlocked continue process" diff --git a/flash-scripts/windows/wait-e-reboot.bat b/flash-scripts/windows/wait-e-reboot.bat deleted file mode 100644 index 474e53a2..00000000 --- a/flash-scripts/windows/wait-e-reboot.bat +++ /dev/null @@ -1,32 +0,0 @@ -@echo off - -:: Copyright (C) 2022 ECORP SAS - Author: Romain Hunault - -:: 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: DEVICE_ID Device we are waiting for reboot -:: $2: ADB_FOLDER_PATH: the path where runnable adb is stored - -:: Exit status -:: - 0 : success -:: - 1 : Error -:: - 10 : DEVICE_ID is missing -:: - 101 : device with DEVICE_ID is not detected - - -SET DEVICE_ID=%~1 -SET ADB_FOLDER_PATH=%~2 -SET ADB_PATH="%ADB_FOLDER_PATH% adb" -echo "ADB path: %ADB_PATH%" -- GitLab From a3bd8f469f173bd6809224427bfc629afb4b276b Mon Sep 17 00:00:00 2001 From: Vincent Bourgmayer Date: Fri, 3 Jun 2022 07:40:23 +0000 Subject: [PATCH 52/53] Update PKGBUILD --- pkg/arch/PKGBUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/arch/PKGBUILD b/pkg/arch/PKGBUILD index 5dfae96a..d46260a9 100644 --- a/pkg/arch/PKGBUILD +++ b/pkg/arch/PKGBUILD @@ -13,7 +13,7 @@ _reqjava=11 makedepends=('git' 'gradle' "java-environment-openjdk=${_reqjava}" 'java-runtime-common' 'ruby-ronn') optdepends=() backup=() -source=("${pkgname}-${pkgver}::git+https://gitlab.e.foundation/e/tools/${pkgname}.git#tag=v${pkgver}-beta" +source=("${pkgname}-${pkgver}::git+https://gitlab.e.foundation/e/tools/${pkgname}.git#tag=v${pkgver}" "${pkgname}.8.md") md5sums=('SKIP' 'bc6e92b53daabcee25e57904b3eb1bb6') -- GitLab From ec34d0454775d5a0e6bef22f849ffae6c9316d42 Mon Sep 17 00:00:00 2001 From: Vincent Bourgmayer Date: Fri, 3 Jun 2022 08:26:42 +0000 Subject: [PATCH 53/53] Update .SRCINFO --- pkg/arch/.SRCINFO | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/arch/.SRCINFO b/pkg/arch/.SRCINFO index 3e52e007..de5fdac8 100644 --- a/pkg/arch/.SRCINFO +++ b/pkg/arch/.SRCINFO @@ -1,7 +1,7 @@ pkgbase = easy-installer pkgdesc = The Easy Installer is a desktop application which helps users install /e/OS by Murena (https://doc.e.foundation/what-s-e) on supported devices. - pkgver = 0.13.4 - pkgrel = 2 + pkgver = 0.14.0 + pkgrel = 1 url = https://gitlab.e.foundation/e/tools/easy-installer arch = x86_64 license = GPL3 @@ -10,7 +10,7 @@ pkgbase = easy-installer makedepends = java-environment-openjdk=11 makedepends = java-runtime-common makedepends = ruby-ronn - source = easy-installer-0.13.4::git+https://gitlab.e.foundation/e/tools/easy-installer.git#tag=v0.13.4-beta + source = easy-installer-0.13.4::git+https://gitlab.e.foundation/e/tools/easy-installer.git#tag=v0.14.0 source = easy-installer.8.md md5sums = SKIP md5sums = bc6e92b53daabcee25e57904b3eb1bb6 -- GitLab