summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--static/js/web-install.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/static/js/web-install.js b/static/js/web-install.js
index 40d2ad98..556665a6 100644
--- a/static/js/web-install.js
+++ b/static/js/web-install.js
@@ -142,6 +142,8 @@ async function unlockBootloader(setProgress) {
const supportedDevices = ["raven", "oriole", "barbet", "redfin", "bramble", "sunfish", "coral", "flame", "bonito", "sargo", "crosshatch", "blueline"];
+const qualcommDevices = ["barbet", "redfin", "bramble", "sunfish", "coral", "flame", "bonito", "sargo", "crosshatch", "blueline"];
+
async function getLatestRelease() {
let product = await device.getVariable("product");
if (!supportedDevices.includes(product)) {
@@ -197,6 +199,8 @@ async function reconnectCallback() {
async function flashRelease(setProgress) {
await ensureConnected(setProgress);
+ let product = await device.getVariable("product");
+
// Need to do this again because the user may not have clicked download if
// it was cached
setProgress("Finding latest release...");
@@ -221,6 +225,12 @@ async function flashRelease(setProgress) {
// See https://android.googlesource.com/platform/system/core/+/eclair-release/fastboot/fastboot.c#532
// for context as to why the trailing space is needed.
await device.runCommand("oem uart disable ");
+ if (qualcommDevices.includes(product)) {
+ setProgress("Erasing apdp...");
+ // Both slots are wiped as even apdp on an inactive slot will modify /proc/cmdline
+ await device.runCommand("erase:apdp_a");
+ await device.runCommand("erase:apdp_b");
+ }
} finally {
safeToLeave = true;
}