diff options
| author | flawedworld <flawedworld@flawed.world> | 2021-12-17 19:29:36 +0000 |
|---|---|---|
| committer | Daniel Micay <danielmicay@gmail.com> | 2021-12-17 14:39:16 -0500 |
| commit | 079743da1af63aa977d7d2b63996850521b96d5a (patch) | |
| tree | e0456cc4d70590d6852e5cd492519bd5ac69dbe4 /static/js | |
| parent | 09ab2636058d364a6d9e59707b315edb5bb33d82 (diff) | |
Erase apdp on Qualcomm devices
Diffstat (limited to 'static/js')
| -rw-r--r-- | static/js/web-install.js | 10 |
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; } |
