OnePlus 8T (oneplus-kebab)
Users owning this device
How to enter flash mode
When powered off:
- Hold power button
- If the device has USB plugged in: wait for the device to vibrate, otherwise it might boot to Qualcomm MSM Mode
- Hold volume up and down
This device uses dynamic partitions which allows it to merge multiple partitions (including system) into one super partition. PostmarketOS' initramfs can't mount these logical partitions yet. We'll need to flash the rootfs directly onto the super partition.
You can try to dump your original super.img (if you want to restore your original Android installation later) by using
adb pull /dev/block/by-name/super super.img
Follow the postmarketOS porting/installation guide and use
pmbootstrap flasher flash_rootfs
to flash rootfs.
Before booting, you'll have to flash a image to your dtbo partition:
pmbootstrap flasher flash_dtbo
Note: the dtbo.img is only present after a rootfs or initramfs image generation.
Getting back to Android
Since flashing the rootfs overwrites the super partition you'll have to do some extra steps to return to a state where you can normally flash an Android ROM.
Use your backed-up super.img
Before flashing your super.img you'll have to convert it into an sparsed image that fastboot can read:
img2simg super.img super-s.img fastboot flash super super-s.img
Ideally you should be able to boot back into Android after restoring boot and dtbo or after switching to an untouched slot. If Android doesn't boot up or you encounter long loading times, bad performance, missing firmware and spontaneous crashes you should try the following options.
Wipe your super partition using super_empty.img
super_empty.img is a small metadata file you can create with Google's own tools (more research needed) and automatically with the Android Build System. If you have an LineageOS build enviroment set-up you can generate it with
Wipe the super partition using
fastboot wipe-super super_empty.img
After that you'll be able to flash a LineageOS OTA package. If the partition sizes defined in LineageOS' super_empty.img don't fit your ROM's partitions or if you're still encountering glitches you can follow this guide.
(more testing required) These tools aren't officially distributed by either Qualcomm nor OnePlus and only work under Windows.
Follow this guide.