While flashing things with TWRP is fun and games, it can sometimes also lead to serious issues on your device. If proper care is not taken or if the installed TWRP recovery on your device has bugs/issues, then restoring a backup from it may corrupt your device, resulting in lost information and features.
Below is a list of issues that could occur when a TWRP restore goes wrong:
- No IMEI number
- Corrupted EFS
- No SIM, card not detected
- Unknown Baseband
- Issues with WiFi and Bluetooth
The major cause behind all these issues after restoring a TWRP backup is the EFS partition. The EFS partition sometimes fails to restore correctly and hence corrupts all other partitions as well.
Developer jcadduono has explained the issue in detail, so we’ll just go ahead quote him below:
The EFS restoration issue was due to a missing file name set bug during the backup restoration process.
This caused all subpartitions associated with a backup-enabled partition to have the first item (ex. the main/non-subpartition) restored to all subpartitions as well.
See for example the partition entries in Angler’s recovery.fstab:
Code:/efs1 emmc /dev/block/platform/soc.0/f9824900.sdhci/by-name/modemst1 flags=backup=1;display=EFS /efs2 emmc /dev/block/platform/soc.0/f9824900.sdhci/by-name/modemst2 flags=backup=1;subpartitionof=/efs1While creating the backup of EFS, you will end up with:
efs1.emmc.win (modemst1 partition raw data)
efs2.emmc.win (modemst2 partition raw data)When restoring this EFS backup, what happened was the file name was not updated for restore, and you ended up with:
Restoring EFS…
Restoring efs1.emmc.win to modemst1
Restoring efs1.emmc.win to modemst2It should have been:
Restoring EFS…
Restoring efs1.emmc.win to modemst1
Restoring efs2.emmc.win to modemst2
Losing your device’s IMEI and cellular functionality is pretty scary. But fret not! Fixing the issue is fairly simple. You just have to erase/reset the modemst1 partition and things will be good again.
You can fix the issue from TWRP recovery, over ADB from Android or via Bootloader mode using Fastboot commands. Below are detailed instructions for both:
How to Fix EFS from TWRP recovery
- Boot into TWRP recovery.
- From TWRP’s main screen, select Advanced » then Terminal.
- Type the following commands in terminal (one by one):
dd if=/dev/zero of=/dev/block/bootdevice/by-name/modemst1
dd if=/dev/zero of=/dev/block/bootdevice/by-name/modemst2
- Reboot device.
How to Fix EFS over ADB
- Setup ADB and Fastboot on your PC.
- Enable Developer options & USB debugging on your Android device.
- Connect your device to the PC and open a command window on the PC.
- Issue the following commands one by one:
adb shell 'dd if=/dev/zero of=/dev/block/bootdevice/by-name/modemst1'
adb shell 'dd if=/dev/zero of=/dev/block/bootdevice/by-name/modemst2'
adb reboot
How to Fix EFS from Bootloader Mode using Fastboot commands
- Setup ADB and Fastboot on your PC.
- Enable Developer options & USB debugging on your Android device.
- Connect your device to the PC and open a command window on the PC.
- Issue the following commands one by one:
adb reboot bootloader
fastboot erase modemst1
fastboot erase modemst2
fastboot reboot
That’s all. Hope the fixes shared above helps you resolve the issues.
I was trying to follow these steps to regain baseband…..but when I do it succeeds in fixing base band but wipes IMEI…..hence still cannot gete network…..if I restore the backup I have it brings back IMEI but restores the non functinoal baseband……any suggestions?
I was trying to follow these steps to regain baseband…..but when I do it succeeds in fixing base band but wipes IMEI…..hence still cannot gete network…..if I restore the backup I have it brings back IMEI but restores the non functinoal baseband……any suggestions?
I was trying to follow these steps to regain baseband…..but when I do it succeeds in fixing base band but wipes IMEI…..hence still cannot gete network…..if I restore the backup I have it brings back IMEI but restores the non functinoal baseband……any suggestions?
I was trying to follow these steps to regain baseband…..but when I do it succeeds in fixing base band but wipes IMEI…..hence still cannot gete network…..if I restore the backup I have it brings back IMEI but restores the non functinoal baseband……any suggestions?
Oh my god!!! You, original poster, is a life saver!!!!! Thanks a million. My IMEI actually got corrupted somehow while I’m restoring a backup from TWRP.
Oh my god!!! You, original poster, is a life saver!!!!! Thanks a million. My IMEI actually got corrupted somehow while I’m restoring a backup from TWRP.
Oh my god!!! You, original poster, is a life saver!!!!! Thanks a million. My IMEI actually got corrupted somehow while I’m restoring a backup from TWRP.
Oh my god!!! You, original poster, is a life saver!!!!! Thanks a million. My IMEI actually got corrupted somehow while I’m restoring a backup from TWRP.
hi, for me it says :
can’t open ‘/dev/block/bootdevice/by-name/modemst1’: No such file or directory
(and for modemst2 the same …)
any idea ?
hi, for me it says :
can’t open ‘/dev/block/bootdevice/by-name/modemst1’: No such file or directory
(and for modemst2 the same …)
any idea ?
I managed to find out the partitions by using a program that backups the EFS partitions and ran the commands accordingly :
dd if=/dev/zero of=/dev/block/mmcblk0p13
dd if=/dev/zero of=/dev/block/mmcblk0p14
but still haven’t succeeded into making the phone work 🙁
My actual problem :
I have Galaxy S5 with a CM 13 backup that works ok …
But since then I have switched to Ressurection Remix and restoring any RR backup brings up the problem with EFS
I managed to find out the partitions by using a program that backups the EFS partitions and ran the commands accordingly :
dd if=/dev/zero of=/dev/block/mmcblk0p13
dd if=/dev/zero of=/dev/block/mmcblk0p14
but still haven’t succeeded into making the phone work 🙁
My actual problem :
I have Galaxy S5 with a CM 13 backup that works ok …
But since then I have switched to Ressurection Remix and restoring any RR backup brings up the problem with EFS
hi, for me it says :
can’t open ‘/dev/block/bootdevice/by-name/modemst1’: No such file or directory
(and for modemst2 the same …)
any idea ?
hi, for me it says :
can’t open ‘/dev/block/bootdevice/by-name/modemst1’: No such file or directory
(and for modemst2 the same …)
any idea ?
I managed to find out the partitions by using a program that backups the EFS partitions and ran the commands accordingly :
dd if=/dev/zero of=/dev/block/mmcblk0p13
dd if=/dev/zero of=/dev/block/mmcblk0p14
but still haven’t succeeded into making the phone work 🙁
My actual problem :
I have Galaxy S5 with a CM 13 backup that works ok …
But since then I have switched to Ressurection Remix and restoring any RR backup brings up the problem with EFS
I managed to find out the partitions by using a program that backups the EFS partitions and ran the commands accordingly :
dd if=/dev/zero of=/dev/block/mmcblk0p13
dd if=/dev/zero of=/dev/block/mmcblk0p14
but still haven’t succeeded into making the phone work 🙁
My actual problem :
I have Galaxy S5 with a CM 13 backup that works ok …
But since then I have switched to Ressurection Remix and restoring any RR backup brings up the problem with EFS
Thank u very much, well done guys it help me a lot, thanks buddy
Thank u very much, well done guys it help me a lot, thanks buddy
Thank u very much, well done guys it help me a lot, thanks buddy
Thanx but i am facing a little challenge when i tried to fix EFS via TWRP RECOVERY..
After running the first command “dd if=/dev/zero of=/dev/block/bootdevice/by-name/modemst1”
my samsung s6 is saying
dd: writing ‘/dev/zero of=/dev/block/bootdevice/by-name/modemst1’ : No space left on device
did you find any solution for this?
No solution yet
I have also tried to fix the “not registered on network” issue using EFS backup mobile app but when i tried to do the efs backup its saying “sorry we can not detect any EFS/IMEI partition on your device”
Thanx but i am facing a little challenge when i tried to fix EFS via TWRP RECOVERY..
After running the first command “dd if=/dev/zero of=/dev/block/bootdevice/by-name/modemst1”
my samsung s6 is saying
dd: writing ‘/dev/zero of=/dev/block/bootdevice/by-name/modemst1’ : No space left on device
Thanx but i am facing a little challenge when i tried to fix EFS via TWRP RECOVERY..
After running the first command “dd if=/dev/zero of=/dev/block/bootdevice/by-name/modemst1”
my samsung s6 is saying
dd: writing ‘/dev/zero of=/dev/block/bootdevice/by-name/modemst1’ : No space left on device
did you find any solution for this?
No solution yet
I have also tried to fix the “not registered on network” issue using EFS backup mobile app but when i tried to do the efs backup its saying “sorry we can not detect any EFS/IMEI partition on your device”
pleaaaaaaaaseeeeee someone help meeeeeeeeeeee……….if i do the twrp thing it says no space left on device, i did the adb thing and rebooted and still nothing then i did the fastboot thing and it says permission DENIED!?!?!?!????!?
did you unlock your phone’s bootloader?
pleaaaaaaaaseeeeee someone help meeeeeeeeeeee……….if i do the twrp thing it says no space left on device, i did the adb thing and rebooted and still nothing then i did the fastboot thing and it says permission DENIED!?!?!?!????!?
pleaaaaaaaaseeeeee someone help meeeeeeeeeeee……….if i do the twrp thing it says no space left on device, i did the adb thing and rebooted and still nothing then i did the fastboot thing and it says permission DENIED!?!?!?!????!?
did you unlock your phone’s bootloader?
please help me , i lost modem bands from Europe , now showing only USA Bands LTE 2.4 .7 But i need 1 3 7 20 Doogee Y6
please help me , i lost modem bands from Europe , now showing only USA Bands LTE 2.4 .7 But i need 1 3 7 20 Doogee Y6
not working
not working
I experienced this trouble on my xperia x compact, now it does not read dim card, and randomly reboots. Tried to erase everything (userdata, boot, cache, recovery, system) with fastboot and reinstall TWRP plus omnirom, but does not work.
I experienced this trouble on my xperia x compact, now it does not read dim card, and randomly reboots. Tried to erase everything (userdata, boot, cache, recovery, system) with fastboot and reinstall TWRP plus omnirom, but does not work.
Fix EFS from TWRP recovery! works! the IMEI number is back, thanks for advice, but some network-pin is needed after reboot
LG V20 H990DS – After installing TRWP lost baseband. Reflashed, tried different ROMS and factory updates. On going for last 6 months.
After doing the TRWP method above, baseband returned.
NB: after running command, I also got No space left on device, this is not a problem because all the command does is write ZERO’s to modemst1 & modemst2
Software version changed from H990ds10b_00_OPEN_TW_DS to H990ds10b-GLOBAL-COM.
Under phone status – IMEI is ‘0’ – not a problem as I can enter the IMEI from the sticker on back of the cover.
Now having fully working LG V20, rooted and with XPOSED installed.
Phone is based in New Zealand, was running default OPEN_TW_DS firmware before I rooted.
Thank You. Thank You. Thank You
its worked for me Thanks, Samsung Galaxy A3 A320F 2017 lineage 16 OS i did it with TWRP Recovery
Redmi note 4x Snap 3/32GB not working
Is there any other way to correct it ? Thanks
I have a Huawei y6 scl-l21 with imei erase, any suggestions?
Fix EFS from TWRP recovery! works! the IMEI number is back, thanks for advice, but some network-pin is needed after reboot
I experienced this trouble on my xperia x compact, now it does not read dim card, and randomly reboots. Tried to erase everything (userdata, boot, cache, recovery, system) with fastboot and reinstall TWRP plus omnirom, but does not work.
not working
please help me , i lost modem bands from Europe , now showing only USA Bands LTE 2.4 .7 But i need 1 3 7 20 Doogee Y6
Lets see if it works…
NO such file found…err.
did you ever fix your problem?
no such file found
I’m unable to dial out after making the below changes on How to Fix EFS from TWRP recovery
dd if=/dev/zero of=/dev/block/bootdevice/by-name/modemst1
dd if=/dev/zero of=/dev/block/bootdevice/by-name/modemst2
Is there a way to reverse this?
I was trying to get back imei on moto g5s plus but couldn’t after spending full day i finally gave up. On next day i went to repair this device and fortunately mechanic wasn’t there as he was ill so i next day i went there to hear this and took my device back. Now i was about to go for another technician but all of sudden i changed my plan and went home. Now i was supposed to get to the mechanic tomorrow. I told to myself why not to have another try by searching stuff. So, i tried many tutorials but couldn’t find any thing. At last i was trying a fix but was pending restart and i tried this fix too and fortunately device is back to working conditions. Thank you so much. I am not sure was it these fixes or was the pending restart but it worked. Thank you