Troubleshooting: TWRP Boot Loop after OTA update in MOTO G4 (XT1621 Athene) - Moto G4 Questions & Answers

Hi. This is my first post in this forum. I had this problem, the phone always started in TWRP Mode after updating by OTA update, I should NOT have updated it this way, but I have done it still. :cyclops: XD
To fix it, try this:
TWRP Method:
1- Go into TWRP -> Go to Advanced -> Go to Terminal:
Enter
2- Please make a backup first of these files in SD card:
Code:
cp /dev/block/platform/soc.0/7824900.sdhci/by-name/mota /sdcard/mota2
cp /dev/zero of=/dev/block/platform/soc.0/7824900.sdhci/by-name/misc /sdcard/misc2
3- Type this exactly:
Code:
dd if=/dev/zero of=/dev/block/platform/soc.0/7824900.sdhci/by-name/mota
HIT ENTER
Code:
dd if=/dev/zero of=/dev/block/platform/soc.0/7824900.sdhci/by-name/misc
HIT ENTER
4- Restart the phone.
Recommendations: Freeze or change name of the Motorola Update App "com.motorola.ccc.ota" ( /system/priv-app/3c_ota/3c_ota.apk ) to solve the continuous update message.
Work fine in my:
MOTO G4 XT1621 Athene
Android version: 7.0
Kernel: 3.10.84-ElementalX-G4-1.04
Firmware version: NPJ25.93-14-8.1
Sorry for my bad writing. Correct me if necessary.

Hi,
Thank you very much. It worked on my Moto G4 XT1621, but there is an error in the cp command (backup): "cp /dev/zero of=/dev/block/platform/soc.0/7824900.sdhci/by-name/misc /sdcard/misc2" should be "cp /dev/block/platform/soc.0/7824900.sdhci/by-name/misc /sdcard/misc2"
When I ran the dd command I had an no space error, but I ran the second dd command anyways (it also had the same error) but after the restart the phone boot directly to android and not to TWRP
Thanks again.
David.
matiashl said:
Hi. This is my first post in this forum. I had this problem, the phone always started in TWRP Mode after updating by OTA update, I should NOT have updated it this way, but I have done it still. :cyclops: XD
To fix it, try this:
TWRP Method:
1- Go into TWRP -> Go to Advanced -> Go to Terminal:
Enter
2- Please make a backup first of these files in SD card:
Code:
cp /dev/block/platform/soc.0/7824900.sdhci/by-name/mota /sdcard/mota2
cp /dev/zero of=/dev/block/platform/soc.0/7824900.sdhci/by-name/misc /sdcard/misc2
3- Type this exactly:
Code:
dd if=/dev/zero of=/dev/block/platform/soc.0/7824900.sdhci/by-name/mota
HIT ENTER
Code:
dd if=/dev/zero of=/dev/block/platform/soc.0/7824900.sdhci/by-name/misc
HIT ENTER
4- Restart the phone.
Recommendations: Freeze or change name of the Motorola Update App "com.motorola.ccc.ota" ( /system/priv-app/3c_ota/3c_ota.apk ) to solve the continuous update message.
Work fine in my:
MOTO G4 XT1621 Athene
Android version: 7.0
Kernel: 3.10.84-ElementalX-G4-1.04
Firmware version: NPJ25.93-14-8.1
Sorry for my bad writing. Correct me if necessary.
Click to expand...
Click to collapse

any chance this will work on my xt1625?

dr1445 said:
any chance this will work on my xt1625?
Click to expand...
Click to collapse
Same question running lineage on my xt1625. Have this issue where it always reboot to twrp after I had did the OTA update

Moto g4 plus always booting in to twrp
matiashl said:
Hi. This is my first post in this forum. I had this problem, the phone always started in TWRP Mode after updating by OTA update, I should NOT have updated it this way, but I have done it still. :cyclops: XD
To fix it, try this:
TWRP Method:
1- Go into TWRP -> Go to Advanced -> Go to Terminal:
Enter
2- Please make a backup first of these files in SD card:
Code:
cp /dev/block/platform/soc.0/7824900.sdhci/by-name/mota /sdcard/mota2
cp /dev/zero of=/dev/block/platform/soc.0/7824900.sdhci/by-name/misc /sdcard/misc2
3- Type this exactly:
Code:
dd if=/dev/zero of=/dev/block/platform/soc.0/7824900.sdhci/by-name/mota
HIT ENTER
Code:
dd if=/dev/zero of=/dev/block/platform/soc.0/7824900.sdhci/by-name/misc
HIT ENTER
4- Restart the phone.
Recommendations: Freeze or change name of the Motorola Update App "com.motorola.ccc.ota" ( /system/priv-app/3c_ota/3c_ota.apk ) to solve the continuous update message.
Work fine in my:
MOTO G4 XT1621 Athene
Android version: 7.0
Kernel: 3.10.84-ElementalX-G4-1.04
Firmware version: NPJ25.93-14-8.1
Sorry for my bad writing. Correct me if necessary.
Click to expand...
Click to collapse
Thank you very much
Both dd commands worked for my XT 1643.I deleted 3c it's file before doing this. I get normal booting after trying lot of tricks.

matiashl said:
Hi. This is my first post in this forum. I had this problem, the phone always started in TWRP Mode after updating by OTA update, I should NOT have updated it this way, but I have done it still. :cyclops: XD
To fix it, try this:
TWRP Method:
1- Go into TWRP -> Go to Advanced -> Go to Terminal:
Enter
2- Please make a backup first of these files in SD card:
Code:
cp /dev/block/platform/soc.0/7824900.sdhci/by-name/mota /sdcard/mota2
cp /dev/zero of=/dev/block/platform/soc.0/7824900.sdhci/by-name/misc /sdcard/misc2
3- Type this exactly:
Code:
dd if=/dev/zero of=/dev/block/platform/soc.0/7824900.sdhci/by-name/mota
HIT ENTER
Code:
dd if=/dev/zero of=/dev/block/platform/soc.0/7824900.sdhci/by-name/misc
HIT ENTER
4- Restart the phone.
Recommendations: Freeze or change name of the Motorola Update App "com.motorola.ccc.ota" ( /system/priv-app/3c_ota/3c_ota.apk ) to solve the continuous update message.
Work fine in my:
MOTO G4 XT1621 Athene
Android version: 7.0
Kernel: 3.10.84-ElementalX-G4-1.04
Firmware version: NPJ25.93-14-8.1
Sorry for my bad writing. Correct me if necessary.
Click to expand...
Click to collapse
There is no mota file in my phone's /by-name folder. Instead there is the following:
boot
cache
expdb
flashinfo
frp
keystone
lk
logo
metadata
nvdata
nvram
oemkeystore
otp
para
proinfo
protect1
protect2
recovery
seccfg
secro
system
tee1
tee2
userdata
And the path is slightly different: /dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name
My phone is a Moto C Plus xt1723 2GB ram/16GB memory dual sim
Which file do i go with?

matiashl said:
Hi. This is my first post in this forum. I had this problem, the phone always started in TWRP Mode after updating by OTA update, I should NOT have updated it this way, but I have done it still. :cyclops: XD
To fix it, try this:
TWRP Method:
1- Go into TWRP -> Go to Advanced -> Go to Terminal:
Enter
2- Please make a backup first of these files in SD card:
Code:
cp /dev/block/platform/soc.0/7824900.sdhci/by-name/mota /sdcard/mota2
cp /dev/zero of=/dev/block/platform/soc.0/7824900.sdhci/by-name/misc /sdcard/misc2
3- Type this exactly:
Code:
dd if=/dev/zero of=/dev/block/platform/soc.0/7824900.sdhci/by-name/mota
HIT ENTER
Code:
dd if=/dev/zero of=/dev/block/platform/soc.0/7824900.sdhci/by-name/misc
HIT ENTER
4- Restart the phone.
Recommendations: Freeze or change name of the Motorola Update App "com.motorola.ccc.ota" ( /system/priv-app/3c_ota/3c_ota.apk ) to solve the continuous update message.
Work fine in my:
MOTO G4 XT1621 Athene
Android version: 7.0
Kernel: 3.10.84-ElementalX-G4-1.04
Firmware version: NPJ25.93-14-8.1
Sorry for my bad writing. Correct me if necessary.
Click to expand...
Click to collapse
Sorry for bringing this up in 2019, but I got stuck in recovery bootloop when upgrading Stock Nougat to Oreo (OPJ28.111-12).
Even when flashing via fastboot adb, it did only boot by pressing START button on fastboot mode, after flashing any ROM, or after any reboot.
Your method worked perfectly in my XT1640, thank you !!

Related

[Fix] Stuck at TWRPviaBump after installing 10L/any OTA?

all credits go to thecubed.
i feel sorry for the guy @ q&a section, that had the same experience . had to go through wipe.
will have to remember to update via lg pc suite now to retain apps etc. then just redo bump if ever. thanks autoprime,thecubed and the rest of the amazing devs.
http://forum.xda-developers.com/showthread.php?t=2451696
thecubed said:
Howdy all!
Did you install TWRP and then take the OTA, now you can't get your phone to boot normally, but you do see TWRP?
Here's the easy fix:
If you have ADB access, plug in your phone and run this:
Code:
adb shell
dd if=/dev/block/platform/msm_sdcc.1/by-name/fota of=/sdcard/fota-backup.img
dd if=/dev/zero of=/dev/block/platform/msm_sdcc.1/by-name/fota
Then you should be able to successfully reboot your phone via the TWRP menu option, or via a simple reboot command in adb.
If you DONT have ADB access (because of an early build of TWRP), you can simply use TWRP's awesome "terminal command" option to run the following:
Code:
dd if=/dev/zero of=/dev/block/platform/msm_sdcc.1/by-name/fota
You'll have to type that whole thing out, and be VERY careful with spaces and punctuation. One wrong letter and you could nuke your phone.
After that finishes, you can reboot and continue on your happy way!
Let me know if this helps anyone!
As usual, I'm on #lg-g2 in Freenode as IOMonster, if I'm around I'll be happy to help wherever I can.
Click to expand...
Click to collapse
http://forum.xda-developers.com/lg-g3/development/fix-stuck-custom-recovery-trying-ota-t2907508
if that doesn't work, try autoprime's with added step for misc.
after that you can delete the files located at (using es file explorer) device>cache>fota
autoprime said:
LG G3 Stuck in Recovery Fix
Background
This thread is to help those who get stuck in custom recovery every time they try to boot into the rom.. usually after trying to take an OTA. Now that we're all rooted and unlocked this might be needed soon. Inspired by IOMonster's [FIX] Installed TWRP and now you're stuck after OTA? thread for the LG G2. Sometimes wiping FOTA was not enough and wiping the misc partition was also needed. But wiping the entire partition isn't the best idea. I've made a flashable zip to automate this process to properly fix being stuck in TWRP/CWM due to "stuck fota" or "stuck misc"​Fix
Flash LG_G3_Flash2FixStuckRecovery.zip to backup the current stuck fota/misc partitions and then fix them to allow proper booting.
Flashing LG_G3_Flash2FixStuckRecovery.zip creates a backup of your FOTA and Misc partitions in the /sdcard/FOTAnMisc_Backup/ folder.
1. Download the LG_G3_Flash2FixStuckRecovery.zip and place it on your phone. You can use TWRP's MTP feature to copy it from computer to phone, use OTG w/connected storage containing zip or use adb push to get the file onto your phone...
Code:
adb push LG_G3_Flash2FixStuckRecovery.zip /sdcard/
DOWNLOAD FROM CODEFIRE HERE
2. Flash LG_G3_Flash2FixStuckRecovery.zip in recovery or use adb commands below to fix boot issues..
Code:
adb shell
su
dd if=/dev/zero of=/dev/block/platform/msm_sdcc.1/by-name/fota
dd if=/dev/zero of=/dev/block/platform/msm_sdcc.1/by-name/misc bs=256 count=1 conv=notrunc
reboot
If you are still booting into TWRP/CWM then you may have accidentally flashed the custom recovery img to the boot partition slot instead of the recovery partition slot. Reflash the rom in TWRP/CWM which should fix the boot.img... or download the required boot.img, place on root of internal storage ( /sdcard/ ) and flash the boot.img in TWRP/CWM...
Code:
dd if=/sdcard/boot.img of=/dev/block/platform/msm_sdcc.1/by-name/boot
reboot
Click to expand...
Click to collapse

After LineageOS Update 08.31.2017 i stuck in bootloop into twrp

Hi,
i tried to update my phone via the integrated updater. It did not start the update and now fails booting into android. it boots every time into twrp.
i tried several possible solutions:
reflash other version
reflash the latest version
flashed fulmics
factory wipe
reflashed twrp
tried to
inshadesofgrey said:
If you get into a recovery boot loop (where the phone keeps booting into the recovery, and not the OS), this will fix it without losing any data. (NO FACTORY RESET NEEDED)
Go to TWRP recovery terminal commands, and enter the following:
dd if=/dev/zero of=/dev/block/platform/msm_sdcc.1/by-name/fota
PRESS ENTER
THEN TYPE
dd if=/dev/zero of=/dev/block/platform/msm_sdcc.1/by-name/misc
THEN PRESS ENTER
REBOOT
This should boot up your phone without any changes.
Click to expand...
Click to collapse
but failed
now i am out of knowledge...
has anyone an idea?
Regards!
Christian
did you tried to restore everything to stock with a kdz file? you can find it on google and you can flash it putting the device in download mode and using lgUP / uppercut to do so.. if you need help you can send me a PM
one_ctrl said:
did you tried to restore everything to stock with a kdz file? you can find it on google and you can flash it putting the device in download mode and using lgUP / uppercut to do so.. if you need help you can send me a PM
Click to expand...
Click to collapse
Is there any better solution for this problem?
I solved it once with a full reinstall an this uppercut tool.
On reddit for other phones there is the solution to boot to bootloader and do
Code:
fastboot continue
resuming boot...
FAILED (remote: unknown command)
finished. total time: 0.001s
But this does not work.
It seems my phone boots to twrp because the lineage os updater app set s.th. to automatically boot to twrp. How can we remove this auto-boot to twrp flag?
Sorry for bringing up this again. I did an OTA update on lineageos on my lg g6. The phone booted correctly in twrp, I installed the update but now the phone boots directly to twrp without any way to let it boot the os. How did you resolve this?
Thanks
Only solution back to stock & after install LOS and wait until bug is fixed.
I use a lg g pad x 8.0 and ran into the same issue.
fastboot continue would not work.
the dd commands did not work either
I think the "msm_sdcc.1" is device specific.
In recovery, I used the file manager to look in /dev/block/platform and notice that "msm_sdcc.1" did not exist but there was one folder in there. I went in there and there was another and kept going til I found the "by-name" folder
then I ran the dd command replacing "msm_sdcc.1" with what was on my device.
I did it for "fota" and "misc" and then my device booted
Someone else has had this problem @gnackwatschn, you can find a way to fix the boot loop here https://forum.xda-developers.com/lg-g6/help/twrp-bootloop-lineageos-ota-update-t3746014/post75488796#post75488796
WARNING [brick]
eng3 said:
I use a lg g pad x 8.0 and ran into the same issue.
fastboot continue would not work.
the dd commands did not work either
I think the "msm_sdcc.1" is device specific.
In recovery, I used the file manager to look in /dev/block/platform and notice that "msm_sdcc.1" did not exist but there was one folder in there. I went in there and there was another and kept going til I found the "by-name" folder
then I ran the dd command replacing "msm_sdcc.1" with what was on my device.
I did it for "fota" and "misc" and then my device booted
Click to expand...
Click to collapse
WARNING! I ran into the same problem on the LG G6 with the nightly update dated Nov 1, 2018. Did what you did, but wrote down the command.
After navigating to the TWRP > Advanced > Terminal, first do
Code:
ls /dev/block/platform
Mine had one entrie: soc, which had two entries: 624000.ufshc and 74a4900.sdhci
only 624000.ufshc had a by-name directory containing fota and misc, so my commands ended up being:
Code:
dd if=/dev/zero of=/dev/block/platform/soc/624000.ufshc/by-name/fota
dd if=/dev/zero of=/dev/block/platform/soc/624000.ufshc/by-name/misc
The commands run, saying:
Code:
dd: writing '/dev/block/platform/soc/624000.ufshc/by-name/fota': No space left on device
8193+0 records in
8193+0 records out
4194304 bytes (4.0MB) copied), 2.783000 seconds, 11.5MBs
and similar for misc.
Reboot to system gives a warning, Your device has failed a routine safety check and will not boot.
Now I'm stuck.... guess its time to start another thread.

Tried to OTA update, now phone only boots into TWRP. ROM is still there.

Hi all, I'm having an issue where I tried to do the OTA update, which failed since I have a TWRP installed.
Now, whenever I boot my phone, it goes to TWRP by default. I can still go to the bootloader and start (or fastboot continue) to enter my OS, but is there a way that I can set that by default?
Thanks!
You can't install OTA update if you're rooted/TWRP. First you'd have to unroot.
Anyways to fix your problem do this:
Go to TWRP> advanced> terminal> and type these 2 commands
1)
dd if=/dev/zero of=/dev/block//bootdevice/by-name/fota
2)
dd if=/dev/zero of=/dev/block//bootdevice/by-name/misc
Should get you out of TWRP bootloop
The OTA is in cache... Wipe caches, reboot, and don't accept the OTA again.
LiteSoul said:
You can't install OTA update if you're rooted/TWRP. First you'd have to unroot.
Anyways to fix your problem do this:
Go to TWRP> advanced> terminal> and type these 2 commands
1)
dd if=/dev/zero of=/dev/block//bootdevice/by-name/fota
2)
dd if=/dev/zero of=/dev/block//bootdevice/by-name/misc
Should get you out of TWRP bootloop
Click to expand...
Click to collapse
Yeah, I realized that afterwards, which was what I mentioned in the OP.
Thanks so much btw, that worked! Guess now we wait until a custom 83 is released
LiteSoul said:
You can't install OTA update if you're rooted/TWRP. First you'd have to unroot.
Anyways to fix your problem do this:
Go to TWRP> advanced> terminal> and type these 2 commands
1)
dd if=/dev/zero of=/dev/block//bootdevice/by-name/fota
2)
dd if=/dev/zero of=/dev/block//bootdevice/by-name/misc
Should get you out of TWRP bootloop
Click to expand...
Click to collapse
This solved my problem. Thank you so much!

Boot/Reboot always goes to TWRP.

I broke my previous G5+, so I bought another one and quickly unlocked the bootloader etc. with drtechie's toolkit.
Boot/Reboot always goes to TWRP. How do I clear this?
I'm able to boot ResurectionRemix by going in to FastBoot/BootLoader by holding 'Vol-' + 'Power' and picking 'Start'.
Tordenflesk said:
I broke my previous G5+, so I bought another one and quickly unlocked the bootloader etc. with drtechie's toolkit.
Boot/Reboot always goes to TWRP. How do I clear this?
I'm able to boot ResurectionRemix by going in to FastBoot/BootLoader by holding 'Vol-' + 'Power' and picking 'Start'.
Click to expand...
Click to collapse
Me too, phone is XT1687, factory unlocked, bootloader unlocked rooted, install was good most of the day, an OTA update / reboot BAM!
TWRP every reboot
Wipe caches in TWRP and reboot if it's caused by an OTA update, a quick Google search would have found that... This issue has been addressed dozens of times here.
acejavelin said:
Wipe caches in TWRP and reboot if it's caused by an OTA update, a quick Google search would have found that... This issue has been addressed dozens of times here.
Click to expand...
Click to collapse
ResurectionRemix doesn't do OTA, and wiping caches doesn't affect this afaik.
Tordenflesk said:
ResurectionRemix doesn't do OTA, and wiping caches doesn't affect this afaik.
Click to expand...
Click to collapse
Sorry, I don't know your issue... I meant to quote @thomwin321as that is likely the issue there.
No-one?
Tordenflesk said:
I broke my previous G5+, so I bought another one and quickly unlocked the bootloader etc. with drtechie's toolkit.
Boot/Reboot always goes to TWRP. How do I clear this?
I'm able to boot ResurectionRemix by going in to FastBoot/BootLoader by holding 'Vol-' + 'Power' and picking 'Start'.
Click to expand...
Click to collapse
Try flashing the stock rom in fastboot, it fix the problem with the recovery, after, install custom recovery, root and custom rom.
I have solved this issue! For reference, the following threads were useful:
https://forum.xda-developers.com/showpost.php?p=74320886&postcount=6
https://forum.xda-developers.com/showpost.php?p=72298526&postcount=14
The key is finding the correct misc file to zero out. From a terminal with root access, or the TWRP terminal:
# cd /dev/block/platform/soc
# find . -name misc
./7824900.sdhci/by-name/misc
# dd if=/dev/zero of=/dev/block/platform/soc/7824900.sdhci/by-name/misc
Further reboots should no longer go to TWRP. Enjoy!
martinmcu said:
I have solved this issue! For reference, the following threads were useful:
https://forum.xda-developers.com/showpost.php?p=74320886&postcount=6
https://forum.xda-developers.com/showpost.php?p=72298526&postcount=14
The key is finding the correct misc file to zero out. From a terminal with root access, or the TWRP terminal:
# cd /dev/block/platform/soc
# find . -name misc
./7824900.sdhci/by-name/misc
# dd if=/dev/zero of=/dev/block/platform/soc/7824900.sdhci/by-name/misc
Further reboots should no longer go to TWRP. Enjoy!
Click to expand...
Click to collapse
The last command worked on my G5 and helped me to get out from TWRP bootloop. Thanks!
pochutkova.smotana said:
The last command worked on my G5 and helped me to get out from TWRP bootloop. Thanks!
Click to expand...
Click to collapse
This really worked?
---------- Post added at 02:26 AM ---------- Previous post was at 01:53 AM ----------
pochutkova.smotana said:
The last command worked on my G5 and helped me to get out from TWRP bootloop. Thanks!
Click to expand...
Click to collapse
#dd line?
jerryspring said:
This really worked?
---------- Post added at 02:26 AM ---------- Previous post was at 01:53 AM ----------
#dd line?
Click to expand...
Click to collapse
Yeah the other stuff doesn't work (permission denied) but the last DD line worked for me.
This works for TWRP Bootloop fix if your phone OS is only accessible via Fastboot but it keeps booting in to TWRP without you hitting the buttons.
Thanks!
Use this command
Fastboot continue
It will solve your problem
Perfect Solution
NO use of pc!
open twrp recovery.
mount system, leave the rest as it is.
Go to advanced, terminal
type dd if=/dev/zero of=/dev/block/platform/soc/7824900.sdhci/by-name/misc
run it.
done problem solved.
The 7824900 or the path to misc can be different for different devices(other than moto g5 plus) but you can navigate that through file manager inside twrp.
I can confirm this work on g5s plus (sanders) running pie rom, thanks neighbor!
I did the step mentioned :
# dd if=/dev/zero of=/dev/block/platform/soc/7824900.sdhci/by-name/misc
And now my phone is stuck at screen where it says "your device has been unlocked and can't be trusted. ID : N/A, your device will boot in 5 seconds".
When I do Power button + volume up/down nothing happens. It turns off the screen and shows the same screen again.
martinmcu said:
I have solved this issue! For reference, the following threads were useful:
https://forum.xda-developers.com/showpost.php?p=74320886&postcount=6
https://forum.xda-developers.com/showpost.php?p=72298526&postcount=14
The key is finding the correct misc file to zero out. From a terminal with root access, or the TWRP terminal:
# cd /dev/block/platform/soc
# find . -name misc
./7824900.sdhci/by-name/misc
# dd if=/dev/zero of=/dev/block/platform/soc/7824900.sdhci/by-name/misc
Further reboots should no longer go to TWRP. Enjoy!
Click to expand...
Click to collapse
You sir is my savior. THXXXXXXXXXXXXXXXXXXX
Hi, I'm trying to resolve this issue too running the adb shell command, but I'm getting 'Permission denied' when I use WIndows command prompt, guess I need to be rooted?
I reflashed stock 8.1 yesterday with the Moto G5 Toolkit and it was booting into the 'No command' screen...
TWRP gone too.
Edit: I got it to work by flashing TWRP then running the dd command from the Advanced > Terminal inside TWRP
BopNiblets said:
....snip....
Edit: I got it to work by flashing TWRP then running the dd command from the Advanced > Terminal inside TWRP
Click to expand...
Click to collapse
That's the way it has to be done right from the start.
martinmcu said:
I have solved this issue! For reference, the following threads were useful:
https://forum.xda-developers.com/showpost.php?p=74320886&postcount=6
https://forum.xda-developers.com/showpost.php?p=72298526&postcount=14
The key is finding the correct misc file to zero out. From a terminal with root access, or the TWRP terminal:
# cd /dev/block/platform/soc
# find . -name misc
./7824900.sdhci/by-name/misc
# dd if=/dev/zero of=/dev/block/platform/soc/7824900.sdhci/by-name/misc
Further reboots should no longer go to TWRP. Enjoy!
Click to expand...
Click to collapse
It worked for me. Thank you very much.
Issue Resolved; Little Tweak needed.
Thanks for the posts. I was able to resolve the issue.
However if the "dd" line doesn't work then try the following steps which resolved my reboot issue!
# cd /dev/block/platform/soc
# find -name misc
you will get the below result!
./7824900.sdhci/by-name/misc
if you are successful until this step then we just need cut short the "dd" code because we are already in the right directory!
just use the following command,
# dd if=/dev/zero of=/7824900.sdhci/by-name/misc
That's it!! you shouldn't be seeing the TWRP boot loop again!

[Guide] Recover IMEI fully detailed

TRY AT YOUR OWN RISK I AM NOT RESPONSIBLE FOR ANY DAMAGES
It may or may not work
So I spent the last 48 hours trying to fix my phone following a lot of tutorials and finally after combining some methods together here is the simplest solution.
1- install twrp 32-bit
2- wipe everything including internal storage
3- with twrp connect to pc
4- transfer the debloated stock firmware download from here
5- flash it
6- reboot to system after full boot still no signal
7- turn off and boot to bootloader
8- run commands (fastboot erase modemst1, modemst2)
9- reboot and voila signal is back + imei is back (cant fix the 4g if any know how let me know)
If you want to install a custom rom 8.1.0 like pixelexperience follow these steps after the previous ones
1- reboot to recovery
2- install no-verity-opt-encrypt-5.1 download from here
3- reboot to recovery
4- wipe > advanced wipe > data only
5- reboot to bootloader
6- flash twrp 64 bit
7- start recovery
8- wipe > slide to factory reset
9- flash custom rom
10- reboot to system > error in sim card detection
11- reboot and voila works like charm but also no 4G only 3G
Can you post the twrp 32-bits? I can't find it
//---//
I do with twrp-3.1.1.0 and the imei keeps 0
Fehra said:
Can you post the twrp 32-bits? I can't find it
//---//
I do with twrp-3.1.1.0 and the imei keeps 0
Click to expand...
Click to collapse
It's on the first page of the dev section
Click here
AhmedtSadek said:
So I spent the last 48 hours trying to fix my phone following a lot of tutorials and finally after combining some methods together here is the simplest solution.
1- install twrp 32-bit
2- wipe everything including internal storage
3- with twrp connect to pc
4- transfer the debloated stock firmware download from here
5- flash it
6- reboot to system after full boot still no signal
7- turn off and boot to bootloader
8- run commands (fastboot erase modemst1, modemst2)
9- reboot and voila signal is back + imei is back (cant fix the 4g if any know how let me know)
If you want to install a custom rom 8.1.0 like pixelexperience follow these steps after the previous ones
1- reboot to recovery
2- install no-verity-opt-encrypt-5.1 download from here
3- reboot to recovery
4- wipe > advanced wipe > data only
5- reboot to bootloader
6- flash twrp 64 bit
7- start recovery
8- wipe > slide to factory reset
9- flash custom rom
10- reboot to system > error in sim card detection
11- reboot and voila works like charm but also no 4G only 3G
Click to expand...
Click to collapse
First thnks for sharing, i spend all day on it trying a lot of ways and nothing, i followed the steps with the stock rom and the signal looks like came back in the first view, but i went to see the IMEI and still 0, i tried to make a call and nothing, rebooted and the signal was lost. I really don't know what to do anymore, everything that i try fails =\
A possible solution from the G5 Plus forum
Hi all - I've done some work on potter (Moto G5 Plus) around the IMEI issue. I was wondering if someone would be able to see if what I have found for the G5 Plus, applies to other Moto phones. Below is my thread:
https://forum.xda-developers.com/g5-plus/how-to/fix-persist-resolve-imei0-explanation-t3825147
So, if someone is willing to help out, all you need is a stock rom with root access. Ideally I'd get two volunteers - one who has never flashed an oreo rom, and a second who has flashed an oreo rom and has had IMEI 0 at some stage (if it appears resolved, that's OK, you can still help). What is important for both scenarios is that you have never flashed someone else's persist.
All you'd need to do to help out is run the following commands via adb or in a shell, and paste the results:
Code:
su
ls -l /persist
That ensures a root shell (su), then lists details about the top level files in the persist folder, including their permissions and ownership.
The second one is this (still in a root shell, so su again if need be):
Code:
find /persist -type f
If anyone has questions, I'll keep an eye on this thread, and I'm also happy to take private messages.
Cheers
NZedPred said:
Hi all - I've done some work on potter (Moto G5 Plus) around the IMEI issue. I was wondering if someone would be able to see if what I have found for the G5 Plus, applies to other Moto phones. Below is my thread:
https://forum.xda-developers.com/g5-plus/how-to/fix-persist-resolve-imei0-explanation-t3825147
So, if someone is willing to help out, all you need is a stock rom with root access. Ideally I'd get two volunteers - one who has never flashed an oreo rom, and a second who has flashed an oreo rom and has had IMEI 0 at some stage (if it appears resolved, that's OK, you can still help). What is important for both scenarios is that you have never flashed someone else's persist.
All you'd need to do to help out is run the following commands via adb or in a shell, and paste the results:
Code:
su
ls -l /persist
That ensures a root shell (su), then lists details about the top level files in the persist folder, including their permissions and ownership.
The second one is this (still in a root shell, so su again if need be):
Code:
find /persist -type f
If anyone has questions, I'll keep an eye on this thread, and I'm also happy to take private messages.
Cheers
Click to expand...
Click to collapse
I tried that thread but it gives me error "chown: bad user 'rfs'"
AhmedtSadek said:
I tried that thread but it gives me error "chown: bad user 'rfs'"
Click to expand...
Click to collapse
Hi, as I stated in the potter thread and above, I need someone who has never installed an Oreo rom to run the commands in my post above. Then I will be able to see the correct ownership for cedric. The 'fix' commands in my Potter thread are specific to Potter.
So to take something from what you posted in the Potter thread, I can see a similar issue, as the owner of your rfs folder is a user and group called "oem_2903" which indicates that the same issue is present.
renanfamous said:
First thnks for sharing, i spend all day on it trying a lot of ways and nothing, i followed the steps with the stock rom and the signal looks like came back in the first view, but i went to see the IMEI and still 0, i tried to make a call and nothing, rebooted and the signal was lost. I really don't know what to do anymore, everything that i try fails =\
Click to expand...
Click to collapse
Yes same problem bro.. with me xda help us plzz what we can do
Hey again, I've worked on another workaround that I have tested on my G5 Plus, that should work with the G5 as well. This will also allow me to identify the correct owner of the rfs folder, which is key to making this work.
For someone who is willing, please back up your persist partition first, then try the following:
Boot into stock rom, ensuring that you have root enabled
Run the following commands via adb or a shell
Code:
su
chmod -R +X+r+w /persist/rfs
chmod -R +X+r+w /persist/hlos_rfs
Then reboot. Your IMEI should be recreated now. Now run the following and post the full output so that I can work out who the correct owner of the rfs and hlos_rfs folders are:
Code:
su
ls -lR /persist/rfs
I flashed a 8.1 Oreo room and then used fastboot erase modemst1,2. This recovered 4g and imei ( no voltle)
I got my volte after flashing stock Oreo.. by fedrey.
Sonisudhanshu said:
I flashed a 8.1 Oreo room and then used fastboot erase modemst1,2. This recovered 4g and imei ( no voltle)
I got my volte after flashing stock Oreo.. by fedrey.
Click to expand...
Click to collapse
Did you had ever restored that moto g4 Persist backup for volte.?
akshu2697 said:
Did you had ever restored that moto g4 Persist backup for volte.?
Click to expand...
Click to collapse
First of all this a g5 thread.
secondly i just simply installed stock oreo and that recovered my 4g imei and volte automatically
akshu2697 said:
Did you had ever restored that moto g4 Persist backup for volte.?
Click to expand...
Click to collapse
Sonisudhanshu said:
First of all this a g5 thread.
secondly i just simply installed stock oreo and that recovered my 4g imei and volte automatically
Click to expand...
Click to collapse
I'm from the G5+ forums. In case it's not common knowledge here, never restore a persist from another device. We have had numerous threads recommending to flash the persist of a G4/G4+ to restore Volte and other functionality. That has been the cause of countless permanent semi-bricked and bricked G5+ devices. The persist is unique to each device, and without your own, you can no longer guarantee full functionality, and in the worst case, you will permanently lose your IMEI.
NZedPred said:
Hey again, I've worked on another workaround that I have tested on my G5 Plus, that should work with the G5 as well. This will also allow me to identify the correct owner of the rfs folder, which is key to making this work.
For someone who is willing, please back up your persist partition first, then try the following:
Boot into stock rom, ensuring that you have root enabled
Run the following commands via adb or a shell
Code:
su
chmod -R +X+r+w /persist/rfs
chmod -R +X+r+w /persist/hlos_rfs
Then reboot. Your IMEI should be recreated now. Now run the following and post the full output so that I can work out who the correct owner of the rfs and hlos_rfs folders are:
Code:
su
ls -lR /persist/rfs
Click to expand...
Click to collapse
When I execute it, it says "chmod: bad mode '+ X + r + w'".
Do you know why it happens?
Code:
adb shell
cedric:/ $ su
cedric:/ # hmod -R +X+r+w /persist/rfs
sh: hmod: not found
127|cedric:/ # chmod -R +X+r+w /persist/rfs
chmod: bad mode '+X+r+w'
1|cedric:/ # chmod -R +X+r+w /persist/hlos_rfs
chmod: bad mode '+X+r+w'
1|cedric:/ #
[CODE]
TioNacho said:
Hey again, I've worked on another workaround that I have tested on my G5 Plus, that should work with the G5 as well. This will also allow me to identify the correct owner of the rfs folder, which is key to making this work.
For someone who is willing, please back up your persist partition first, then try the following:
Boot into stock rom, ensuring that you have root enabled
Run the following commands via adb or a shell
Then reboot. Your IMEI should be recreated now. Now run the following and post the full output so that I can work out who the correct owner of the rfs and hlos_rfs folders are:
When I execute it, it says "chmod: bad mode '+ X + r + w'".
Do you know why it happens?
Code:
adb shell
cedric:/ $ su
cedric:/ # hmod -R +X+r+w /persist/rfs
sh: hmod: not found
127|cedric:/ # chmod -R +X+r+w /persist/rfs
chmod: bad mode '+X+r+w'
1|cedric:/ # chmod -R +X+r+w /persist/hlos_rfs
chmod: bad mode '+X+r+w'
1|cedric:/ #
[CODE][/QUOTE]
Just follow the guide here:
[url]https://forum.xda-developers.com/g5-plus/how-to/fix-persist-resolve-imei0-explanation-t3825147[/url]
Those commands above only worked in certain environments (e.g. with a particular version of something, can't remember which).
Click to expand...
Click to collapse
Hi All, Am Moto G5 plus XT1687 user. I installed number of custom ROM's and finally head back to Stock. This is my headache now, I lost my IMEI & VOLTE. I tried so many steps as mentioned in XDA, same I also tried installing with someone's persist .win file. Permanently I lost my IMEI & VOLTE. If you guys need anything from my phone to find a solution, please ping me. Now I can use that phone as 2g device only.
[email protected] said:
Hi All, Am Moto G5 plus XT1687 user. I installed number of custom ROM's and finally head back to Stock. This is my headache now, I lost my IMEI & VOLTE. I tried so many steps as mentioned in XDA, same I also tried installing with someone's persist .win file. Permanently I lost my IMEI & VOLTE. If you guys need anything from my phone to find a solution, please ping me. Now I can use that phone as 2g device only.
Click to expand...
Click to collapse
Since my Moto G5 Plus (XT1687) isnt my primary phone I just flashed it back to stock 7.1 and when I got the Oreo OTA it fixed the IMEI problem.
sabbotage said:
Since my Moto G5 Plus (XT1687) isnt my primary phone I just flashed it back to stock 7.1 and when I got the Oreo OTA it fixed the IMEI problem.
Click to expand...
Click to collapse
Thanks for the reply. Please update with stock room details that you used. I will try the same and revert.

Categories

Resources