How to recover from "fastboot erase all"

Search This thread

ansh_kumar

Member
Sep 17, 2017
8
1
I accidentally executed the "fastboot erase all" and now the IMEI is gone. I have stock firmware but it is not able to bring the imei number back. But the interesting this is that "fastboot getvar imei" still shows the imei of my device. So, I think Moto e2 Xt1521 stores imei is some partition and "fastboot erase all" erased that partition. So, here is what I'm thinking :
1) Since the partition was only erased, there could be some way to get the erased data back, like we recover data from a formatted partition on PC.
2) Since I have my original IMEI couldn't I right the data back on the partition ?
3) Take someone else partitions copy and flash it into mine phone.
4) Use xposed framework to register a random/original imei.

I tried method 4 but it's not working. Also I found online that "fastboot oem writeimei" could write new imei. But the questions still remains the same; Android takes its imei from the partition rather than "fastboot getvar imei".

Without IMEI I'm not able to make any calls and so technically my phone is useless now.

Any suggestions ?

EDIT:

I have installed "IMEI changer pro" (XPOSED ) and here is what I found.
1) *#06# gives me my new imei but *#*#4636#*#* still shows IMEI: 0
So, I think the network is checking the system IMEI which is shown by #*#*4636#*#*
This post says
1. Dhob and Hob are nothing but plain text partitions, Dhob is dynamic hob and Hob is static Hob.
2. Dhob stores cryptotext by default, this crypto text contains information like Imei, ESN, Meid etc.
3. The Hob partition is a XML formatted plain-text file that contains Data which i am not sure about.
4. Uses a PBKDF2 key for encryption and decryption of Dhob.
5. The size field in Hob is Hex. So, 16 is 22 and 32 is 50.
6. The modem updates NV items on the fly which is why you can get 0 and null IMEI by fiddling.
7. In case the IMEI doesn't match with equipment then NV item is made 0.
8. EFS is created on the go not sure.

This means that the modem updates the NV and that is where we need to strike.
But getting the right IMEI and making call with SIM are two different things. Here my aim is to make call. Any suggestions here ???

Request:
There is a slight chance that flashing hob, dhob and fsc might bring my signal back. So anyone could give me the image of these will be helpful. Here is the command to get these files (MOTO E2 2015 XT1521 )

dd if=/dev/block/platform/msm_sdcc.1/by-name/hob of=/sdcard/hob.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/dhob of=/sdcard/dhob.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/fsc of=/sdcard/fsc.img
 
Last edited:

Ricardo2003

Member
Jul 9, 2017
30
6
did you try to flash a upgrade of android? maybe if you flash a firmware it restore the partition information
 

ansh_kumar

Member
Sep 17, 2017
8
1
did you try to flash a upgrade of android? maybe if you flash a firmware it restore the partition information

Yes I have tried android 5.0.2 , 5.1.1 and 6.0.1 but none is working. I found on the internet that flashing hob, dhob and fsc partition could get my signal back but making calls and sms might not work. I have updated my question. Please check.
 

Ricardo2003

Member
Jul 9, 2017
30
6
Okay, if I understood correctly, you flashed the hob,dhob and fsc images, but your IMEI still doesn't appear.
Did you try with one of these three images?, Maybe if you try with another image of hob, dhob or fsc of another link you will get your IMEI, but the information you had says that the IMEI need to be the same of your device, or of the wrong way you IMEI will appear like a 0, did you think on this when you flash your images?

Well, a reflash is not a bad idea

Sent from my Droid Turbo using XDA Labs
 

ansh_kumar

Member
Sep 17, 2017
8
1
Okay, if I understood correctly, you flashed the hob,dhob and fsc images, but your IMEI still doesn't appear.
Did you try with one of these three images?, Maybe if you try with another image of hob, dhob or fsc of another link you will get your IMEI, but the information you had says that the IMEI need to be the same of your device, or of the wrong way you IMEI will appear like a 0, did you think on this when you flash your images?

Well, a reflash is not a bad idea

Sent from my Droid Turbo using XDA Labs

I will try with one of the three file. Could you please give me images of hob, dhob, fsc because the one I'm having now is of different phone (moto g). Yes I thought over IMEI: 0 condition and here is what I was thinking:
1) "fastboot oem writeimei <imei>" could write new imei but the bootloader throws me an error of "permission denied". So, if somehow I get the permission and write the same imei as on the hob and dhob then my device might work.
2) Through some Xposed module I could register on the network. (I have never developed any xposed module but this might work)
Any suggestions ??
 
Last edited:

abhijeet11

Member
May 29, 2010
20
4
Can you help with fsc hob dhob for droid turbo?

Okay, if I understood correctly, you flashed the hob,dhob and fsc images, but your IMEI still doesn't appear.
Did you try with one of these three images?, Maybe if you try with another image of hob, dhob or fsc of another link you will get your IMEI, but the information you had says that the IMEI need to be the same of your device, or of the wrong way you IMEI will appear like a 0, did you think on this when you flash your images?

Well, a reflash is not a bad idea

Sent from my Droid Turbo using XDA Labs

Hi Ricardo, I see you have a Droid turbo XT1254 - I have the same issue like that of OP and finally came to the same conclusion that i will live happy with just calls on my phone by restoring the hob dhob and fsc files ....can you kindly share me these files from you turbo? Thank you!!!
 

Ricardo2003

Member
Jul 9, 2017
30
6
Hi Ricardo, I see you have a Droid turbo XT1254 - I have the same issue like that of OP and finally came to the same conclusion that i will live happy with just calls on my phone by restoring the hob dhob and fsc files ....can you kindly share me these files from you turbo? Thank you!!!

Sorry but before you loss the IMEI you should have a EFS backup, this thing is for help you if you lose your IMEI

I don't have anymore a XT1254 but I can say that if I have a EFS backup I can't share it with you because turbo still appears an IMEI = 0

Flashing another custom ROM maybe can fix that, I haven't left an IMEI, so I don't know how to help you but maybe here can

Good luck
 
  • Like
Reactions: abhijeet11

abhijeet11

Member
May 29, 2010
20
4
Sorry but before you loss the IMEI you should have a EFS backup, this thing is for help you if you lose your IMEI

I don't have anymore a XT1254 but I can say that if I have a EFS backup I can't share it with you because turbo still appears an IMEI = 0

Flashing another custom ROM maybe can fix that, I haven't left an IMEI, so I don't know how to help you but maybe here can

Good luck
Thanks for the promt response.... Appreciate your inputs but I thought I read somewhere that even if i flash back the 3 files viz. Fsc, hob and dhob I won't get back imei (will remain 0) but calling works.... Currently my phone is just a WiFi tab so anything is better than that
 

Ricardo2003

Member
Jul 9, 2017
30
6
Thanks for the promt response.... Appreciate your inputs but I thought I read somewhere that even if i flash back the 3 files viz. Fsc, hob and dhob I won't get back imei (will remain 0) but calling works.... Currently my phone is just a WiFi tab so anything is better than that

Is calls working with an 0 IMEI?... And also the wifi?
 

MURSHIG

Member
Mar 14, 2022
21
1
what to do if I executed fastboot erase boot erase cpucp erase dtbo erase modem erase oplusstanvbk erase oplus_sec erase shrm erase splash erase qweslicstore erase vbmeta_vendor erase vbmeta_system erase vendor_boot erase vm-bootsys ?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Hi Ricardo, I see you have a Droid turbo XT1254 - I have the same issue like that of OP and finally came to the same conclusion that i will live happy with just calls on my phone by restoring the hob dhob and fsc files ....can you kindly share me these files from you turbo? Thank you!!!

    Sorry but before you loss the IMEI you should have a EFS backup, this thing is for help you if you lose your IMEI

    I don't have anymore a XT1254 but I can say that if I have a EFS backup I can't share it with you because turbo still appears an IMEI = 0

    Flashing another custom ROM maybe can fix that, I haven't left an IMEI, so I don't know how to help you but maybe here can

    Good luck
    1
    No calls aren't....I get signal though on new 4g sim cards and Sometimes 4g /LTE Internet only works but its rare...

    Well, I lost my IMEI but after restoring my efs backup i didn't get my IMEI but I have carrier signal, calls, data, and other stuff is working, also before restoring my backup I had WiFi