Factory image with custom recovery? - Nexus 6 Q&A, Help & Troubleshooting

Hi everyone, so this isn't necessarily a Nexus 6 specific question but more of a Nexus question, I just currently own and use my Nexus 6 as a daily driver, hence why I'm posting in this thread. So you know how Nexus devices can be modified to run ROMs other than factory Google Android using custom recovery? Well I was wondering if the same can be done with Google Nexus factory images through a custom recovery. I've searched for this question everywhere and can't find any sources. The closest I found was that you can flash the whole factory Nexus image through a desktop terminal and android sdk tools, but what if I was to pull only the bootloader, boot, and system images, then using a custom recovery wipe all partitions except internal storage and flash these pulled images from the factory Nexus image for the respective Nexus device. Would this result in a soft brick or would it actually install the factory Nexus image. And if it won't work this way, why not. What makes the factory Nexus images different from custom ROMs in terms of installation. I know flashing those images using terminal commands via a desktop is the go to way to flash between factory Nexus images manually, but what about doing this without the assistance of a desktop or laptop? Is that possible. If not then why not?

you can only flash any of the .img files via fastboot, while youre in the recovery. twrp can flash boot.img files(kernels), but thats it.

Syndrome666 said:
Hi everyone, so this isn't necessarily a Nexus 6 specific question but more of a Nexus question, I just currently own and use my Nexus 6 as a daily driver, hence why I'm posting in this thread. So you know how Nexus devices can be modified to run ROMs other than factory Google Android using custom recovery? Well I was wondering if the same can be done with Google Nexus factory images through a custom recovery. I've searched for this question everywhere and can't find any sources. The closest I found was that you can flash the whole factory Nexus image through a desktop terminal and android sdk tools, but what if I was to pull only the bootloader, boot, and system images, then using a custom recovery wipe all partitions except internal storage and flash these pulled images from the factory Nexus image for the respective Nexus device. Would this result in a soft brick or would it actually install the factory Nexus image. And if it won't work this way, why not. What makes the factory Nexus images different from custom ROMs in terms of installation. I know flashing those images using terminal commands via a desktop is the go to way to flash between factory Nexus images manually, but what about doing this without the assistance of a desktop or laptop? Is that possible. If not then why not?
Click to expand...
Click to collapse
Maybe this is what you mean:
http://forum.xda-developers.com/showthread.php?t=3066052

what make a factory image different than custom roms.. for one(very important), its format. roms are built in a flashable .zip form, factory images are built into .img form.

simms22 said:
what make a factory image different than custom roms.. for one(very important), its format. roms are built in a flashable .zip form, factory images are built into .img form.
Click to expand...
Click to collapse
That answers my question, thank you. Would creating a zip file from these image files be flashable with twrp or cwm recovery?

Syndrome666 said:
That answers my question, thank you. Would creating a zip file from these image files be flashable with twrp or cwm recovery?
Click to expand...
Click to collapse
Did you even look at the link I posted before?

Evolution_Tech said:
Did you even look at the link I posted before?
Click to expand...
Click to collapse
Not sure how I missed it. Just read it, makes sense now, thank you.

Syndrome666 said:
That answers my question, thank you. Would creating a zip file from these image files be flashable with twrp or cwm recovery?
Click to expand...
Click to collapse
yes, as thats how i flashed m, through a 800mb+ flashable zip

simms22 said:
yes, as thats how i flashed m, through a 800mb+ flashable zip
Click to expand...
Click to collapse
So I could take the Android m preview 2 build, extract bootloader, boot, radio, and system images, bundle them into a zip file using root explorer, place them into / directory, reboot to twrp and flash the Android m zip?

Syndrome666 said:
So I could take the Android m preview 2 build, extract bootloader, boot, radio, and system images, bundle them into a zip file using root explorer, place them into / directory, reboot to twrp and flash the Android m zip?
Click to expand...
Click to collapse
yes(well, i really dont know using root explorer), and you dont have to do it. as someone has already made the bootloader, radio, boot.img, and full system+boot.img(rom)

simms22 said:
yes, and you dont have to do it. as someone has already made the bootloader, radio, boot.img, and full system+boot.img(rom)
Click to expand...
Click to collapse
Well they probably bundle the stock encrypted boot image with it. I always source a noencrypy boot and just flash through terminal, but I'll definitely give this a try as it's pretty cool and I was always wondering if this was possible with custom recovery. Thanks again

Syndrome666 said:
Well they probably bundle the stock encrypted boot image with it. I always source a noencrypy boot and just flash through terminal, but I'll definitely give this a try as it's pretty cool and I was always wondering if this was possible with custom recovery. Thanks again
Click to expand...
Click to collapse
yup, its possible. except i flashed a custom kernel, despair

Related

Still no OTA but you want KitKat AND keep your data?

Hello friends!
I want to share some information for the beginners here:
While there is the Nexus 4 factory image for KitKat available, there still are non known OTA urls.
But you can flash KitKat anyway AND keep your data (as long as you have an unlocked bootloader):
1. Download the factory image from here:
https://developers.google.com/android/nexus/images?hl=de#occamkrt16o
2. extract ALL the files contained into the same directory where your fastboot.exe is saved, for unpacking I recommend using 7zip
3. boot your phone into bootloader
4. type in the following commands:
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 flash system system.img
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot format cache
fastboot reboot
You're done, KitKat on your Nexus 4, your apps and data still available!
Note: Your phone has to be full stock!!!!
UPDATE:
I'm really sorry for the mistakes I made in this thread.
I corrected them all by now, I think.
To make it more easy for you: You can rename the radio and the bootloader files let's say to radio.img and bootloader.img. Then use the fastboot commands with these new names. So you're a bit more safe not to make spelling errors.
Once again: I am sorry and I hope nobody got stuck due to my mistakes!!!
Some errors here.
random hero said:
fastboot flash bootloader bootloader-mako-makoz10o.img
Click to expand...
Click to collapse
Should be
fastboot flash bootloader bootloader-mako-makoz20i.img
random hero said:
fastboot flash radio radio-mako-m9615a-cefwmazm-2.0.1700.48.img
Click to expand...
Click to collapse
Should be
fastboot flash radio radio-mako-m9615a-cefwmazm-2.0.1700.84
random hero said:
fastboot flash recovery recovery.img
Click to expand...
Click to collapse
Skip this if you dont want your custom recovery to be stock again. :good:
random hero said:
Hello friends!
I want to share some information for the beginners here:
While there is the Nexus 4 factory image for KitKat available, there still are non known OTA urls.
But you can flash KitKat anyway AND keep your data (as long as you have an unlocked bootloader):
1. Download the factory image from here:
https://developers.google.com/android/nexus/images?hl=de#occamkrt16o
2. extract ALL the files contained into the same directory where your fastboot.exe is saved, for unpacking I recommend using 7zip
3. boot your phone into bootloader
4. type in the following commands:
fastboot flash bootloader bootloader-mako-makoz10o.img
fastboot reboot-bootloader
fastboot flash radio radio-mako-m9615a-cefwmazm-2.0.1700.48.img
fastboot reboot-bootloader
fastboot flash system system.img
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot format cache
fastboot reboot
You're done, KitKat on your Nexus 4, your apps and data still available!
Note: Your phone has to be full stock!!!!
Click to expand...
Click to collapse
If you're making a guide, make sure you give people the correct commands (the numbers of the bootloader and radio are wrong). Not to mention there already is a guide where flashing the update without losing data is explained.
http://forum.xda-developers.com/showthread.php?t=2527142
vanmarek said:
If you're making a guide, make sure you give people the correct commands (the numbers of the bootloader and radio are wrong). Not to mention there already is a guide where flashing the update without losing data is explained.
http://forum.xda-developers.com/showthread.php?t=2527142
Click to expand...
Click to collapse
The numbers of radio & bootloader in Factory image itself are wrong
I am sorry for the two "spelling errors". I corrected them, should be all fine now.
I did not notice that the other guide contains information about flashing KitKat without losing all your data...
sometimes it can be hard to keep an eye on all the threads in every detail...
fastboot flash bootloader bootloader-mako-makoz10i.img still wrong should be 20 instead of 10
Don't really want go threw all that ..
dose somebuy just have image I can flash without having to use the above
I want down load the Image
Boot into Recovery and Flash the Image with Team win Project
Then Reboot
Onknight said:
Don't really want go threw all that ..
dose somebuy just have image I can flash without having to use the above
I want down load the Image
Boot into Recovery and Flash the Image with Team win Project
Then Reboot
Click to expand...
Click to collapse
there are some stock images with root on android develop or orig android develop.
edit: can use dd command to flash images if u have root.
do dd if=/block of/img
like dd if=/dev/block/platform/by-name/system /data/media/0/download/images/zipextracted/system.img
opssemnik said:
fastboot flash bootloader bootloader-mako-makoz10i.img still wrong should be 20 instead of 10
Click to expand...
Click to collapse
Again sorry for that... updated. Thank you!
"I'm really sorry for the mistakes I made in this thread.
I corrected them all by now, I think.
To make it more easy for you: You can rename the radio and the bootloader files let's say to radio.img and bootloader.img. Then use the fastboot commands with these new names. So you're a bit more safe not to make spelling errors."
I thought it was excellent! Anyone who knows what they are doing in the Command Prompt/Terminal understands that they can hit the Tab key to auto-complete the filename. Its up to them to make sure they are accessing their correct folder/file name, not yours!
good work, although i have a different question, why is it that everyone always recommends 7zip for extraction of factory image, i have always been using winrar, i googled this and got nothin, so plz do tell anyone who knows the reason
maverickronny said:
good work, although i have a different question, why is it that everyone always recommends 7zip for extraction of factory image, i have always been using winrar, i googled this and got nothin, so plz do tell anyone who knows the reason
Click to expand...
Click to collapse
7zip is free, winrar is not.
maverickronny said:
good work, although i have a different question, why is it that everyone always recommends 7zip for extraction of factory image, i have always been using winrar, i googled this and got nothin, so plz do tell anyone who knows the reason
Click to expand...
Click to collapse
In my opinion 7Zip looks slightly better and it doesn't spam you with that your trial is over every time you open it.
what to do with a custom rom?
I have PA on my N4 and was wondering what to do to get KitKat? is the procedure similar or different?
Thanks a lot!
maverickronny said:
good work, although i have a different question, why is it that everyone always recommends 7zip for extraction of factory image, i have always been using winrar, i googled this and got nothin, so plz do tell anyone who knows the reason
Click to expand...
Click to collapse
7zip is far more friendly towards archives other than rar and zip formats. it's also the only archive app I've found that will allow you to open a flashable zip or apk and replace files inside (like an icon's image file, for example) without having to actually decompile/recompile either the zip or apk (assuming you don't change too much with either file-type)
mad_zack said:
I have PA on my N4 and was wondering what to do to get KitKat? is the procedure similar or different?
Thanks a lot!
Click to expand...
Click to collapse
whether it's a custom or stock rom does not matter. the procedure will be the same either way
Upgrading 4.2>4.3>4.4 was always a piece of cake with Wug toolkit and never had to reinstall any application.
Keeping my settings and applications was important for me.
Sent from my NookColor using Tapatalk 4
how is this method different from if i just removed the -w wipe parameter?
maverickronny said:
how is this method different from if i just removed the -w wipe parameter?
Click to expand...
Click to collapse
the method you refer to will still install the userdata.img file, which will wipe your rom's userdata, as well as anything on your storage partition. The method mentioned in this thread's OP omits the userdata.img file and relies on the user manually wiping the rom data in n custom recovery, therefore wiping only rom data while leaving the storage partition untouched.
Confused as to why people take all these steps when its just unlock>flash recovery>Flash update rom of your choice and done. All these threads on the same thing makes no sense and lets be honest its not that hard to keep up with threads if you search extensively prior to making up a thread which at week three of KitKat you should of thought would be up already.
Not flaming anyone just trying to understand the thought process. Mistakes happen I get it but we got to do better especially with so many people destroying their phones over simple things.... Jus Sayin'
hp420 said:
the method you refer to will still install the userdata.img file, which will wipe your rom's userdata, as well as anything on your storage partition. The method mentioned in this thread's OP omits the userdata.img file and relies on the user manually wiping the rom data in n custom recovery, therefore wiping only rom data while leaving the storage partition untouched.
Click to expand...
Click to collapse
I updated from 4.3 to KRT16O (and later, KRT16S) by omitting the "-w" from the batch file, and I didn't lose a byte of userdata. My bootloader is unlocked, but everything else is stock.
It was so painless, I wonder why I ever bothered waiting for OTAs in the first place.

[Q] installing a new ROM question

I have a Xperia Z, and installed CM 10 on it, using the following method
Unlocked the bootloader from Sony's site
Downloaded the SDK
Flashboot flash boot boot.IMG
And installed cm.zip from the sdcard.
It worked, in fact, I am typing this from my newly ROM'ed xperia.
So, the question is , if I want to install another ROM now, say CM11 or even a complete different one from xda , what is the process?
Do I just copy the new zip, boot into recovery, and wipe wipe install?
Or do I need to reflash the new boot.IMG from the new ROM every time?
Thanks
endlesslyonline said:
I have a Xperia Z, and installed CM 10 on it, using the following method
Unlocked the bootloader from Sony's site
Downloaded the SDK
Flashboot flash boot boot.IMG
And installed cm.zip from the sdcard.
It worked, in fact, I am typing this from my newly ROM'ed xperia.
So, the question is , if I want to install another ROM now, say CM11 or even a complete different one from xda , what is the process?
Do I just copy the new zip, boot into recovery, and wipe wipe install?
Or do I need to reflash the new boot.IMG from the new ROM every time?
Thanks
Click to expand...
Click to collapse
For flashing CM11
Copy the rom to device
Reboot to recovery
Clear dalvik cache
Flash the rom.
For other rom
Copy rom to device
Copy Gapps to device
Reboot to recovery
Format system
Format cache
Format dalvik cache
Format data(not internal sd)
Flash the rom
Flash Gapps
OK, thanks
So I was correct in thinking the boot.IMG (which is the recovery, right?) Won't have to be flashed again.
endlesslyonline said:
OK, thanks
So I was correct in thinking the boot.IMG (which is the recovery, right?) Won't have to be flashed again.
Click to expand...
Click to collapse
You dont have to flash recovery again.
Hitting thanks would have been easier than writing it!
endlesslyonline said:
OK, thanks
So I was correct in thinking the boot.IMG (which is the recovery, right?) Won't have to be flashed again.
Click to expand...
Click to collapse
well not exactly, the boot.img is the kernel
Pablosch23 said:
well not exactly, the boot.img is the kernel
Click to expand...
Click to collapse
That's my understanding as well. So why is flashing boot.img necessary for installing custom recovery?
Pablosch23 said:
well not exactly, the boot.img is the kernel
Click to expand...
Click to collapse
Ah OK. But am I correct in saying that the (for example) clockworkMOD, or any other custom recovery resides in the boot.IMG
In lamens terms, can we say that the boot.IMG is almost like the bios on a PC?
Sorry for the dumb questions, I just wanna learn some mpre
endlesslyonline said:
Ah OK. But am I correct in saying that the (for example) clockworkMOD, or any other custom recovery resides in the boot.IMG
In lamens terms, can we say that the boot.IMG is almost like the bios on a PC?
Sorry for the dumb questions, I just wanna learn some mpre
Click to expand...
Click to collapse
I think you are right, I'm a also a newbie though..the boot.img contains the kernel (and the ramdisk) where the recovery resides.
Khaiyan said:
That's my understanding as well. So why is flashing boot.img necessary for installing custom recovery?
Click to expand...
Click to collapse
The boot.IMG is the kernel itself
If you flashed wrong one on wrong device so say goodbye to the device
Tapatalk'ed from my Xperia™ Z (C6602) running Dirty Unicorns ROM!
endlesslyonline said:
Ah OK. But am I correct in saying that the (for example) clockworkMOD, or any other custom recovery resides in the boot.IMG
In lamens terms, can we say that the boot.IMG is almost like the bios on a PC?
Sorry for the dumb questions, I just wanna learn some mpre
Click to expand...
Click to collapse
Most custom roms include recovery so I dont think you will have to flash boot.img separately again and again

System Dump UK 4.4W.2

W110_4.4W.2_System_Dump.zip - 206.78 MB
Thanks!
So, every region using different one?
Any way to use this to restore to stock?
Is it the complete file? I tried pushing it to /system to recover from an accidental \system format but it does not seem to revive the phone! Am I doing something wrong?
Camazza said:
Is it the complete file? I tried pushing it to /system to recover from an accidental \system format but it does not seem to revive the phone! Am I doing something wrong?
Click to expand...
Click to collapse
not sure I literally just did a fastboot to download everything on the system partition, as for restoring it this way im not sure how to go about it, I would have thought fastboot would work but if not it might need to be created as a flashable zip
Hawke84 said:
not sure I literally just did a fastboot to download everything on the system partition, as for restoring it this way im not sure how to go about it, I would have thought fastboot would work but if not it might need to be created as a flashable zip
Click to expand...
Click to collapse
In another thread I posted a stock rooted 5.0.1 system image that can be flashed using fastboot. I can whip up a TWRP zip too if people want.
tonu42 said:
In another thread I posted a stock rooted 5.0.1 system image that can be flashed using fastboot. I can whip up a TWRP zip too if people want.
Click to expand...
Click to collapse
I think that'd be great please if don't mind...so used to flashing ROMs using recovery zips for all my other devices that I'm kinda missing it for this watch
Is the link broken? Where is the zip?
Edit: works on pc. Couldnt get it on the note 4 through Chrome the stock internet browser or ES File Downloader

forgot to backup boot.img

So I forgot to backup my stock kernel before flashing franco R23. Can I just extract the boot.img from the update.zip? I'm on LMY47M. Thanks!
chrisbo4 said:
So I forgot to backup my stock kernel before flashing franco R23. Can I just extract the boot.img from the update.zip? I'm on LMY47M. Thanks!
Click to expand...
Click to collapse
yes, assuming that's the build your are running.
flash using fastboot:
fastboot flash boot boot.img
you'll have to root again after, if desired.
PhilDX said:
yes, assuming that's the build your are running.
flash using fastboot:
fastboot flash boot boot.img
you'll have to root again after, if desired.
Click to expand...
Click to collapse
Thanks! I'll give that a try.
It depends what you mean bybuodste.zip. if you mean OTA then no but you can normally get it from the factory images but there isn't one for M so you'll need to find the rooted ROM.zip and extract it from there.
rootSU said:
It depends what you mean bybuodste.zip. if you mean OTA then no but you can normally get it from the factory images but there isn't one for M so you'll need to find the rooted ROM.zip and extract it from there.
Click to expand...
Click to collapse
^^^ this guy is right, I read the OP too quickly and missed the part about update.zip, I just assumed that we were talking about factory images.
I don't think the boot.img changed after D (including E, M and I), but a little digging around should verify that.
factory images are here:
https://developers.google.com/android/nexus/images
whatever you do, do not attempt to relock your boot loader (should you want to for some reason) until everything is working properly.
PhilDX said:
I don't think the boot.img changed after D (including E, M and I), but a little digging around should verify that.
Click to expand...
Click to collapse
Good point.
Could download the OTA files and run an md5sum on all the boot patches. If they match in each, they're patching kernel identically and the factory image version for any 5.1 would be appropriate.

Was trying to flash M and now I have no OS at all.....

So a while ago I rooted my phone after doing a lot of research (because I have no idea about this topic) and it was all good (it was only to use some apps, no ROM or anything)..
Today I wanted to install Android M, I also searched a lot and ended up using the same thread ([HOW-TO] The Nexus 6 All-In-One Beginner's Guide) and used step 5A and 5B.
When I reached the point of choosing the .zip file to install (on TWRP) it said: "This operation may install incompatible software and render your device unusable", and when I tried to flash it said "Failed" in red.
Now when I try to reboot to system it says "No OS installed" and if I try I only see the white Google logo with the open lock at the bottom of the screen.
I can only use the recovery mode and Bootloader mode.
Any help is really appreciated...
Try to use the software from Android developers
try to use the factory image from Google developers just search for android factory image
in case all steps fail try to psuh the files using fastboot flash (partition) (partintion).img
I can only use the recovery mode and Bootloader mode...
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=3121053
The OP of the JDX thread has a possible solution. There are links to 'zips' for bootloader and radio. First need to flash M-bootloader and M-radio
Dolji said:
try to use the factory image from Google developers just search for android factory image
in case all steps fail try to psuh the files using fastboot flash (partition) (partintion).img
Click to expand...
Click to collapse
the strange thing is that i was using the factory image from Google developers!!
I don´t understand why it said it´s incompatible!!
NLBeev said:
http://forum.xda-developers.com/showthread.php?t=3121053
The OP of the JDX thread has a possible solution. There are links to 'zips' for bootloader and radio. First need to flash M-bootloader and M-radio
Click to expand...
Click to collapse
I will give it a try and let you know.
Thank you.
khaledkatranji said:
the strange thing is that i was using the factory image from Google developers!!
I don´t understand why it said it´s incompatible!!
Click to expand...
Click to collapse
You don't use twrp to flash the stock images from Google ....twrp is used for flashing ROMs and making backups etc ....
Sent from my Nexus 6 using Tapatalk
nexus6R3plicant said:
You don't use twrp to flash the stock images from Google ....twrp is used for flashing ROMs and making backups etc ....
Sent from my Nexus 6 using Tapatalk
Click to expand...
Click to collapse
That´s what I was going to ask about just now.
I tried flashing a ROM and it worked fine, tried flashing M stock image but it did not work.
So what should I do/use to flash the stock images from Google?
khaledkatranji said:
That´s what I was going to ask about just now.
I tried flashing a ROM and it worked fine, tried flashing M stock image but it did not work.
So what should I do/use to flash the stock images from Google?
Click to expand...
Click to collapse
You use fastboot from a computer to flash stock images. Custom recoveries are used for flashing custom rom zips.
Go.to nexus 6 general > sticky roll-up thread.
All guides and info is there.
khaledkatranji said:
That´s what I was going to ask about just now.
I tried flashing a ROM and it worked fine, tried flashing M stock image but it did not work.
So what should I do/use to flash the stock images from Google?
Click to expand...
Click to collapse
These are twrp flashable zips http://forum.xda-developers.com/nexus-6/development/fxz-nexus-6-recovery-flashable-fastboot-t3066052 otherwise you will need to have adb/fastboot working on your computer and use fastboot to flash images
BladeRunner said:
These are twrp flashable zips http://forum.xda-developers.com/nexus-6/development/fxz-nexus-6-recovery-flashable-fastboot-t3066052 otherwise you will need to have adb/fastboot working on your computer and use fastboot to flash images
Click to expand...
Click to collapse
Just fastboot, not adb
danarama said:
Just fastboot, not adb
Click to expand...
Click to collapse
True, but if you're setting things up properly for the first time then you're installing both fastboot and adb.
Why not just follow what Google says? https://developers.google.com/android/nexus/images?hl=en
nhizzat said:
Why not just follow what Google says? https://developers.google.com/android/nexus/images?hl=en
Click to expand...
Click to collapse
Cuz Google's instructions are no bueno and flash all doesn't work right on nexus 6. Use this thread and use method 2. Works every time.
http://forum.xda-developers.com/showthread.php?t=2954008
Sent from my Nexus 6 using Tapatalk
one simple question that i have to ask, i dont see it mentioned anywhere here, is your bootloader still unlocked?
danarama said:
You use fastboot from a computer to flash stock images. Custom recoveries are used for flashing custom rom zips.
Go.to nexus 6 general > sticky roll-up thread.
All guides and info is there.
Click to expand...
Click to collapse
After struggling for hours to know how to write the commands it finally worked and now I have M on my device AND I have more knowledge about this topic.
Thank you all for taking the time to help me, and I hope I won´t have to come here again

Categories

Resources