diff --git a/app/public/resources/-Nord.json b/app/public/resources/-Nord.json index 8bd275beb687c224f247cb46f1bf04ef7165e5e6..43a63e3c5695ff7406b53c36be9ea8a2755b611d 100644 --- a/app/public/resources/-Nord.json +++ b/app/public/resources/-Nord.json @@ -1,8 +1,9 @@ { + "$schema": "https://e.foundation/installer/schemas/devices.schema.json", "android": 12, "steps": [ { - "command": "reboot bootloader" + "command": "reboot bootloader" }, { "id": "connect-bootloader", diff --git a/app/public/resources/FP3.json b/app/public/resources/FP3.json index 3e3bda91b56fef485a51b7f1a9cb75091db5941b..269b8957f69359ff3884027678c9eb53ae02a292 100644 --- a/app/public/resources/FP3.json +++ b/app/public/resources/FP3.json @@ -1,4 +1,5 @@ { + "$schema": "https://e.foundation/installer/schemas/devices.schema.json", "steps": [ { "mode": "bootloader", diff --git a/app/public/resources/FP4-safe.json b/app/public/resources/FP4-safe.json index 1f267bbc34bbd55796aa33cc50dc2fe9a2f629aa..382038fcd011d84a4691fecfa4f6c8239e7288ba 100644 --- a/app/public/resources/FP4-safe.json +++ b/app/public/resources/FP4-safe.json @@ -1,4 +1,5 @@ { + "$schema": "https://e.foundation/installer/schemas/devices.schema.json", "steps": [ { "mode": "bootloader", diff --git a/app/public/resources/FP4.json b/app/public/resources/FP4.json index 036fcfb7bf47e042d6ffa0b66ab2ec75900fa808..eee8c2ddfc58285ccd95295dc18eb793f95a156b 100644 --- a/app/public/resources/FP4.json +++ b/app/public/resources/FP4.json @@ -1,4 +1,5 @@ { + "$schema": "https://e.foundation/installer/schemas/devices.schema.json", "security_patch_level": "2024-06-05", "steps": [ { diff --git a/app/public/resources/GS290.json b/app/public/resources/GS290.json index 281dfe4ef7e0d2ba6a68b07a9143cc9d1fb5cd06..c7ca63d12036b58582ee6c59b2d45caf59667aac 100644 --- a/app/public/resources/GS290.json +++ b/app/public/resources/GS290.json @@ -1,4 +1,5 @@ { + "$schema": "https://e.foundation/installer/schemas/devices.schema.json", "steps": [ { "mode": "bootloader", diff --git a/app/public/resources/OnePlus7.json b/app/public/resources/OnePlus7.json index d3387909054f9d00c890f3b0b1a5e6f71b502cee..cad8c585342f6eb12ed2698ca26ac5d9db5a114a 100644 --- a/app/public/resources/OnePlus7.json +++ b/app/public/resources/OnePlus7.json @@ -1,4 +1,5 @@ { + "$schema": "https://e.foundation/installer/schemas/devices.schema.json", "android": 14, "steps": [ { diff --git a/app/public/resources/OnePlus7Pro.json b/app/public/resources/OnePlus7Pro.json index abf2dce1cad7b8d9fa37de92f1a46610796938ee..9d0f4d1ee0fdc4f0441641c39e9c189ca1c3d14e 100644 --- a/app/public/resources/OnePlus7Pro.json +++ b/app/public/resources/OnePlus7Pro.json @@ -1,4 +1,5 @@ { + "$schema": "https://e.foundation/installer/schemas/devices.schema.json", "android": 14, "steps": [ { diff --git a/app/public/resources/OnePlus7T.json b/app/public/resources/OnePlus7T.json index 9d54693249d6a5e86d41d240eac141af6d0a9514..3c2a3242a3fb2f4d6cdc6b2d1d83ba8b0380df18 100644 --- a/app/public/resources/OnePlus7T.json +++ b/app/public/resources/OnePlus7T.json @@ -1,4 +1,5 @@ { + "$schema": "https://e.foundation/installer/schemas/devices.schema.json", "android": 14, "steps": [ { diff --git a/app/public/resources/OnePlus8.json b/app/public/resources/OnePlus8.json index 034d99c43e2b12fc5aa4a75e8d09fb4ddfb8fd32..46efdf5a2af616043ac0b0bede5b23d1c3e04fa4 100644 --- a/app/public/resources/OnePlus8.json +++ b/app/public/resources/OnePlus8.json @@ -1,4 +1,5 @@ { + "$schema": "https://e.foundation/installer/schemas/devices.schema.json", "android": 14, "steps": [ { diff --git a/app/public/resources/OnePlus8Pro.json b/app/public/resources/OnePlus8Pro.json index cf7bcc21b466cf3aaa8b46f7b443f7be81832905..fee0f08b057e6a017f25318ecbb4d1659ef70735 100644 --- a/app/public/resources/OnePlus8Pro.json +++ b/app/public/resources/OnePlus8Pro.json @@ -1,4 +1,5 @@ { + "$schema": "https://e.foundation/installer/schemas/devices.schema.json", "android": 13, "steps": [ { diff --git a/app/public/resources/Teracube_2e.json b/app/public/resources/Teracube_2e.json index be88089a099604e3b44d657778ca56e07475e462..8aab22eab914c378d1061c45477df01c7555c567 100644 --- a/app/public/resources/Teracube_2e.json +++ b/app/public/resources/Teracube_2e.json @@ -1,4 +1,5 @@ { + "$schema": "https://e.foundation/installer/schemas/devices.schema.json", "UNUSED___security_patch_level": "2020-04-05", "description": "Teracube 2e (2020)", "steps": [ @@ -16,7 +17,6 @@ "id": "flashing", "command": [ "erase userdata", - "flash preloader preloader_zirconia.bin", "flash lk lk.img", "flash md1img md1img.img", diff --git a/app/public/resources/coral.json b/app/public/resources/coral.json index 98aa67d7aa71725b408e54cb8034a3269d5d7e80..839bd937e539d595b5281aa14fa06d22cab7a9ca 100644 --- a/app/public/resources/coral.json +++ b/app/public/resources/coral.json @@ -1,4 +1,5 @@ { + "$schema": "https://e.foundation/installer/schemas/devices.schema.json", "android": 14, "steps": [ { diff --git a/app/public/resources/emerald-safe.json b/app/public/resources/emerald-safe.json index 853abb0e66139e7567fcdd31f2be7956e04cef77..7f158f1ee1edf91153dbfcd30b0e0dafdd16535c 100644 --- a/app/public/resources/emerald-safe.json +++ b/app/public/resources/emerald-safe.json @@ -1,4 +1,5 @@ { + "$schema": "https://e.foundation/installer/schemas/devices.schema.json", "description": "Teracube 2e (2021 emerald) Safe", "steps": [ { diff --git a/app/public/resources/emerald.json b/app/public/resources/emerald.json index 7ca01e0129938ea1943785d250237fd172daaced..7f186c1867c891304770caa716557647bec2e77d 100644 --- a/app/public/resources/emerald.json +++ b/app/public/resources/emerald.json @@ -1,4 +1,5 @@ { + "$schema": "https://e.foundation/installer/schemas/devices.schema.json", "UNUSED___security_patch_level": "2020-04-05", "description": "Teracube 2e (2021 emerald)", "steps": [ diff --git a/app/public/resources/flame.json b/app/public/resources/flame.json index c51b1111334c98dd77cdde40a76d86cb9f31bacd..17122567a674914332e08e502d3ed289bfab250f 100644 --- a/app/public/resources/flame.json +++ b/app/public/resources/flame.json @@ -1,4 +1,5 @@ { + "$schema": "https://e.foundation/installer/schemas/devices.schema.json", "android": 14, "steps": [ { diff --git a/app/public/resources/panther.json b/app/public/resources/panther.json index 92594b3effdfb7dcf7f12cef73306fc2a7ec0399..435e3eec735576e28b3d49c3aee16b59c6c7bfff 100644 --- a/app/public/resources/panther.json +++ b/app/public/resources/panther.json @@ -1,4 +1,5 @@ { + "$schema": "https://e.foundation/installer/schemas/devices.schema.json", "android": 13, "steps": [ { diff --git a/app/public/resources/redfin.json b/app/public/resources/redfin.json index ca9fd8ec45abea5bca75c9d811663b18fad55050..66ee6815e36b63dfa875ace60e419c67e41ea562 100644 --- a/app/public/resources/redfin.json +++ b/app/public/resources/redfin.json @@ -1,4 +1,5 @@ { + "$schema": "https://e.foundation/installer/schemas/devices.schema.json", "android": 13, "steps": [ { diff --git a/app/public/resources/sunfish.json b/app/public/resources/sunfish.json index fcecbc4e8fe4964c3e3c309ca9b86b7f3008b529..657210171743f522c6216591b54b2b059b31032f 100644 --- a/app/public/resources/sunfish.json +++ b/app/public/resources/sunfish.json @@ -1,4 +1,5 @@ { + "$schema": "https://e.foundation/installer/schemas/devices.schema.json", "android": 14, "steps": [ { diff --git a/app/public/resources/tetris.json b/app/public/resources/tetris.json index 2d619b2234b68d3eb5152963ec07d81ec07b7fce..054c629ff902e1ae63993bab06d5c4bc64441a93 100644 --- a/app/public/resources/tetris.json +++ b/app/public/resources/tetris.json @@ -1,4 +1,5 @@ { + "$schema": "https://e.foundation/installer/schemas/devices.schema.json", "android": 14, "steps": [ { diff --git a/app/public/schemas/devices.schema.json b/app/public/schemas/devices.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..cb5613d1ab0149c2c6ad4acdafbba2cb47afc345 --- /dev/null +++ b/app/public/schemas/devices.schema.json @@ -0,0 +1,144 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://e.foundation/installer/schemas/devices.schema.json", + "title": "Device", + "description": "A device who can be used with /e/ web installer", + "type": "object", + "properties": { + "$schema": { + "type": "string", + "description": "URL of the JSON Schema, if you remove it, autocomplete doens't work" + }, + "description": { + "type": "string", + "description": "Description of the device, you can use this to provide more informations" + }, + "UNUSED___security_patch_level": { + "type": "string", + "description": "[DEPRECATED, USE security_path_level instead] Security Path Level date (AAAA-MM-JJ)", + "deprecated": true + }, + "security_patch_level": { + "type": "string", + "description": "Security Path Level date (AAAA-MM-JJ)" + }, + "android": { + "description": "Android version of /e/ image, use version number, not letter", + "type": "number" + }, + "steps": { + "description": "Each object is a step, called in order", + "type": "array", + "items": { + "type": "object", + "properties": { + "mode": { + "type": "string", + "description": "Alias to reboot in specific mode", + "enum": [ + "fastboot", + "adb", + "bootloader" + ] + }, + "command": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string", + "anyOf": [ + { + "type": "string", + "enum": [ + "connect adb", + "connect bootloader", + "reboot", + "reboot adb", + "reboot fastboot", + "reboot bootloader", + "erase [partitionName]", + "oem unlock [varName?]", + "oem lock [varName?]", + "flashing unlock [varName?]", + "flashing lock [varName?]", + "flash [partitionName] [fileName]", + "sideload [fileName]", + "delay [delayInSeconds]" + ] + }, + { + "type": "string" + } + ] + } + }, + { + "type": "string", + "enum": [ + "connect adb", + "connect bootloader", + "reboot", + "reboot adb", + "reboot fastboot", + "reboot bootloader", + "erase [partitionName]", + "oem unlock [varName?]", + "oem lock [varName?]", + "flashing unlock [varName?]", + "flashing lock [varName?]", + "flash [partitionName] [fileName]", + "sideload [fileName]", + "delay [delayInSeconds]" + ] + }, + { + "type": "string" + } + ] + }, + "id": { + "type": "string", + "description": "Unique id of each step" + }, + "needUserGesture": { + "type": "boolean", + "description": "If this option is set to true, installer display a button, user needs to click on this button to continue installation" + } + }, + "additionalProperties": false + } + }, + "folder": { + "description": "An array describing the files involved in the flash process", + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "This name is exposed as fileName in a step command" + }, + "path": { + "type": "string", + "description": "Path used to download the file." + }, + "unzip": { + "type": "boolean", + "description": "Mark true in case we have a zip we want to uncompress." + }, + "mapping": { + "type": "object" + } + }, + "additionalProperties": false + }, + "required": [ + "name", + "path" + ], + "additionalProperties": false + } + }, + "additionalProperties": false +} \ No newline at end of file