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

Commit 933cbe0e authored by Frank PREEL's avatar Frank PREEL
Browse files

Use teracube to test "-safe" procedure based on the Android security patch level

parent 21ccbbba
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -198,6 +198,8 @@ export class Controller {
                    console.error(e); // K1ZFP TODO
                    return false;
                }
            case Command.CMD_TYPE.format:
                return this.deviceManager.for(cmd.partition);
            default:
                WDebug.log(`try unknown command ${cmd.command}`)
                await this.deviceManager.runCommand(cmd.command);
+6 −0
Original line number Diff line number Diff line
@@ -126,6 +126,12 @@ export class DeviceManager {
        return this.bootloader.runCommand(`erase:${partition}`);
    }

    format(argument) {
        return true;
//        return this.bootloader.runCommand(`format ${argument}`);
//        the fastboot format md_udc is not supported evne by the official fastboot program
    }

    unlock(command) {
        return this.bootloader.runCommand(command);
    }
+6 −1
Original line number Diff line number Diff line
@@ -9,7 +9,8 @@ export class Command {
        lock: 'lock',
        connect: 'connect',
        reboot: 'reboot',
        downloading: 'downloading',
        download: 'download',
        format: 'format'
    };

    constructor(cmd) {
@@ -59,6 +60,10 @@ export class Command {
                    this.type = Command.CMD_TYPE.lock;
                }
                break;
            case 'format':
                this.partition = res[1];
                this.type = Command.CMD_TYPE.format;
                //"format md_udc",
        }
    }
}
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@
      "command": [
        
        "erase userdata",
        "fastboot format md_udc",
        "format md_udc",
        "flash boot_a boot.img",
        "flash dtbo_a dtbo.img",
        "flash vbmeta_a vbmeta.img",
+2 −2
Original line number Diff line number Diff line
{
  "unused_security_patch_level": "2020-04-05",
  "UNUSED___security_patch_level": "2020-04-05",
  "steps": [
    {
      "mode": "bootloader",
@@ -16,7 +16,7 @@
      "command": [
        
        "erase userdata",
        "fastboot format md_udc",
        "format md_udc",
        "flash boot_a boot.img",
        "flash dtbo_a dtbo.img",
        "flash vbmeta_a vbmeta.img",