diff --git a/README.md b/README.md index 4680afd30385cd3b50b98ec7a7810cfb3d1f614f..2b81e9c245c0472b663b43f148287c244ceb2878 100644 --- a/README.md +++ b/README.md @@ -45,8 +45,10 @@ developer: - Israel Yago pereira ## Changelogs +### v0.16.0 (candidate) + - OnePlus 8 Pro -### v0.15.1 (candidate) +### v0.15.1 - 431 optionally lock bootloader after flashing - 432 Check the path to the files in MSWindows - 434 Easy Installer detect 2e as not compatible diff --git a/flash-scripts/windows/install-e-recovery-boot.bat b/flash-scripts/windows/install-e-recovery-boot.bat index da3803bf567891e5a4ed7df116cad92da663172f..0d2b6699ff293627b094b6ae3eb16ae94655fc59 100644 --- a/flash-scripts/windows/install-e-recovery-boot.bat +++ b/flash-scripts/windows/install-e-recovery-boot.bat @@ -26,7 +26,7 @@ :: - 102 : E_IMAGE_PATH missing SET FASTBOOT_PATH=%~1 -SET E_IMAGE_PATH=%~2 +SET E_IMAGE_PATH="%~2" IF not defined %FASTBOOT_PATH ( echo "Fastboot path is empty" diff --git a/src/main/java/ecorp/easy/installer/AppConstants.java b/src/main/java/ecorp/easy/installer/AppConstants.java index c74d633d1a59aad3fa88403fa254e3d38a419270..a9354b43606bb8dcc3a9c2acbaeb1401b5912950 100644 --- a/src/main/java/ecorp/easy/installer/AppConstants.java +++ b/src/main/java/ecorp/easy/installer/AppConstants.java @@ -27,7 +27,8 @@ import java.nio.file.Paths; */ public abstract class AppConstants { - public final static String APP_VERSION = "v0.15.1"; + + public final static String APP_VERSION = "v0.16.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/src/main/java/ecorp/easy/installer/controllers/subcontrollers/DeviceDetectedController.java b/src/main/java/ecorp/easy/installer/controllers/subcontrollers/DeviceDetectedController.java index fde8445dd7e4fb470f7fec1c9b3cb75bd7f3ec34..bd11c459d3c10c29a308f1d0d807f49a8ba44c3b 100644 --- a/src/main/java/ecorp/easy/installer/controllers/subcontrollers/DeviceDetectedController.java +++ b/src/main/java/ecorp/easy/installer/controllers/subcontrollers/DeviceDetectedController.java @@ -111,6 +111,12 @@ public class DeviceDetectedController extends AbstractSubController{ displayUnauthorizedDeviceFound(); return; } + + if (DeviceHelper.isDeviceBlacklisted(phone.getAdbDevice())) { + displayIncompatibleDeviceFound(phone.getAdbModel()); + return; + } + final String model = phone.getAdbModel(); if(model == null || model.isEmpty()) displayUnknowDeviceFound(); @@ -118,6 +124,7 @@ public class DeviceDetectedController extends AbstractSubController{ //check that there is config file for this device detectionMsg.setText(String.format(i18n.getString("detect_lbl_compatibleDeviceFound"), model)); if(parentController != null){ + // Fill last property of Phone object phone.setInternalCode(DeviceHelper.getDeviceInternalcode(phone.getAdbDevice())); diff --git a/src/main/java/ecorp/easy/installer/helpers/DeviceHelper.java b/src/main/java/ecorp/easy/installer/helpers/DeviceHelper.java index b4db778951a029e82a2df30527231e06a99464af..68f4f1ab24eb30c5f96773e7fd5c5b9705c22055 100644 --- a/src/main/java/ecorp/easy/installer/helpers/DeviceHelper.java +++ b/src/main/java/ecorp/easy/installer/helpers/DeviceHelper.java @@ -23,7 +23,9 @@ import java.io.IOException; import java.io.InputStream; import java.net.URL; import java.text.ParseException; +import java.util.Arrays; import java.util.HashMap; +import java.util.List; import java.util.Map; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -40,6 +42,8 @@ public class DeviceHelper { private final static String YAML_FOLDER_PATH = "/yaml/"; private static final HashMap map = new HashMap() {{ + // Format e95acf4b device usb:3-1.4 product:OnePlus8Pro_EEA model:IN2023 device:OnePlus8Pro transport_id:5 + // Keep model as identifier -> getDeviceInternalcode put("hero2lte", "0001"); put("herolte", "0002"); put("star2lte", "0003"); @@ -56,7 +60,8 @@ public class DeviceHelper { put("sunfish", "0015"); put("flame", "0016"); put("coral", "0017"); - put("keyword", "0018"); //OnePlus 7 Pro + put("keyword", "0018"); //OnePlus7 Pro + put("OnePlus8Pro", "0021"); }}; /** @@ -67,6 +72,18 @@ public class DeviceHelper { public static String getDeviceInternalcode(String key){ return map.get(key); } + + /** + * Returns true if the device is blacklisted. A blaclisted device embeds flashs scripts but + * is not detected by the Easy installer (use case Murena ROM has an issue we nned to wait for the next ROM release + * but developping procces is allowed). + * @param key the ADB device code's name (example: Samsung galaxy S7 => herolte) + * @return can return null if no key matches + */ + public static boolean isDeviceBlacklisted(String key){ + List blaclisted = Arrays.asList("OnePlus8Pro", "OnePlus8"); + return blaclisted.contains(key); + } /** diff --git a/src/main/resources/images/oneplus-settings.png b/src/main/resources/images/oneplus-settings.png new file mode 100755 index 0000000000000000000000000000000000000000..445523272420ef4f492a4351f1fe7af22eb823a3 Binary files /dev/null and b/src/main/resources/images/oneplus-settings.png differ diff --git a/src/main/resources/images/oneplus_allowOEMUnlocking.png b/src/main/resources/images/oneplus_allowOEMUnlocking.png new file mode 100644 index 0000000000000000000000000000000000000000..04079705b390056e9b0161bbe27f0e58342cfaac Binary files /dev/null and b/src/main/resources/images/oneplus_allowOEMUnlocking.png differ diff --git a/src/main/resources/images/oneplus_enableOEMUnlocking.png b/src/main/resources/images/oneplus_enableOEMUnlocking.png new file mode 100644 index 0000000000000000000000000000000000000000..3e3a219e66058a30a549211f7bfb9894038b222d Binary files /dev/null and b/src/main/resources/images/oneplus_enableOEMUnlocking.png differ diff --git a/src/main/resources/images/oneplus_searchOEM.png b/src/main/resources/images/oneplus_searchOEM.png new file mode 100644 index 0000000000000000000000000000000000000000..0df5b59b6784b6955c782870ad4acd038a73b2f2 Binary files /dev/null and b/src/main/resources/images/oneplus_searchOEM.png differ diff --git a/src/main/resources/instructions/imageName_en_EN_0021.properties b/src/main/resources/instructions/imageName_en_EN_0021.properties new file mode 100644 index 0000000000000000000000000000000000000000..124e46b1f5fd78d58a93a7d3a22950c223b621a0 --- /dev/null +++ b/src/main/resources/instructions/imageName_en_EN_0021.properties @@ -0,0 +1,60 @@ +# 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 +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + + +install_instr_openSettings=oneplus-settings.png +install_instr_searchOEM=oneplus_searchOEM.png +install_instr_acceptOEMUnlockWarning=oneplus_allowOEMUnlocking.png +install_instr_enableOEMUnlocking=oneplus_enableOEMUnlocking.png + +## Step f2 +#install_instr_unlockingOem +#install_instr_selectUnlockBootloader +#install_instr_unlockBootloader + +## Step f3 +#devMode_main +#devMode_instr_settings +#devMode_instr_build +devMode_instr_tap7=enableADB3.png +#debugADB_instr_settings +#debugADB_instr_search +#debugADB_instr_androidDebug +#debugADB_instr_debugOn +#debugADB_instr_tapeOK +#debugADB_instr_acceptCertificate +#eAccount_lbl_alreadyAccount + +## Step f6 +#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.png +install_instr_e_recovery_apply_update_from_adb=install_instr_e_recovery_apply_update_from_adb.png +#install_instr_e_recovery_apply_update_from_adb_wait_for_result + +## Step f7 +#install_instr_e_recovery_apply_update_from_adb_accept_sign_fail + +## Step f8 +install_instr_e_recovery_back=install_instr_e_recovery_back.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_apply_update_from_adb_wait_for_result \ No newline at end of file diff --git a/src/main/resources/lang/translation.properties b/src/main/resources/lang/translation.properties index 6b0a3c4edaaa2ce71a609a774b66a37d59437e3f..8c8c0e8edabd844b1ed9f9108b91ab6188e20bbd 100644 --- a/src/main/resources/lang/translation.properties +++ b/src/main/resources/lang/translation.properties @@ -27,6 +27,9 @@ all_btn_needHel= Need help all_btn_continue=Continue all_btn_donate=Donate +#oneplus +install_instr_e_recovery_oneplus_select_recovery= Installing the partition + # Welcome Scene welcome_mTitle=Welcome to the /e/OS Installer! welcome_lbl_body1=This program will enable you to install /e/OS on your phone in a few minutes. Don't worry, it is simple and easy. @@ -199,7 +202,7 @@ install_instr_choose_e_recovery_validate_wait_for_result= After a while the devi 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_apply_update_from_adb_accept_sign_fail= A screen that says Signature verification failed, this is expected, please click Continue +install_instr_e_recovery_apply_update_from_adb_accept_sign_fail= A screen that says Signature verification failed, this is expected, please accept this warning. 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" diff --git a/src/main/resources/lang/translation_fr_FR.properties b/src/main/resources/lang/translation_fr_FR.properties index 9a6ac9bc31faf33f978f2febfdc346d9da0c2175..f760a53a00b1d6705d2d5a30e5faefa2e049223d 100644 --- a/src/main/resources/lang/translation_fr_FR.properties +++ b/src/main/resources/lang/translation_fr_FR.properties @@ -318,7 +318,7 @@ install_instr_choose_e_recovery_validate_wait_for_result= Le téléphone va rebo 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_apply_update_from_adb_accept_sign_fail= Un écran indique que la vérification de la signature a échoué, c'est normal, veuillez cliquer sur Continuer. +install_instr_e_recovery_apply_update_from_adb_accept_sign_fail= Un écran indique que la vérification de la signature a échoué, c'est normal, veuillez accepter cet avertissement. 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" diff --git a/src/main/resources/yaml/OnePlus8Pro_flash.yml b/src/main/resources/yaml/OnePlus8Pro_flash.yml index d00ee101184fc5faa142c86ee20830494fe7126a..05809819647526ec1644dfcf052e562d2788c2e0 100644 --- a/src/main/resources/yaml/OnePlus8Pro_flash.yml +++ b/src/main/resources/yaml/OnePlus8Pro_flash.yml @@ -86,6 +86,7 @@ steps: - debugADB_instr_debugOn - debugADB_instr_tapeOK - debugADB_instr_acceptCertificate + - eAccount_lbl_alreadyAccount f4: type: load stepNumber: 5 @@ -135,7 +136,6 @@ steps: - 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 - - install_instr_e_recovery_apply_update_from_adb_accept_sign_fail titleKeyIconName: icon-download.png script: wait-e-recovery-sideload parameters: @@ -149,7 +149,7 @@ steps: type: load stepNumber: 8 nextStepKey: f8 - titleKey: install_instr_eosInstall + titleKey: install_instr_e_recovery_apply_update_from_adb_accept_sign_fail instructions: - install_instr_e_recovery_oneplus_select_recovery averageTime: 150