[GUIDE] Nexus 4 - Factory Image Restore

Many Thanks,
Soft Bricked my phone while trying to Root it! Revived it using your notes above! Great stuff!
 
Hi! I've followed every last guide on the internet to no avail. After getting through all the procedures in the guide, my Nexus gets stuck booting up. It gets past the Google logo and gets stuck on the X. Anything I'm doing wrong?
 
Hi! I've followed every last guide on the internet to no avail. After getting through all the procedures in the guide, my Nexus gets stuck booting up. It gets past the Google logo and gets stuck on the X. Anything I'm doing wrong?

How long did you give it at the boot animation? Be sure you let it sit as much as 10 minutes.

If it was still stalling did you try booting back to the bootloader then locking and unlocking again?
 
How long did you give it at the boot animation? Be sure you let it sit as much as 10 minutes.

If it was still stalling did you try booting back to the bootloader then locking and unlocking again?

I haven't tried locking and unlocking again. I'll try that now. Thanks!

Edit: That worked!!! After hours today... that's all I had to do haha. Thanks a million!
 
Last edited:
hey i have problem with my nexus 4
accidentally i formatted everything in my nexus 4 now when i start it its stuck on google and when i open it in recovery mode to sideload zip files the pc is unable to detect the memory card could u please find me a way out of it
 
hey i have problem with my nexus 4
accidentally i formatted everything in my nexus 4 now when i start it its stuck on google and when i open it in recovery mode to sideload zip files the pc is unable to detect the memory card could u please find me a way out of it

Follow the guide
 
Extract the files from the Factory Image we downloaded from Google. Dive through the folders and you will find a number of files we are going to fastboot to your device. We want to place all of these files into the directory we located earlier which contains our "fastboot" file. Move or copy them over to that folder.

which files, how many files?
 
Do I need to root my device before following this guide?

This guide is to allow you to restore a phone to a factory state after its been screwed up as a result of hacking or bad flashing.

If your problem is not the result of either already being rooted and doing something bad, or flashing something that did not go well... then this guide is NOT for you.
 
Thank you for your quick answer! I just wanted to go back from 4.2.2 to 4.2.1. But I'm finding difficult to find a guide for that! Do you know where can I find one?

This guide is to allow you to restore a phone to a factory state after its been screwed up as a result of hacking or bad flashing.

If your problem is not the result of either already being rooted and doing something bad, or flashing something that did not go well... then this guide is NOT for you.
 
Thank you for your quick answer! I just wanted to go back from 4.2.2 to 4.2.1. But I'm finding difficult to find a guide for that! Do you know where can I find one?

This will downgrade you to 4.2.1 if that is the factory image you use.. however you must unlock the bootloader, which will fully wipe the device (internal sdcard/memory included), and the procedure itself will again wipe anything left on the device.

If you are ok with that and need to downgrade then you can use this guide to do that, yes.
 
how long "wirting system" can take?
past 30 minutes

Shouldn't be more than a few.. 10 minutes most. Sorry I did not get notified of this post sooner.

If it's taking that long I'd try a different usb port / cable

Sent from my Nexus 4 using Tapatalk 2
 
Guide updated with direct links to the new 4.3 factory image and instructions for flashing them.

:)
 
Everything's fine until I get to fastboot ?w update image-occam-jwr66v.zip

With the -w option I simply get;

usage: fastboot [ <option> ] <command>


commands:
update <filename> reflash device from update.zip
flashall flash boot + recovery + system
flash <partition> [ <filename> ] write a file to a flash partition
erase <partition> erase a flash partition
getvar <variable> display a bootloader variable
boot <kernel> [ <ramdisk> ] download and boot kernel
flash:raw boot <kernel> [ <ramdisk> ] create bootimage and flash it
devices list all connected devices
reboot reboot device normally
reboot-bootloader reboot device into bootloader


options:
-w erase userdata and cache
-s <serial number> specify device serial number
-p <product> specify product name
-c <cmdline> override kernel commandline
-i <vendor id> specify a custom USB vendor id

A read out as if I used it incorrectly. Without the -w option;

archive does not contain 'boot.sig'
archive does not contain 'recovery.sig'
archive does not contain 'system.sig'
--------------------------------------------
Bootloader Version...: MAKOZ20i
Baseband Version.....: M9615A-CEFWMAZM-2.0.1700.84
Serial Number........: 003adfgfgfds56766c4a
--------------------------------------------
checking product... OKAY
checking version-bootloader... OKAY
checking version-baseband... OKAY
sending 'boot' (6194 KB)... OKAY
writing 'boot'... OKAY
sending 'recovery' (6738 KB)... OKAY
writing 'recovery'... OKAY
sending 'system' (570666 KB)... ERROR: usb_write failed with status e00002be
FAILED (data transfer failure (No such file or directory))




I see the downloading... in the fastboot screen on the Nexus right now but nothing, I'm back at the prompt after the failure message in the terminal. I tried re-downloading the 4.3 stock image and using different tools to expand it with the same results.
 
Everything's fine until I get to fastboot ?w update image-occam-jwr66v.zip

With the -w option I simply get;

usage: fastboot [ <option> ] <command>


commands:
update <filename> reflash device from update.zip
flashall flash boot + recovery + system
flash <partition> [ <filename> ] write a file to a flash partition
erase <partition> erase a flash partition
getvar <variable> display a bootloader variable
boot <kernel> [ <ramdisk> ] download and boot kernel
flash:raw boot <kernel> [ <ramdisk> ] create bootimage and flash it
devices list all connected devices
reboot reboot device normally
reboot-bootloader reboot device into bootloader


options:
-w erase userdata and cache
-s <serial number> specify device serial number
-p <product> specify product name
-c <cmdline> override kernel commandline
-i <vendor id> specify a custom USB vendor id

A read out as if I used it incorrectly. Without the -w option;

archive does not contain 'boot.sig'
archive does not contain 'recovery.sig'
archive does not contain 'system.sig'
--------------------------------------------
Bootloader Version...: MAKOZ20i
Baseband Version.....: M9615A-CEFWMAZM-2.0.1700.84
Serial Number........: 003adfgfgfds56766c4a
--------------------------------------------
checking product... OKAY
checking version-bootloader... OKAY
checking version-baseband... OKAY
sending 'boot' (6194 KB)... OKAY
writing 'boot'... OKAY
sending 'recovery' (6738 KB)... OKAY
writing 'recovery'... OKAY
sending 'system' (570666 KB)... ERROR: usb_write failed with status e00002be
FAILED (data transfer failure (No such file or directory))




I see the downloading... in the fastboot screen on the Nexus right now but nothing, I'm back at the prompt after the failure message in the terminal. I tried re-downloading the 4.3 stock image and using different tools to expand it with the same results.

Did you unzip the file using 7zip... And have you tried a different usb port (rear port is recommended) or even different cable?

Also what happened with the device that warranted the restore? Want to rule out hardware failure.

Sent from my Nexus 4 using Tapatalk 2
 
Alright, stupid me I suppose, but I thought I was UPDATING to 4.3. I couldn't find a walkthrough to update so I decided to follow this to wipe the phone and install 4.3 stock and now I'm up to this point and my phone is FUBAR. I couldn't find the walkthrough that I used for the 4.2.1 to 4.2.2 update and was really hopeful I could just deal with wiping out the phone and installing 4.3

I'm on Mac OS X, have used The Unarchiver, Apple's Archive Utility and Keka (fail, fail, fail) and am using the LG-provided cable. I've tried this with the simpler adb-fastboot files and Google Developer install, same outcome. I've tried the 2 USB ports in front of my comp... I guess I'll try the back...
 
Alright, stupid me I suppose, but I thought I was UPDATING to 4.3. I couldn't find a walkthrough to update so I decided to follow this to wipe the phone and install 4.3 stock and now I'm up to this point and my phone is FUBAR. I couldn't find the walkthrough that I used for the 4.2.1 to 4.2.2 update and was really hopeful I could just deal with wiping out the phone and installing 4.3

I'm on Mac OS X, have used The Unarchiver, Apple's Archive Utility and Keka (fail, fail, fail) and am using the LG-provided cable.

See if you can find 7zip for mac(?) to unzip it. Also try switching usb ports.

You can also try just sending the system since everything else is done. Unzip the archive and look for just the system.img. In fastboot mode try just doing:
fastboot erase system
Followed by
fastboot flash system system.img

If it doesn't work the first time try the other suggestions and keep at it. It's not unheard of to see these things take a couple goes before it will proceed error-free.

Sent from my Nexus 4 using Tapatalk 2
 
Okay, whilst crossing my fingers I checked Google's Android developer downloads and downloaded what appears to be a last-updated 07/17/2013 adt-bundle?this, oddly enough and albeit producing the same error outputs, worked. The phone also froze at the boot animation for quite awhile, remembering another having similar problems I scrolled up and tried the unlock/lock oem-bootloader... viol?! I'm now reinstalling and setting up the new phone!

After this experience I see why it's understood that it's nigh impossible to brick a Nexus device! I'm only partially an ***** when I'm impatient!