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

Commit adbe70c7 authored by Frank Preel's avatar Frank Preel
Browse files

Support for 2020 & 2021 T2e models

parent df6a0613
Loading
Loading
Loading
Loading
+0 −13
Original line number Diff line number Diff line
@@ -106,19 +106,6 @@ public class DeviceDetectedController extends AbstractSubController{
            return; 
        }

        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();
+2 −1
Original line number Diff line number Diff line
@@ -146,7 +146,8 @@ public class DeviceDetectionTask extends Task<Phone>{
                }else if(stringPart.contains("device:")){
                    logger.debug("  \"device\" keyword has been found");
                    String device = stringPart.substring("device:".length() );
                    if(device.equals("Teracube_2e")) device ="emerald"; 
                    if(device.equals("Teracube_2e") && datas[0].startsWith("2020")) device ="Teracube_2e"; 
                    if(device.equals("Teracube_2e") && datas[0].startsWith("2021")) device ="emerald"; 
                    //if(device.equals("k63v2_64_bsp")) device="GS290"; //bad idea. Device not really compatible.
                    result.setAdbDevice(device);
                }