[How-to] OnePlus 6 - Direct upgrade (dirty flash) of /e/ OS from Android 10 "Q" to Android 13 "T"

Hello folks,

it’s been a while since my last post and my popular(-ish) step-by-step guide for the initial install of /e/ OS on OnePlus 6.

The reason for being silent is that I stayed on Android 10 for a long while, since any subsequent major update of the OS would have required flashing the stock firmware, which in turn seemed to require wiping and resetting the phone, which was not something I was looking forward to.

But these days I am on holiday and I decided to take the bull by the horns.

Since in the process of upgrading I have discovered some interesting information and facts that are not in the documentation, I thought it was useful to wrap up a new guide to share with the community.

So my present to you for the new year is:

How to dirty flash /e/ OS “T” (Tiramisu, Android 13) over /e/ OS “Q” (Quince Tart, Android 10) without wiping the phone

FROM:

TO:

Disclaimer

This procedure worked for me executing the commands exactly as reported and while using the specific origin and destination OS versions that are documented.
Before trying this, you must take a backup of all your data, including but not limited to: contacts, chats, messages, pictures, videos, music and all relevant apps’ data that is stored on your phone.
This is necessary as, if things go wrong, you may have to reset and wipe the phone, which entails all your data will be erased and gone forever.
I shall not be deemed responsible if you ran outta gas, have a flat tire, don’t have enough money for the cab, earthquakes, floods and locusts.

I personally did use a CygWin shell on Windows 11, but the commands illustrated in this guide should be identical on any computer operating system.

Reference documentation

Note: I used Lineage OS’ documentation instead of /e/ OS’ as the former was more detailed.

Download sources

Before you start

  • Read the documentation in full at least once, make sure you understand the process and have all the tools and packages at your disposal
  • Ensure your smartphone is fully charged
  • Take a complete backup of your apps’ data, contacts, images, videos etc. and make a copy of it to your computer, cloud drive or anywhere else outside of your phone
  • Download the latest /e/ OS release, the latest Stock ROM, the firmware extractor tool (all mandatory) and, optionally, the additional tools and packages listed in the Download sources links provided above
    • check that the files are not corrupted by checking corresponding md5 or sha256 checksums using the most appropriate tools or commands that are available for your computer and operating system

Preparations

You made the backup, haven’t you? :wink:

  • Install or upgrade Android platform tools (adb, fastboot) on your computer (instructions here)
  • Enable USB debugging mode on your phone
    • Settings > About Phone > Build Number
      • Tap 7 times to enable Developer Options
    • Settings > System > Developer Options > Android debugging > Enable
  • Remove screen lock password or PIN before starting the upgrade operations

Extract firmware from latest Stock ROM

  • Unzip latest Oxygen OS Android 11 stock ROM from OnePlus: OnePlus6Oxygen_22.J.62_OTA_0620_all_2111252336_287bcb1636d743d3.zip
  • Follow the instructions below to extract the firmware files from the payload.bin file found in the uncompressed Stock ROM
    • the operation should take a couple of minutes
[op6user@hal-9000:~/Downloads] ./payload-dumper-go ../OnePlus6Oxygen_22.J.62_OTA_0620_all_2111252336_287bcb1636d743d3/payload.bin
payload.bin: ../OnePlus6Oxygen_22.J.62_OTA_0620_all_2111252336_287bcb1636d743d3/payload.bin
Payload Version: 2
Payload Manifest Length: 153240
Payload Manifest Signature Length: 267
Found partitions:
LOGO (8.0 MB), abl (2.2 MB), boot (67 MB), dtbo (8.4 MB), fw_4j1ed (352 kB), fw_4u1ea (352 kB), system (3.0 GB), vbmeta (8.2 kB), vendor (1.1 GB), aop (184 kB), bluetooth (766 kB), cmnlib64 (500 kB), cmnlib (381 kB), devcfg (41 kB), dsp (34 MB), hyp (397 kB), keymaster (234 kB), modem (120 MB), qupfw (66 kB), storsec (25 kB), tz (2.1 MB), xbl_config (98 kB), xbl (3.3 MB), oem_stanvbk (975 kB), reserve (968 MB), india (321 MB)
[...]

The operation will create a subdirectory called extracted_[date]_[time] with all the individual firmware images:

[op6user@hal-9000:~/Downloads/extracted_20231227_121513] ls -l
total 5479180
-rwx------+ 1 op6user None    8011776 Dec 27 12:15 LOGO.img
-rwx------+ 1 op6user None    2183168 Dec 27 12:15 abl.img
-rwx------+ 1 op6user None     184320 Dec 27 12:15 aop.img
-rwx------+ 1 op6user None     765952 Dec 27 12:15 bluetooth.img
-rwx------+ 1 op6user None   67108864 Dec 27 12:15 boot.img
-rwx------+ 1 op6user None     380928 Dec 27 12:15 cmnlib.img
-rwx------+ 1 op6user None     499712 Dec 27 12:15 cmnlib64.img
-rwx------+ 1 op6user None      40960 Dec 27 12:15 devcfg.img
-rwx------+ 1 op6user None   33554432 Dec 27 12:15 dsp.img
-rwx------+ 1 op6user None    8388608 Dec 27 12:15 dtbo.img
-rwx------+ 1 op6user None     352256 Dec 27 12:15 fw_4j1ed.img
-rwx------+ 1 op6user None     352256 Dec 27 12:15 fw_4u1ea.img
-rwx------+ 1 op6user None     397312 Dec 27 12:15 hyp.img
-rwx------+ 1 op6user None  321073152 Dec 27 12:15 india.img
-rwx------+ 1 op6user None     233472 Dec 27 12:15 keymaster.img
-rwx------+ 1 op6user None  119820288 Dec 27 12:15 modem.img
-rwx------+ 1 op6user None     974848 Dec 27 12:15 oem_stanvbk.img
-rwx------+ 1 op6user None      65536 Dec 27 12:15 qupfw.img
-rwx------+ 1 op6user None  968146944 Dec 27 12:16 reserve.img
-rwx------+ 1 op6user None      24576 Dec 27 12:15 storsec.img
-rwx------+ 1 op6user None 2998927360 Dec 27 12:17 system.img
-rwx------+ 1 op6user None    2056192 Dec 27 12:15 tz.img
-rwx------+ 1 op6user None       8192 Dec 27 12:15 vbmeta.img
-rwx------+ 1 op6user None 1073741824 Dec 27 12:15 vendor.img
-rwx------+ 1 op6user None    3289088 Dec 27 12:15 xbl.img
-rwx------+ 1 op6user None      98304 Dec 27 12:15 xbl_config.img

Upgrade firmware

Important: if you are not running /e/ OS recovery or Lineage OS recovery, the operations described in this section will always fail with one of the following errors:

  • Could not check if partition abl has slot all
  • Flashing is not allowed for Critical Partitions

I figured out that the reason is that TWRP recovery, that I was using, does not seem to provide access to the fastbootd (note the trailing “d”) mode that is required to perform the firmware update operation that takes place on critical partitions.
Flash over either one of the above mentioned recoveries (e.g. fastboot flash recovery a_working_recovery.img) to fix the issue.
In short, if you don’t have access to a screen similar to the following, firmware flashing won’t work:
image
Please note the screenshot is not from /e/ OS recovery nor OnePlus 6, but gives the idea.

  • Reboot the phone into recovery mode to launch /e/ OS’ recovery
  • /e/ OS recovery > Advanced > Enter fastboot
    • Stop here, at the fastbootd menu level, ignoring the additional options
  • With the phone in fastbootd mode, check if the phone is correctly connected:
[op6user@hal-9000:~/Downloads] fastboot devices
a92743xx         fastboot
  • Once the connectivity is OK, send to the phone all the necessary firmware images by issuing the following commands:
fastboot flash --slot=all abl abl.img
fastboot flash --slot=all aop aop.img
fastboot flash --slot=all bluetooth bluetooth.img
fastboot flash --slot=all cmnlib cmnlib.img
fastboot flash --slot=all cmnlib64 cmnlib64.img
fastboot flash --slot=all devcfg devcfg.img
fastboot flash --slot=all dsp dsp.img
fastboot flash --slot=all fw_4j1ed fw_4j1ed.img
fastboot flash --slot=all fw_4u1ea fw_4u1ea.img
fastboot flash --slot=all hyp hyp.img
fastboot flash --slot=all keymaster keymaster.img
fastboot flash --slot=all LOGO LOGO.img
fastboot flash --slot=all modem modem.img
fastboot flash --slot=all oem_stanvbk oem_stanvbk.img
fastboot flash --slot=all qupfw qupfw.img
fastboot flash --slot=all storsec storsec.img
fastboot flash --slot=all tz tz.img
fastboot flash --slot=all xbl xbl.img
fastboot flash --slot=all xbl_config xbl_config.img
  • When successful, each of the above commands should give an output similar to the following:
[op6user@hal-9000:~/Downloads/extracted_20231227_121513] fastboot flash --slot=all abl abl.img
Sending 'abl_a' (2132 KB)                          OKAY [  0.062s]
Writing 'abl_a'                                    OKAY [  0.019s]
Sending 'abl_b' (2132 KB)                          OKAY [  0.047s]
Writing 'abl_b'                                    OKAY [  0.016s]
Finished. Total time: 0.204s

Before proceeding any further, double check that you have sent over each and every firmware image in the list and that the execution of each command was successful.

  • If that is not the case, issue or repeat the necessary commands

Dirty flash new OS (Android 13 “T”)

At this stage, you should be still in the fastbootd menu of /e/ OS recovery (/e/ OS recovery > Advanced > Enter fastboot), from which you can enter the recovery mode to install the new /e/ OS release file in zip format.

Proceed as follows:

  • /e/ OS recovery (fastbootd) > Enter recovery
  • /e/ OS recovery > Apply update > Apply from adb
  • With the phone ready to receive the zip file, send the new /e/ OS package (Android 13 “T”) from your computer:
[op6user@hal-9000:~/Downloads] adb sideload e-1.18-t-20231210360971-dev-enchilada.zip
serving: 'e-1.18-t-20231210360971-dev-enchilada.zip'  (~47%)
Total xfer: 1.00x

Please note the transfer progress may stop at 47%, but that’s OK.
It takes about 3 minutes in total (1 min for sending) to complete the installation.

  • If you need to install additional zip packages, do it now and before booting into the new operating system: this is especially true if you need to install Google apps/Google Play store
  • If desired, restore TWRP recovery as per below
    • Be prepared to give OK on the phone in case of warning about unsigned package
[op6user@hal-9000:~/Downloads]  adb sideload twrp-installer-3.7.0_11-0-enchilada.zip
serving: 'twrp-installer-3.7.0_11-0-enchilada.zip'  (~47%)
Total xfer: 1.00x
  • Once all the necessary packages are installed, reboot system: /e/ OS recovery > Reboot system now
  • Enjoy /e/ OS “T”!

Bonus: restore separate Wi-fi tiles in Quick Settings

As of Android 12, Quick Settings have changed, and Wi-fi is aggregated together with Mobile Data under the Internet tile. I don’t like this, so I found a way to separate these.

Proceed as follows:

  • If not already done, enable USB debugging mode:
    • Settings > About Phone > Build Number
      • Tap 7 times to enable Developer Options
    • Settings > System > Developer Options > Android debugging > Enable
  • Connect the phone to your computer via USB, then issue the following commands from the computer:
[op6user@hal-9000:~] adb shell
OnePlus6:/ $ settings put global settings_provider_model false
OnePlus6:/ $ settings put secure sysui_qs_tiles "wifi,cell,$(settings get secure sysui_qs_tiles)"
OnePlus6:/ $ exit

Result:
image

5 Likes

Does it may work for a rooted device on /e/OS R (Android 11) ?

I have two Oneplus 6 phones running on Android 12 /e/OS S Enchilada. I am assuming these instructions would work for me also to move to 13/T?
I wonder if it is worth the effort for an old non-geek to attempt all this. Is it worth the headache or potential heartache?
I also assume I can just stay on 12/S for quite some time and stay fat, dumb and happy? Is my assumption true?

So these instructions are for the “big jump” from Android 10 (Q) to Android 13 (T); if you are already on Android 12 (S) things are much more simple.

As no Upgrade page is shown linked off https://doc.e.foundation/devices/enchilada the best source of information is from LineageOS, where we find Upgrade to a higher version of LineageOS (e.g. lineage-19.1 → lineage-20). (19.1 → 20 is Android 12 (S) to Android 13 (T), your case).

So, while you should backup all essentials before any intervention, these instructions do not include any “Format data” phase.

  • There is a warning about using latest Android 11 firmware.

For reassurance you might check whether you already have the latest Vendor security patch level, indicated in the OP to be Nov 1 2021. (Settings > About phone > Android version.)

Some more clarification perhaps Search – enchilada recent threads.

I am looking to try this upgrade but I am still unsure. I am currently on Android 12 and on /e/ version 1.17 Enchilada dated Nov 11,2023. I am unsure on which files to download from https://images.ecloud.global/dev/enchilada/ to get to Android 13 (T)? Would I just use the [e-1.17-t-20231111351094-dev-enchilada.zip]?

What do you see ?

Usually you would simply install latest, today e-1.20-t-20240222382228-dev-enchilada.zip I see no benefit in taking an older version like 1.17.

Or did I misunderstand you ?

you would take guidance from the install page https://doc.e.foundation/devices/enchilada/install.

There are 5 fields on the line

e-1.20-t-20240222382228-dev-enchilada.zip [MD5 | SHA256] / recovery-e-1.20-t-20240222382228-dev-enchilada.img [SHA256]

This represents the /e/OS ROM and e-Recovery, plus 3 checksum files with which you can verify your downloads.

Yes my security patch level is Nov 1 2021.
That was my other confusion: Should I stay 1.17-s to 1.17-t or take latest 1.20-t? I will try the 1.20-t.
I can understand what the .zip file is but I do not have any understanding of the recovery file. The only time I ever use ADB or sideload is about every 1-5-2 years to do some function such as this so it is all greek to me and probably others. Most instruction seems to be written for those more advanced than the casual user so thanks for the help.

It seems like what I need to do is:
Download the ADB function tools and unzip them
Download the 1.20 zip and recovery files.
Enable ADB Debugging on the phone
Establish a connection with ADB between the laptop and phone.
Run adb -d reboot sideload (per the lineage update instructions).
Run adb -d sideload /path/to/zip (inserting the path to my 1.20 zip file).
Once I have installed everything successfully, click the back arrow in the top left of the screen, then “Reboot system now”.
Does this sound right? Did I miss anything?

Do I also need to ensure that OEM Unlock is enabled?
Do I also need to do the following to unlock bootloader or is that already done since I am already using /e/?
'On the computer, open a terminal and type:
adb reboot bootloader

Do I need to boot into fastboot mode?
"You can also boot into fastboot mode via a key combination:
  * With the device powered off
  * hold <kbd>Volume Up</kbd> + <kbd>Power</kbd>.
Once the device is in fastboot mode, verify your PC finds it by typing:
fastboot devices

Is this needed?
Now type the following command to unlock the bootloader:
fastboot oem unlock

It seems the instructions on the Lineage page - https://wiki.lineageos.org/devices/enchilada/upgrade/ - are much more basic than what I just detailed?

Edit you posted above while I was writing the following! :slightly_smiling_face:

Before doing anything I suggest you boot you phone into recovery to see what it is.

Boot to Recovery

With the device powered off - hold Volume Down + Power

Use this as a guide [HOWTO] use e-Recovery to wipe & format data before sideloading/install eOS. In this adventure there is nothing to do, you just exploring.

Use https://wiki.lineageos.org/devices/enchilada/install/ by all means, but you do not seem to have included the steps to install the e-Recovery.

The reassurance I mentioned is that that is already a match with the date in Android 13 in the image at the very top of this thread.

Your instruction - Use https://wiki.lineageos.org/devices/enchilada/install/ by all means, but you do not seem to have included the steps to install the e-Recovery.

I am not sure what the steps are or even what it does as I did not see them on the Lineage page for upgrade?

I said use it by all means.

Back a couple of steps …

Well they are more cryptic they include a link to the LineageOS install package which is a link. This instruction implies one might sideload the whole “package” or have the knowledge to select the bits you need.

  • Anyway we are not doing Lineage, I guess I pointed you to their upgrade page so that you can see that no “Return to stock ROM” and no “Format data” is specified. I made this digression since and because /e/ upgrade pages have been withdrawn. Upgrade From S → T should be a breeze.

The section Unlocking the bootloader is for a new install, or a locked bootloader.

I suggest you get platform tools on you PC https://doc.e.foundation/pages/install-adb and get to the bottom of the page where we are advised

After this you should be able to access adb and fastboot by typing only the below commands in a console
adb devices
or
fastboot devices

aibd, I appreciate all of your input. I have been rereading all this thread to ensure my understanding before I do any actual changes. I am still not clear on if I need to sideload the recovery file or just the .zip file. My Vendor security patch level is November 1, 2021 so does this mean I only need to sideload the 1.20…zip file that I downloaded and not bother with the recovery…img file?

I am glad you adked. Since writing more hypothetically above, I have downloaded the 1.20-t ROM and can confirm that it contains e-recovery.

Late edit, payload-dumper-go reveals:
$ ./payload-dumper-go e-1.20-t-20240222382228-dev-enchilada.zip
Found partitions:
boot (67 MB), dtbo (8.4 MB), system (3.0 GB), vbmeta (8.2 kB), vendor (1.1 GB)

You just need to ensure that in Settings > Search > Update recovery, in Developer options is set to update recovery. Then your proposed sideload of the “fully loaded” ROM is expected to work.

(When you have an A /B slot phone you see the active slot displayed in e.recovery. It is useful to learn and understand how and when the slot changes. This is only my very general advice, there is no need to think it is a problem today.)

  • Always have a backup before an intervention

Thanks, now just getting the nerve up and time to try it.

SUCCESS! on both of my Oneplus 6 phones. I am now at e-1.20-t!
I can not be the only one in this situation needing to upgrade from s to t. I do not know why there is not at least a simple to follow instruction to do the upgrade so the common user can complete this without such headaches and anxiety without having to pick through multiple sources to figure it out.

Better yet, I do not understand why the Updater on /e/ does not recognize the version and ask if the user wants to upgrade from s to t and have the upgrade built into running the Updater. If ‘we’ want /e/ to be used by the masses it needs to be made maintainable without such trouble. IOS would never work this way!

Thank you so much for your assistance. I could not have gotten this far without your help.

1 Like

You might consider writing up your first hand experience in a new thread with S → T Upgrade in the title.

Update

See [Guide] /e/OS Upgrade Android 12 (S) to 13 (T) 'enchilada'

This topic was automatically closed after 180 days. New replies are no longer allowed.