FORUMS
Remove All Ads from XDA

 View Poll Results: Are you Happy buying Nexus 6 ?

Yes ofcourse
 
1,312 Vote(s)
87.47%
Not really
 
112 Vote(s)
7.47%
May be in future
 
76 Vote(s)
5.07%

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

1,071 posts
Thanks Meter: 2,582
 
By Mr hOaX, Senior Member on 26th November 2014, 03:16 PM
Post Reply Email Thread
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


Quote:


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




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)



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



- 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



Video Guides

Thanks Anuj Patel

For Windows:



For MAC:

The Following 193 Users Say Thank You to Mr hOaX For This Useful Post: [ View ] Gift Mr hOaX Ad-Free
 
 
26th November 2014, 03:18 PM |#2  
Mr hOaX's Avatar
OP Senior Member
Thanks Meter: 2,582
 
Donate to Me
More
>> 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
The Following 22 Users Say Thank You to Mr hOaX For This Useful Post: [ View ] Gift Mr hOaX Ad-Free
26th November 2014, 03:18 PM |#3  
Mr hOaX's Avatar
OP Senior Member
Thanks Meter: 2,582
 
Donate to Me
More
//Reserved

If you want me to include anything in OP or in second post, please quote me on this thread with needed information.
The Following 9 Users Say Thank You to Mr hOaX For This Useful Post: [ View ] Gift Mr hOaX Ad-Free
26th November 2014, 03:19 PM |#4  
Evo_Shift's Avatar
Senior Member
Thanks Meter: 485
 
More
I have not been able to get the flash-all method to work on lollipop on my Nexus 6 or Nexus 5. I always get those sig, storage or no system errors. The long method has worked fine for me though.
The Following 5 Users Say Thank You to Evo_Shift For This Useful Post: [ View ] Gift Evo_Shift Ad-Free
26th November 2014, 03:24 PM |#5  
Mr hOaX's Avatar
OP Senior Member
Thanks Meter: 2,582
 
Donate to Me
More
Quote:
Originally Posted by Evo_Shift

I have not been able to get the flash-all method to work on lollipop on my Nexus 6 or Nexus 5. I always get those sig, storage or no system errors. The long method has worked fine for me though.

You need to follow long method for this. Even I was facing sig storage errors. I followed long method, it works flawlessly
The Following 5 Users Say Thank You to Mr hOaX For This Useful Post: [ View ] Gift Mr hOaX Ad-Free
26th November 2014, 08:42 PM |#6  
abaaaabbbb63's Avatar
Senior Member
Somewhere Over The Rainbow
Thanks Meter: 3,433
 
More
Hi!

I have a suggestion. Instead of constantly updating the thread for every factory image that might be released in the future, you might want to replace things like "lrx21o" to a more universal name, so users aren't confused about it.

Also, try using this link for the factory images. It links directly to the shamu ones:
https://developers.google.com/androi...s/images#shamu

Anyways, good job!
The Following User Says Thank You to abaaaabbbb63 For This Useful Post: [ View ] Gift abaaaabbbb63 Ad-Free
27th November 2014, 07:48 PM |#7  
Member
Thanks Meter: 14
 
More
My Sprint Nexus 6 has a submenu in settings for updating profile and PRL. Would this still be there if I use the Factory Images or is that an addition Sprint made to their phones? Thanks
27th November 2014, 09:37 PM |#8  
Evo_Shift's Avatar
Senior Member
Thanks Meter: 485
 
More
Quote:
Originally Posted by njd.sina

My Sprint Nexus 6 has a submenu in settings for updating profile and PRL. Would this still be there if I use the Factory Images or is that an addition Sprint made to their phones? Thanks

Yep, that's built in. I've flashed the factory image multiple times and those settings are built in.
The Following User Says Thank You to Evo_Shift For This Useful Post: [ View ] Gift Evo_Shift Ad-Free
1st December 2014, 09:50 PM |#10  
bdubs4200's Avatar
Senior Member
Thanks Meter: 267
 
More
when i get to the dead android power+VOL UP doesnt do anything... it just reboots and has been booting for the last 10 mins. i had to do the long method also, the flash all file stopped at system.img also
2nd December 2014, 02:04 AM |#11  
bajasur's Avatar
Retired Forum Moderator
Flag San Clemente
Thanks Meter: 10,512
 
Donate to Me
More
Quote:
Originally Posted by bdubs4200

when i get to the dead android power+VOL UP doesnt do anything... it just reboots and has been booting for the last 10 mins. i had to do the long method also, the flash all file stopped at system.img also

+1

I fixed this by following instructions above, replacing recovery.img with latest twrp then booting into twrp to do factory reset.

After doing factory reset power off phone and then reboot. Fixed my issue
Post Reply Subscribe to Thread

Tags
flashing stock, flashing stock android, nexus 6 factory images, return stock

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes