The dangers of "fastboot erase all" - AKA How to lose your IMEI

I want to write this little piece since this was the dumbest thing that could have happened to my phone.

Yesterday, during the afternoon, my phone got caught in a bootloop. Apparently the data partition corrupted itself and I couldn't wipe it through TWRP. I thought "Okay, that's fine, but maybe eMMC is about to die", I later found out it was fine during troubleshooting, but that is kinda useless now.

I made a backup of my internal storage and decided to troubleshoot the issue, I tried to clean the slate through fastboot, but since I didn't remember the exact partitions, I did a "fastboot erase all" and didn't even pay attention to the console text, for me, it was all dandy and it wiped what I expected (Too used to this stuff, you know). Sadly, that didn't solve my issue with the /data partition, Lineage still was caught in a bootloop and I still couldn't wipe /data through TWRP. I then remembered that the stock rom comes with a gpt.bin file that contains the partition table and expected partitions! "That ought to do the trick!", I thought.

Fast-forwarding to today's morning, I flashed stock and it worked fine! Phone booted and all! Although I was late to college, I quickly reflashed LineageOS with GApps and decided to download some small apps with LTE, as my house doesn't have phone reception most of the time (fucking Claro reeee), I didn't realize the issue, but as I was reaching the bus terminal, I should already have it working, that wasn't the case though. One college <-> Home trip later without anything to do, I went and flashed stock again, wondering if it was a bug on LineageOS, I then went to an area with reception and it still was stuck at "emergency calls only". I decided to google the issue and that led me to check my IMEI, in that instant I realized I fucked up, "IMEI = 0".

I already tried to follow some tutorials to recover my IMEI using Qualcomm tools, but it was a no go, and I'm going to give Xposed + IMEI Changer a try, if it works, I'm stuck at Marshmallow with a hacky workaround, otherwise this phone is basically as good as a media consumption device with a cracked screen, which is a crappy thing anyway.

TL;DR: Don't use "fastboot erase all" on Motorola phones, they keep the partition with the IMEI data exposed and unless you have backups, you are screwed.

As a sidenote, this whole ordeal also killed my SD card with backups, that's how lucky I am.

And in something completely unrelated, Fate/GO seems to work in a GApps-less phone, that is actually a pretty cool thing if I ever follow my "Avoid Google" plan.

EDIT: Xposed + IMEI changers were a no go, mostly likely because it doesn't account for dual SIM phones I guess?
  • Like
Reactions: 3 people

Comments

Wipe userdata, reflash stock ROM through fastboot or unlock bootloader (if you can) and get a custom ROM going. Unless it's a hardware issue, then you are shit out of luck.
 
That's what "erase all" means... you've learned the hard way.

Something similar happened to me but on a PC, while using the shell modifying partitions... now I check twice the command before pressing ENTER key.
 
I actually have used this command on other phones without issue IIRC, it's weird to leave such important partitions exposed to the user, you know.
 
  • Like
Reactions: 2 people
Jeez, I mostly blame Motorola for this one for letting you fuck your IMEI.

Have you called Motorola and asked them for assistance? This isn't a OnePlus phone so you probably voided your warranty, but it's probably worth a shot anyway.
 
Also, sorry for double post:

"And in something completely unrelated, Fate/GO seems to work in a GApps-less phone, that is actually a pretty cool thing if I ever follow my "Avoid Google" plan."

Were you able to get it working with root? I've tried and failed
 
I doubt they will repair it the cheap way (fixing the IMEI), they will probably ask for a full motherboard repair or will simple refuse to do because it's an old phone/user mistake. The whole phone is in a bad shape (cracked screen and one of the SIM slots broke due to a crappy SIM adapter) too, so it would get expensive very quick.

As for the Fate/GO + root, there's a way to play it, it's a bit crappy (No SafetyNet for me) and requires LineageOS, but it works wonder.
Basically, get iSu + LineageOS' SU, keep the stock kernel, it has a patch to hide SU from everything when it's toggled off, toggle SU normally through dev options, configure iSu to automatically disable root for Fate/GO (I keep it off all time and only toggle it on for root apps) and go to the build.prop section and keep everything at a safe value. Reboot phone and it should work fine (or at the second attempt to load the game), if you keep it GApps less, Fate/GO will give a warning but it seems to download normally, I didn't load the game though.

If you don't have LineageOS, maybe SuperSU installed on /sbin + the new suhide-lite could work too, I had no luck making it work on Magisk through, and nobody seems to care enough to discover how it detects Magisk.
 
  • Like
Reactions: 2 people
I bought a xt 1033 dual chip to reuse parts, the only problem it showed was the IMEI = 0, I solved the problem with this:


It's in Portuguese, but I've seen you're from Brazil, so I do not see any problems posting here ...
 
F
Stock ROM should have flashable IMEI. You only lose IMEI if you don't have enough space on your device during flashing.
But that sucks, hope ya get it fixed. You must find something to flash for IMEI to work again
 
Hmm, weird, I got the official stock ROM (Signed and all) but there is no IMEI to flash, just the modem firmware.

Rodrigo's workaround also failed, it doesn't seem to stick after rebooting it.
 
P
Wonder if this would happen on a Sony device with the TA partition intact? P.S Don't try this. lol
Motorola probably will never fix this as fastboot isn't really for the average consumer, which sucks
 
In general, if rooted, you can backup the partitions responsible for saving the IMEI.

I backed up my old Samsung Siii EFS partition using DD.
 
Yeah, I had a full backup, but it died with my 32GB SD card, I should have kept another one off-site, damnit.
 

Blog entry information

Author
matpower
Views
1,093
Comments
30
Last update

More entries in Personal Blogs

More entries from matpower

General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: but well atleast my game tv stick can, @Psionic Roshambo