Unlocking and Rooting Stock Pixel XL


Hey. This page is more than 6 years old! The content here is probably outdated, so bear that in mind. If this post is part of a series, there may be a more recent post that supersedes this one.

I have done a DIY job on my in-car screen. It has no mobile internet (i.e. it has no SIM card) so the intention was to automagically turn on my phone’s HotSpot function and use that for the car’s internet. When my car turns on it powers up a little T-Link Bluetooth AUX audio thing I have wired in parallel to the cigarette lighter. The phone connects to that (and disconnects when ignition goes off).  This is my way of getting my phone (and the Trigger Task Launcher app) to ‘know’ I am driving. I wanted to use the app to turn on phone’s hotspot when Bluetooth connection made (i.e. I’m driving). As always, a hurdle slung itself up in front of me: the toggle hotspot function in Trigger did not work… A polite note in the app you may need to have a rooted phone to be able to (programmatically) enable a wifi hotspot…I am not sure that is true in hindsight. Anyway, prior to this wonderful hindsight I went ahead and rooted my Pixel XL phone, as I thought it would sort the issue out (*!*! Spoiler alert !*!* It didn’t).

When I have needed to root other phones, for example activating Bluetooth 3 (or maybe 4?) on my Galaxy Nexus, it’s been pretty straightforward. I thought it would be the same with my stock Pixel XL. Guess what? It’s a bit of a mission.

If you google ‘root Pixel XL’ you’ll be sent through to step-by-step guides on XDA. There seem to be two main ones:

The Magisk logo. Kind of like it. Reckon it would be better less multi-coloured? Maybe?

Neither of the step-by-steps really worked for me. The SuperSU one got stuck at installing suHide in TWRP, and I got lost with Magisk one – the links are all dead or send you to an adult colouring book (not in THAT adult way, the “Duuuur, I like to colour stuff” way) on Amazon. I figure someone gets cash from the Amazon links. I don’t know – clicking on the ‘root’ links take you to ebay sales of various root vegetables.

Magical Dawn colouring book. all the links on the XDA page for Magisk take you here. ya, its irritating. but I did learn Magisk is the Norwegian/ Swedish for Magical. This is odd, as it clearly shares a homology with the word magic comes from the Latin (and ancient Greek). At what point were Romans

I got there eventually, mostly by hit-and-miss…This post really is me just writing it down for the next time I have to work it out. Hopefully helpful for someone else too.

My Guide to Rooting a Stock Pixel XL

The first thing you have to do is unlock the phone’s bootloader…the instruction I found on XDA worked well enough for me I think from memory.

Beware:

  1. This resets your phone (but I found that Oreo pretty much backs up everything in the cloud so not that great a deal). I was too impatient to use the backup apps they suggest in various step-by-step guides.
  2. On Oreo, you get a warning every time you power on the phone when you unlocked the bootloader. Something about security (blah, blah, blah).

After fiddling around with the SuperSU method a bit I gave up on it. Here’s what I then did:

    1. I downloaded the most up-to-date TWRP custom recovery image for the PIxel XL to my PC: https://twrp.me/google/googlepixelxl.html. At the time of writing the most recent was twrp-3.2.1-0-marlin.img
    2. I opened up cmd prompt/ console/ Windows PowerShell and went to my Windows downloads folder
    3. I used the adb to reboot my USB-connected phone to  the bootloader: adb reboot bootloader
    4. I then used fastboot to get into TWRP: fastboot boot twrp-3.2.1-0-marlin.img
    5. I downloaded the latest version of Magisk from here
    6. I pushed the Magisk image on my PC to my phone. I renamed it BTW (on my desktop) to just Magisk.zip; you don’t need to though. Since we have not rooted quite yet the easy immediately accessible storage on the Pixel XL in /sdcard/. Here is the command for that operation: adb push Magisk.zip '/sdcard/'
    7. Back on the phone, in TWRP I installed this package with the install button… Just navigate tosdcard and go for it.

And that was it I think … unless I missed something. Feels much easier to describe than it was. You’ll find when you reboot your phone that you have ‘Magisk Manager’ installed as an app.

I was rooted, the phone was rooted. Everyone & -thing was happy.

One bit of confusion- solved quickly with Google – was that if, when you first unlock your phone and you are setting things up again, you turn on pin-lock or pattern- lock or whatever-lock (face lock!) in Android then you’ll not be able to get at anything in TWRP. TWRP does not seem to like the security or Android does not like TWRP poking around under its bonnet. I don’t know: either way, though an easy fix is to turn off all your security stuff until you are done rooting…or just don’t turn anything it on when you set up again after unlocking at the first stage of the procedure.

There are a couple of apps on the Google Play Store which you can use to check you are rooted okay.

EndNote (as always, nothing just works)

Even after rooting I still couldn’t use Trigger to turn on and off the hot spot  Why? Because on Android Oreo (8) they made controlling hot spot more accessible to developers (kind of, the jury is out on that) – before you had to use reflection to get at hidden methods inWifiManager. The old reflection method does not work on Oreo as a consequence, and Trigger has not been updated/ patched to take care of Oreo.

(NB you need to get Trigger to request root/ superuser access – you do this in Advanced Settings in Trigger…though not much good for what I am doing as it did not help!).

EndNote II

Today I received a Google OTA update/ patch for Oreo. Because the phone is rooted it would install (which is dumb). There is a page on the Magisk GitHub site that tells you how to get around this but it reads like a pain like in the arse. I have not done it yet. Kind of thinking I might go back to stock. Dunno.