Friday, March 29, 2024

Rooting and ROM hacking as an Android newbie was a risky challenge

Share

I interviewed ProtonAOSP ROM creator Danny Lin about whether rooting Android phones is still worth it in 2021.

lineageos-oneplus-7-pro.jpeg

Before I decided to switch from iOS to Android, I heard all about people who jailbreak iPhones to escape Apple’s walled garden. I never understood the appeal, personally. It wasn’t until I started testing out Android launchers that I learned about the joys of customization compared to Apple’s static, curated iOS experience.

But I’m no hobbyist, the kind of person who tugs at loose threads of technology to see what breaks before fixing it. So I have to admit to a bit of imposter syndrome when reading how my colleague Alex Dobie installed Android 11 on his old Galaxy S2, or how Andrew Myrick used to root and install nightly ROMs on his Nexus 4. I use Android phones constantly these days, but I don’t have a decade of experience rooting in the OS’s backend to call upon.

[youtube https://www.youtube.com/watch?v=dEvlnovdpA4?modestbranding=0&html5=1&rel=0&autoplay=0&wmode=opaque&loop=0&controls=1&autohide=0&showinfo=0&theme=dark&color=red&enablejsapi=1]

With these insecurities driving me, I started reading up on Magisk, ROMs, and rooted apps. My main goal: get root access and flash a new ROM on my OnePlus 7 Pro while getting no help whatsoever from my colleagues. I was curious if someone without any experience could succeed using only the online resources available to me, or if rooting and alternate OSes are better suited for Android veterans. Plus, I wanted to decide, is rooting Android phones in 2021 actually worth the effort?

Long story short, my multi-day hackathon was a stressful mess, including a Fastboot loop, several false starts, and broken TWRP image files — ending in a partial victory that came with a free tension headache.

Stumbling in the dark

oneplus-7-pro-fastboot-rooting-rom.jpeg

All of my casual root reading suggested that XDA Developers is the best mainstream authority on this topic. So I tracked down their OnePlus 7 Pro rooting guide, tried my darndest to follow the steps… and immediately ran into difficulties.

Look at some of the steps, presented without elaboration: “Reboot into your bootloader.” “Flash TWRP.” “Set up adb.” What on earth does any of that mean? What’s the difference between booting into your bootloader, fastboot, or recovery mode? Where’s the glossary?!

Rooting rookies have to parse every step for the unspoken assumptions behind them, or else risk breaking their phone for good.

After some flustered background reading, activating my phone’s Developer Tools and installing Android Debug Bridge (ADB) commands didn’t prove especially difficult. I have experience with Terminal commands, and (some) Android phones make it surprisingly easy to access the bootloader. But things grew much more dangerous after I unlocked the bootloader.

XDA told me to run TWRP with a “fastboot boot twrp_file_name.img,” using a linked TWRP file for Guacamole. I did so, at which point I got the above “Fastboot mode” logo. Progress? Nope! It stayed frozen on that screen for hours before I figured out how to send the phone to recovery mode and reboot to factory settings.

root-flash-rom.jpeg

Both of my initial attempts to root my phone nearly ended in disaster. I only persisted because I had Android phones to spare and something to prove.

During my second attempt, I noticed some sites recommended switching my A/B partition and using fastboot flash boot file_name.img instead. This time, instead of booting straight into TWRP as promised, my phone went into the generic bootloader. Worse, it didn’t matter if I shut it off, switched to recovery mode, or tried to install a new img file; the phone would immediately switch back to the bootloader. My previous recovery mode shortcut didn’t work, either. I was screwed and frustrated that my hard work wasn’t paying off.

Even more hours later, thanks to some panicked forum posts from people experiencing similar issues, I managed to escape my bootloop hell. But after two days of research and stress, I knew I wasn’t going to make TWRP work for me. So I switched over to the LineageOS wiki to see if I’d have more luck with the popular ROM.

lineageos-root-rom.jpeg

In this case, I’m happy to say I mostly succeeded. I flashed the LineageOS ROM and then installed it from recovery. I also attempted to install a custom Google Apps (GApps) suite since third-party ROMs don’t get access to the Play Store. After a few more steps, I did finally reboot into LineageOS. But for whatever reason, the GApps Suite didn’t take, limiting me to its pre-downloaded apps and whatever safe .apk files I downloaded online. And LineageOS removed superuser access in 2019, so I’d still need to install Magisk Manager or give individual apps root access over ADB.

But at this point, I was pretty mentally drained, nursing that headache I mentioned earlier. If I did have someone walk me through installing Magisk in person, I’m sure I could get my OnePlus 7 Pro rooted fairly quickly. But it does seem like most of the rooting guides in 2021 assume you already have a thorough background in the hobby.

Now, I’m trying to decide if rooting is worth the effort in the first place.

The dangers of rooting and ROMs

bootloader.jpeg

To get to the root of the problem (pun intended), I reached out to Danny Lin, who develops the ProtonAOSP custom ROM for Pixel phones. He also made waves for recreating the Material You theming engine as open-source code during the early Android 12 betas. If anyone could give me an informed opinion on the risks and justifications for rooting and ROMs, it was him.

“I wouldn’t recommend rooting or installing a custom ROM to most ‘normal’ users who just need their phone to work,” Lin told me. Although “permanent bricks are very unlikely,” he notes that many issues with ROMs are “out of the control of ROM developers,” such as when Google breaks SafetyNet.

So you need the patience to deal with occasional but inevitable breakage, plus the know-how to recognize when something goes wrong and the willingness to take the time to fix it. That’s why you need “experience with modding mobile devices” to handle ROMs safely beyond the initial installation.

As for the dangers of rooting, Lin didn’t beat around the bush about its dangers:

Rooting is a risk because it means that you’re always one accidental tap away from getting your entire device compromised, vulnerabilities in the root implementation notwithstanding. Yes, having a permission prompt is definitely better than nothing, but it’s still far riskier than not being rooted at all.

Despite that, Lin finds root to be “invaluable” as a developer for testing and debugging, and thinks it serves a purpose for tools where stock Android “falls flat,” such as full data backups. And if there’s a “root-exclusive feature” you want, “it’s probably worth the risk” to try.

Is rooting a dying art in 2021?

what-is-root-1.jpg

Plenty of Android Central readers have left nostalgic comments on how they used to flash or root their phones, but don’t anymore. I asked Lin why rooting Android phones in 2021 might be more niche than in the past, and he had a host of reasons.

As stock Android improves, the drive to root and ROM goes down, and the skill level required goes up.

First, “stock Android has also gotten more powerful,” but beyond that, many third-party Android apps have found ways to implement missing features without root access, preserving your phone’s security. Lin also noted that modding is “more complicated” than ever before because of recent Android advancements like “seamless A/B updates and dynamic partitions.”

So older Android enthusiasts give up on root and ROMs because of the increased difficulty for diminishing returns. Meanwhile, new Android fans don’t replace them because of the steep learning curve.

“Flashing can be quite daunting for new users because there’s so much more room for failure in the process than there used to be,” Lin said. “It’s a lot of steps, and missing one small detail can result in a soft brick that people don’t want to deal with.” His words were so accurate to my own experience that I could only laugh to myself.

oneplus-7-pro-3.jpg

If I had succeeded in rooting my OnePlus 7 Pro, I had planned to test out apps like YouTube Vanced, AdAway, Tasker, and others that use root access to great effect. With these apps, you can add tools like a recycling bin or terminal access, better monitor and control your energy usage or background app activity; or remove unwelcome ads from apps.

Frankly, though, most of these aren’t vital tools for my daily phone use, which mostly involves casually playing Android games and checking email. Given the serious vulnerabilities caused by opening the Pandora’s Box that is root access, I’m not sure if I’d say these tools are “worth it” to me as they would be for other power users. Plus, as Lin said, you can get some of these tools now even without root access!

I may attempt another run at rooting in the future, simply for knowledge’s sake. But I think I’m increasingly more interested in installing new ROMs like ProtonAOSP and LineageOS, because they add cool tweaks and optimizations to your phone without turning it into a ticking time bomb.

Read more

More News