[TUTORIAL] How to flash a factory image | Return to stock | Unroot/SAVE your Nexus 6P

Search This thread

abaaaabbbb63

Senior Member
Nov 19, 2011
3,898
3,423
Somewhere Over The Rainbow
How to flash a factory image | Return to stock | Unroot your Nexus 6P​




Hello Nexus 6P Users!

This tutorial will show you how to reset/unroot/save your Nexus 6P by flashing the Google Factory Images.



Post-Divider-LG.jpg

WARNING!!!

This process will wipe your phone completely. Backup your storage before you continue.
I am also not responsible if anything goes wrong.


FOLLOW EVERY SINGLE STEP
or you will end up in a bootloop, or with a bricked phone, and we don't want that

Let's get started!!



Post-Divider-LG.jpg

Setting up



For this process, you will need to:

Install adb and fastboot drivers. To do this, use this simple program:
http://forum.xda-developers.com/showthread.php?t=2588979

For MAC and Linux users: simply follow these instructions:
http://forum.xda-developers.com/showthread.php?t=2638673

Off-topic: installing ADB and Fastboot so easily, what a time to be alive!


Download the latest factory images from here:
https://developers.google.com/android/nexus/images#angler

★Extract the archive you downloaded (Use WinRAR). It should look like this:

tyPJH6g.png


★Unlock your bootloader (In case you haven't already). Only follow step 1 from this thread:
http://forum.xda-developers.com/nexus-6p/general/guides-how-to-guides-beginners-t3206928







Post-Divider-LG.jpg

Flashing the factory images



There is more than one way to flash these images. Each give the same results, but the first is for lazy (or smart) users :D

Method 1. Easy method.

★Power off your phone.

★Boot it in fastboot by pressing and holding Power Button + Volume Down at the same time.

★Connect your phone to your PC through your USB cable.

★Execute the flash-all.bat script (for Windows) or flash-all.sh(for MAC and LINUX) in the folder where you extracted the factory images.
**!!** For MAC: You'll have to edit the flash-all.sh, and add "./" before every fastboot command.

★Wait for everything to flash.

★After everything finished, select "Recovery" using the volume buttons.

★When a small dead Android appears, press Power Button + Volume UP.

★Select "Wipe data/factory data reset"

★Reboot. Your phone should be stock. :good:


Method 2. Long method (Same thing actually, but I'll mention it, just in case first one does not work)

★Extract the image-angler-xxxxxx.zip from the previously extracted folder somewhere easy to access (On C:\images for example. Make it easy to type). You will have the following files:

zHQoAzg.png


★In the new folder, from the original archive/folder, extract "bootloader-angler-angler-XX.XX.img" (rename it to bootloader.img) and "radio-angler-angler-XX.XX" (rename it to radio.img)

★Power off your phone.

★Boot it in fastboot by pressing and holding Power Button + Volume Down at the same time.

★Connect your phone to your PC through your USB cable.

★Open a CMD window.

★Type the following commands, in this order (If you have a different folder, change the path)
Code:
fastboot flash bootloader C:/images/bootloader.img
fastboot reboot-bootloader
fastboot flash radio C:/images/radio.img
fastboot reboot-bootloader
fastboot flash system C:/images/system.img
fastboot flash vendor C:/images/vendor.img
fastboot flash userdata C:/images/userdata.img 
(Note: this command will wipe your device (including /sdcard), EVEN if your bootloader is already unlocked.)

fastboot flash boot C:/images/boot.img
fastboot flash recovery C:/images/recovery.img
fastboot erase cache
fastboot flash cache C:/images/cache.img

★After everything finished, select "Recovery" using the volume buttons.

★When a small Android appears, press Power Button + Volume UP.

★Select "Wipe data/factory data reset"

★Reboot. Your phone should be stock. :good:



And now you have a brand new Nexus 6P (software wise, at least). Congratulations!
 

abaaaabbbb63

Senior Member
Nov 19, 2011
3,898
3,423
Somewhere Over The Rainbow

Kremata

Senior Member
Dec 26, 2011
1,077
1,269
Montreal-Shanghai
When I download the images it doesn't contains Angler-bootloader and Radio.img. It only contains one file with the boot.img, etc... I tried downloading all the 6.0.0 link and it's all the same . I don't understand.
 

TwiggieSmalls

Senior Member
Dec 5, 2013
87
22
Gresham
I cannot make phone calls through the phone app?
I followed directions step by step but every time I get to the dead android guy and hold vol up + pow. I do not get the "stock" recovery where I could choose to data/factory reset, I just get the little dead android guy again.

Any help?
 

cediedc

Senior Member
Feb 11, 2013
56
11
From Heisenberg post says that
Note: You should never flash the userdata image. It doesn't take into consideration the storage capacity of the device and always allocates 32gb of storage. This is ok for the 32gb model, but for the 64gb and 128gb models you'll end up with much less storage capacity than you should have.
And I have 64gb of storage. should I wipe or flash?:confused:
 

DJBhardwaj

Recognized Contributor
Apr 23, 2011
5,050
2,699
27
Delhi
From Heisenberg post says that
And I have 64gb of storage. should I wipe or flash?:confused:

You can do both. Just in case, your storage spaces shows reductions after flashing (Like my 64GB variant shows 32 GB), you can fix it by wiping data from stock recovery.
If you're not willing to remove the data on your internal storage, you can skip flashing userdata.img.
 

DJBhardwaj

Recognized Contributor
Apr 23, 2011
5,050
2,699
27
Delhi
nope just the factory image from google..can you send me the link to the vendor img for latest stock build? and do i fastboot flash it? thanks :)

Vendor.img is already included in the factory image. If you used flash-all.bat script, it must have been flashed. What commands did you precisely use to flash the factory image?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 35
    How to flash a factory image | Return to stock | Unroot your Nexus 6P​




    Hello Nexus 6P Users!

    This tutorial will show you how to reset/unroot/save your Nexus 6P by flashing the Google Factory Images.



    Post-Divider-LG.jpg

    WARNING!!!

    This process will wipe your phone completely. Backup your storage before you continue.
    I am also not responsible if anything goes wrong.


    FOLLOW EVERY SINGLE STEP
    or you will end up in a bootloop, or with a bricked phone, and we don't want that

    Let's get started!!



    Post-Divider-LG.jpg

    Setting up



    For this process, you will need to:

    Install adb and fastboot drivers. To do this, use this simple program:
    http://forum.xda-developers.com/showthread.php?t=2588979

    For MAC and Linux users: simply follow these instructions:
    http://forum.xda-developers.com/showthread.php?t=2638673

    Off-topic: installing ADB and Fastboot so easily, what a time to be alive!


    Download the latest factory images from here:
    https://developers.google.com/android/nexus/images#angler

    ★Extract the archive you downloaded (Use WinRAR). It should look like this:

    tyPJH6g.png


    ★Unlock your bootloader (In case you haven't already). Only follow step 1 from this thread:
    http://forum.xda-developers.com/nexus-6p/general/guides-how-to-guides-beginners-t3206928







    Post-Divider-LG.jpg

    Flashing the factory images



    There is more than one way to flash these images. Each give the same results, but the first is for lazy (or smart) users :D

    Method 1. Easy method.

    ★Power off your phone.

    ★Boot it in fastboot by pressing and holding Power Button + Volume Down at the same time.

    ★Connect your phone to your PC through your USB cable.

    ★Execute the flash-all.bat script (for Windows) or flash-all.sh(for MAC and LINUX) in the folder where you extracted the factory images.
    **!!** For MAC: You'll have to edit the flash-all.sh, and add "./" before every fastboot command.

    ★Wait for everything to flash.

    ★After everything finished, select "Recovery" using the volume buttons.

    ★When a small dead Android appears, press Power Button + Volume UP.

    ★Select "Wipe data/factory data reset"

    ★Reboot. Your phone should be stock. :good:


    Method 2. Long method (Same thing actually, but I'll mention it, just in case first one does not work)

    ★Extract the image-angler-xxxxxx.zip from the previously extracted folder somewhere easy to access (On C:\images for example. Make it easy to type). You will have the following files:

    zHQoAzg.png


    ★In the new folder, from the original archive/folder, extract "bootloader-angler-angler-XX.XX.img" (rename it to bootloader.img) and "radio-angler-angler-XX.XX" (rename it to radio.img)

    ★Power off your phone.

    ★Boot it in fastboot by pressing and holding Power Button + Volume Down at the same time.

    ★Connect your phone to your PC through your USB cable.

    ★Open a CMD window.

    ★Type the following commands, in this order (If you have a different folder, change the path)
    Code:
    fastboot flash bootloader C:/images/bootloader.img
    fastboot reboot-bootloader
    fastboot flash radio C:/images/radio.img
    fastboot reboot-bootloader
    fastboot flash system C:/images/system.img
    fastboot flash vendor C:/images/vendor.img
    fastboot flash userdata C:/images/userdata.img 
    (Note: this command will wipe your device (including /sdcard), EVEN if your bootloader is already unlocked.)
    
    fastboot flash boot C:/images/boot.img
    fastboot flash recovery C:/images/recovery.img
    fastboot erase cache
    fastboot flash cache C:/images/cache.img

    ★After everything finished, select "Recovery" using the volume buttons.

    ★When a small Android appears, press Power Button + Volume UP.

    ★Select "Wipe data/factory data reset"

    ★Reboot. Your phone should be stock. :good:



    And now you have a brand new Nexus 6P (software wise, at least). Congratulations!
    6
    err.... Heisenberg's already have a tutorial on how to return to stock... not sure why we need a duplicate posting..

    #9 How To Flash The Factory Images (And Return To Stock)

    I thought that a separate thread would raise its visibility and would be easier to spot for users that do not know their way around XDA that well.
    3
    err.... Heisenberg's already have a tutorial on how to return to stock... not sure why we need a duplicate posting..

    #9 How To Flash The Factory Images (And Return To Stock)
    2
    Post-Divider-LG.jpg

    Credits and Thanks:

    @Mr hOaX
    Got some fastboot command "updates" from you

    @Heisenberg
    Really cool root tutorial


    1
    Credits and Thanks:

    Mr hOaX
    Got some fastboot command "updates" from you

    Heisenberg
    Really cool root tutorial

    Nice to see you here bro :)
    Good job :D

    This guy's tutorial will really save your nexus for sure ;)