We had a typical issue with Moto E XT1022 dual sim phone. After changing the screen, the customer complained of no Wifi and SIM not detecting. We checked hardware and seemed okay.
The solution was to flash it with Stock ROM. Instead of flashing with Android 4.4.4 we decided to flash it with Android 5.0.
Let me first talk about the issues I faced.
FastBoot Mode - I was not sure which is the fastboot mode. Pressing Power button and Vol down for 10 secs will get you into fastboot mode. Recovery is not fast boot.
USB device is not detected - This was the error i was getting in my Windows 10 machine. No matter what I do, install drivers or restart or manually configure device manager. I always got this error. The solution was to replace the cable with new one. Believe it or not it worked.
Error - target max-sparse-size 256mb error cannot load - Again one of those errors which I could not get past when starting to run the fastboot script. The solution was simple. I had to run the fastboot command from same directory as Fastboot.exe was placed in Windows. I was running it from c: and my files were somewhere in d:\
Finally Moto E takes really long time to boot ~10 mins and the Wifi and Network started working.
Intensive process for someone who is doing it for first time. Sharing for benefit of others.
FOLLOWING steps were useful from XDA-developers website
Flash stock rom via fastboot: Ensure your phone's battery is atleast 50% charged. Just charge your phone for 45 mins,ead if yor phones seems dead. You DONT need to unlock bootloader for flashing official firmwares
1. Download and install Motorola device manager
2. Download and extract adb_fastboot.zip to any folder on your pc
3. Download Stock 5.1 rom file for your device model [thanks to lost101] and extract its contents to the same folder where you have adb_fastboot files
4. Reboot your phone to 'bootloader mode'. To do this turn of your phone completely. Hold volume down button and then press and hold power button. Release power button after 4-6 seconds and then release volume down button. Your phone is now in bootloader mode.
5. Connect your phone to pc via a reliable usb cable. Look at your phone screen. It should say 'USB connected'.
6. Now go to the folder where you have extracted all the files. Holding down shift key, Right click on any point on white screen. Then click on 'open command window here' from the menu that appears. Command Prompt will open now
7. On command prompt type
and check if it is detecting your device.
8. Now run the following commands in the given sequence
mfastboot flash partition gpt.bin mfastboot flash motoboot motoboot.img mfastboot flash logo logo.bin mfastboot flash boot boot.img mfastboot flash recovery recovery.img mfastboot.exe flash system system.img_sparsechunk.0 mfastboot.exe flash system system.img_sparsechunk.1 mfastboot.exe flash system system.img_sparsechunk.2 mfastboot.exe flash system system.img_sparsechunk.3 mfastboot flash modem NON-HLOS.bin mfastboot erase modemst1 mfastboot erase modemst2 mfastboot flash fsg fsg.mbn mfastboot erase cache mfastboot erase userdata fastboot reboot
proceed to each command after you get success message on command. If file name of system.img_sparsechunk is different then change the command accordingly. Just ensure to flash all system.img_sparsechunk files
Your phone may take 10-20 mins to turn on the first time. Dont panic this is normal. If it takes more time then power it off by holding power button till it turns off. Power it on after it cools down.