From e8f43c808ea65e9c9f872e28de195f1081cee9ed Mon Sep 17 00:00:00 2001 From: Jan Sprinz Date: Sat, 2 Nov 2019 19:05:22 +0100 Subject: [PATCH 1/3] Add fastboot:reboot step, resolves #989 --- src/devices.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/devices.js b/src/devices.js index b1b15da4..6810e701 100644 --- a/src/devices.js +++ b/src/devices.js @@ -220,7 +220,7 @@ function installStep(step) { case "fastboot:reboot_bootloader": return new Promise(function(resolve, reject) { global.mainEvent.emit("user:write:working", "particles"); - global.mainEvent.emit("user:write:status", "Rebooting"); + global.mainEvent.emit("user:write:status", "Rebooting", true); global.mainEvent.emit("user:write:under", "Rebooting to bootloader"); fastboot .rebootBootloader() @@ -228,6 +228,17 @@ function installStep(step) { .catch(reject); }); break; + case "fastboot:reboot": + return new Promise(function(resolve, reject) { + global.mainEvent.emit("user:write:working", "particles"); + global.mainEvent.emit("user:write:status", "Rebooting", true); + global.mainEvent.emit("user:write:under", "Rebooting system"); + fastboot + .reboot() + .then(resolve) + .catch(reject); + }); + break; case "user_action": return new Promise(function(resolve, reject) { global.mainEvent.emit( From c31c2fb4bf0e6c50949d7f3bfb2c08c1edf6f607 Mon Sep 17 00:00:00 2001 From: Jan Sprinz Date: Sat, 2 Nov 2019 19:08:18 +0100 Subject: [PATCH 2/3] Add fastboot:continue step, resolves #990 --- src/devices.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/devices.js b/src/devices.js index 6810e701..78c806ec 100644 --- a/src/devices.js +++ b/src/devices.js @@ -239,6 +239,17 @@ function installStep(step) { .catch(reject); }); break; + case "fastboot:continue": + return new Promise(function(resolve, reject) { + global.mainEvent.emit("user:write:working", "particles"); + global.mainEvent.emit("user:write:status", "Continuing boot", true); + global.mainEvent.emit("user:write:under", "Resuming boot"); + fastboot + .continue() + .then(resolve) + .catch(reject); + }); + break; case "user_action": return new Promise(function(resolve, reject) { global.mainEvent.emit( From ca133900562e519ff841ca3d8860de32b160cd25 Mon Sep 17 00:00:00 2001 From: Jan Sprinz Date: Sat, 2 Nov 2019 19:11:05 +0100 Subject: [PATCH 3/3] Update android tools module --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index ab6bff4e..046a6444 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5206,9 +5206,9 @@ } }, "promise-android-tools": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/promise-android-tools/-/promise-android-tools-1.0.7.tgz", - "integrity": "sha512-55AzHyu6SE7L5EfbYe1Qh51dDPE4UgxCJhm5sZ1JEKhps2B+2JAaAj7sEP8GECIbNFQPkWCi+sN4s/Hstryxvg==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/promise-android-tools/-/promise-android-tools-1.0.8.tgz", + "integrity": "sha512-NoJtIvnJAB3fWivH+XX4bWBuDE7FxT0vSlnivUjlmO2lqQrbZwl+LrcVCwJ3ZGmNghycnIQHyOtrurpXkEAJeQ==", "requires": { "chai": "^4.1.2", "chai-as-promised": "^7.1.1", diff --git a/package.json b/package.json index 6b0366dc..17e8fb4b 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "jquery": "^3.1.1", "jquery-i18next": "^1.2.0", "mkdirp": "^0.5.1", - "promise-android-tools": "^1.0.7", + "promise-android-tools": "^1.0.8", "request": "^2.79.0", "system-image-node-module": "^1.0.10", "ubports-api-node-module": "^2.0.1",