Welcome to the Android Central Forums Create Your Account or Ask a Question Answers in 5 minutes - no registration required!
Page 1 of 13 1234 ... LastLast
Results 1 to 25 of 302
Like Tree92Likes
  1. Thread Author  Thread Author    #1  
    2defmouze's Avatar

    Posts
    5,825 Posts
    Global Posts
    5,846 Global Posts
    ROM
    AOKP

    Default [GUIDE] Nexus 4 - Factory Image Restore

    [TITLE=Nexus 4 Factory Image Restore]
    [TAB=Intro]Hit a wall while hacking away on your unlocked Nexus 4? Don't Panic!! Whether you think you bricked your device, desire a clean slate to start over, or just want to play with some fastboot commands.. Nexus devices are the recipients of full Factory Images straight from Google, ensuring that we can recover from even the ugliest of situations and restore our device to brand new, out-of-the-box condition at any time. You will need a few files and a little familiarity with entering commands in a terminal / command prompt, but mostly just the ability to read and follow instructions. It's so easy, your grandma could do it! [WARN]Restoring the Factory Images will wipe EVERYTHING on your device, including the internal sdcard partition. If you can boot it up at all right now, you may wish to copy your photos, music, etc to your computer before we begin, else they will be lost. We are not responsible for your device and anything you do to it, but we will do our best to help[/WARN]
    [GUIDE] Nexus 4 - Factory Image Restore-dontpanic_large.jpg
    [/TAB][TAB=Setup and Files]A few items you will need before we begin..
    1. Factory Image The latest Factory Image for your device -- 4.3 (JWR66V) -- direct download link from Google: https://dl.google.com/dl/android/aos...y-08d2b697.tgz
    A link to the page where you can find the files yourself, if for some reason the direct link is not working: https://developers.google.com/android/nexus/images
    Please check the md5 checksum after downloading. If you get anything other than: 9d33973a61fa9266244fc43397888703 -- you should redownload. If you don't know how to check an md5 on your operating system, Google it!

    2. ADB and fastboot files Unless you used some kind of toolkit when you originally unlocked/rooted your device, you should have these already. They may be located in your Android SDK /platform-tools directory if you have that installed, or wherever you downloaded them to before. Make sure you know where they are. If you need to grab them again, I totally stole these from smarter people than me (namely PaulOBrien) and just took out stuff we don't need, and renamed it to avoid confusion for you guys. Download from here: https://dl.dropbox.com/u/47300967/ne...b-fastboot.zip
    *Mac users: Some Mac users have reported freeze-ups and other issues when the process gets to sending the system.img over to the device. AC users bshimrak and andr0idralphie were able to solve this by using updated adb and fastboot files, and bshimrak was kind enough to provide me those files, which I am mirroring here: https://dl.dropboxusercontent.com/u/...ndroid-MAC.zip
    Mac users may need to use these adb and fastboot files. The steps should remain the same.

    3. Drivers If you are on a Windows system (linux and mac need not bother with these): Universal Naked Driver 0.72.zip
    Warning: Uninstall any previous driver package's you may have installed and also manually remove drivers by attaching your phone and going to Windows device manager and right click the entry for your phone and select "Uninstall" on the next prompt make sure to select "Delete the driver software for this device" then hit OK and reboot before installing these drivers
    HUGE thanks to 1wayjonny at xda for these drivers!

    [/TAB][TAB=Step-by-Step]Are you still with me? Great... let's get started!

    Here are the GENERAL INSTRUCTIONS TO RESTORE THE STOCK IMAGES. Make sure you know how to do it for your computer/setup and that ADB and fastboot is set up on your computer. Know the exact folder containing the fastboot files you will be using.

    [NOTE]Throughout these instructions I will be entering our commands in the format:
    Code:
    fastboot … … …
    However, you must remember to modify just the beginning part to reference the appropriate file for your system.
    For Windows this should look like:
    Code:
    fastboot-windows … … …
    For Linux (note that sudo may be required before entering fastboot commands):
    Code:
    sudo fastboot-linux … … …
    For Mac (note that ./ is required before entering the commands on a Mac):
    Code:
    ./fastboot-mac … … …
    [/NOTE]

    [INFO]1. Extract the files from the Factory Image we downloaded from Google. The BEST app you can use for this is 7zip. I suggest Googling it and finding a version for your OS. Using other file archive apps (i.e. winrar, winzip, etc) may result in errors. 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.

    2. Open a command prompt inside the folder we have set up our files in. On Windows this can be done by holding shift as you right-click in the folder, then select "Open command window here". On Mac or on a Linux system you want to open a terminal/command prompt and navigate to that folder using "cd" or "change directory" commands. For example, if you grabbed the zip I posted earlier and extracted it on your desktop, your folder is called "nexus4-adb-fastboot" on your desktop, and you would enter:
    Code:
    cd desktop
    cd nexus4-adb-fastboot
    Now your command prompt is ready in the correct directory for all of the following commands.

    3. Boot into the bootloader/fastboot mode. Power down the phone, then hold Volume Down and Power until you see the familiar green robot, and a string of text on the left that begins with "fastboot mode" in red letters. You may also get here if your phone is powered on and plugged into the computer already by simply typing
    Code:
    fastboot reboot bootloader
    in the prompt and hitting Enter. Regardless.. Plug it in now. If possible try to use a USB port in the rear of your computer, rather than the front. Yes, this can make a difference!

    4. Let's make sure fastboot is recognizing your device. Type this command and hit Enter:
    Code:
    fastboot devices
    You should see "List of attached devices" Followed by a string of numbers. If you do not see this, you do not have your drivers installed correctly! You may need to remove them and try just reinstalling from the Setup tab earlier. If you got the expected response, let's move on to fastbooting you back to stock...

    5. This first command is going to wipe all your old EVERYTHING from the device. This step isn't always needed, but it's a great idea to do it anyway. The code we use later to flash the Factory Image will also wipe it, but you may sometimes avoid bugs by doing it manually first. Type each of these lines followed by Enter between them, waiting for one to finish before moving on to the next:
    Code:
    fastboot erase boot
    fastboot erase cache
    fastboot erase recovery
    fastboot erase system
    fastboot erase userdata
    6. These commands are going to flash the Factory Image to your device. Each command will flash a different component/image required to go to stock. You can copy and paste each command, but if they don't work type them in. There's a general "language" that's being spoken here, so as long as you understand that language you'll be able to get the general jibe of what's going on. Also, make sure each command is COMPLETE before going to the next.
    Code:
    fastboot flash bootloader bootloader-mako-makoz20i.img
    fastboot reboot-bootloader
    fastboot flash radio radio-mako-m9615a-cefwmazm-2.0.1700.84.img
    fastboot reboot-bootloader
    fastboot –w update image-occam-jwr66v.zip
    When the final command completes the phone should reboot itself. Let it do this without touching anything, all the way to the Welcome screen. Leave your command prompt window open, we aren't done just yet!

    7. If you intend to keep your device unlocked and get back to playing with it, then you are done! Have fun! However, if you would like to re-lock your bootloader now that you have a stock device again, simply reboot into the bootloader just like we did earlier. In the command prompt type:
    Code:
    fastboot oem lock
    fastboot reboot-bootloader
    Hitting enter between each line, of course. Now you can boot up into your stock, locked phone. If you want to unlock that bootloader again (remember, doing so will wipe everything just as it did the first time) just boot into the bootloader again and use:
    Code:
    fastboot oem unlock
    And that's it.. you have in your hands a completely restored, stock device and can get back to tinkering with it as much as you like. If you have any questions, comments, concerns.. just post them and myself or someone else will help you out as soon as we can. Also check the Troubleshooting tab for some solutions to common questions or errors. Credit to everyone who I stole borrowed files and verbatim for this guide

    Happy fastbooting![/INFO]

    [/TAB][TAB=Troubleshooting]Answers and Solutions to Common Issues
    Q. When entering the commands I see the error "fastboot is not a recognized command"
    A. Your command prompt just isn't looking in the correct location. Remember you had to locate the directory which contains your fastboot file, move all of the files extracted from the Factory Image to that directory, and then either tell the command prompt to look in that directory or open the command window from within that directory. Go back to Step 2 of the step-by-step and try again.

    Q. Everything seemed to work.. but when I was flashing the image I saw these (or similar) messages:
    archive does not contain 'boot.sig'
    archive does not contain 'recovery.sig'
    archive does not contain 'system.sig'
    A. Safe to ignore these.

    Q. After the process completes I am getting stuck at the Android X or boot logo and cannot get past it.
    A. Boot back into the bootloader and try locking and then unlocking it, simply using:
    fastboot oem lock
    followed by
    fastboot oem unlock
    And accept it on the phone. Sometimes the wipe this does is needed to fully clear the old data and caches.

    Q. I got an error saying "FAILED (command write failed (Unknown error))"
    A. Try using a different USB port. It's usually best, if possible, to use one in the back of your computer rather than the front.

    Q. Message indicates the fastboot command is not in the correct syntax.. or I got an error sending the system portion.. or it seemed to freeze when sending system and won't boot up now.
    A. Besides trying a different USB port, also try entering the final command switching up the "-w" portion to follow the "update" command, as in:
    fastboot update –w image-occam-jop40d.zip

    Q. I got an error saying "FAILED (remote: (BadParameter))"
    A. Your computer did not like flashing the last file, the big .zip containing the various parts of your system (specifically the boot, system, recovery, and userdata sections). Unzip that file, and make sure to move the extracted files once again to the same directory as your fastboot file. Now you are going to flash each of them one at a time, as in:
    Code:
    fastboot flash boot boot.img
    fastboot flash system system.img
    fastboot flash recovery recovery.img
    fastboot flash userdata userdata.img
    Please be sure to only enter these lines one at a time and let each one finish before entering the next. When done reboot.

    [/TAB]
    [/TITLE]
    Last edited by 2defmouze; 07-26-2013 at 11:37 AM.
    Thanked by 90:
    + Show/Hide list of the thanked
  2. Thread Author  Thread Author    #2  
    2defmouze's Avatar

    Posts
    5,825 Posts
    Global Posts
    5,846 Global Posts
    ROM
    AOKP

    Default Re: [GUIDE] Factory Image Restore - Google Nexus 4

    Reserved.
    Thanked by 4:
    rbh135 likes this.
  3. #3  
    zero neck's Avatar
    The Ever-Living

    Posts
    5,090 Posts
    Global Posts
    5,097 Global Posts
    ROM
    KANG

    Default Re: [GUIDE] Factory Image Restore - Google Nexus 4

    damn, love the tabs.


    * INCREDIBLE * MECHA * TORO * GROUPER * GALAXY S3 *
    * [TORO RADIOS] * [NEXUS WALLS] * [GROUPER GUIDE] * [CHATTER] *
    Thanked by:
  4. #4  

    Default Re: [GUIDE] Nexus 4 - Factory Image Restore

    Bbcode guru...nicely done

    Sent from my Nexus 7 using Tapatalk 2
    Nexus 4 / Nexus 7 / Transformer Prime
    @digitalslacker
    +digitalslacker
    Thanked by:
  5. #5  
    zero neck's Avatar
    The Ever-Living

    Posts
    5,090 Posts
    Global Posts
    5,097 Global Posts
    ROM
    KANG

    Default Re: [GUIDE] Nexus 4 - Factory Image Restore

    Sticky yo


    * INCREDIBLE * MECHA * TORO * GROUPER * GALAXY S3 *
    * [TORO RADIOS] * [NEXUS WALLS] * [GROUPER GUIDE] * [CHATTER] *
    2defmouze likes this.
  6. #6  

    Default Re: [GUIDE] Nexus 4 - Factory Image Restore

    Best. thread. ever... thanks.
    Thanked by:
    zero neck and 2defmouze like this.
  7. #7  

    Default Re: [GUIDE] Nexus 4 - Factory Image Restore

    Alright so I've done this countless times with my N7 and Gnex, and I tried this with the N4 a couple times and followed this guide, but I'm stuck at the boot screen and it just won't boot up. Anyone else run into this issue?
  8. Thread Author  Thread Author    #8  
    2defmouze's Avatar

    Posts
    5,825 Posts
    Global Posts
    5,846 Global Posts
    ROM
    AOKP

    Default Re: [GUIDE] Nexus 4 - Factory Image Restore

    Quote Originally Posted by BearDroid View Post
    Alright so I've done this countless times with my N7 and Gnex, and I tried this with the N4 a couple times and followed this guide, but I'm stuck at the boot screen and it just won't boot up. Anyone else run into this issue?
    Have you unplugged it from the computer? That sometimes has to be done as soon as the restore completes..
    Thanked by:
  9. #9  

    Default Re: [GUIDE] Nexus 4 - Factory Image Restore

    Quote Originally Posted by 2defmouze View Post
    Have you unplugged it from the computer? That sometimes has to be done as soon as the restore completes..
    I have not. I will try that now.

    Edit: So far it's not working. It's still stuck on the bootscreen.

    Edit 2: I used the Nexus 4 Toolkit and it worked. I have no idea why and what the difference was. I followed the directions down to the .img and nothing worked.
    Last edited by BearDroid; 11-23-2012 at 01:45 PM.
    Thanked by:
  10. #10  
    zero neck's Avatar
    The Ever-Living

    Posts
    5,090 Posts
    Global Posts
    5,097 Global Posts
    ROM
    KANG

    Default Re: [GUIDE] Nexus 4 - Factory Image Restore

    still need to sticky this thrizead.


    * INCREDIBLE * MECHA * TORO * GROUPER * GALAXY S3 *
    * [TORO RADIOS] * [NEXUS WALLS] * [GROUPER GUIDE] * [CHATTER] *
    Thanked by:
    2defmouze likes this.
  11. Thread Author  Thread Author    #11  
    2defmouze's Avatar

    Posts
    5,825 Posts
    Global Posts
    5,846 Global Posts
    ROM
    AOKP

    Default Re: [GUIDE] Nexus 4 - Factory Image Restore

    Housekeeping... updated link and instructions to reflect the new 4.2.1 (JOP40D) factory image.

    Lol what's a guy gotta do to get stickied around here? Who's asleep at the wheel AC?
    Thanked by:
    NotJustAPhone likes this.
  12. #12  
    zero neck's Avatar
    The Ever-Living

    Posts
    5,090 Posts
    Global Posts
    5,097 Global Posts
    ROM
    KANG

    Default Re: [GUIDE] Nexus 4 - Factory Image Restore

    We got a nonsticky emergency here, alert the mods


    * INCREDIBLE * MECHA * TORO * GROUPER * GALAXY S3 *
    * [TORO RADIOS] * [NEXUS WALLS] * [GROUPER GUIDE] * [CHATTER] *
  13. #13  

    Default Re: [GUIDE] Nexus 4 - Factory Image Restore

    Quote Originally Posted by zero neck View Post
    We got a nonsticky emergency here, alert the mods
    A few mods have thanked the op. Maybe they waiting for the apocalypse?

    Go slap dmm upside his head.
  14. #14  
    NotJustAPhone's Avatar

    Posts
    11,475 Posts
    Global Posts
    11,780 Global Posts
    ROM
    GS3: CleanROM / N4: AOKP

    Default Re: [GUIDE] Nexus 4 - Factory Image Restore

    Quote Originally Posted by davey11 View Post
    A few mods have thanked the op. Maybe they waiting for the apocalypse?

    Go slap dmm upside his head.
    Where's dmm been hiding?

    Sent from my Galaxy Nexus
  15. Thread Author  Thread Author    #15  
    2defmouze's Avatar

    Posts
    5,825 Posts
    Global Posts
    5,846 Global Posts
    ROM
    AOKP

    Default Re: [GUIDE] Nexus 4 - Factory Image Restore

    Quote Originally Posted by NotJustAPhone View Post
    Where's dmm been hiding?

    Sent from my Galaxy Nexus
    Remember that safe full of money Scrooge McDuck would swim around in? Lol..

    Sent from my Nexus 4 using Tapatalk 2
  16. #16  
    mzanette's Avatar
    Zee

    Posts
    643 Posts
    Global Posts
    644 Global Posts

    Default Re: [GUIDE] Nexus 4 - Factory Image Restore

    Friend of mine did a factory reset on his Nexus 4, and now he doesn't have the Emoji keyboard as an option any longer. On my Nexus it's called iWnn IME under language and input. I've found a .zip file on XDA that contains this keyboard, but I'm just curious as to how I go about installing it. Do I flash the entire .zip file through the fastboot/command line option, or can I take the iWnn IME.apk that I find inside the zip file and install that as a regular app? Anyone know?
    A proud former Nexus 4 Limbo level-2 member
  17. Thread Author  Thread Author    #17  
    2defmouze's Avatar

    Posts
    5,825 Posts
    Global Posts
    5,846 Global Posts
    ROM
    AOKP

    Default Re: [GUIDE] Nexus 4 - Factory Image Restore

    Quote Originally Posted by mzanette View Post
    Friend of mine did a factory reset on his Nexus 4, and now he doesn't have the Emoji keyboard as an option any longer. On my Nexus it's called iWnn IME under language and input. I've found a .zip file on XDA that contains this keyboard, but I'm just curious as to how I go about installing it. Do I flash the entire .zip file through the fastboot/command line option, or can I take the iWnn IME.apk that I find inside the zip file and install that as a regular app? Anyone know?
    If it was a part of stock, it should have been included when he correctly flashed the factory image.

    In terms of the zip you found, you would want to flash it using a custom recovery. You can boot into TWRP temporarily for that purpose, just follow the steps in the Root It! tab in my Unlock guide, and flash that zip instead of the SuperSU one.

    Sent from my Nexus 4 using Tapatalk 2
  18. #18  
    mzanette's Avatar
    Zee

    Posts
    643 Posts
    Global Posts
    644 Global Posts

    Default Re: [GUIDE] Nexus 4 - Factory Image Restore

    Quote Originally Posted by 2defmouze View Post
    If it was a part of stock, it should have been included when he correctly flashed the factory image.

    In terms of the zip you found, you would want to flash it using a custom recovery. You can boot into TWRP temporarily for that purpose, just follow the steps in the Root It! tab in my Unlock guide, and flash that zip instead of the SuperSU one.

    Sent from my Nexus 4 using Tapatalk 2
    That's that's what I suspected. Just note, he didn't actually FLASH the factory image, he went into the phone settings -->Backup and reset--> "Factory data reset"
    A proud former Nexus 4 Limbo level-2 member
  19. #19  

    Default Re: [GUIDE] Nexus 4 - Factory Image Restore

    HELP....NO IDEA WHAT TO DO

    I followed the instruction, all successful, until I input "./fastboot-mac -w update image-occam-jop40d.zip"

    - 1st try,
    Code:
    checking product... OKAY
    checking version-bootloader... OKAY
    checking version-baseband... OKAY
    sending 'boot' (6166 KB)... OKAY
    writing 'boot'... OKAY
    sending 'recovery' (6664 KB)... OKAY
    writing 'recovery'... OKAY
    sending 'system' (531285 KB)... ERROR: usb_write failed with status e00002be
    FAILED (data transfer failure (No such file or directory))
    - 2nd try....I'm confident I didn't misspell, so I re-enter the code again and IT GETS STUCK
    Code:
    archive does not contain 'boot.sig'
    archive does not contain 'recovery.sig'
    archive does not contain 'system.sig'
    --------------------------------------------
  20. Thread Author  Thread Author    #20  
    2defmouze's Avatar

    Posts
    5,825 Posts
    Global Posts
    5,846 Global Posts
    ROM
    AOKP

    Default Re: [GUIDE] Nexus 4 - Factory Image Restore

    Quote Originally Posted by wahaha686 View Post
    HELP....NO IDEA WHAT TO DO

    I followed the instruction, all successful, until I input "./fastboot-mac -w update image-occam-jop40d.zip"

    - 1st try,
    Code:
    checking product... OKAY
    checking version-bootloader... OKAY
    checking version-baseband... OKAY
    sending 'boot' (6166 KB)... OKAY
    writing 'boot'... OKAY
    sending 'recovery' (6664 KB)... OKAY
    writing 'recovery'... OKAY
    sending 'system' (531285 KB)... ERROR: usb_write failed with status e00002be
    FAILED (data transfer failure (No such file or directory))
    - 2nd try....I'm confident I didn't misspell, so I re-enter the code again and IT GETS STUCK
    Code:
    archive does not contain 'boot.sig'
    archive does not contain 'recovery.sig'
    archive does not contain 'system.sig'
    --------------------------------------------
    Try using a different usb port, one in the back if possible. Also redownload the file.

    Sent from my Nexus 4 using Tapatalk 2
  21. #21  

    Default Re: [GUIDE] Nexus 4 - Factory Image Restore

    Thank you so much for the guide. Everything seems to be working well, except I got the three boot, recovery, and system.sig errors. When my Nexus 4 reboots, it seems fine until it gets to the "X" splashcreen. It has now been stuck at this point for about 45 minutes. I have tried going through the entire process multiple times now, and have downloaded the stock file multiple times as well. It won't boot either plugged in or unplugged via usb.

    Someone help.... Please???
    Marwan Alani likes this.
  22. Thread Author  Thread Author    #22  
    2defmouze's Avatar

    Posts
    5,825 Posts
    Global Posts
    5,846 Global Posts
    ROM
    AOKP

    Default Re: [GUIDE] Nexus 4 - Factory Image Restore

    Quote Originally Posted by cjhudelson View Post
    Thank you so much for the guide. Everything seems to be working well, except I got the three boot, recovery, and system.sig errors. When my Nexus 4 reboots, it seems fine until it gets to the "X" splashcreen. It has now been stuck at this point for about 45 minutes. I have tried going through the entire process multiple times now, and have downloaded the stock file multiple times as well. It won't boot either plugged in or unplugged via usb.

    Someone help.... Please???
    The sig errors are meaningless ignore them. Don't know why it's not booting, but after 8 minutes or so it's safe to reboot and try over.. Try unplugging it from the computer as soon as the process finishes and it reboots itself.

    Sent from my Nexus 4 using Tapatalk 2
  23. #23  

    Default Re: [GUIDE] Nexus 4 - Factory Image Restore

    Quote Originally Posted by 2defmouze View Post
    The sig errors are meaningless ignore them. Don't know why it's not booting, but after 8 minutes or so it's safe to reboot and try over.. Try unplugging it from the computer as soon as the process finishes and it reboots itself.

    Sent from my Nexus 4 using Tapatalk 2
    Thanks for the quick reply. I have tried that a few times thinking that may be the case. However, unplugged or plugged in, it just won't get past the splash screen. Is there a possibility to side load the stock from from Android recovery? I have seemingly gotten to that screen, but I just have no idea what to do there. Again, any help would be great!

    Thank you so much!
  24. Thread Author  Thread Author    #24  
    2defmouze's Avatar

    Posts
    5,825 Posts
    Global Posts
    5,846 Global Posts
    ROM
    AOKP

    Default Re: [GUIDE] Nexus 4 - Factory Image Restore

    Quote Originally Posted by cjhudelson View Post
    Thanks for the quick reply. I have tried that a few times thinking that may be the case. However, unplugged or plugged in, it just won't get past the splash screen. Is there a possibility to side load the stock from from Android recovery? I have seemingly gotten to that screen, but I just have no idea what to do there. Again, any help would be great!

    Thank you so much!
    If you can get into recovery (even a custom one) try clearing the cache and dalvik cache and rebooting again.

    Sent from my Nexus 4 using Tapatalk 2
  25. #25  

    Default Re: [GUIDE] Nexus 4 - Factory Image Restore

    Quote Originally Posted by 2defmouze View Post
    If you can get into recovery (even a custom one) try clearing the cache and dalvik cache and rebooting again.

    Sent from my Nexus 4 using Tapatalk 2

    Just wiped cache and it insta-rebooted. Looking like it is now just stuck on the Nexus X again... Hoping something can be done still....

    How about the custom rom idea? Is there any use in trying to load CM10?
Page 1 of 13 1234 ... LastLast

Similar Threads

  1. [GUIDE] Nexus 7 - Factory Image Restore
    By 2defmouze in forum Google Nexus 7 (2012) Rooting, ROMs, & Hacks
    Replies: 405
    Last Post: 08-04-2014, 10:41 AM
  2. [GUIDE] Return to Stock: Factory Images for the VZW Galaxy Nexus
    By dmmarck in forum Verizon Galaxy Nexus Rooting, ROMs, and Hacks
    Replies: 110
    Last Post: 03-31-2013, 12:08 PM
  3. Factory Image(JB) for Nexus S and Galaxy Nexus Posted
    By still1 in forum Android 4.1 / 4.2 / 4.3 Jelly Bean
    Replies: 6
    Last Post: 07-29-2012, 02:11 PM

Posting Permissions