2 Commits 23cd0ee7a8 ... dc7dc955fb

Author SHA1 Message Date
  angela dc7dc955fb Unbrick Oneplus9 notes added 1 year ago
  angela 0168b30f33 Downgrading Android 13 notes added 1 year ago
2 changed files with 108 additions and 0 deletions
  1. 23 0
      android/downgrading-oneplus9-oxygenos.md
  2. 85 0
      android/unbricking-oneplus9.md

+ 23 - 0
android/downgrading-oneplus9-oxygenos.md

@@ -0,0 +1,23 @@
+# Downgrading Oneplus 9 Oxygen OS
+After [unbricking a Oneplus 9 device](unbricking-oneplus9.md), I expected the jump from Android 11 to Android 12 to have some sort of warning - but it jumped straight to Android 13.
+
+As there is no Lineage compatible version for Android 13 at the time of writing, this was too much of an upgrade.
+
+**Note that downgrading this way wipes the system, so back up anything important**
+
+1. Download the *old* system update APK from Oneplus and put it in the phone's download folder: https://oxygenos.oneplus.net/OPLocalUpdate_For_Android13.apk and install
+
+    *This is required, otherwise you need to do it via fastboot, the same as the unbrick method*
+    - Native system update app does not allow downgrading
+    - If not already allowed, you'll be prompt to allow the File Manager permission to install 'unknown' apps.
+
+2. Download the rollback package from Oneplus, [this article](https://www.rprna.com/tips-tricks/oxygenos-13-rolback-guide-update-3/) has links to rollback variants (North America, India, Europe) coming directly from Oneplus
+  - Put the zip in the *device* root, not Download/update or anything like that.  The system update APK specifically looks in the system root for the rollback zip.
+  - [Rollback packages to Open beta / forum thread for Android 12 to Android 11](https://community.oneplus.com/thread/1502946)
+
+3. Reboot when prompted
+  - After the 1+ / Android splash screen, there was a brief screen where Chinese text with a progress bar shown, it lasted for about 30 seconds and booted into the Oxygen OS splash screen
+    - Unclear on what it said, but considering the package is sourced from Chinese manufacturer Oneplus, likely just a diagnostic message
+
+
+4. Locate Build mode in Settings and tap 3-4 times to get developer mode back

+ 85 - 0
android/unbricking-oneplus9.md

@@ -0,0 +1,85 @@
+# Unbricking Oneplus 9 During LineageOS Install
+My first brick during a LineageOS ROM install and *also* my first A/B device I'm installing Lineage to!
+
+**Pre-requisites**
+- ADB
+- Fastboot
+- [OxygenOS Full Image](https://www.oneplus.com/support/softwareupgrade/details?code=PM1617074715494)
+  - Unzip
+- [Payload Dumper Go](https://github.com/ssut/payload-dumper-go)
+  - [Latest version](https://github.com/ssut/payload-dumper-go/releases) & unzip
+  - Navigate to the directory where **payload-dumper-go** is
+  ```bash
+  ./payload-dumper-go OnePlus9Oxygen_22.O.13_OTA_0130_all_2111112106_03a66541157c4af5/payload.bin
+  ```
+    - *[path to payload_dumper_go] [path to unzipped Oxygen OS payload.bin]*
+    - The extracted files are what's used for the unbricking process
+
+**Problem**
+- Ended up on Qualcomm CrashDump screen after flashing TWRP recovery
+  - Lineage's instructions state third-party recovery... etc etc, which is fine; I've used TWRP on every device I've installed Lineage to and never had issues despite scary warnings.
+  - TWRP was not the culprit, as [others on XDA](https://forum.xda-developers.com/t/recovery-11-official-teamwin-recovery-project.4294289/) had success.
+
+
+**The culprit**
+- From Lineage's install wiki:
+  > Warning: This platform requires additional partitions to be flashed for recovery to work properly, the process to do so is described below.
+  ```bash
+  fastboot flash dtbo dtbo.img
+  fastboot flash vendor_boot vendor_boot.img
+  ```
+    - In a rookie move, I downloaded the *latest* versions of the two above images and flashed them.  My device was on Android 11... the images were for **Android 12**
+
+
+**Fix**
+- [Unbrick Oneplus 9 article](https://www.droidwin.com/unbrick-oneplus-9-pro-fastboot-commands/) from Droidwin
+- [This XDA thread](https://forum.xda-developers.com/t/restore-oneplus-9-to-stock-via-fastboot-commands.4265153/) covers a similar scenario, but users have some cross-platform commands that might also be useful while on Windows
+
+**Messages encountered during the unbrick process**
+
+```bash
+angela@debian$ ~/Downloads: fastboot -w
+Erasing 'userdata'                                 FAILED (remote: 'Erase of userdata is not allowed in snapshotted state')
+fastboot: error: Command failed
+```
+  - Attempt to clear snapshot state:
+
+  ```bash
+  fastboot snapshot-update cancel
+  ```
+
+  - Result:
+  > Snapshot cancel                                    OKAY [  0.003s]
+Finished. Total time: 0.003s
+
+***
+
+Wipe everything (per the instructions):
+```bash
+angela@debian$: fastboot -w
+Erasing 'userdata'                                 OKAY [  0.206s]
+/usr/lib/android-sdk/platform-tools/make_f2fs failed with status 1
+fastboot: error: Cannot generate image for userdata
+  ```
+  - Whatever.  Ignored this and proceeded (did not wipe at this step)
+***
+
+  > Invalid sparse file format at header magic
+
+
+  - I already knew the partitions were jacked up, so I ignored this and waited for the images to process.
+    It occurred on these steps, but the flash of the images were still successful:
+
+    ```bash
+    fastboot flash product product.img
+    fastboot flash system system.img
+    fastboot flash system_ext system_ext.img
+    ```
+
+Now, when I booted back into the OS it was stuck on the boot animation.  I waited about 5 mins, boot into fastboot > then recovery and wiped *everything* -- cache, system, files, etc.
+
+Boot animation took about a minute the next run and then boot into Oxygen OS.
+
+Note to self: Apparently the 'first boot' *can* take a while, but typically no more than 15 mins.
+
+Phone was fully operational and running on it's original version of Oxygen OS / Android 11.