[TUTORIAL][GUIDE][HOW TO] Flash Factory Images || Unroot || Relock bootloader

Are you Happy buying Nexus 6 ?

  • Yes ofcourse

    Votes: 1,374 87.3%
  • Not really

    Votes: 122 7.8%
  • May be in future

    Votes: 78 5.0%

  • Total voters
    1,574
Search This thread

Pkt_Lnt

Inactive Recognized Contributor
Dec 26, 2011
7,894
5,804
SLO
Some help please. I have a Nexus 6 with the PureNexus ROM and I need to reset the phone back to factory status as I now have a Pixel XL.

I've followed the instructions correctly (as far as I'm aware anyway). I'm getting the following error with the Flash all script (bolded text)

Use Method 2 in the OP.
 

MartinN6

Senior Member
Jul 6, 2015
662
388
Kassel
Google Pixel 6 Pro
In "https://forum.xda-developers.com/nexus-6/general/trying-to-reset-custom-romd-nexus-6-to-t3530192" I read
"Whatever you do, do not flash userdata.img. Simply make sure you do a factory reset after flashing, as the userdata.img is for a 32GB N6. Flashing it on a 64GB N6 results in half the internal storage being unseen by the device until a factory reset is done."

I have a 64GB Nexus 6 - what shall I do?
 

coremania

Senior Member
Jan 16, 2016
1,806
557
In "https://forum.xda-developers.com/nexus-6/general/trying-to-reset-custom-romd-nexus-6-to-t3530192" I read
"Whatever you do, do not flash userdata.img. Simply make sure you do a factory reset after flashing, as the userdata.img is for a 32GB N6. Flashing it on a 64GB N6 results in half the internal storage being unseen by the device until a factory reset is done."

I have a 64GB Nexus 6 - what shall I do?
What's the problem? If you want to wipe the phone completely flash the userdata.img and do a factory reset, or what's the point?
 

pcrussell50

Senior Member
Jan 5, 2008
366
70
santa barbara, ca
Also, if you backdate and use an older version of Marshmallow than the latest, you will probably get notifications to accept an update OTA. you can decline to update of course.

-peter
 

alexcolka

Member
Oct 11, 2016
38
9
50
Guayaquil
I guess so, you may use Nexus Root Toolkit, is very easy and straightforward. All is explained in that great utility.

Sent from my Nexus 6 using Tapatalk
 

Top Liked Posts

  • There are no posts matching your filters.
  • 198
    Heya Nexus 6 Users,

    In this thread, I'll help you to flash factory images on your nexus 6. This process will wipe your device, so please BACKUP YOUR DATA before going through the flashing process.

    You can backup your data from some well-known apps from Play Store

    - Titanium Backup (Root)
    - Super Backup (Non-root)
    - Helium (Non-root) etc


    I am not responsible if anything goes wrong.


    Step 1 : Pre-requisite

    ==> Setup your workspace by following step two from this (Credits @xBeerdroiDx)

    ==> For MAC users, you can follow this thread (Credits @AshtonTS)

    ==> For Linux users, you can follow this thread (Credits @bloodychaos)


    Step 2 : Downloading Factory Images

    ==> You can find Nexus 6(shamu) factory images from here.


    Step 3 : Extracting Factory Images

    ==> Extract the archive you downloaded (First extract shamu-XXXXX.tgz and then extract shamu-XXXXX.tar). You can use WinRaR or 7z etc. It should look like this

    XTNNqMd.png



    Step 4 : Unlock the bootloader

    ==> Follow this thread. (Credits @xBeerdroiDx)


    Step 5 : Flashing

    ==> Method 1 : (Short and Sweet)

    - Power off your phone.

    - Boot it in fastboot(bootloader mode) 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.

    (For windows users)

    h355rHW.png


    - 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.





    ==> Method 2 : (Long, but works always)

    - Extract the image-shamu-XXXXXX.zip somewhere easy to access (On C:/image-shamu-XXXXXX for example).
    - In the same folder, from the original archive, extract "bootloader-shamu-moto-XXXXXX.img" (rename it to bootloader.img) and "radio-shamu-XXXXXX.img" (rename it to radio.img). You will have the following files:

    vWX7X5f.png


    - Power off your phone.

    - Boot it in fastboot(bootloader mode) 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.(By pressing shift key + right mouse click at same time)

    - Type the following commands, in this order (If you have a different folder, change the path)

    Code:
    fastboot flash bootloader C:/image-shamu-XXXXXX/bootloader.img
    fastboot reboot-bootloader
    fastboot flash radio C:/image-shamu-XXXXXX/radio.img
    fastboot reboot-bootloader
    fastboot flash system C:/image-shamu-XXXXXX/system.img
    fastboot flash userdata C:/image-shamu-XXXXXX/userdata.img 
    (Note: this command will wipe your device (including /sdcard), EVEN if your bootloader is already unlocked.)
    
    fastboot flash boot C:/image-shamu-XXXXXX/boot.img
    fastboot flash recovery C:/image-shamu-XXXXXX/recovery.img
    fastboot erase cache
    fastboot flash cache C:/image-shamu-XXXXXX/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.

    (Credits @abaaaabbbb63)

    (Credits @Chirag_Galani for testing it :p )

    Please consider downloading a free/paid version of my ANDROID APP

    Hit thanks if you appreciate my efforts and if this thread helped you at any moment :) :D



    Video Guides

    Thanks Anuj Patel

    For Windows:


    For MAC:

    22
    >> Quick FAQs <<

    Q1. Do I need to root the device before flashing?
    Ans. NO

    Q2. Will I loose device root status after flashing?
    Ans. YES

    Q3. Do I need to unlock bootloader before flashing?
    Ans. YES

    Q4. Can I skip any of the above steps in any method?
    Ans. NO

    Q5. Do I need to tick USB Debugging in Developer options before flashing?
    Ans. NO (Answer corrected by @samersh72)

    Q6. My device is not detected in my PC. What should I do?
    Ans. Reinstall the drivers properly.

    Q7. Can I root my device after flashing process?
    Ans. YES

    Q8. Which method is recommended for me?
    Ans. Method 2 if you are not expert in flashing.

    Q9. What will be my device status after flashing?
    Ans. Stock Android with bootloader unlocked

    Q10. My device is taking time to boot up. What should I do now?
    Ans. Wait for 10-15 mins before thinking of reflashing.

    Q11. My phone has 3GB RAM, can I flash factory images directly without using PC?
    Ans. NO

    Q12. How many times can I flash my device?
    Ans. More than 0

    Q13. Will I loose my data after flashing?
    Ans. YES

    Q14. I have some other query...
    Ans. Please post it in Q&A section.

    Q15. I am noob in all this. I am flashing for the very first time. Can you provide me support online via any software?
    Ans. Follow each step as mentioned in first post. You'll be 100% successful.

    Q16. What will be status of bootloader after flashing?
    Ans. Unlocked

    Q17. What is fastboot mode?
    Ans. Bootloader mode.

    Q18. Can I take screenshot of my bootloader mode using power+volume down?
    Ans. NO

    Q19. Any other easy way to flash?
    Ans. If there was, I would have mentioned it.

    Q20. Do you recommend me using toolkits to do this job?
    Ans. NO

    Q21. Can I connect my device over the air and flash it from PC?
    Ans. NO

    Q22. I don't have my device USB right now. Can I flash using other compatible USB cable?
    Ans. YES

    Q23. I have installed the drivers properly, still it's not recognized by my PC?
    Ans. Use other USB port

    Q24. How do I relock bootloader after flashing? (For 5.0.X)
    Ans. Follow this. (Credits @BRKotucs)

    Q25. I am having problems with unzipping the file. Can you help me?
    Ans. Read this (Credits @av8rdude)

    Q26. I am unable to get into stock recovery, what should I do?
    Ans. Read this (Credits @jj14 and @WMguy)

    Q27. It shows 32GB storage for 64GB storage device after flashing, where is my 32GB lost ?
    Ans. Read this (Credits @efrant)

    Q28. I need some information on adb and fastboot, what are those commands ?
    Ans. Read this (Credits @rootSU)


    Q29. Will I get OTA updates from Google after successfully completing any of the above methods ?
    Ans. YES (Do not root or alter any system files)

    Q30. I want to relock the bootloader after flashing? (For 5.1.X)
    Ans. Follow this. (Credits @Evolution_Freak)

    Q31. Can I flash back to Android version 5.0.1 if I'm on Android version 5.1?
    Ans. NO
    14
    So, after following instructions fully, not skipping any step from method 2, my 64Gb shows up as a 32Gb. Any ideas?
    Reboot into the bootloader and type this:

    fastboot format userdata
    fastboot format cache
    fastboot reboot

    That will obviously wipe all your data again, but it should return back to 64GB
    9
    //Reserved

    If you want me to include anything in OP or in second post, please quote me on this thread with needed information.
    6
    HOW DO I LOCK THE BOOTLOADER?

    Before you get started you need to make sure Android boots properly then go to.... Settings / Developer Options / to "ENABLE" OEM Unlocking



    Lock The Bootloader
    • Turn the phone off. Then boot it into the bootloader/fastboot mode by holding volume down + power.

    • Plug the phone into your PC, then open a command prompt window and type:
      Code:
      cd Desktop/android-sdk-windows/platform-tools
      Code:
      fastboot devices
      This command will list the connected devices. If your phones serial number shows up you are good to go and may continue. If the phone is NOT listed this indicates that your drivers are not installed correctly. In order for you to continue you must fix your drivers so that your phone is listed under fastboot devices.

    • If the phone has been recognized by the command above, proceed to locking the bootloader with the following command:
      Code:
      fastboot oem lock

    • After the above command has finished executing, run the following command.
      Code:
      fastboot reboot

      Done.
    • Close the command prompt window.

    Sent from my Nexus 6 using Tapatalk