My phone won't boot properly after I try to install a custom ROM

Search This thread

lazzr

Member
May 3, 2021
17
0
Hello. I've tried many different ways to install the customs ROMs on here for Moto G8 Power (XT2041-3) but nothing has worked. When I try to flash using fastbootd every ROM except the Lineage one fails at the stage where I try to load the system.img. Even when I think I've correctly installed Lineage that way, when I go to reboot my phone it won't boot properly. I keep getting the screen alternating between the Motorola icon and the unlocked bootloader warning screen. It does that repeatedly for a while and then eventually boots as if I am powering on my phone for the first time out of the box after buying it.
So I've also tried TWRP. Again, I can seemingly install some of the flashable zips (Lineage and Omnirom), but when I reboot the same thing happens. Motorola screen, unlocked bootloader warning screen, etc, repeately for a couple of minutes, and then it boots to the Android system that came with the phone. As if there's been a total factory reset and I am turning on the phone for the first time. ADB sideload doesn't work either because even though it can detect ADB devices at first, as soon as I go to sideload on TWRP and then try "adb sideload .....zip" on the terminal of my computer (Linux) it doesn't seem to recognise any ADB devices any more.
I know it says to reboot to recovery after installing a custom ROM, but the same thing happens if I try that. Some sort of bootloop I think, and then basically a factory reset start.
TWRP doesn't seem to permanently install on my phone. If I try going into bootloader and then recovery after I have just used TWRP then all I get is the 'No Command' screen. Could this be part of the reason? I recently found out about DM-Verity. Could something on my phone be preventing changes to the system? It's really frustrating. Previously when I've installed custom ROMs on other Motorola phones I haven't had any problems. Any suggestions would be much appreciated. Thanks
 

lazzr

Member
May 3, 2021
17
0
Thanks tinbilly but I'm still unsure what to do. I hadn't tried CrDroid before so before anything I tried flashing those image files via fastbootd. Same problem - it failed at system.img. Which leaves me unable to boot into custom ROM or stock ROM. Before when that has happened I have always been able to just reflash stock using the commands on the XML file. Now even the first command fails (fastboot getvar max-sparse-size) so I don't seem to be able to get back to stock at the moment. I'll keep trying.

I didn't know how you flashed stock ROM to partition b. The only way I can think to change to partition b is to go into fastbootd and use the "fastboot set_active b" command. Or to flash TWRP (which doesn't work at the moment) and change slots that way. I think changing it on fastbootd might have messed me up a bit because it just went into a bootloop when I tried to do anything after that. For some reason I seem to be back in partition a now though (I typed "fastboot getvar all" while I was in fastbootd and it came back showing slot a).
 

tinbilly

Member
Dec 23, 2017
41
10
BlackBerry KEYone
Moto G Power
Here is my suggestions:

1. Hard reset your device following this or this. They are basically the same instruction. Hopefully this will get your phone back to the stock rom. If not, then just try step 2 below.

2. Install the xt2041-3 stock rom on your device by following the instructions in the download link. Or you could try this method.

3. Once you are back to stock rom, you can install any custom rom via fastboot mode.

Hope that will help.
 
Last edited:
  • Like
Reactions: TiTiB

lazzr

Member
May 3, 2021
17
0
Thanks for that. I'm going to work on it over the weekend and see how I get on. I feel like I've spent too many valuable hours of my life trying to figure this out. If only this custom ROM thing could just be straightforward for everyone all the time.
 

lazzr

Member
May 3, 2021
17
0
Here is my suggestions:

1. Hard reset your device following this or this. They are basically the same instruction. Hopefully this will get your phone back to the stock rom. If not, then just try step 2 below.

2. Install the xt2041-3 stock rom on your device by following the instructions in the download link. Or you could try this method.

3. Once you are back to stock rom, you can install any custom rom via fastboot mode.

Hope that will help.
Cheers for your suggestions but nothing has worked. The phone wasn't taking any commands to reinstall stock ROM so I went to fastbootd (via recovery - no command - hold power button and up) and did a factory reset from there. Then I was able to flash the commands on the stock ROM xml file via the bootloader. So I got back to stock fine. But after trying to flash Lineage OS it seems to have worked fine but when I go to reboot I keep booting to bootloader. I tried fastboot oem fb_mode_clear but that didn't change anything. I'll keep trying different things and let people know if I find a solution.
 

Beetle84

Recognized Contributor
Oct 24, 2013
2,396
1,399
Hervey Bay
Cheers for your suggestions but nothing has worked. The phone wasn't taking any commands to reinstall stock ROM so I went to fastbootd (via recovery - no command - hold power button and up) and did a factory reset from there. Then I was able to flash the commands on the stock ROM xml file via the bootloader. So I got back to stock fine. But after trying to flash Lineage OS it seems to have worked fine but when I go to reboot I keep booting to bootloader. I tried fastboot oem fb_mode_clear but that didn't change anything. I'll keep trying different things and let people know if I find a solution.
Did you format data before or after installing lineage os? As in, where you have to type yes, not just wiping data.
 

lazzr

Member
May 3, 2021
17
0
Did you format data before or after installing lineage os? As in, where you have to type yes, not just wiping data.
Hi Beetle. I always swipe to the right to wipe the cache etc. And after flashing I swipe to wipe the dalvik. But I'm never given the option to type yes. I'm not sure what you mean.

I've spent a lot of time wondering why TWRP never reboots when I try to reboot into recovery after flashing a zip. I just realised (after reading the instructions for flashing ArrowOS on this forum) that I can flash TWRP to partition b as well by using the commands:
fastboot flash recovery twrp.img
fastboot flash recovery_b twrp.img

By doing that I was able to (or so I thought) install the zip to the inactive slot b, and then reboot to recovery using TWRP, and it comes back as having the active slot b. I got excited but when I went to reboot system the same thing happened. Just some sort of bootloop thing. Nothing seems to work. I've tried OmniROM and Stag zips as well.
 

Beetle84

Recognized Contributor
Oct 24, 2013
2,396
1,399
Hervey Bay
Hi Beetle. I always swipe to the right to wipe the cache etc. And after flashing I swipe to wipe the dalvik. But I'm never given the option to type yes. I'm not sure what you mean.

I've spent a lot of time wondering why TWRP never reboots when I try to reboot into recovery after flashing a zip. I just realised (after reading the instructions for flashing ArrowOS on this forum) that I can flash TWRP to partition b as well by using the commands:
fastboot flash recovery twrp.img
fastboot flash recovery_b twrp.img

By doing that I was able to (or so I thought) install the zip to the inactive slot b, and then reboot to recovery using TWRP, and it comes back as having the active slot b. I got excited but when I went to reboot system the same thing happened. Just some sort of bootloop thing. Nothing seems to work. I've tried OmniROM and Stag zips as well.
When you press wipe in twrp, down the bottom is a button 'format data', tap that, type yes and enter.

Then reboot.
 
  • Like
Reactions: sd_shadow

lazzr

Member
May 3, 2021
17
0
When you press wipe in twrp, down the bottom is a button 'format data', tap that, type yes and enter.

Then reboot.
Thanks. I tried it but then I end up with no zip file in my internal storage so have nothing for twrp to install. I tried copying and pasting the file from my PC to my Android folder but it was going to take about a week to copy over. I also can't use ADB sideload for some reason. I get this:

adb: sideload connection failed: no devices/emulators found
adb: trying pre-KitKat sideload method...
adb: pre-KitKat sideload connection failed: no devices/emulators found

and

E:Unable to get child ID

on my phone when I cancel the sideload. I can't figure it out at all.
 

lazzr

Member
May 3, 2021
17
0
I also just tried flashing my stock recovery to replace twrp. After I had already used twrp to format everything. Then went to fastbootd and tried flashing the image files. They looked like they had installed but now when I reboot it automatically takes me to bootloader instead of into system.
 

tinbilly

Member
Dec 23, 2017
41
10
BlackBerry KEYone
Moto G Power
In twrp, there's no option to wipe system. So in my case, I replaced twrp with stock recovery, then did a Factory Reset [Advanced > Reset options > Erase all data (factory reset)].

Before "tried flashing the image files" in fastbootd, did you "fastboot set_active a"?
 

lazzr

Member
May 3, 2021
17
0
In twrp, there's no option to wipe system. So in my case, I replaced twrp with stock recovery, then did a Factory Reset [Advanced > Reset options > Erase all data (factory reset)].

Before "tried flashing the image files" in fastbootd, did you "fastboot set_active a"?
I've tried the "fastboot set_active a" but it still doesn't work. I've factory reset through stock recovery too, and seem to have tried everything I can think of. I miss my old original Moto G which was easy to install on. I've been trying for weeks and keep running into the same issues. I'll keep trying over the next few days and report back if I solve it in case anyone else has the same problem.
 

tinbilly

Member
Dec 23, 2017
41
10
BlackBerry KEYone
Moto G Power
Mine is a XT2041-1. What I did:

1. flashed back to stock ROM 10_QPE30.69-16
2. rebooted the phone, then set it up (I did not upgrade to Android 11 as notified by the system)
3. wiped the phone using System > Advanced > Reset (just to be safe)
4. flashed to crDroid 7.4 (Android11-based)

You said you failed to load the custom ROM's system.img. What is the exact error message? Please attach some screenshots as well.
 
  • Like
Reactions: sd_shadow

lazzr

Member
May 3, 2021
17
0
Mine is a XT2041-1. What I did:

1. flashed back to stock ROM 10_QPE30.69-16
2. rebooted the phone, then set it up (I did not upgrade to Android 11 as notified by the system)
3. wiped the phone using System > Advanced > Reset (just to be safe)
4. flashed to crDroid 7.4 (Android11-based)

You said you failed to load the custom ROM's system.img. What is the exact error message? Please attach some screenshots as well.
I thought I'd try some more possible ways to fix it before replying but I've just wasted another few hours to no avail. I have the flashable zips for OmniROM 11 and Lineage, but I can't even get TWRP to ask for a password anymore so all my files show up as gobbledegook. Not that I think they would work either because they haven't so far.

The one that I thought had been successful was installing Lineage images using fastbootd, but whenever I go to reboot I end up in bootloader. The bootloader log says "Reboot mode set to fastboot". I have no idea how to get out of that. Fastboot fb_mode_clear doesn't work.

I thought I would try to root the phone (I know people say you don't need to do that first but I'm sure in the past I have done) but I can't get Magisk to install.

I installed Lineage images again, and then after it rebooted into bootloader I installed TWRP and tried entering the dd commands on this page in the terminal (I didn't know how to do the backup in section 2 of the instructions):
All I got back was "no such file or directory".

The error message from installing images (the one below was CrDroid 7.4 but it happens with most of them) seems to be quite common from what I can tell from reading other people's posts. I have also I tried "sudo" before flashing the system image because I've seen that recommended, but it didn't work either:

writing 'system_a' 5/6 (usually 3/3 on other ROMs)...
FAILED (remote: Operation not permitted)
DSC05181.JPG
Wiping my data and formatting has caused me some issues too. I've done that many different things that I can't remember what exactly, but I do know that when I tried to install ZIP files using TWRP the Failed to mount '/system_root' error message came up a few times.
I've attached an images below to give an example of the types of other red screen messages I've had:
DSC05178.JPG
Forgive the long message. If any of this gives you any ideas or you've seen it before then please let me know. To be honest I just want a phone without all the google stuff on it and the amount of time I've spent on this I'm feeling like I should just get myself a different phone it would be easier to install on.
 

lazzr

Member
May 3, 2021
17
0
A final attempt for now. I factory reset through fastbootd. Then "installed" Lineage image files. Rebooted and ended up in bootloader. Flashed TWRP, which this time could recognise my folders. ADB pushed Omnirom zip to my data folder. Tried a wipe, got lots of error messages, then tried installing the zip, and got the below:DSC05182.JPG
This whole experience has been brutal.
 

tinbilly

Member
Dec 23, 2017
41
10
BlackBerry KEYone
Moto G Power
From my experience with TWRP on my XT2041-1, I won't go with TWRP to flash a custom ROM. So just forget TWRP for now.

One important question, I think: Can you flash and boot your device to stock Android 10? [Note: I find this is a reliable method to go back to stock ROM. Just make sure you get the correct one matching your device.]

If yes, let take it as a starting point. From there, I suggest you wipe the phone using System > Advanced > Reset then flash to a Custom ROM using fastbootd. Btw, which custom ROM you prefer and intend to flash on your phone?
 

tinbilly

Member
Dec 23, 2017
41
10
BlackBerry KEYone
Moto G Power
A final attempt for now. I factory reset through fastbootd. Then "installed" Lineage image files. Rebooted and ended up in bootloader. Flashed TWRP, which this time could recognise my folders. ADB pushed Omnirom zip to my data folder. Tried a wipe, got lots of error messages, then tried installing the zip, and got the below:View attachment 5309925
This whole experience has been brutal.
What did you do after factory reset? How did you install Lineage image files? Please briefly describe what you did step-by-step. Just briefly.
 

lazzr

Member
May 3, 2021
17
0
From my experience with TWRP on my XT2041-1, I won't go with TWRP to flash a custom ROM. So just forget TWRP for now.

One important question, I think: Can you flash and boot your device to stock Android 10? [Note: I find this is a reliable method to go back to stock ROM. Just make sure you get the correct one matching your device.]

If yes, let take it as a starting point. From there, I suggest you wipe the phone using System > Advanced > Reset then flash to a Custom ROM using fastbootd. Btw, which custom ROM you prefer and intend to flash on your phone?
I can boot to stock using the same list of commands in that link. Starting with fastboot getvar max-sparse-size. Then I set up my phone to enable USB debugging and "file transfer" under default USB configuration. Then "ADB reboot bootloader", and click to enter recovery. I get the "No command" screen so I hold the power button and press up. Then "enter fastboot" to enter fastbootd. I've followed the next few instructions exactly as everyone says. Set active a, flash boot then system etc, then erase userdata.

This time I enabled "PTP" instead of "File Transfer" under default USB configuration to see if it made any difference. It still won't load system and I get this message:

sending sparse 'system_a' 1/2 (720896 KB)...
OKAY [ 20.736s]
writing 'system_a' 1/2...
(bootloader) Preflash validation failed
FAILED (remote failure)

I don't understand how it helps to install stock ROM and then wipe the phone using System > Advanced > Reset. That just puts me back to the same place as after I installed stock and I have to go in Developer Options etc again.

I'll try any ROM. I'm trying CrDroid now but it doesn't work. Lineage is the only one that seems to install system but I can't reboot to system.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Here is my suggestions:

    1. Hard reset your device following this or this. They are basically the same instruction. Hopefully this will get your phone back to the stock rom. If not, then just try step 2 below.

    2. Install the xt2041-3 stock rom on your device by following the instructions in the download link. Or you could try this method.

    3. Once you are back to stock rom, you can install any custom rom via fastboot mode.

    Hope that will help.
    1
    Hi Beetle. I always swipe to the right to wipe the cache etc. And after flashing I swipe to wipe the dalvik. But I'm never given the option to type yes. I'm not sure what you mean.

    I've spent a lot of time wondering why TWRP never reboots when I try to reboot into recovery after flashing a zip. I just realised (after reading the instructions for flashing ArrowOS on this forum) that I can flash TWRP to partition b as well by using the commands:
    fastboot flash recovery twrp.img
    fastboot flash recovery_b twrp.img

    By doing that I was able to (or so I thought) install the zip to the inactive slot b, and then reboot to recovery using TWRP, and it comes back as having the active slot b. I got excited but when I went to reboot system the same thing happened. Just some sort of bootloop thing. Nothing seems to work. I've tried OmniROM and Stag zips as well.
    When you press wipe in twrp, down the bottom is a button 'format data', tap that, type yes and enter.

    Then reboot.
    1
    Mine is a XT2041-1. What I did:

    1. flashed back to stock ROM 10_QPE30.69-16
    2. rebooted the phone, then set it up (I did not upgrade to Android 11 as notified by the system)
    3. wiped the phone using System > Advanced > Reset (just to be safe)
    4. flashed to crDroid 7.4 (Android11-based)

    You said you failed to load the custom ROM's system.img. What is the exact error message? Please attach some screenshots as well.