*You must have previously installed the Android SDK on your computer and unlock the bootloader.
- Download the original image. here
- Uncompress it.
- Modify flash-all.sh file if you’re using linux / mac or flash-all.bat if you’re using Windows.
Change the line that looks like this :
fastboot -w update image-hammerhead-lmy48b.zip
Remove the -w, w means wipe (erase) that’s what we want to avoid :
fastboot update image-hammerhead-lmy48b.zip - Open the file with name use by the previous fastboot command, in this example we will open : image-hammerhead-lmy48b.zip
- Erase userdata.img from this compress file.
- Close the edited zip file.
- Flash the phone with the flash-all.sh script if you’re using linux/mac or with flash-all.bat if your’re using Windows.
After rebooting, you can now root the phone if necessary.