Motorola G4 peregrine unable to reinstall twrp

I have a Moto G4 “peregrine” with working /e/ om it when suddenly it stopped working and when I tried to start it up it got stuck on the first screen saying it’s rooted. I can get it in fastboot flash mode though with the hold “Volume Down” + "Power"key combination, but when I try the recovery option it dies, so I can’t get it in recovery mode. When I connect it to my pc and type fastboot devices I get “TA34801E3X fastboot”, so the pc sees it, but then I try to install the latest Twrp version with “fastboot flash recovery twrp-3.3.1-0-peregrine.img” it fails because a partition can’t be erased. The entire message is as follows:
(bootloader) has-slot:recovery: not found
(bootloader) is-logical:recovery: not found
Sending ‘recovery’ (8352 KB) OKAY [ 5.297s]
Writing ‘recovery’ (bootloader) Failed to erase partition
(bootloader) Failed to flash partition recovery
FAILED (remote: ‘’)
fastboot: error: Command failed

I have a second Moto G4, that had working /e/ that I had as a backup, but I didn’t update it for a couple of months and when I put my sim card in, the phone wouldn’t recognise the sim. So I tried to update, but after downloaden the latest update and clicking “install” the update wasn’t installed and twrp was opened. I read somewhere that an older version of TWRP could be the problem, so I tried to instal the latest version. That actually worked, but now when I start this phone up I have the same problem as with the other phone, only it gets stuck on the screen with the E logo. The phone is detected by my pc, but this one also dies when I try to start up in recovery.

Does anyone have any idea how to solve this? I have no backup, so all my data will be gone if I reinstall /e/, but as long as I get my phone to work again, that’s fine with me

Thank’s in advance.

I see now you have had a working /e/ on the phone so my previous comment is n/a
You could try this for a temporary recovery. Not a long term solution though

Hmmm. no replies for 5 days and my phone are still broke :-(. I can’t reinstall /e/ because I can’t get the phone to startup in recovery. What can I do?


Well, it seems something’s still working instead of shut down…

Did you try : Fastboot mode (Vol. down + Power), scroll to “Power Off” and OK with Power ? Then boot…

Good Luke !

Did you try to use Motorola’s official flash software and revert to their stock. That would be the first step to get the phone to work. Then you can flash TWRP and come back to custom ROM’s.

Hi you guys,
Thnx for your replies.

@trefix: I don’t exactly know what you mean. When I 'm in Fastboot mode via Volume down + Power I get the attached screen. Options are:
-Normal powerup. Then it hang on the opening screen1
-Recovery. Then. the screen turns black and I hear that the phone is disconnected from the pc
-Factory. Then I get the start screen of motorla and then it starts the loading battery screen which disappears after a few seconds.
-Barcodes. Same thing as with “Factory” happens
-BP Tools. Same thing as with “Factory” happens
-QCOM. Same thing as with “Factory” happens.

So no possibility to “scroll to “Power Off” and OK with Power ? Then boot…”

I don’t know how to attache photos to my posts. Is thaat not possible?.

There is a rectangular button with a picture symbol on it.

Well, I told you may have, on phone, whithout PC :

  • power on
  • reboot bootloader
  • recovery
  • … (logs)
  • power off,

if your TWRP already works. You can “scroll” with the Vol-down button and chose with Power.

Nope, I don’t get those options. Also without connection to the pc, I only get the options I mentioned above
If I’m not mistaking, TWRP should start up if I reboot in recovery, but it doesn’t alas.

OK, I don’t know how, but suddenly I’m in recovery with TWRP running :smiley:
Now I tried to sideload the latest dev build
trying to follow the instructions for updating with a computer found here: [HOWTO] Update /e/
But sideloading the file doesn’t work. See the attached screenshots on my pc and phone.

Do any of the failure messages hint to what is wrong?
Since I don’t know how I got back into TWRP I just keep my phone connected to the pc and hope it will stay in recovery mode. If you have any clues, please let me know.

The way I flash the zip through sideload on my device ( not a moto) is

  • On the Device:
    In TWRP I get the option under Advanced - there is an option to set device in Sideload mode
  • Then on PC
    After activating adb I type adb sideload
    after this the sideload process starts. It takes some time to complete the process.
    The process can fail if the device is not connected properly, cable is faulty or not attached correctly.

Thnx for your reply Manoj.
This is exactly what I did. and then I got the failure messages you can see in the pictures. Things like “could not detect system for for dev/block/bootdevice/by-name/userdata” on the device and adb: sideload connection failed:closed.
The device was recognised bij the pc. I verified that by typing fastboot devices on the command line on the pc.
If I go to advanced filemanager on the device, I get a whole set of directories, most of which are empty. I have 2 sdcard directories, sdcard and sdcard1 although there is only 1 sdcardslot on my device. They are both empty, which shouldn’t be the case because I used the sd card for apps and to store my contacts on. I think the sdcard is actually not found.
When I go to Reboot in TWRP and click recovery or bootloader for example, I get a confirmation warning saying “No OS installed. Are you sure you want to reboot?. press back button to cancel.” Which off course I do.
By the way, it seems that now the connection between de pc and the device is lost, because when I check the connection through “fastboot devices” I get no listed devices not even after disconnecting and reconnecting the device fysicly.
Is there anything I can check so you have an idea what’s wrong?

Ok, so I tried to install the latest dev by copying it on an freshly formatted sdcard and inserting it in the device. Alas, it didn’t work
See the attached photos for the error messages.
Seems to me it is searching for directories while the directorysystem is broke, since it is unable to mount a lot of directories. On the other hand, with the advanced / file manager option in TWRP, I can see all the directories.
I don’t know, but I’m temped to wipe all data and try installing from the sdcard again, but maybe Ill just brick the device that way?

Can you try without the external SDCard. Try sideloading without the sdcard and then if it works insert the external card later.

I would try that now.

  1. First, make sure that the current TWRP version → wrp-3.3.1-0-peregrine.img on Recovery partition is installed. Finally press TWRP App “Do Not install” and restart your device.
    See also → How to Update TWRP Recovery.

  2. As a second step copy /e/ ROM latest dev build to the external microSD card.

  3. As a third step, boot the current TWRP.
    3.1 WIPE > FORMAT DATA¹ > YES type (not Advanced Wipe)
    3.2 TWRP Menu → Wipe → Advanced wipe → Dalvik / System / Data / Cache
    3.3 Back to TWRP Menu → Install →
    3.4 Wipe > Cache/Dalvik → Restart system

/e/ OS should start and initialize itself.

¹Note: “Format Data - Yes” will wipe all of your Apps, Backups, Pictures, Videos, Media and removes Encryption on Internal Storage.

@Manoj I haven’t tried that, but I managed to format s sdcard and put the latest dev on it. With the option mount in twrp the device started recognising tHe card and I could see the dev. I got an error 7, but I googled how to solve that problem and it worked for my second device. So now I have /e/ running on it, but unfortunately, the device doesn’t recognise my sim. That was the reason why I wanted to update this device anyway, so maybe that’s a hardware problem?

On the other device, Itried the same, but de error 7 is still there and installation fails because cache, data, firmware and system can’t be mounted.

So,some succes, but still not out of the woods.

I think I’ll try wiping everything like Archie advises. Wish me luck

I tried to wipe all data and even that doesn’t work. Error messages appear:
When formatting cache using make_ext4fs…
" Failed to mount cache (invalid argument)"
And all the other directories like /data, /firmware and /system can’t be mounted.
If I go to the mount option in twrp, I can only choose MicroSD Card, not cache, data, firmware, system or USB OTG, which are the other options.
I’ll try rebooting to recovery and see what happens

When I reboot to recovery, twrp starts up with the the question:
“Keep System Read only?
TWRP can leave your system partition unmodified to make it easier for you to take official updates. TWRP will be unable to prvent stock ROM from reeplacing TWRP and will not offer to root your device.”

I swiped to allow modifications. Only difference now is, that I can’t mount the sd card anymore and in file manager, I can’t see the content of the sd card anymore, so I can’t even try to install the latest dev.

By the way, I have twrp 3.3.1-0 istalled on the device, in case you were wondering. On my other device (the one that has /e/ working, but doesn’t recognise the sim) I also have 3.3.1-0, but when installing /e/, I did intstall the TWRP app (which you advise not ), and it keeps saying that I need to update TWRP, although as far as I can see, this is the latest version.

Thnx for all your help you guys. I’ve been trying to get this to work for over a week now, but I’m not giving up! Hope you’re not tired of me yet😀

With an unrooted device the official TWRP App has no useful function. See also → This app can run without root, but most features will not be available without root.