yashsingh1/xdaforums huggingface dataset:
[Essential Phone Guides, News, & Discussion] ultrasuper:
Successfully rooted Pie.

This will hopefully fill in some of the "not entirely obvious" intermediate steps, which aren't spelled out in the OP, for those that like me, aren't totally "familiar" yet with process/steps .. Perhaps the OP can be ammended a bit.

Waited for back order from PrimeDay. Received 8/3, finally turned it on yesterday.

Surprised it shipped with 7.1.1 and not Oreo.

Took the OTA upgrade to Pie current. After a few hrs of messing around, went for root.

Two (older) laptops w/USB 2.0 ports only, are currently booted to live versions of Deb 9.4 and 9.5. I installed "android-adb-tools" and "fastboot".

https://github.com/invisiblek/udevrules

Invisiblek's udev rules/script (99-android,rules) needed to be updated because "user" on Live Debian is not a member of group "sudo" but is a memeber of "plugdev". Then fastboot works without needing "sudo".

fastboot detected the PH-1, and installed twrp, but adb (v1.0.36) would not detect the device at all. Tried everything.

This is the cable I'm using (USB C to USB A (3.0) https://www.amazon.com/gp/product/B01E9W8KYC ), assuming it's backwards compatible to USB 2.0. Maybe that's the issue, BUT fastboot unlocking, AND chagning the active slot to "slot b", AND flashing TWRP (fastboot flash boot_b twrp-mata_11.img) all worked flawalessly w fastboot so I doubt it's the cable.

adb on this same setup works perfectly with my LG G3 (obviosly a different cable), no issue detecting the device, but with the PH-1, nothing detected by adb (yet fastboot does detect. wierd.)

(same outcome on both laptops- "adb devices" detects nothing.)

Pushed forward by just changing the USB connection on the phone from "Charging Only" to "File transfer" and used the gui to copy Magisk.zip and PIE.img to sdcard/Download.

Powered off phone, powered on to Fastboot, rebooted to Recovery.

On inital TWRP screen didn't choose to mount System as read-only (wasn't covered in the OP), chose "Install", switched to "image" from "zip" at bottom, selected Pie.img, SELECTED "Boot partition" to install to (NOT "system") (wasn't covered in the OP).

Received a "Failed to mount /system" error. Ignore and reboot back to Pie, no issue.

Install Root Checker basic from Play to verify successful root, and noted [MENTION=6039235]NanoDice[/MENTION] 's post https://xdaforums.com/showpost.php?p=77370258&postcount=1650 where he denotes that Safety Net Check will result "Invalid" but that's due to an outdated API call in Magisk-- and in effect, your device is passing Safety Net. I assume he's researched it and it's correct.

All's good here.

Thanks to all the brave souls who came before to pave the way.

**If anyone has any dang clue as to why my adb doesn't detect the PH-1, I'd be grateful to hear about it. That's an important issue needing to be resolved.
[Essential Phone Guides, News, & Discussion] NanoDice:
Lucky for you, I've had the same issue and managed to solve it.

1) Go to https://www.essential.com/developer/current-builds .

2) Scroll down to a link that says "Click here to download current Windows Drivers for Essential Phone". Download and install.

3) Once you do, it will install to Program Files (x86) >> Essential

4) Go into the ADB folder (Program Files (x86) >> Essential >> ADB)

5) Place all your .img files here.

6) SHIFT + Right Click to open Powershell in ADB folder and try again

7) Profit
[Essential Phone Guides, News, & Discussion] droidian5:
[MENTION=9266664]RavinDal[/MENTION] asked me to post step by step for rooting, but after reading this OP, that OP and the other OP, Redit, etc. etc. I realized there isn't much more to add to the existing information/steps already out there for Google to find. Also many folks have already posted their step by steps here, so I decided to just post a list of "Essential" things that are needed for rooting/roming to work. It's meant to be a very basic list. Let me know what I missed or messed up!

-Ensure you have a good ADB/Fastboot environment, use Essentials ADB/Fastboot which can be found here.

-Make sure you have a good cable, NOT the one that came in the box.

-Make sure phone is past basic setup and is working, you will need to have developer options set, then USB Debugging, and ensure OEM unlocking is enabled (may be already set/grayed out)

-REMOVE PIN/PASSCODE!!! - TWRP for PH-1 cannot decrypt phone!

-Place all items you want to flash or push in the ADB/Fastboot folder, (TWRP, boot image, Magisk, etc.)

-Place or push the boot image, Magisk, kernal, etc on the root of your phones internal storage

-Make sure both bootloader and critical are unlocked -best no-brick insurance policy out there! (SquareTrade comes in at a close 2nd)

-In TWRP - always mount system as read only, install boot.img to Boot, never install TWRP app

Helpful ADB commands:

-run commands from CMD prompt from within ADB folder. Google it to find out how

adb devices - starts ADB and shows connected devices

adb reboot bootloader - reboots phone to bootloader enabling fastboot

Cheers!
[Essential Phone Guides, News, & Discussion] aer0zer0:
To get rid of the system can't be mounted error. Mount system read/only in TWRP after flashing boot.img and custom kernel (if that's what u do) and before flashing magisk.
[Essential Phone Guides, News, & Discussion] aer0zer0:
ADB -version

Will check adb version

FASTBOOT --version

Minus minus version will check fastboot version if anybody needs it.

---------- Post added at 07:07 PM ---------- Previous post was at 07:03 PM ----------

Yeah, currently using ianmacd version.

The bts file has the wiping script (flashes, wipes) but fastboot -w does the same thing

You can fastboot erase stuff but -w is all inclusive.
[Essential Phone Guides, News, & Discussion] ultrasuper:
Thanks man but this is on Linux, not Windows. :(

*Update: All is fine. See update at bottom.

So to re-iterate for anyone who can help,

My Linux fastboot worked fine, unlocking AND transferring over/flashing TWRP to the bootloader, but

# adb devices

Does NOT detect the phone, while

# fastboot devices

DOES, and performs perfectly.

Using the same setup with my old LG G3 (and a different cable naturally),

# adb devices

detects the G3 and performs perfectly.

*Update: Everything works fine.

This is what happens when you are exhausted.

I simply forgot I had factory reset-- and in my head conflated the fact that since the bootloader was now unlocked, and therefore the Developer Option item "Allow Bootloader Unlocking" is missing WITH the "Allow USB Debugging" option also staying set-- which of course, it was not.
[Essential Phone Guides, News, & Discussion] RavinDal:
Thanks for helping out, man. One last question: which magisk version did you use? I heard there's problems with the 16.0 one. Should I install the 16.7 beta instead? Thanks!
[Essential Phone Guides, News, & Discussion] ultrasuper:
16.7 is the current stable. https://xdaforums.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445

It works for me.
[Essential Phone Guides, News, & Discussion] coconutxyz:
is there anyway to install patch boot image without twrp / pc ??
[Essential Phone Guides, News, & Discussion] loumaros:
Cheers for the quick guide. Even though I removed my pin, my device is still encrypted according to my settings menu.

Would I have to restore it to factory status? Or the no-pin-state is sufficient?
[Essential Phone Guides, News, & Discussion] droidian5:
No pin/password is sufficient
[Essential Phone Guides, News, & Discussion] sash11:
Without twrp yes, but not without a PC. You need to be in fastboot mode and flash patched boot.img from a PC. No way around that I'm afraid.
[Essential Phone Guides, News, & Discussion] ultrasuper:
Question:

Once rooted, in Settings -> System -> Developer options,

Are we supposed to uncheck Automatic system updates (apply updates when device restarts)

??

Also, now that this is OTA Pie, "About Phone" says, Pixel XL
[Essential Phone Guides, News, & Discussion] DoR3M3:
Where's the Source for the mata TWRP?
[Essential Phone Guides, News, & Discussion] sash11:
You can uncheck if you want. I do not see Pixel XL in the about phone even though I got Pie through OTA process. Where do you see Pixel XL, is it in Model & hardware? I have Model: PH-1 there.
[Essential Phone Guides, News, & Discussion] ultrasuper:
Settings -> System -> Advanced, "About phone" says "Pixel XL"

Clicking further on About phone, "Model & hardware" says "Model: Pixel XL"

Clicking further on Model & hardware, I get the "Model & hardware" popup, wherein it says

"Model: Pixel XL"

"Serial number: PM1Lxxxxxxxxxxxx"

"Hardware version: 1.8"

Amazon Halo Gray version, shipped w/7.1.1, OTA'd to Pie last week, finally installed Magisk and rooted few days ago.
[Essential Phone Guides, News, & Discussion] bmg1001:
You sure it's not a module you're using?
[Essential Phone Guides, News, & Discussion] ultrasuper:
The only things I've installed beyond what I stated as my last line above, are YouTube Vanced black themed and Daydream enabler from Magisk Modules, and a few apps like Root Checker, WiFI analyzer, LTE Discovery, Coverage and a couple of cable TV apps.

Could it be the Daydream Magisk Module?
[Essential Phone Guides, News, & Discussion] bmg1001:
Could be. Should likely disable it and check if it changes back to normal.
[Essential Phone Guides, News, & Discussion] ultrasuper:
That was it indeed.
[Essential Phone Guides, News, & Discussion] ranasrule:
Can some kind sould please point me to where I can download Magisk zip compatible with Pie ?
[Essential Phone Guides, News, & Discussion] untruestory:
How do I transfer files from my computer to device from bootloader or TWRP?

My apologies, I can't find this answer and I'm in a pinch for time...

I accidentally flashed the boot image on system and I need my phone for work today.
[Essential Phone Guides, News, & Discussion] aer0zer0:
Ooof, switch slots and boot.
[Essential Phone Guides, News, & Discussion] untruestory:
Thanks for the quick reply!

If I can I'd like to get the files from my computer to my device I can flash them in TWRP straight away.
[Essential Phone Guides, News, & Discussion] sash11:
Latest Magisk Beta 16.7 works just fine with Pie

---------- Post added at 04:45 PM ---------- Previous post was at 04:44 PM ----------

If you are in twrp, connect cable to a PC and copy files to local storage.
[Essential Phone Guides, News, & Discussion] galakanokis:
I just unrooted and re-rooted with Elemental X plus Magisk 16.7. No issues at all. Magisk is from the beta thread or download it through the app on the phone.

Fastboot Flash twrp.img

In twrp flash stock pie img

-flash EX kernel zip

-flash magisk 16.7 zip

reboot

No issues.
[Essential Phone Guides, News, & Discussion] droidian5:
Sounds like fun! I'll have to give it a go tonight.
[Essential Phone Guides, News, & Discussion] galakanokis:
I actually did it all on the phone. Used EXKM to flash the twrp boot img and then rebooted into recovery. Once in recovery flashed the previously mentioned files.

Cannot stress enough about removing PIN/password protection though. If you flash twrp in an app and reboot without removing the PIN you will hoop yourself and will be in the hunt for a PC.
[Essential Phone Guides, News, & Discussion] bmg1001:
Remember though that only /sdcard is unavailable when you have a screenlock. If you tend to flash a lot of stuff for whatever reason, you may find it easier to just use something like a root file manager or adb to transfer and keep files like boot images somewhere like /data/media/ so that you don't have to remove your screenlock.
[Essential Phone Guides, News, & Discussion] RandomPooka:
Using a USB-C OTG device works as well.
[Essential Phone Guides, News, & Discussion] galakanokis:
Cool, never thought of that but will do it this moving forward.

---------- Post added at 07:14 PM ---------- Previous post was at 07:13 PM ----------

Dropped my nice little 64Gb stick a month or so ago in my bedroom and I cannot find it. Loved that little thing.
[Essential Phone Guides, News, & Discussion] NLBeev:
Please explain how you flashed twrp with ex manager.

I see no flash function in ex manager.
[Essential Phone Guides, News, & Discussion] :
Under tools,this is how I do it it most of the time
[Essential Phone Guides, News, & Discussion] five40:
Quick question.

Why is TWRP flashed to the boot partition and not recovery like other phones?

I am guessing that's why it doesn't stick after boot.
[Essential Phone Guides, News, & Discussion] sash11:
Yes, sir. That is the reason. New A/B slot configuration is to blame for this. Recovery is baked into boot now it treble compatible devices.
[Essential Phone Guides, News, & Discussion] gk1984:
But official TWRP includes a zip that injects TWRP recovery into your boot image. This was briefly attempted here but it broke touch in TWRP. No progress since.
[Essential Phone Guides, News, & Discussion] jionny:
New to Essential phone, just updated to Pie and unlocked bootloader after reading and following directions cannot boot into twrp. I changed the name on my pc and phone to twrp.img. is there somewhere specifically I am suppose to place the twrp.img on the phone? On my pc its in my minimal adb folder
[Essential Phone Guides, News, & Discussion] bmg1001:
What does your terminal say when you try to flash TWRP? Usually you can just type "fastboot flash boot ", drag and drop the TWRP image onto the command prompt, and then hit enter. No need to keep TWRP in a specific place.
[Essential Phone Guides, News, & Discussion] jionny:
it says cannot load twrp.img I will try to drag and drop per your suggestion

---------- Post added at 01:14 PM ---------- Previous post was at 12:57 PM ----------

With all the reading I did, you made it simple easy, success, Thanks!
[Essential Phone Guides, News, & Discussion] five40:
So will this be the case with any phone that supports Treble?

If so it's a pain in the butt to have to fastboot flash twrp everytime twrp is needed.
[Essential Phone Guides, News, & Discussion] gk1984:
Ever treble phone is likely to share recovery and boot.

But the zip that injects Twrp into the boot image makes it permanent, until you flash a new boot image (update included)
[Essential Phone Guides, News, & Discussion] Natakranta:
Hi guys, I'm in search for twrp for my new PH-1. I'm surprised to see there's no official version for it on twrp.me

I see tutorials linking here to invisiblek page for twrp download. Last file I see there is twrp_mata_11.img uploaded 20 Dec 2017. Is it the latest version of twrp available for Essential? Please advise.
[Essential Phone Guides, News, & Discussion] NLBeev:
The Ess Phone arrived (Amazon US).

Updated Pie and rooted with Magisk 16.7. Flashed EX kernel.

Wondering if it's possible to install next OTA when only the stock P kernel is Flashed with EX manager.

---------- Post added 25-08-2018 at 12:14 AM ---------- Previous post was 24-08-2018 at 11:54 PM ----------

I've used this version yesterday after unlock of bootloader and critical partition.
[Essential Phone Guides, News, & Discussion] DoR3M3:
I just heard the TWRP Team got an Essential, I hope it's true... :)
[Essential Phone Guides, News, & Discussion] Natakranta:
Theoreticaly yes, unless you changed something on system partition with any of mods you use.

Thanks for confirming.
[Essential Phone Guides, News, & Discussion] TT_Vert:
Have any of you got pie rooted? I have both tried to sideload and install the zip via twrp following the instruction found many different places and I get no errors during install but upon reboot of the lineage boot image I don't see magisk. I did see mention somewhere I have to boot a modified boot image made by magisk but I don't know where it is to even specify it to boot it or its name. Any input would be appreciated, not sure if this is a pie thing or I'm just an idiot.

Dave
[Essential Phone Guides, News, & Discussion] Mathmatic:
Looking for some advice/help.

So, got my phone a few days ago, updated to Pie, and decided this evening to sit down and root. Grabbed the stock image for 9.1. No password, etc. I unlocked the bootloader (unlock and unlock_critical). Went through setup again (both times). Flashed TWRP, fine. Installed the stock boot image on boot partition b, installed Magisk16.7. Rebooted, all good.

Went ahead and set my password back, then I noticed that I didn't have internet and couldn't access most settings. And it looked like my SIM card wasn't there. Did some reading and it sounded like maybe my user account no longer had admin privileges. On a suggestion I read, rebooted to fastboot and wiped the cache, no difference.

Then I tried something that maybe I shouldn't have. Went back into fastboot and switched to boot_a to see if that would boot an older working version. Stuck at the spinning dots for a long time. Rebooted back to fastboot and reflashed TWRP. Now, I realized that since I set my password I can't do anything, so pressed reboot in TWRP and I saw I had the option to reboot to a or b, so tried a. Still spinning dots. Change back to b in fastboot, but now I'm stuck in a bootloop. Boot into TWRP and reboot selecting the b option, but still bootlooping. Kind of at a loss at this point.

Any suggestions? Did I just shoot myself in the foot?
[Essential Phone Guides, News, & Discussion] TT_Vert:
Can't you just flash back the stock boot image or the image for your ROM to at least get you back up? Or just install the rom atop what you've got. So long as you don't wipe data you should be ok. Did you actually SEE that you had root? Could you tell me your procedure that worked? I'm fighting to get root w/ magisk.

Dave
[Essential Phone Guides, News, & Discussion] DoR3M3:
I can confirm this for 16.7 I also needed to mount the system read only to flash magisk...

[MENTION=4550123]bmg1001[/MENTION], I think you need to change the rooting for Stock, so that people mount the system read only in twrp in order to flash magisk...
[Essential Phone Guides, News, & Discussion] TT_Vert:
At what point are you mounting system ro? After you install ROM but before magisk I assume? Did you use command mount -o ro,remount /system ? I cannot get that to work for some reason using adb. Perhaps you mounted RO in TWRP GUI? I tried that and did get a failed to mount /system but no dice on root still :(

---------- Post added at 12:59 AM ---------- Previous post was at 12:57 AM ----------

At what point are you mounting system ro? After you install ROM but before magisk I assume? Did you use command mount -o ro,remount /system ? I cannot get that to work for some reason using adb.. IN fact I don't even see system mounted

rootfs on / type rootfs (rw,seclabel)

tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,size=1859808k,nr_inodes=464952,mode=755)

devpts on /dev/pts type devpts (rw,seclabel,relatime,mode=600)

proc on /proc type proc (rw,relatime,gid=3009,hidepid=2)

sysfs on /sys type sysfs (rw,seclabel,relatime)

selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)

tmpfs on /tmp type tmpfs (rw,seclabel,relatime,size=1859808k,nr_inodes=464952)

pstore on /sys/fs/pstore type pstore (rw,seclabel,relatime)

none on /config type configfs (rw,relatime)

adb on /dev/usb-ffs/adb type functionfs (rw,relatime)

/dev/block/sda16 on /data type ext4 (rw,seclabel,relatime,data=ordered)

/dev/block/sda16 on /sdcard type ext4 (rw,seclabel,relatime,data=ordered)
[Essential Phone Guides, News, & Discussion] DoR3M3:
Well, I'm using the latest Oreo Fastboot images, and doing flashall.sh.

Then I boot into my shiny new Oreo, set things up I like.

Next I run adb reboot bootloader, and then I boot into twrp, and under the mount options you'll see to mount the system read only. Then I install/flash the stock boot.img, then I install/flash Magisk. ;)
[Essential Phone Guides, News, & Discussion] TT_Vert:
ohhh so you are actually using TWRP to install the stock boot.img rather than CLI via fastboot? Or after flashing magisk then booting back into bootloader and using fastboot to change boot file? Are you using the stock boot image or the one provided by lineage (lineage-15.1-20180812-UNOFFICIAL-mata.zip.boot.img)? I wonder if the fact i'm on pie is part of the issue here.

Are you just pushing all of those files (including that flashall.sh file) to the sd card and running that via adb?
[Essential Phone Guides, News, & Discussion] bmg1001:
I'll look into it. In all honesty, I've never had any issues flashing Magisk in TWRP when system was rw, but if it really does fix issues for lots of people, I'd be happy to add that tip in the OP.

It's just a bit confusing for me considering the entire point of Magisk is that it never touches /system, so it really shouldn't matter, but you never know with Magisk :P
[Essential Phone Guides, News, & Discussion] DoR3M3:
Hi, well I'm new with the phone, and typically you don't have to do anything, just install it...

I know this method of madness works in Custom Roms LOL...

But when it comes to flashing it in Stock, at first I thought it had to be flashed on the opposite slot, like how the custom roms are, and I tried it, but it's the same, flashing on either slot, it comes back complaining it can't mount the system.

This is on Oreo for me too by the way, with 16.7, maybe on Pie it works better?

So, not sure what's up...
[Essential Phone Guides, News, & Discussion] TT_Vert:
Thanks guys, I was not flashing the boot img in TWRP rather via CLI, that fixed it.

Dave
[Essential Phone Guides, News, & Discussion] NLBeev:
3 modules (Magisk): Doze for GMS, Hosts Adblock, Wellbeing beta.

All can be deleted, but I'll give it a try when an update arrives.

EDIT

My idea is to unroot & update, using EX-Kernel manager instead of a PC.

(Post #1685; [MENTION=9317968]jacksummers[/MENTION])
[Essential Phone Guides, News, & Discussion] Mathmatic:
Since I have reinstated my password (pattern) - and now am stuck in a bootloop, what is safe for me to do in TWRP in terms of wiping, backing up and/or reinstalling?
[Essential Phone Guides, News, & Discussion] spotmark:
Since you have a password you won't be able to use TWRP. Your options are to wipe data in the stock recovery or flash a BTS file.
[Essential Phone Guides, News, & Discussion] Mathmatic:
Thanks for the info. Since I already reflashed TWRP (after what seems to be a failed attempt to install the system image & magisk) can I actually get back into stock recovery? Can I just do this with fastboot erase? I already downloaded the BTS file for 9.1 (although wasn't sure if I was supposed to grab the OTA or Fastboot image)... do I use ADB to flash, or?
[Essential Phone Guides, News, & Discussion] avatar1961:
I have searched for an answer here and on google but no luck. I have tried to follow these instructions about 20 times, but when I get to the TWRP screen, I cannot swipe to unlock or anything else. Touch does not work. I am currently reflashing stock PIE and will try again, but how the heck do I get TWRP touch working or is there a way to do this without it working?
[Essential Phone Guides, News, & Discussion] galakanokis:
Can you grab the boot.img related to your ROM and flash it in fastboot? Once you flash TWRP you overwrite your kernel and need to flash it again. No need to wipe or anything just the boot.img.
[Essential Phone Guides, News, & Discussion] aer0zer0:
Let me be clear when I say do it "read only" specifically. If you mount system in twrp rw, especially stock, it may be more difficult to just flash a stock boot to remove magisk, and OTA.

The bug in twrp is just it throws a system busy error in flashing magisk at the end if you don't.
[Essential Phone Guides, News, & Discussion] avatar1961:
Got it!

Woot! got it all working!