completely erease efs partition - OnePlus 5 Questions & Answers

Guys, is there a way to completely wipe efs partition and then restore it?
Are these erease commands?
Code:
fastboot erease modemst1
fastboot erease modemst2

If you don't know the command, you shouldn't do it. You might say goodbye to your radios if something goes wrong and you happen to have an unusable backup or none at all. Remember the OP2 times...

Related

[Q] - fastboot erase userdata

Sometimes I completely wipe my device before puting a rom on it, when I got my Gnex obviously because it had no removable sd card I couldnt remove it and format it.
I used this command yesterday to wipe my rooted N4 and it wont boot, I've flashed a stock image to get it up and running again and for testing purposes tried it again but with a different rooted rom, same outcome.
1) Does anyone know why this would be?
2) Is there a better way to completely wipe my device without causing this problem
Thanks in advance
on fastboot erase userdata
Hello.
I think I got into a similar problem as you did.
I wanted to write JOP40D using the google factory images on my Nexus 4, and in the process I also used a combination of fastboot -w as well as fastboot erase userdata. Now my phone won't boot up completely.
I wanted to ask you if/how you managed to recover to stock...
I personally tried using google's stock factory images for Nexus 4 (from developers.google.com), without success.
Thanks in advance.
Re: on fastboot erase userdata
FYI, Nexus 4 Toolkit did it for me.
1) The problem is the google factory image script does not reformat userdata && cache. These stay damaged from the initial fastboot erase operation done within the same script sequence. The Toolkit does 'reformat' them.
Not sure why this happens, may be from a bad erase that does not trigger reformatting, but it probably has to do with the version of fastboot you run on your PC versus the fastboot backend phone daemon. I posted online about this and hope to get some answers.
2) There must be a way to trigger this reformatting of userdata && cache...
boy3dfx said:
FYI, Nexus 4 Toolkit did it for me.
1) The problem is the google factory image script does not reformat userdata && cache. These stay damaged from the initial fastboot erase operation done within the same script sequence. The Toolkit does 'reformat' them.
Not sure why this happens, may be from a bad erase that does not trigger reformatting, but it probably has to do with the version of fastboot you run on your PC versus the fastboot backend phone daemon. I posted online about this and hope to get some answers.
2) There must be a way to trigger this reformatting of userdata && cache...
Click to expand...
Click to collapse
Sorry for the late reply only just seen it, so there's def a problem then and not something im doing wrong...
you might wanna update the sdk, when i used the same commands adb said someting like "you mean format" and processed the command without isssues
Stretlow said:
Sometimes I completely wipe my device before puting a rom on it, when I got my Gnex obviously because it had no removable sd card I couldnt remove it and format it.
I used this command yesterday to wipe my rooted N4 and it wont boot, I've flashed a stock image to get it up and running again and for testing purposes tried it again but with a different rooted rom, same outcome.
1) Does anyone know why this would be?
2) Is there a better way to completely wipe my device without causing this problem
Thanks in advance
Click to expand...
Click to collapse
1) Doing this on my Atrix 2 also causes a bootloop. I'm assuming it's because it is completely erasing the data partition instead of formatting it.
2) Try using fastboot format userdata (this works for me), or use the toolkit/a custom recovery to do your wiping.
Sent from my MB865 using xda premium
boy3dfx said:
FYI, Nexus 4 Toolkit did it for me.
1) The problem is the google factory image script does not reformat userdata && cache. These stay damaged from the initial fastboot erase operation done within the same script sequence. The Toolkit does 'reformat' them.
Not sure why this happens, may be from a bad erase that does not trigger reformatting, but it probably has to do with the version of fastboot you run on your PC versus the fastboot backend phone daemon. I posted online about this and hope to get some answers.
2) There must be a way to trigger this reformatting of userdata && cache...
Click to expand...
Click to collapse
Yes, there is a way to format partitions. The most recent version of fastboot supports this command.
Code:
fastboot format <partition>
So it works like this:
Code:
#format userdata
fastboot format userdata
#format cache
fastboot format cache
comminus said:
Yes, there is a way to format partitions. The most recent version of fastboot supports this command.
Code:
fastboot format <partition>
So it works like this:
Code:
#format userdata
fastboot format userdata
#format cache
fastboot format cache
Click to expand...
Click to collapse
Thanks! I was stuck at the endless boot logo after trying to restore with the factory image via fastboot. This got me back to normal booting.
Ok so I updated my SDk last night and typed (without quotes) "fastboot erase userdata" it gave me a message saying DID YOU MEAN FASTBOOT FORMAT USERDATA" then it completed the action however my phone still didnt boot.
Sorry for my ADB noobness but just to clarify...
I used to type exactly as this "fastboot erase userdata"
And now I have to type this
"fastboot format userdata" which should fix the issue, Erase all userdata (media, pictures etc) and boot the device
Thanks again chaps
boy3dfx said:
FYI, Nexus 4 Toolkit did it for me.
1) The problem is the google factory image script does not reformat userdata && cache. These stay damaged from the initial fastboot erase operation done within the same script sequence. The Toolkit does 'reformat' them.
Not sure why this happens, may be from a bad erase that does not trigger reformatting, but it probably has to do with the version of fastboot you run on your PC versus the fastboot backend phone daemon. I posted online about this and hope to get some answers.
2) There must be a way to trigger this reformatting of userdata && cache...
Click to expand...
Click to collapse
^^^ This, I have been going crazy trying to figure out the issue with the hanging boot. The format makes it boot everytime.
The problems are being caused when fastboot erase is used to delete the contents of the partition.
FASTBOOT ERASE IS NOT NEEDED ON THE NEXUS 4 (only the Nexus 7 uses fastboot erase to wipe the partitions before flashing).
If flashing manually just use the google script supplied with the stock image to flash correctly (from the jop40d build. If flashing jop40c then use the correct image names for that):
fastboot flash bootloader bootloader-mako-makoz10l.img
fastboot reboot-bootloader
ping -n 5 127.0.0.1 >nul
fastboot flash radio radio-mako-m9615a-cefwmazm-2.0.1700.33.img
fastboot reboot-bootloader
ping -n 5 127.0.0.1 >nul
fastboot -w update image-occam-jop40d.zip
Or use the Nexus 4 Toolkit to do it all automatically and properly
Mark.
[removed].
sdkmanager
android_sdk/tools/bin

[HELP]Fastboot Image

Hi everyone,
I need a native fastboot image for modemst1 and modemst2.
Yes i now some of you don´t want to upload the file because of the IMEI
But my opt coldn´t detect my imei so simcard detection couldn´t work .
The get the issue after flashing the MIU7 ROM , please don´t flash the ROM
If there is somebody who want to upload the modemst 1 and modemst2 please make a replay with the link or send my the file or with a email
Thanks for your attention
and hope i get the file soon
and sorry for my bad English
i have created a shell script and batch script, for a stock reset opt [modemst1 & modemst2]
Thnx for Information
I had that same after install Miui v7, phone got hardbrick.
I used download tool for back 100% Oxygen Os.
Phone woke up but had problem with wifi+sim no detect.(Imei Gone)
It was problem with EFS Partition damaged I think.
User RevUnix saved my time and life
You must use adb console and put :
fastboot erase modemst1
fastboot erase modemst2
fastboot reboot
Note: Please be sure you have unlocked bootloader
That should repair your phone
It worked
lukaszlol1990 said:
I had that same after install Miui v7, phone got hardbrick.
I used download tool for back 100% Oxygen Os.
Phone woke up but had problem with wifi+sim no detect.(Imei Gone)
It was problem with EFS Partition damaged I think.
User RevUnix saved my time and life
You must use adb console and put :
fastboot erase modemst1
fastboot erase modemst2
fastboot reboot
Note: Please be sure you have unlocked bootloader
That should repair your phone
Click to expand...
Click to collapse
Thank you for your help

ZE550KL with no IMEI after modem reflashing (please help me)

Hello, since i had gps issues i've reflashed the modem on adb and then erased modemst like this:
mfastboot flash modem [email protected]@[email protected]@NON-HLOS-64bit.bin
fastboot erase modemst1
fastboot erase modemst2
So the gps seems to be ok now, but the phone data is stuck on edge, and if i force 3g from the settings it doesn't connect at all
so i've putted stock recovery , wiped all data and installed a complete stock update but with no luck.
anyone have some idea?
EDIT: i've noticed that i don't have imei anymore... how to restore it?
reddevilx said:
Hello, since i had gps issues i've reflashed the modem on adb and then erased modemst like this:
mfastboot flash modem [email protected]@[email protected]@NON-HLOS-64bit.bin
fastboot erase modemst1
fastboot erase modemst2
So the gps seems to be ok now, but the phone data is stuck on edge, and if i force 3g from the settings it doesn't connect at all
so i've putted stock recovery , wiped all data and installed a complete stock update but with no luck.
anyone have some idea?
EDIT: i've noticed that i don't have imei anymore... how to restore it?
Click to expand...
Click to collapse
This is only a theory.
You need to else another rooted device ze550kl.
Commands for new device:
adb shell
su
cat /dev/block/mmcblk0p16 > /mnt/sdcard/modemst1.img
cat /dev/block/mmcblk0p17 > /mnt/sdcard/modemst2.img
Commands for old device:
adb reboot bootloader
fastboot flash modemst1 modemst1.img
fastboot flash modemst2 modemst2.img
The way to "/dev/block/mmcblk0p16" and "/dev/block/mmcblk0p17" is for a device ze500kl. I do not know to way for your device ze550kl.
Thank you Muminek111,
i've tried but with no luck, i've copied and flashed mmcblk0p16 and mmcblk0p17, the files exists but it doesn't change anything.
reddevilx said:
Thank you Muminek111,
i've tried but with no luck, i've copied and flashed mmcblk0p16 and mmcblk0p17, the files exists but it doesn't change anything.
Click to expand...
Click to collapse
I do not know if your device ze550kl has "modemst1" partition name "mmcblk0p16". It's the name for ze500kl device. You have to search in folder dev/block/............ I have the names in folder dev/block/platform/soc.0/7824900.sdhci/by-name.
You can flash back modem partition if you will know the name. The name of my modem partition is mmcblk0p38.
I don't understand;
this is the /dev/block/platform/7824900.sdhci
http://pastebin.com/Ebit7VFJ
this is /dev/block/platform/7824900.sdhci/by-name
http://pastebin.com/fx8FbBdU
modem is p35, modemst1 is p36 and modemst2 is p37?
i think i'm making a mistake because doing so i have a huge modemst2
i also don't understand why restoring a full twrp backup doesn't solve it
reddevilx said:
I don't understand;
this is the /dev/block/platform/7824900.sdhci
http://pastebin.com/Ebit7VFJ
this is /dev/block/platform/7824900.sdhci/by-name
http://pastebin.com/fx8FbBdU
modem is p35, modemst1 is p36 and modemst2 is p37?
i think i'm making a mistake because doing so i have a huge modemst2
i also don't understand why restoring a full twrp backup doesn't solve it
Click to expand...
Click to collapse
I think that the twrp recovery doesn't backs up all partitions.
This are my screenshots the folders from an apk Total Commander.
https://drive.google.com/file/d/0B7F3ZXr565GkYWJJT1ByX0VqQTQ/view?usp=drivesdk
https://drive.google.com/file/d/0B7F3ZXr565GkdXFxSVluSHAzUXM/view?usp=drivesdk
But everything shows to the folder dev/block/
Therefore is the command cat /dev/block/.......... > /mnt/sdcard/modemst1.img
OK, so now with total commander i found that
Modem is 41
Modemst1 is 18
Modemst2 is 19
i've flashed the new ones but i'm still with null imei.
Thank you anyway i've learned something new
You should back up the partition before every command erase partition.
I've made a backup from a working phone but it doesn't work, i think that the board may be faulty.
Thank you anyway

Ruined my modem partition... Please help

i downloaded factory image of 7.12.29 oreo
i used flash_factory.bat
it reflashed partitioning
apparently it had a command "fastboot flash modem_a NON-HLOS.bin"
the NON-HLOS.bin file does not exist in images folder nor in any fastboot rom
now i dont have any connectivity... signal.. wifi etc..
can anybody provide NON-HLOS.bin file for the A1
Hello,
Inside the fastboot ROM file "tissot_images_7.12.19_20171219.0000.00_7.1_d39fa89aaf.tgz" (Nougat 7.1.2) ... in the file "flash_all_lock_crc.bat" for example, these lines appear:
fastboot %* flash modem_a %~dp0images\modem.img || @ECHO "Flash modem_a error" && exit /B 1
fastboot %* flash modem_b %~dp0images\modem.img || @ECHO "Flash modem_b error" && exit /B 1
It seems that the file is called "modem.img", not "NON-HLOS.bin".
May be?
Regards!
PS: Sorry for my English!
i managed to flash all images from fast boot to partitions manually step by step
except something called fsg and persist partitions
which i managed to flash through twrp using dd command via terminal
now it boots but i dont have imei number "says imei number unknown"
and it reboots after less than a minute
i read something about qcn file restore and editing from another mi A1
and that i can edit it to put my imei numbers back
anybody please provide a valid qcn number and how can i restore it
m.hashem said:
i managed to flash all images from fast boot to partitions manually step by step
except something called fsg and persist partitions
which i managed to flash through twrp using dd command via terminal
now it boots but i dont have imei number "says imei number unknown"
and it reboots after less than a minute
i read something about qcn file restore and editing from another mi A1
and that i can edit it to put my imei numbers back
anybody please provide a valid qcn number and how can i restore it
Click to expand...
Click to collapse
if it is under warranty just brick your phone and give it to service centre they will flash it and give you back
m.hashem said:
i downloaded factory image of 7.12.29 oreo
i used flash_factory.bat
it reflashed partitioning
apparently it had a command "fastboot flash modem_a NON-HLOS.bin"
the NON-HLOS.bin file does not exist in images folder nor in any fastboot rom
now i dont have any connectivity... signal.. wifi etc..
can anybody provide NON-HLOS.bin file for the A1
Click to expand...
Click to collapse
i have same problem last night
then i reflash 7.12.19 using miflash 2016.08.30.0
my imei normal again
Wow! The file NON-HLOS.bin is the modem for other Xiaomi phone. May be you use a batch file (flash_factory.bat) for other phone, not Mi A1. Please use Mi Flash with right rom.
this is method not working
bangir said:
i have same problem last night
then i reflash 7.12.19 using miflash 2016.08.30.0
my imei normal again
Click to expand...
Click to collapse
this is method not working
gautamaurya said:
this is method not working
Click to expand...
Click to collapse
What happens if you try to re-flash your modem with the flash_all or flash_all_except_storage scripts from here: https://forum.xda-developers.com/mi-a1/how-to/ota-official-fastboot-image-n2g47h-7-12-t3728929 ?
Can you please report, if it works and if should not work, please attach the terminal/ shell outpout of the failed flashing attempt here.
modemst1 and modemst2
hey ... i managed to flash the fastboot rom via miflash via hsusb 9008 mode through miflash tool (run as administrator)
the remainig problem is 2 partitions modemst1 and modemst2
which are dev/block/mmcblk0p14 & 15 respectively
can somebody please send me a backup of modemst1 and modemst2
it's doable via twrp
fastboot boot twrp3.1.1.1.img
advanced
terminal
dd if=/dev/block/mmcblk0p14 of=/sdcard/modemst1.img
dd if=/dev/block/mmcblk0p15 of=/sdcard/modemst2.img
i'll flash them back and edit the imei numbers via hex after qcn backup
thanks everybody
m.hashem said:
hey ... i managed to flash the fastboot rom via miflash via hsusb 9008 mode through miflash tool (run as administrator)
the remainig problem is 2 partitions modemst1 and modemst2
which are dev/block/mmcblk0p14 & 15 respectively
can somebody please send me a backup of modemst1 and modemst2
it's doable via twrp
fastboot boot twrp3.1.1.1.img
advanced
terminal
dd if=/dev/block/mmcblk0p14 of=/sdcard/modemst1.img
dd if=/dev/block/mmcblk0p15 of=/sdcard/modemst2.img
i'll flash them back and edit the imei numbers via hex after qcn backup
thanks everybody
Click to expand...
Click to collapse
I have done some digging in order to assist you to get this fixed. I think I have 2 very hot leads (untested as I don't have any issues with my IMEI):
1. http://www.androidbrick.com/ultimat...agon-xiaomi-mi5-imei-and-baseband-repair-fix/ & http://www.androidbrick.com/ultimate-guide-qualcomm-snapdragon-imei-baseband-repair-fix-part-2/
2. https://androidmtk.com/use-qualcomm-smartphone-write-imei-tool (looks almost to easy, but worth a try?)
Please report your feedback here
hey bro how to the editting modem1st.img
m.hashem said:
i downloaded factory image of 7.12.29 oreo
i used flash_factory.bat
it reflashed partitioning
now i dont have any connectivity... signal.. wifi etc..
Click to expand...
Click to collapse
Hello!
I made the same mistake. Is there a way to solve this problem?
m.hashem said:
i downloaded factory image of 7.12.29 oreo
i used flash_factory.bat
it reflashed partitioning
apparently it had a command "fastboot flash modem_a NON-HLOS.bin"
the NON-HLOS.bin file does not exist in images folder nor in any fastboot rom
now i dont have any connectivity... signal.. wifi etc..
can anybody provide NON-HLOS.bin file for the A1
Click to expand...
Click to collapse
Same problem here. Phone doesn't work correctly now. Boots, freezes and reboots. :crying:
persist image problem
https://xiaomifirmware.com/guides-and-tips/restore-persist-partition-xiaomi-mi-a1/
try ghis to restore persist img from twrp see if it fixes the freeze and reboot problem
also download the persist.img from the guide not from a fastboot rom... it should be 32 mb in size
i actually bricked my phone via doing fastboot flash partition partition-both-gpt.bin from fastboot folder then fastvoot reboot.... warning this bricks the phone completely... theres no bootloader now... i gave it to service center... ill take my chances for replacement
m.hashem said:
https://xiaomifirmware.com/guides-and-tips/restore-persist-partition-xiaomi-mi-a1/
try ghis to restore persist img from twrp see if it fixes the freeze and reboot problem
also download the persist.img from the guide not from a fastboot rom... it should be 32 mb in size
i actually bricked my phone via doing fastboot flash partition partition-both-gpt.bin from fastboot folder then fastvoot reboot.... warning this bricks the phone completely... theres no bootloader now... i gave it to service center... ill take my chances for replacement
Click to expand...
Click to collapse
thank you very much broo my device is fixed freezee and reboots problem
Ok. But what is the persist partition? Someone tried already? Doesn't want to brick my phone completely.
how to the editting qcn file beacuse my imei 0 null please help me editting brother
m.hashem said:
https://xiaomifirmware.com/guides-and-tips/restore-persist-partition-xiaomi-mi-a1/
try ghis to restore persist img from twrp see if it fixes the freeze and reboot problem
also download the persist.img from the guide not from a fastboot rom... it should be 32 mb in size
i actually bricked my phone via doing fastboot flash partition partition-both-gpt.bin from fastboot folder then fastvoot reboot.... warning this bricks the phone completely... theres no bootloader now... i gave it to service center... ill take my chances for replacement
Click to expand...
Click to collapse
The freeze and reboot problem is fixed. Thanks. Still one problem. IMEI1 is 0 and IMEI2 is null. Anyone has an idea?
Nordland_ua said:
Hello!
I made the same mistake. Is there a way to solve this problem?
Click to expand...
Click to collapse
Me tooo
Sent from my Mi A1 using Tapatalk
https://www.androidfilehost.com/?fid=673956719939818468
Replace the IMEi with UR Own IMEI . if not it's illegal to use this QCN
Password : testnreport
if you don't know how to change IMEI Using hex editor , try my method . DO NOT use QCN to restore .
(hex and imei provided in order for u to find n replace)
i lost my imei n spent me about 6days n 8 hours per day to find a way to fix it .
actually it's easy to fix the problem .
My own method
1. download the older rom (7.8.23) Link
2. Use flash_all.bat
3.reboot into fastboot mode , erase modemst1 and modemst2 .
fastboot erase modemst1
fastboot erase modemst2
4. reboot
5. go to phone , enter *#*#717717#*#*
6.got to settings enable USB Debugging (ADB)
7. disconnect your phone n connect it back
8.Use WriteDualIMEI(W+G_eMMC) Remember run as administrator , enter your IMEI .
9.if success , go to phone enter *#*#717717#*#* to disable the diag port
10. reboot
Done .

Solved!! I need modem files for POCO M3. (NV data is corrupted)

Just for my curiosity I was trying to change my device's IMEI. I used qfil to backup my qcn file. Then I rebooted to fastboot mode and ran the following command:-
fastboot erase modemst1
fastboot erase modemst2
fastboot erase fsg
For just in hope to erase the current partition and restore qcn.
But, after doing this my device isn't booting. It's just bootlooping to Recovery mode (stock).
Full firmware flash using MIFlash is even not working.
Bootloader of my POCO m3 is unlocked.
Please help me how to recover my device. OR kindly provide the three files of your POCO M3 by pulling it via adb.
ankitby2 said:
Just for my curiosity I was trying to change my device's IMEI. I used qfil to backup my qcn file. Then I rebooted to fastboot mode and ran the following command:-
fastboot erase modemst1
fastboot erase modemst2
fastboot erase fsg
For just in hope to erase the current partition and restore qcn.
But, after doing this my device isn't booting. It's just bootlooping to Recovery mode (stock).
Full firmware flash using MIFlash is even not working.
Bootloader of my POCO m3 is unlocked.
Please help me how to recover my device. OR kindly provide the three files of your POCO M3 by pulling it via adb.
Click to expand...
Click to collapse
Experts also avoid trying IMEI, so I don't know what you were watching.
rotoko said:
Experts also avoid trying IMEI, so I don't know what you were watching.
Click to expand...
Click to collapse
Thankyou for the reply! I have successfully repaired by rooting---resetting the efs--- and then restoring the qcn. My device is back to life now!
After flashing my poco is doing the same thing it's booting to recovery with an corrupt nv message
can you please share more information how you fixed this.

Categories

Resources