[GUIDE] Nexus 4 - Factory Image Restore

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!

Nicely done! And thanks for sharing, as I'll have to take a look and see if I need to update something or link to these files as well. :)

Sent from my Nexus 4 using Tapatalk 2
 
So I followed this guide (trying to go back from rooted, stock 4.2.2 ROM, .33 radio for LTE) to update to 4.3.

Everything worked fine (I think), but its been at the X splash screen for about 10 minutes now. Also noticed that it stays at the "Google" screen longer than before, then going to the splash screen. Ideas?

Code:
C:\Users\Desktop\Nexus Root\nexus4-adb-fastboot>fastboot-windows devices
XXXXXXXXXX        fastboot

C:\Users\Desktop\Nexus Root\nexus4-adb-fastboot>fastboot-windows erase boo
t
erasing 'boot'... OKAY

C:\Users\Desktop\Nexus Root\nexus4-adb-fastboot>fastboot-windows erase cha
che
erasing 'chache'... FAILED (remote: Partition table doesn't exist
)

C:\Users\Desktop\Nexus Root\nexus4-adb-fastboot>fastboot-windows erase cac
he
erasing 'cache'... OKAY

C:\Users\Desktop\Nexus Root\nexus4-adb-fastboot>fastboot-windows erase rec
overy
erasing 'recovery'... OKAY

C:\Users\Desktop\Nexus Root\nexus4-adb-fastboot>fastboot-windows erase sys
tem
erasing 'system'... OKAY

C:\Users\Desktop\Nexus Root\nexus4-adb-fastboot>fastboot-windows erase use
rdata
erasing 'userdata'... OKAY

C:\Users\Desktop\Nexus Root\nexus4-adb-fastboot>fastboot flash bootloader
bootloader-mako-makoz20i.img
'fastboot' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\Desktop\Nexus Root\nexus4-adb-fastboot>fastboot-windows flash boo
tloader bootloader-mako-makoz20i.img
sending 'bootloader' (2201 KB)... OKAY
writing 'bootloader'... OKAY

C:\Users\Desktop\Nexus Root\nexus4-adb-fastboot>fastboot-windows reboot-bo
otloader
rebooting into bootloader... OKAY

C:\Users\Desktop\Nexus Root\nexus4-adb-fastboot>fastboot-windows flash rad
io radio-mako-m9615a-cefwmazm-2.0.1700.84.img
sending 'radio' (54321 KB)... OKAY
writing 'radio'... OKAY

C:\Users\Desktop\Nexus Root\nexus4-adb-fastboot>fastboot-windows reboot bo
otloader
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

C:\Users\Desktop\Nexus Root\nexus4-adb-fastboot>fastboot-windows reboot-bo
otloader
rebooting into bootloader... OKAY

C:\Users\Desktop\Nexus Root\nexus4-adb-fastboot>fastboot -w update image-o
ccam-jwr66v.zip
'fastboot' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\Desktop\Nexus Root\nexus4-adb-fastboot>fastboot-windows -w update
 image-occam-jwr66v.zip
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........: XXXXXXXXXX
--------------------------------------------
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)... OKAY
writing 'system'... OKAY
erasing 'userdata'... OKAY
erasing 'cache'... OKAY
rebooting...

C:\Users\Desktop\Nexus Root\nexus4-adb-fastboot>
 
Last edited:
after a near heart attack, i'm good! i went from CyanogenMod to stock 4.3.

i had a minor scare with the missing 'boot.sig' business then got stuck on the X logo. i wasn't able to boot into the bootloader so i sat the phone down, walked into the kitchen, grabbed a drink and walked back. booted into bootloader and followed the troubleshooting instructions. the first time i had tried to boot into bootloader i just got a red LED (heart attack time). not sure what was up with that but happy to be on 4.3!
 
I seem to be having the same problem as andr0idralphie. I was running a Nexus 4 (rooted and unlocked, but stock) with 4.2.2. I thought I could use this guide to update to 4.3. I got as far as andr0idralphie, received the following error: sending 'system' (570666 KB)... ERROR: usb_write failed with status e00002be FAILED (data transfer failure (No such file or directory)) I attempted to follow the advice of 2defmouze by erasing the system and resending it, but now Terminal (i'm using a mac) is stuck on erasing 'system' ... (its been about 25 mins)

What should I do? Is it safe to quit terminal, reopen it and try erasing and resending the system?
 
It appears that I've solved the problem. I'm now running 4.3 on my nexus 4. I'm not exactly sure what was causing the problem but I just could not get the system.img to flash. So I did some searching and found this post: Can't flash system.img in fastboot - xda-developers

Which led me on a search for alternate fastboot files, which I found here: Cult of Android MobileRooting The Google Nexus 4 The Right Way [How-To] | Cult of Android

I dropped the new adb and fastboot files into the folder from the beginning of this guide and started the step-by-step from scratch. But instead of typing ./fastboot-mac, now I typed ./fastboot...

It took a while to send and write the system.img (~90 seconds total) but it worked. The phone took a little longer to boot, but not too much. The Welcome screen sat at the 'just a sec' screen for a few minutes, but after that everything has been smooth!
 
I had a similar issue, I believe, it was similarly resolved by using a more recent release of Google's Mac Dev tools
 
I had a similar issue, I believe, it was similarly resolved by using a more recent release of Google's Mac Dev tools
After rereading your post I see that, indeed, you explained how to solve the problem. When I first read it I thought you were trying to go back to 4.2.2 and that that was what you download from the google dev page. Thanks, anyway :-)
 
It appears that I've solved the problem. I'm now running 4.3 on my nexus 4. I'm not exactly sure what was causing the problem but I just could not get the system.img to flash. So I did some searching and found this post: Can't flash system.img in fastboot - xda-developers

Which led me on a search for alternate fastboot files, which I found here: Cult of Android MobileRooting The Google Nexus 4 The Right Way [How-To] | Cult of Android

I dropped the new adb and fastboot files into the folder from the beginning of this guide and started the step-by-step from scratch. But instead of typing ./fastboot-mac, now I typed ./fastboot...

It took a while to send and write the system.img (~90 seconds total) but it worked. The phone took a little longer to boot, but not too much. The Welcome screen sat at the 'just a sec' screen for a few minutes, but after that everything has been smooth!

I had a similar issue, I believe, it was similarly resolved by using a more recent release of Google's Mac Dev tools

Happy you solved the problem, and thanks for sharing the solution! See that's what helps us all learn :)

I quickly took a look but the links weren't providing me the updated Mac tools you guys were using. If someone wouldn't mind linking me directly so that I can update the guide/tools and help people going forward I would greatly appreciate it! :D
 
Thanks a bunch! I added them with a note to the OP and credited the two of you guys for figuring that out :)
Perhaps you should note in the guide that when using the newer fastboot files for Mac the syntax for the Terminal commands is changed from "./fastboot-mac" to "./fastboot" (minus the ", of course)
 
Perhaps you should note in the guide that when using the newer fastboot files for Mac the syntax for the Terminal commands is changed from "./fastboot-mac" to "./fastboot" (minus the ", of course)

Actually I thought ahead and just renamed them to flow with the syntax of the original instructions... but thanks for looking out ;)
 
command: ./fastboot-mac flash system system.img
Result: sending 'system' (570666 KB)... ERROR: usb_write failed with status e00002be
FAILED (data transfer failure (No such file or directory))

there is something wrong with the system.img please help
 
No, download Google's latest Mac adt-bundle. Everything worked after I used that. Scroll up, read the thread a bit...
 
command: ./fastboot-mac flash system system.img
Result: sending 'system' (570666 KB)... ERROR: usb_write failed with status e00002be
FAILED (data transfer failure (No such file or directory))

there is something wrong with the system.img please help

No, download Google's latest Mac adt-bundle. Everything worked after I used that. Scroll up, read the thread a bit...

Try the updated Mac files I posted in the OP, as andr0idralphie suggested..
 
I was using Nexus 4 unrooted for months. yesterday I received OTA for 4.3. i followed the procedure. but after reboot my phone is stuck on X logo. I tried to follow the steps given here. Hav esetup correct adb on my Win 8 laptop. but since USB debugging was not enabled on my phone, it is not being detected in fastboot command prompt. How do I proeed? please help..
 
I was using Nexus 4 unrooted for months. yesterday I received OTA for 4.3. i followed the procedure. but after reboot my phone is stuck on X logo. I tried to follow the steps given here. Hav esetup correct adb on my Win 8 laptop. but since USB debugging was not enabled on my phone, it is not being detected in fastboot command prompt. How do I proeed? please help..

You don't need usb debugging enabled for fastboot. What exactly is happening when you are in the bootloader, plugged in, and enter fastboot devices?

Also given that you had an unrooted, locked (I'm presuming) device which froze up after the update, you may possibly just want to contact Google and get a new one sent rather than start hacking at it.
 

Forum statistics

Threads
956,569
Messages
6,968,864
Members
3,163,567
Latest member
SmoothieP