[HOWTO] Flash /e/ OS on an A/B partitioned device (OnePlus 6T with Android 10)

Goal
Flashing /e/ OS on an A/B partitioned OnePlus 6T with Android 10.
This tutorial should work with any A/B partitioned device, but you will need to adapt it.
Be careful if your OnePlus 6T is a T-Mobile locked variant! You should adapt image download, because global and T-Mobile variants are not compatible.

Disclaimer
During this tutorial, we will try to flash /e/ OS on a OnePlus 6T, which is an A/B partitioned device. But what exactly is an A/B partitioned device? Many people explained that way better than I could. Please refer to the link at the end of this how-to to learn more. But basically, it’s a device with two separated partitioned systems, allowing seamless updates, reducing risks to brick your device with breaking changes.
Trying to mess with A/B partioning is somewhat dangerous. I won’t take any responsibility if the process fails. Do this at your own risk.
I’m not sure that my tutorial will work for everyone. I’m not sure it’s the safest and fastest way to have /e/ OS installed on your OnePlus 6T. But it worked for me, so I’m sharing my experience with you, hoping it can help more people to swap from a stock OxygenOS to /e/ OS.

Thanks
Please let me begin by giving huge thanks to @Lance, @martoni and @marchottinger for their threads. This one is more or less my experience about following their steps.
Also, thanks to XDA Developers threads, LineageOS guide and OnePlus forums threads for their help. Useful links are at the end of this post.

Pre-requisites

  • a computer with adb and fastboot installed (you can get them from official Google developer site)
  • a /e/ OS ROM ZIP (refered to as “e-os-9.zip” during this how-to)
  • a stock OxygenOS Pie ROM (refered to as “stock-oos-9.zip” during this how-to)
  • a TWRP image - It must be corresponding to your actual Android version (refered to as “twrp-Q.img” during this how-to)
  • the TWRP installer - corresponding to your TWRP image version (refered to as “twrp-installer.zip” during this how-to)
  • a lot of time (this is a 42 steps guide… This will be a long and tedious process)

Guide

  1. Backup your data on an external device. This process will erase everything. One last time. Backup. Your. Data. Unless you don’t have anything to keep. Then, let’s go.
  2. First: if you use anything else than a PIN code to unlock your phone, change it now. Last TWRP image for Android 10 asks for a data decryption password. It will be easier if it’s a PIN code. Go to Settings > System > Security and change your screen locking choice by a PIN code.
  3. Enable USB debugging. Go to Settings > System > About. Tap repeatedly on “build number” until your device grants you developer access. Go back to System, then go to developer options. Enable USB debugging, as well as bootloader OEM unlocking and advanced reboot options.
  4. Reboot to fastboot mode (with buttons or advanced reboot options, or by executing adb reboot bootloader with your device connected to your computer)
  5. Once your device has booted in fastboot mode, connect it to your computer with a USB cable if it wasn’t
  6. On your computer, open a command line, and execute fastboot devices. Your device should be listed. Otherwise, try again with sudo. If it works, don’t forget to add sudo to every following fastboot command.
  7. Execute fastboot oem unlock. Ensure that your device is actually unlocked by executing fastboot oem device-info. It will tell you something like “device unlocked: true”. Please note it will ask you to erase all of your data, and that you must accept to continue.
  8. Reboot your phone
  9. Go to every classic first boot steps to initialize it until you reach the home page (don’t forget to setup a PIN code as your screen lock system)
  10. Go to Settings > System > About. Tap repeatedly on “build number” until your device grants you developer access. Go back to System, then go to developer options. Enable USB debugging and advanced reboot options.
  11. (Hopefully) say goodbye to your stock OS ROM, as this should be the last time you see it. Reboot to bootloader, and prepare for some fun.
  12. Once in bootloader, execute fastboot boot twrp-Q.img (don’t forger sudo if required). It will temporarily load the TWRP on your phone.
  13. Wait for TWRP to start. Decrypt your data thanks to your PIN code. Swipe to allow system modifications.
  14. On your computer, execute adb devices (it should list your device)
  15. Execute adb push twrp-installer.zip /storage/
  16. In TWRP, go to Wipe, don’t check any of the advanced wipe options, and swipe to do a factory reset
  17. Go to TWRP home, then install. Click on “Up a level” to go to your device drive root. Select “twrp-installer.zip” and swipe to execute.
  18. Go to TWRP home, then “Reboot”. Select reboot to recovery.
  19. You should now be in the durably installed TWRP. It won’t ask for your PIN code this time, and this will result to weird named folders in the “install” section if you go in it.
  20. Go to Wipe and execute a factory reset
  21. On your computer, execute adb push stock-oos-9.zip /storage/
  22. Then, execute adb push twrp-installer.zip /storage/
  23. Go to TWRP home, then install, click on “up a level”, go to “storage”, select “stock-oos-9.zip” and swipe to install
  24. Go back to TWRP home, then install, click on “up a level”, select “twrp-installer.zip” and swipe to install
  25. Go back to TWRP home, then go to reboot, and here comes the tricky part: note (and please don’t forget) the selected slot. Let’s say it’s A for this tutorial. If it’s B for you, just invert it at each step you see it from now.
  26. Reboot to recovery.
  27. Go to reboot. In this tutorial, we should be on slot B. If you were on slot B earlier, you should be on slot A now. If you aren’t on the wanted slot, click on it and reboot to recovery again and check that it actually changed.
  28. Go to TWRP home, then wipe, and swipe to do a factory reset like earlier
  29. Go to install (everything should have weird names)
  30. On your computer, execute again adb push stock-oos-9.zip /storage/ and adb push twrp-installer.zip /storage/
  31. In TWRP, click on “up a level”, then “storage” and select “stock-oos-9.zip”. Swipe to install. When finished, select “twrp-installer.zip” and swipe to install.
  32. At this point, we have flashed a stock OxygenOS ROM based on Android 9, as well as TWRP, on both slots. Go to TWRP home, select reboot. You should be on slot B (for this tutorial’s sake). Reboot to recovery, and check again: you should be on slot A.
  33. Go to Wipe and swipe to do a factory reset one more time
  34. Execute adb push e-os-9.zip /storage/
  35. In TWRP, select install, click on “up a level”, go to storage, select “e-os-9.zip” and swipe to install.
  36. Go to reboot, select “recovery”. You should have rebooted into LineageOS recovery (which is the ROM of top of what is built /e/ OS). If you rebooted into TWRP, go to reboot again, and select “recovery”.
  37. In LineageOS recovery, select factory reset, then format data / factory reset and do the formatting process. This will remove encryption entirely and delete all your data one more time, as well as format your cache partition.
  38. Go to advanced, select sideload
  39. On your computer, execute adb sideload twrp-installer.zip. If you have a permission issue, execute adb kill-server to kill adb deamon on your computer, and then execute sudo adb devices. Deamon will start with sudo permission, and should list your device, showing that it is waiting for sideload. So re-execute the command.
  40. Select reboot to recovery
  41. You should now be in TWRP again and you shouldn’t have any data in “install”. Go into “advanced”, select adb sideload and swipe to begin sideloading
  42. On your computer, execute (with sudo if required) adb sideload e-os-9.zip. At the end, you should be able to press “reboot system”, and this should get you to your fresh /e/ OS install! (note that we didn’t install TWRP after that, so we won’t have it on the device. You should be able to flash it also, if you want)

Big oof.

Troubleshooting

  • I followed the official /e/ doc about how to install /e/ OS on my OnePlus 6T under Android 10 twice. It bricked my phone twice.
  • I had a hard time installing /e/ OS on my OnePlus 6T. If you go into a bootloader loop, that’s a bad sign, sadly. I wrote this how-to to get out of it.
  • I also got into a recovery loop once. Re-doing the “flash stock OxygenOS ROM + TWRP installer” steps on both slots, then following the next steps helped me.

Helpful links

Do not hesitate to answer this thread if you want some help. I’m not sure I’ll be able to help you, but I’ll surely try!

Thanks,
Fluf

5 Likes

@Manoj about that part, you may want to do something :stuck_out_tongue:

1 Like

Hi @Fluf thanks for the guide. We have a warning right at the start of all guides asking users not to downgrade from 10. Having said that there will be a growing number of users who will be coming from Android 10 and would still need a guide. Let me see if we can link your guide and other such posts to the official documentation as additional help for users.

2 Likes

Hi, maybe downgrading to Android Pie from Android 10 before installing /e/ could be a solution to avoid bricking the device and having to go through the hassle of such a long process to install /e/ ? (Mine is already bricked and I still need to apply @Fluf 's solution to install /e/, so too late to try that -thanks again for this by the way!). It seems pretty straightforward (see this tutorial for example : https://www.theandroidsoul.com/how-to-roll-back-oneplus-6-6t-to-android-9-pie/ ) and then users could follow the /e/ tutorial as it currently is (providing the TWRP recovery installation works, as I for myself had to use another version, but maybe this is also because my phone had Android 10 and not Pie…)
If this works, it would be worth mentioning in the installation guide, for it seems that many OP6T devices are now running Android 10. Not sure I’m clear, but I’ll rephrase if needed!

1 Like

Hello @Fluf and @Anissa,
With the latest update from LineageOS updater manager, do you install the latest ?
If yes, did you have some issue during the installation ?
For me, there was a update before le 05/30/20 and everything was OK (good product the LineageOS updater manager).
But with the latest (05/30/20), during the reboot step, the oneplus didn’t find any OS and lineageOS recovery told me : no boot - factory restoration…
I did it because it was a loop reboot without it…
I have a new installation about LineageOS and a new issue begin…the sounds…

The sounds about notification, alarm or the phone is named with a number and not the name about the song i have chosen…And, during a alarm check, that was the notification sound for alarm…

Did you have this kinds of issue ?

martoni

I don’t have any update on /e/ OS…
Did you have a LineageOS ROM before, or did you update from /e/ OS to LOS through the updater (this could be an issue…) ?
About the alarm sound issue, I don’t have any of this kind. Maybe try the LineageOS forums ?

I didn’t use /e/ because it’s android pie and lineageOS is android 10.
And the installation guide about lineageOS is better
Was it a mistake…
I don’t know why i had this issues but i want to come back to /e/

I don’t think you can use LineageOS updater from another ROM. There must be incompatibility issues that caused your boot-loop. There are deep system differences between LineageOS and /e/ OS.
You need to flash /e/ OS again…

Sorry for my last comment but i would like to say that i used LineageOS updater only for lineageOS of course. :slight_smile:

Oh, okay! Sorry I didn’t understand. Then, it seems that it’s a LOS specific issue. Honestly, I think you will get more help on LOS forums about LOS issues :sweat_smile:

1 Like

Hello @Fluf,

If i understand good the A/B partitions, and when you want to install a new system, you have to choose the unused slot before install TWRP for exemple ?

thanks,

martoni

Not for TWRP. As it is a recovery, it is installed on both slots in any case :slightly_smiling_face:

3 Likes

I tried your guide and it worked perfectly. Thank you very much for the awesomely detailed guide!!! :smile:
Very well written, all 42 steps!! :laughing: :laughing:

2 Likes

Hey @Anissa ! Did you succeed?
I would like to be sure this how-to works for most people!

Hi @Fluf I think you can be sure this wonderful how to will work for most everyone. It’s an awesome guide!!!

1 Like

Hi @Fluf, unfortunately my internet was down these past days so I couldn’t download all the files needed to apply you how-to (and my phone connection was definitely not up to the task), but it’s now working again so I will try it tonight or tomorrow. Will let you know as soon as I’m done, I promise!

Shouldn’t it be “twrp-Q.img” ?

:scream:
I had to read your sentence like ten times to see the difference… But yes, you’re right! It’s twrp-Q.img!

@Manoj I can’t edit my post anymore… Could you please do the modification? Thanks!

2 Likes

Done. There was only one change required right?

2 Likes

Yes, thanks! That’s perfect