Android Mod'sZaki's Interests

Let’s try a OnePlus 9 custom ROM!
Havoc OS V4.19


I’ve been replacing stock Android with custom ROMs for a few years now. It’s a fairly straightforward process, but it can be complicated with some newer devices. I’m going to show you how I replaced OnePlus 9’s oxygen OS 11 with Havoc OS V4.19; an AOSP ROM inspired by Google Pixel! In fact, when you create a Google account on it with your Gmail account, you’ll get an email notification that you successfully connected to a Pixel phone, instead of a OnePlus device.

I won’t be going very in-depth as far as all the necessary settings and preparations; it’s more of a general overview of the steps I took in order to flash the custom ROM. The actual step-by-step processes can be found on various websites, for example XDA developers, as well as many other independent sources online. Google is your friend; it’s not too difficult to find a guide.

Before we go through the process of flashing the ROM let’s go over the benefits of changing the Android OS to begin with. Now a lot of the benefits really are going to be for the person who relies on their Android phone for more than entertainment, making calls and, of course; staying organized in life.

Custom ROMs will offer things like overclocking, which might be useful for someone who’s into gaming, or even video editing on your phone, for example. This is becoming possible as CPUs are getting more and more powerful. There are all sorts of video editing apps that are now available that can allow you to produce professional quality videos right from your phone with these more powerful devices. Not that they aren’t capable of running on devices that aren’t overclocked, but overclocking will speed up the process. Another improvement is the removal of bloatware. You’ll find that as bigger apps fill up your phone’s memory, every bit of RAM will come in handy.

previous arrow
next arrow

And it’s also useful for someone who’s into UI customization. If you’re tired of the stock experience, you can add all sorts of improvements to the status bar which are not possible on stock Android. They may not be groundbreaking improvements, but they are nice and really just dependent on personal preference. How about those annoying ads on free apps? With a rooted device, Lucky Patcher can completely remove the Google Ads from the app. It will even make an ad-free APK so that you can use it again without going through the hacking.

Let’s talk about the disadvantages of a custom ROM. Most people who have gone through the trouble of replacing stock with a custom ROM are also going to root their device. But certain apps don’t like a rooted device. Google started using SafetyNet to check if someone has rooted their device. It’s more of a security restriction than anything, and these are like banking apps for example, that may consider a rooted device a way for a hacker to access personal information from the app. You’ll also notice that, after rooting the device, every time you boot the phone you’re going to get a message saying that your “your device may be available to attackers”. This is sort of a silly message for the “average user” actually; furthermore the majority of manufacturers also void their warranties if you unlock the bootloader to install a custom ROM, but that’s never really a big concern for someone who’s taking the time to learn about what the process involves, since restoring it to a factory state comes in handy quite often. Someone who’s only flashed a custom ROM on their phone without looking into how to restore it to factory has only done half the job, because there’s always a possibility of needing to go back to stock Android. So I will also describe how to be able to restore your phone back to stock, if necessary. As you can see, SafetyNet is the only real problem. Luckily, there are workarounds for this problem too.

previous arrow
next arrow

For me, the complete custom ROM experience has always involved flashing the custom ROM, rooting the device and hiding root so that SafetyNet apps will still function. I’ll go over basics to get all this done.

Before you can do any kind of flashing on your Android device, no matter who makes it; you need to get it unlocked from your carrier. As long as there’s no money owed to the carrier, they will gladly unlock it for you free of charge within a few days. In my case, this was a T-Mobile device, so I had to fill out an online form providing them with the phone’s IMEI and unlock code. A few days later, they emailed me my approval as well as the unlock .bin file, which is used to actually unlock the device.

So, now that the phone is unlocked, let’s start by getting the OnePlus 9 ready for the Havoc OS custom ROM. You’ll have to download a few tools in order to ensure everything goes smoothly. And you’ll have to make some changes to Windows itself to be able to use these flashing apps.

OnePlus 9 uses something called MSM Tool to restore it to the factory Oxygen OS version. This may or not be necessary for the flashing process, depending on the version of Android that the custom ROM needs before flashing. Some ROMs require an older version of Android OS. In my case, I had upgraded to Android 12. But Havoc OS requires Android 11. So I had to use MSM Tool to downgrade my phone to Android 11.

previous arrow
next arrow

After making sure all the appropriate drivers are installed and that MSM Tool is able to run correctly without driver signature restrictions, you can load the app and inside the folder you’ll find the app itself, as well as a large file that used to flash oxygen OS 11 or Android 11 onto the OnePlus 9.

Once you’ve flashed on Oxygen OS 11, you’ll have to go into developer settings and OEM unlock the phone. Once you’ve OEM unlocked the phone, go into developer settings again and enable USB debugging as well as the advanced restart option. With the advanced restart option enabled, go ahead and restart the device into the bootloader.

Here we’re going to actually unlock the device using the unlock token file provided by the carrier. After using the appropriate fastboot command as well as the token bin file you should get a message saying that the device is now unlocked. You will also have to enter the OEM unlock fastboot command. This will perform a factory reset wipe on the device.

Restart your phone, and you’ll get the warning message. It’ll boot into oxygen OS 11 and you have to go through the initial setups like it was a brand-new device. Go through the process of OEM unlocking it and getting access to advanced restart options the same as you did before. With that completed, go ahead and choose the advanced restart option to go back into bootloader. Now that you’re on a device that is completely unlocked, and you’re in the bootloader; it’s time to replace the stock recovery with the recovery for Havoc OS.

These next few steps can quite easily brick your device; so careful attention is needed. You can get the Havoc OS custom ROM from their website; it’s a single zip file (it may be a good idea to get their official Gapps too). Extract the payload.bin from the original Havoc OS zip file. Now use Payload dumper to extract its image files. Next, use fastboot to flash the necessary image files. This should replace the stock recovery with LineageOS’s recovery. Go ahead and reboot into the new recovery. You’re going to have to download a file called copy partitions. Some devices like the OnePlus 9 for example have two different partitions, so it’s a little more complicated. They’re separated into two different slots, and you’ll have to make sure that you’re flashing the correct files to the correct slot or else you end up with a brick. You’ll have to ADB sideload the copy partitions zip file from your PC to the OnePlus 9. Go to the main menu of the recovery and select factory reset. Now go back to the main menu again and reboot the phone back into recovery. With these steps completed we can now finally flash Havoc OS. Sideload the Havoc OS zip file. And you’ll see that the installation is beginning. Installation progress may stall at 47%, but that doesn’t mean there’s a problem. Next you’ll see that step 1/2 is completed, wait for step 2/2 to complete. Return to the main menu and reboot to the system, and now you have Havoc OS installed on the OnePlus 9.

You’ll notice right away that this is very different from the oxygen OS UI. After all, this is a ROM based on the pixel. As well as a lot of cool tweaks added by the Havoc OS team. One of my favorite features other than the usual status bar UI tweaks is a network meter in the status bar as well as a nice looking FPS meter for gaming. Including the ability to change brightness by sliding your finger across the status bar.

Now for the rooting problem. It’s not really a difficult fix. Use Magisk to root the device. Once rooted, you’ll notice some apps won’t work with a rooted device. You’ll have to “hide root”. Once you’ve hidden root, you can test it by using an app like YASNAC (Yet Another SafetNet Attestation Checker). It will tell you if your device passes the SafetyNet checks. If it does, you’re good to go! Install any app you like without worrying about being rooted.

I’ve been using this ROM every day, and I’ve had no issues at all. I don’t think I will ever go back to stock. The OnePlus 9 does have a few other custom ROM choices, but Havoc OS is one of the top ROMs available. Whichever ROM you choose, you’ll still have a great custom ROM experience.


What's your reaction?

In Love
Not Sure
Zaki Uddin
I love cooking, photography and travelling to interesting places! In my free time I am planning to see as much of the US as I can and internationally too. When I'm not busy I also enjoy going to concerts, watching anime and playing videogames.

Leave a reply

Your email address will not be published. Required fields are marked *