20240827

Tips for custom ROMs on your OnePlus 7T

I've been messing around with custom ROMs for my OnePlus 7T phone. I wanted to document a few tips and tricks I ended up using, because most of the web sites with information on this seem kind of skeezy.

My phone is a OnePlus 7T. I have no idea what other phones these steps will work on. Probably some other OnePlus phones, but I really don't know, sorry.

Securely installing OnePlus fastboot drivers

TLDR: with device manager showing the unknown entry, click Windows Update -> check for updates, then advanced, then optional updates.

Most of the steps start with using Android's platform tools to boot into fastboot/bootloader mode using adb reboot bootloader and then some series of commands using the fastboot tool. The problem I had is once booted into the bootloader, the fastboot tool wouldn't find any devices.

I'm on Windows 11, and in Device Manager I saw an entry for an unknown Android device with no driver. I searched online and found that you're supposed to install a special driver for it, but most web sites offered their own links for a driver and said stuff like turn off driver signing verification.

Let me be clear: do not turn off driver signing verification. You don't need to, to get this working.

When you've got Device Manager showing you a driver it doesn't know about, go into Windows Update and click to check for updates. Once the spinner is done, go into Advanced options, then scroll down and click on Optional Updates. Might have to expand the "driver updates" section. There should be an entry for the fastboot driver.

Unbricking your phone if you're stuck in fastboot mode

If you get into fastboot and something in your install fails, fear not, this phone has a built-in recovery mode, if you have the right tools on your PC. The right tools were ones I found on https://onepluscommunityserver.com/.

Inside the download package was a tool called "MsmDownloadTool V4.0.exe". You run this tool and (unfortunately) allow it admin privileges, although I seriously doubt it actually needs them to function.

Choose "other" on the first dialog.

To get your phone to show up in the list, do the following. The steps are important to do in the right order.

  1. Unplug the phone from USB
  2. Power off the phone
  3. Press and hold Vol+ and Vol-. Keep holding them.
  4. While still holding them, plug in USB. Keep holding them! This boots the phone into something called EDL. I think it means Emergency DownLoad.
  5. Keep holding down those buttons! When the phone show up in the list in the MSM tool, click the Start button in the tool.
  6. Once the tool starts successfully transferring stuff to the phone, whew, you can finally release Vol+ and Vol-

The reason you have to hold the buttons down so long is that EDL mode times out after several seconds if you release the buttons, so you have to wait until the tool is actually doing a transfer before it's safe to let go.

Getting out of EDL mode

If you need to get out of EDL mode, press and hold Vol- or Vol+ and Power for several seconds. The phone should boot back to fastboot or boot up fully.

Local upgrade after unbricking your device

The OnePlus community server only had a link to Android 10 or 11, not the latest Android 12, so my first step after unbricking was upgrading to the same version I'd had on my phone before I messed with it. The phone did start auto-updating but to some intermediate version, not the latest one that I wanted.

Luckily some kind soul randomly uploaded those OnePlus upgrade files somewhere. Wow.

You copy the zip file with that official upgrade to the root of your device's internal storage. Go into the device's software update settings. Pause or cancel any over-the-air update in progress. Then hit the gear button in the corner and choose local upgrade. It should let you pick the upgrade zip file.

Locking the boot loader

Everyone is confronted with having their device wiped when unlocking the boot loader at the start of the process. What I didn't realize is that locking it would also wipe my device. So my advice to you is after you get the new OS booting, lock the boot loader right away before you start customizing the device or installing stuff.