Usage: payload_dumper.py payload.bin
. Some of the images could be Ext4 instead of Android sparse format. In this case: img2simg system.ext4.img system.img
(the tool img2simg
is part of the package android-tools-fsutils
on Ubuntu).
Enable the OEM unlock option (refer to the picture OnePlus_6_OEM_unlock.jpg
). When the phone is (re)booting, press volume up until you end up in the boot loader (refer to the picture OnePlus_6_bootloader.jpg
). The phone must not have a USB cable plugged in. If it does, it will just get stuck as if it were switched off, and you'll need to hard power off it by holding the power button (still unplugged).
- XDA: How to flash Treble roms on OnePlus 6
- XDA: Mistery solved, developer documentation for GSI on One Plus 6
Despite what those links say, there is no need to flash both slots (A/B) nor to flash boot.img
:
- Flashing the current slot is enough, and I would even recommend not to flash the other slot. In case things go wrong, you'll still be able to switch to the untouched slot for booting the phone
- Flashing the
boot.img
image is required only when the device has been rooted, or it has boot-looped (more than 7 times in the case of the OnePlus 6). It's possible to look at the number of boot attempts left usingfastboot getvar all
. Flashingboot.img
will reset this count. When flashing it, you should use the stock image.
However vbmeta.img
must indeed be flashed: fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
. When flashing vbmeta.img
you should use the stock image. For going back to stock, just reflash it without the options --disable-verity
and --disable-verification
.
The user data partition must also be erased: fastboot -w
.
Finally, all those flashing operations must be done in a single fastboot session (avoid to reboot between each, as it will decrease the counter of attempts left in boot.img
and you may need to reflash it in the end).