maggu2810

OnePlus 6 / 6T

OnePlus 6 / 6T (software) modifications

Author: Markus Rathgeb


Introduction

This currently serves as a collection of some thoughts for me.

The hardware OP6 and OP6T should be very similar, so I assume the most stuff should be identical.

The hardware I ordered is a OP6 and not a OP6T. So I cannot judge if the information on this site fits to both devices.

Just to be on the safe side: I do not take any guarantees. Do whatever you want to do with this information. It is all your responsibility.

Codename

Device Name Codename
OnePlus 6 enchilada
OnePlus 6T fajita

Roadmap

Special boot modes

Recovery

Bootloader / Fastboot / Download

Unlocking the bootloader

  1. Enable OEM unlock in the Developer options under device Settings, if present.
    1. Open setting, go to “About” and tap on the “Build number” box ~10 times until the “You are now a developer” toast message appears.
    2. Go back to the main settings page, go to “System” and then “Developer options” (it might be hiding behind a dropdown menu). Toggle the switch to “Enable OEM unlocking”
  2. Connect the device to your PC via USB.
  3. Enter Download Mode
  4. Once the device is in fastboot mode, verify your PC finds it by typing: fastboot devices
    If you don’t get any output or an error:
    • on Windows: make sure the device appears in the device manager without a triangle. Try other drivers until the command above works!
    • on Linux or macOS: If you see no permissions fastboot try running fastboot as root. When the output is empty, check your USB cable and port!
  5. Now type the following command to unlock the bootloader: fastboot oem unlock
    Note: At this point the device may display on-screen prompts which will require interaction to continue the process of unlocking the bootloader. Please take whatever actions the device asks you to to proceed.
  6. If the device doesn’t automatically reboot, reboot it. It should now be unlocked.
  7. Since the device resets completely, you will need to re-enable USB debugging to continue.

See also:

Ensuring all firmware partitions are consistent

In some cases, the inactive slot can be unpopulated or contain much older firmware than the active slot, leading to various issues including a potential hard-brick. We can ensure none of that will happen by copying the contents of the active slot to the inactive slot.

To do this, sideload the copy-partitions-20220613-signed.zip package by doing the following:

  1. Download the copy-partitions-20220613-signed.zip file from here. It should have a MD5 sum of 79f2f860830f023b7030c29bfbea7737 or a SHA-256 sum of 92f03b54dc029e9ca2d68858c14b649974838d73fdb006f9a07a503f2eddd2cd.
  2. Sideload the copy-partitions-20220613-signed.zip package:
    • On the device, select “Apply Update”, then “Apply from ADB” to begin sideload.
    • On the host machine, sideload the package using: adb sideload copy-partitions-20220613-signed.zip
  3. Now reboot to recovery by tapping “Advanced”, then “Reboot to recovery”.

Installing LineageOS from recovery

See also:

Restore Partitions / Update Firmware

postmarketOS installation instructions states that you should erase the dtbo partition using fastboot erase dtbo.

Erasing the dtbo partition will make Android (and ALL Android-based software like Ubuntu Touch or TWRP recovery) unbootable on the current slot (read this page if you’re not sure what that means). You can re-flash an Android ROM via fastboot by extracting the payload.bin from the OTA zip and using a tool like android-ota-payload-extractor to get the individual partition images. It is almost never necessary to resort to extreme measures like “MSM Download tool” to reflash the device via EDL

See also:

Linux

Fedora

Setup

To run aarch64 executables we need to ensure the respective qemu-user-static package is installed and binfmt is setup correctly.

dnf install qemu-user-static-aarch64

The file /proc/sys/fs/binfmt_misc/qemu-aarch64 should exist.

If there is something wrong, check the status end if desired restart the service.

systemctl status systemd-binfmt.service 
systemctl restart systemd-binfmt.service