Updating to /e/OS Pie using fastboot, adb, and TWRP on Essential PH-1

This is how I updated from /e/ Nougat to Pi/e/. A back to stock clean method. The only tools needed are fastboot and adb. Well, and TWRP.

New official Pie build is now available.

If I’m not mistaken, Pie stock images after August or September 2018 would result in a TWRP without working touch. In some cases that also means a ROM without touch if one is able to boot into it.
The patched image below apparently allows for touch and is only used until official TWRP zip can be flashed. Due to its age I’m not sure if it would work to boot an OS directly from it.

September 2018 pre-patched TWRP image with touch ( Google Drive ).

Mirrored here just in case.

In the article Installing LineageOS and Magisk on Essential Phone PH-1 using Windows it implies that the official TWRP image is no longer supported. In that article another TWRP image is used. Touch works, when on Pie firmware. This will be the image used in this article.
The previous patched TWRP image remains linked above as it works on Nougat firmware and Pie (though maybe not on recent firmware).

December 2018 TWRP image via Google Drive.
Mirrored here.

I use the Back-To-Stock zip packages instead of those available from Essential. Same images but these include wipe and nowipe batch/shell scripts, includes a cmd-here.exe for Windows, and reboots back into bootloader when finished. Preferable since there is no reason (for me) to boot into the stock ROM.

I used this last Pie build from August 2019: PQ1A.190105.112-BACK-TO-STOCk.zip

Back To Stock Essential Firmware - https://forum.xda-developers.com/essential-phone/development/stock-7-1-1-nmj20d-t3701681

Official TWRP 3.2.3-0 flashable zip is included in the above zips for convenience. Otherwise can be obtained from the TWRP site here

Steps I used. Make sure you have backed up all files and other items you want to save. Everything will be wiped.

  1. Boot into bootloader mode.
    1a. From /e/ Nougat with advanced power menu enabled, reboot into bootloader.
    1b: Without advanced power menu, reboot and keep VolumeDown button pressed.
    1c: From powered off device, hold Power+VolDn.

  2. Once in bootloader mode, plug phone into PC. Since we’re talking update/upgrade it’s assumed adb/fastboot and/or Essential drivers are installed.

  3. Unpack stock image. Open a command prompt in the unpacked directory. If adb/fastboot are not in your path then copy the needed platform tools to the unpacked directory.

  4. See if device is recognized…

fastboot devices

  1. Flash stock ROM…

flashallwipe.bat ( ./flashallwipe.sh on Linux. Script must be executable. Can also do bash flashallwipe.sh ).

That will take awhile.
In another directory with adb and fastboot I keep all the other items to be installed or pushed.

The following steps are mostly taken from the Essential rooting guide below but with some changes…

[Guide] How to Install TWRP & Root Essential Phone (Method 2)

  1. How to install TWRP (simplified)

Determine current slot:

fastboot getvar current-slot

say you get “a”

Here I install TWRP image to both slots to guarantee working touch environment regardless of slot.

fastboot flash boot_b Dec_boot_patched_TWRP.img
fastboot flash boot_a Dec_boot_patched_TWRP.img
fastboot --set-active=b

Now use volume rockers to go to RECOVERY and then press power button to select, you should boot into TWRP.
Now push the TWRP zip file to the phone…

adb push twrp-installer-mata-3.2.3-0.zip /sdcard/

Flash the TWRP zip file. INSTALL -> Select zip file -> Swipe to flash. It will install to both slots.
Then go to TWRP’s Reboot menu and change slot to “a”.
Now reboot back to recovery (not to system unless you want to boot stock ROM).

You may notice errors in red at the terminal or output screen regarding /data. Items written or pushed will be lost after rebooting into TWRP. Not sure if it has to do with encryption or what. So after flashing and rebooting back into TWRP you’ll want to format /data. After doing so, reboot back into recovery again. You should not see any errors/notices regarding /data from this point on.

  1. Via adb, push new Pi/e/ ROM and TWRP zip to /sdcard/. Flash ROM, immediately followed by TWRP zip.

Now you can choose to either…
Reboot back into Recovery if you have other items to flash such as root/Magisk/etc.
Reboot into System (eOS Pie). Setup and test.

All has worked fine on my end. Other than once just to look around, I do not boot into stock ROM. Not necessary and don’t need extra cruft automatically created by Google apps under Android/data/.

Given that I installed the TWRP image to both slots it’s probably not necessary to set the other slot (“b” in the example) as active before flashing the TWRP zip. Didn’t want to take any chances plus didn’t have the chance to check.

I invite any corrections, unnecessary steps, etc. TWRP is a must for me as I don’t do OTAs on any devices plus I usually have other items to flash after updating a ROM. Updating to Pi/e/ without TWRP is documented in the eWiki.


Sorry folks. After pasting article I had issues with a couple of links. Had to re-edit a few times. Hope all is okay now.

This is actually my first Pie ROM. My other devices are multibooters so Pie has been out of the question. Plus not too happy with the changes/restrictions Google implements with each new Android version. After running test and unofficial builds for a bit I find myself quite pleased.

1 Like

Please could you edit the tuto & make it obvious for neebees. E. g. a recent link for backups

No links for backup. For personal media files, documents, etc., you could plug in a USB-OTG flash drive or a regular one with OTG adaptor and save/copy files and directories like DCIM, Music, Movies, Pictures, etc. Your Download directory also.
Essentially manually save items you don’t want to lose to external storage, the cloud, or even your computer (your phone’s storage should show up as a drive in Windows for instance).
This is the only phone I have without microSD so I don’t have much peace of mind if it ever fails and takes everything with it. :grin:

As far as saving app data, you can use Titanium Backup or oandbackup.
TiBu can backup to a flash drive. For oandbackup you can do the backups then copy its directory ( /data/media/0/oandbackups ) to external media and later copy it back.

Note: When updating from one Android version to another (Nougat to Pie in this case) it is not a good idea to restore apps. Manually install/reinstall third party apps and then just restore their data. Less chance of problems.

As far as editing the tutorial for newbies, I was the newbie when I started the update. Did the update about half a dozen times to make sure I did it okay. Then tried to document it. Let me know which parts seem unclear or confusing. My brain’s a mess so maybe the tutorial reflects that. :yum:

1 Like

A few miscellaneous notes.

Network traffic monitor/indicator in the status bar has been disabled by Lineage for devices with a notch. Bummer.
Lock screen weather. I don’t see an option for it anywhere. Double bummer. Maybe I’m just missing something, if it is there somewhere let me know.
Cameras. We get two. Open Camera and Essential’s own Klik camera. There’s an update to Klik at the Play Store. Info implies that the update is needed for the camera to function after February 2020. Not sure what that means.

Can you release or at least describe the patch that was required to TWRP for enabling touch?

Sorry, no. I know nothing about the patch. The image was provided in the Essential Rooting Guide Method 1.

Dees_Troy is the official maintainer of TWRP. Maybe he can shed some light on that. Also check with bmg1001, the author of that tutorial.

I would love to see a new TWRP that fixes both the touch and screen offset issues.

Just so I’m clear. After fastboot flashing the TWRP image to both slots you rebooted into TWRP using the volume rockers/buttons. Touch should be working since that image has that capability.

Question. You used the set-active=b thing. That assumes that your current slot was “a”. Was that the case? Either way, try setting active to the other slot and reboot into recovery. See if touch works.

I believe the original/official steps were:

  1. Get current slot.
  2. Fastboot flash TWRP image to opposite slot.
  3. Set opposite slot as active.
  4. Reboot back into recovery using volume buttons.
  5. Push and flash TWRP zip (assuming touch works).
  6. From TWRP’s reboot menu, change/switch slot back to original slot. Reboot back into recovery.
  7. Now ready for pushing and flashing a ROM.

For me, I flashed the TWRP-SEP.img to both slots to assure I had touch on either slot before flashing TWRP zip.

I’m currently in the process of starting completely from scratch. That means starting with Nougat and working my way up. From Nougat to Pie without stock in between first.
Hopefully I don’t break things badly. The Essential is a quaternary device and /e/ is also on another device so I won’t cry too much if I kill it. Well, maybe. :grimacing:

1 Like


Finally got TWRP with touch as follow:

adb shell getprop ro.boot.slot_suffix

fastboot --set-active=_b
Setting current slot to ‘b’…
OKAY [ 0.039s]
finished. total time: 0.039s

fastboot flash boot twrp-3.2.3-0-mata.img && fastboot reboot
target reported max download size of 536870912 bytes
sending ‘boot_b’ (48712 KB)…
OKAY [ 1.705s]
writing ‘boot_b’…
OKAY [ 0.690s]
finished. total time: 2.395s

finished. total time: 0.050s

adb push twrp-installer-mata-3.2.3-0.zip /sdcard
twrp-installer-mata-3.2.3-0.zip: 1 file pushed. 22.9 MB/s (34875104 bytes in 1.450s)

Then follow

  • Go back to return to main menu, then tap Wipe.
  • Now tap Format Data and continue with the formatting process. This will remove encryption as well as delete all files stored on the internal storage.
  • Return to the previous menu and tap Advanced Wipe.
  • Select the Cache and System partitions to be wiped and then Swipe to Wipe.
  • Sideload the /e/ .zip package:
  • On the device, select “Advanced”, “ADB Sideload”, then swipe to begin sideload.
  • On the host machine, sideload the package using:

adb sideload ePie.zip

Total xfer: 1.00x

I can boot on /e/ but still NO TOUCH

Note: If I use TWRP-SEP.IMG I do not have the touch on the TWRP

Ah, I was about to respond to the post that popped up in my email. Seemed like there was a step or two that seemed missing or skipped. Was going to ask if touch was not working on both slots or just one of them. Quaternium mentioned how he only had touch on one slot in this thread.

But now I see the above post. Good that some progress was made on getting the ROM installed. I’m going to try and reproduce the issues and see how I fare.
We have to get this all squared away so the docs can be updated and finalized.

from within the folder where I extracted the ZIP PQ1A.190105.112-BACK-TO-STOCk i use the following command:

sudo ./flashallnowipe.sh
And I get: sudo: ./flashallnowipe.sh: command not found

If I do:
bash: ./flashallwipe.sh: Permission denied

I am missing something here ?

Oh, yes. The scripts are not executable. As is they’re just text files. Make them executable with…

chmod 755 flashallnowipe.sh

Then it can be run.

1 Like

Glad to say, after a long and painful day, /e/ Pie is now on my PH1 and seems ok.


  1. https://doc.e.foundation/devices/mata/

  2. I install back to store using instructions on:
    Then update Android to Pie (9) from the device with Android.

  3. TWRP
    Main difficulty was to get TWRP working (lot of issues with the touch).
    I used the TWRP-SEP.img

Switch slot:
adb shell getprop ro.boot.slot_suffix

fastboot --set-active=_a
fastboot flash boot TWRP-SEP.img && fastboot reboot

And from there follow the instructions:

Installing /e/ from custom recovery

  1. Download the /e/ install package that you’d like to install from here.
  2. If you aren’t already in recovery mode, reboot into recovery mode:
 adb reboot recovery
  1. Optional Tap the Backup button to create a backup. Make sure the backup is created in the external sdcard or copy it onto your computer as the internal storage will be formatted.
  2. Go back to return to main menu, then tap Wipe.
  3. Now tap Format Data and continue with the formatting process. This will remove encryption as well as delete all files stored on the internal storage.
  4. Return to the previous menu and tap Advanced Wipe.
  5. Select the Cache and System partitions to be wiped and then Swipe to Wipe.
  6. Sideload the /e/ .zip package:
  • On the device, select “Advanced”, “ADB Sideload”, then swipe to begin sideload.
  • On the host machine, sideload the package using:
  adb sideload filename.zip
  1. Once installation has finished, return to the main menu, tap Reboot, and then System
1 Like

Well, I’m still with the old march 3 version and a bad screen. Witch is a pity for a device supposed to be easy to install/use for mainstream users and paid more than 2.000€ for supporting the project :frowning:
Reading the posts makes me uncomfortable.
A complete & safe page would be useful.

I feel you. Did two more nights of Nougat to Pie testing that didn’t go so well (when not using a back to stock method).

I wouldn’t equate or judge the project based on a single problematic device. Not really the device but about Pie and TWRP not getting along. The issues will/can/may be present even with other ROMs. Check the XDA threads for some examples.

Yes, of course a complete and safe page of instructions would be useful. That’s the reason I was going through all the tests. Separate from what Pistou and Quaternium have used but I may try something along their lines.
Update, retain data, and not have a broken Pie wrt WiFi, Bluetooth and cellular data.

The whole TWRP touch issue (when only using 3.2.3-0 from TWRP site) is a major headache. I have found that if there is no touch in TWRP there is also no touch in the ROM (same slot). The use of TWRP-SEP.img is recommended. Otherwise doing most things via adb might be the better route.

Hej @marcdw, have you ever tried the custom recovery recommendation of LineageOS?

Yes, I have that one, from a long time ago. It’s version 3.2.1. I think I used it only once during the testing. Will give it another look.

For information only and without guarantee:

4… As mentioned above, the official TWRP version doesn’t work so download this version to …

1 Like

Many thanks @archje for the links. Will use that TWRP image as well as consult the tutorial on the next round of testing. Commencing now.

Regarding Lineage Recovery. I saw that for the first time this week. Nifty.

So I tried that Dec_boot_patched_TWRP.img. Again, since I’m testing upgrading Nougat to Pie while retaining data I hit a minor snag. Started off wanting to use that TWRP but found it has no touch on Nougat firmware. Probably because it’s based on Pie(?). Always something.
Later after /e/ Nougat was squared away and it was time to upgrade I decided to flash Pie firmware without wiping userdata. Then installed the December TWRP to both slots. Touch is initially working. Flashed Pi/e/ followed by flashing TWRP zip. Touch is indeed working, on both slots. Finally! :ok_hand:
Booted the ROM. Data and settings intact. Still, in my case, WiFi and Bluetooth just do not work. A full back to stock with wipe was in order.

Don’t know if anyone else has done an actual upgrade and if the problem is just me.