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

Commit 2491bb00 authored by Jackeagle's avatar Jackeagle
Browse files

Make flash cooldown configurable per device via JSON config



Add flash_cooldown_ms to device config JSON to override the default
2500ms delay between flash operations. Devices that need more time
(e.g. Qualcomm ABL) can set a higher value without slowing down
devices that work fine with the default.

Signed-off-by: default avatarJackeagle <jackeagle102@gmail.com>
parent aaf5beec
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -56,6 +56,13 @@ Open chrome base browser and go to http://localhost:5173/.

        > For oem, recovery, rom and key, we parse these command and execute them. The others commands are not analyzed and executed arbitrarily in the device.
      
    - Optional top-level settings

            | key                  | example | description                                                                                  |
            |----------------------|---------|----------------------------------------------------------------------------------------------|
            | `flash_cooldown_ms`  | `3000`  | Delay in ms between flash operations. Defaults to 2500 if not set. Increase for slow devices |
            | `security_patch_level` | `"2018-01-05"` | When the device's patch level is newer, the `-safe.json` variant is loaded instead  |

    - Define the folder, an array describing the files involved in the flash process
        - template: 
            ```json
+1 −1
Original line number Diff line number Diff line
@@ -188,7 +188,7 @@ export class Controller {
      case Command.CMD_TYPE.erase:
        return this.deviceManager.erase(cmd.partition);
      case Command.CMD_TYPE.flash: {
        const FLASH_COOLDOWN_MS = 2500; // Pause after flash to let device stabilize
        const FLASH_COOLDOWN_MS = this.resources?.flash_cooldown_ms ?? 2500;
        const result = await this.deviceManager.flash(
          cmd.file,
          cmd.partition,