yashsingh1/xdaforums huggingface dataset:
[Nexus 5 General] mattk9609:
Hello all, noob here.

Just switched from a SII to a N5 and the way I went about it on my SII is that after I initially unlocked, flashed CWM recovery, and rooted, I downloaded the stock ROM as well as any custom ROMs I was interested in (as well as stock and custom kernels and radios) straight from my phone onto my external SD card. Then I could boot into CWM recovery and flash between them all to my hearts desire.

...anyways, is this possible on the Nexus 5? I'm under the impression that if I tried this every time I factory reset to prepare for a new flash everything on my phone would be lost, which is really really dumb and I don't understand at all if this is the case.

My current situation is I am unlocked and on CWM recovery, using a guide in original android development, and I did all this from fastboot on my computer. I then went into CWM recovery and installed SuperSU onto my stock ROM, and all was well. I then decided to download Cataclysm (spelling?) ROM from xda right from my phone, booted into CWM, factory reset (and to my surprise all my files were still there), then flashed the ROM straight from CWM, keeping the stock kernel and radio.

When I booted into it it wasn't exactly the daily driver material I wanted it to be, and I want to flash back to a stock ROM. I downloaded the stock images from Google's Developer website and when I went into CWM it was not in my download folder, leading me to assume it could only be done in fast boot on a computer. Is there any way I can flash the stock ROM straight from CWM avalible?

My end goal (for now) is to be on stock ROM rooted with a TWRP recovery (it seems preferred in these forums), and a stock kernel and radio untill more stable options are available. The catch is I don't have access to a computer 'till the weekend....so besides the recovery obviously am I able to get to this point, or am I stuck with a half broken phone for now?

Thanks, and sorry for the probably unnecessarily long post as well as being a natural half-wit.
[Nexus 5 General] abaaaabbbb63:
Yeah, download this ROM:

http://xdaforums.com/showthread.php?t=2507861

It's stock, untouched, and can be flashed from recovery.
[Nexus 5 General] mattk9609:
I got this error.

Thanks for the link BTW, I'm embarrassed I didn't see that in the first place.

Edit: IGNORE THIS, FIGURED IT OUT.
[Nexus 5 General] abaaaabbbb63:
Might be a bad download. Try downloading it again.
[Nexus 5 General] cammel:
Does anyone noticed that the wipe data option on the stock recovery takes a really long time to wipe?? Or is it just me??

For a moment I thought that the recovery was stuck so I forced a reboot keeping the power button pressed, and then the phone wouldn't turn on and kept bootlooping, so I entered recovery again, selected Wipe data and leave it alone and it took about 5 to 10 minutes to wipe, and then the phone booted up fine, but I'm shocked that it took so much time to wipe on the stock recovery!

Anyone else had this problem?
[Nexus 5 General] abaaaabbbb63:
That's not normal. The wipe should be done in a matter of seconds (max 1-2 min if your device is full of stuff).

Try doing another wipe. Does it take as long as the first time?
[Nexus 5 General] cammel:
Hmm... Well I don't know what to say, did you do it yourself from stock android recovery? I mean, I did it a few times just to check and it takes by far more time than any other phone I had including the nexus 4 and 7. I have the black nexus 5 32gb I don't know if that has something to do with this but just in case...

And I read somewhere on the Web that with TWRP recovery the wipe data option takes a long time too... I don't know if they already fixed it or not but maybe in this phone there's something different that makes the wipe data option taking a long time to be done.. I don't know really.. :confused:
[Nexus 5 General] abaaaabbbb63:
Yeah, I did it on my Nexus 4, filled with stuff, music, things.

TWRP was fixed some days ago. Now the wipe is almost instant (10 seconds, maybe 20)
[Nexus 5 General] sergiox209:
yea. its the android that is opened up right? i did press those buttons but a menu fails to pop up.
[Nexus 5 General] abaaaabbbb63:
This is the stock recovery.

When you press the buttons, this should appear:
[Nexus 5 General] sergiox209:
ok i got the menu to pop.
[Nexus 5 General] abaaaabbbb63:
Perfect, now select "wipe data/factory reset", and try to boot.
[Nexus 5 General] sergiox209:
OMG! DUDE THANK YOU!! im so noob at this lol:P valuable lesson learned READ INSTRUCTION!
[Nexus 5 General] abaaaabbbb63:
Your welcome! Have a nice day :D
[Nexus 5 General] harlenm:
Tagged in case I need this.
[Nexus 5 General] Finfo:
Hi abaaaabbbb63,

I used CF-Auto root for Nexus 5, but did not do anything else.

I need to RMA the phonen because dead pixels, I am planning to:

1) unroot using the "full unroot" option in SuperSU

2) plug phone when fast booting and run from cmd "fastboot oem lock"

do you think that will do it and after that I can return it without issues on warranty?

Many thanks in advance.
[Nexus 5 General] abaaaabbbb63:
Yes, it will do it.

But if you want to be sure, you should flash the factory images.
[Nexus 5 General] Finfo:
Many thanks, I will do so.
[Nexus 5 General] globy518:
Ok so im having a problem, when I restore this I cant get into the recovery mode options.

Also after installing the stock roms, i get a message that says the camera and gallery are not working. The worst part is that I cant save any apns so I can't connect to my provider.

I have tried installing everything again and I get the same problems.

Any help with be appreciated.
[Nexus 5 General] abaaaabbbb63:
When in stock recovery, Power + Volume UP doesn't work?
[Nexus 5 General] abaaaabbbb63:
The Radio has nothing to do with the Android version. You can always use the radio version you like ( even older ones, if you find them better, like giving you stronger signal), together with your favorite Android version, regardless of their version. They don't have anything in common.
[Nexus 5 General] jd1639:
Great, thanks. That what I thought and was hoping to hear. You guys with stickied threads are doing a great job fit the community. Keep up the good work:thumbup:
[Nexus 5 General] Primokorn:
Perfect guide!

Just one thing: we need to open cmd window from fastboot folder right? (or point on fastboot folder after opening cmd)
[Nexus 5 General] abaaaabbbb63:
Yeah. I had another guide to install fastboot drivers that showed how to do that. I will make the proper modifiations tomorrow
[Nexus 5 General] CarpeNivem:
I'm really confused about two things...

First, where do we obtain fastboot.exe from? Whenever I try to type the commands in Step 2, or run the batch file from Step 1, it says "fastboot is an unrecognized command". I tried following the instructions on this page - http://www.theandroidsoul.com/nexus-5-driver-adb-fastboot-installation-guide/ - but it only talks about drivers in Device Manager. I see no mention of where to obtain the fastboot command at all. What am I missing?

Secondly, all of this aside, shouldn't it be true that if I do the following...

1. Press and hold Vol+, Vol-, Power together.

2. Vol+ to "Recovery"

3. Power

4. When alien with red ! appears, Vol+ to make menu appear

5. Select "Factory reset"

6. Confirm, yes, really, do this.

7. Reboot

...shouldn't the next thing that happens be, the phone boots up good as new, factory fresh?

I ask because I did all of that, but I'm stuck at the spinning colored dots. It's been 5 minutes now. There's no way it should take this long to boot up. I'm pretty convinced it's never going to. :(
[Nexus 5 General] jd1639:
Did you follow the op and install the adb and fastboot drivers? And, 2, a factory reset doesn't put the system back on your phone. It just resets all the data that's there.
[Nexus 5 General] Chromium:
Hah, looks like [MENTION=4346614]abaaaabbbb63[/MENTION] forgot to add a guide on how to setup adb (unless im blind?). Anyways heres how you do it:

http://www.redmondpie.com/how-to-set-up-android-adb-and-fastboot-on-windows-tutorial/

No, its not really the same thing. Factory reset via recovery consists of just wiping stuff, while flashing the factory images is wiping + installing fresh new images to the partitions of the phone.
[Nexus 5 General] cammel:
Ok, but you didn't do it on your n5 from stock recovery right?

I just found this on the TWRP thread

http://xdaforums.com/showthread.php?p=47202046

Thanks!
[Nexus 5 General] pgptheoriginal:
I really can't understand what I'm doing wrong: I've set up ADB and Fastboot, but here's what I get when I try to execute the flash-all.sh file (on Mac):

The file is in the same folder as the bootloader, radio and image I downloaded (which I only unzipped after downloading). It seems the filenames aren't matching, even if I didn't touch them.
[Nexus 5 General] abaaaabbbb63:
What are the filenames? Try downloading them again.
[Nexus 5 General] pgptheoriginal:
I meant the names of bootloader, radio and image: those files are there, placed in the right directory, but aren't loaded... I downloaded the factory image three times thinking about a corrupted file, but nothing changes.
[Nexus 5 General] abaaaabbbb63:
Then try using method #2. Same thing actually.
[Nexus 5 General] underr.t:
yeah! :cyclops:
[Nexus 5 General] varuntis1993:
Hey I had unlocked device, it was neither rooted nor any custom recovery was installed.....I need to RMA it due to the yellow screen tint....I have performed all the steps as you said and yeaa the status has also changed to false......just need to ask you a ques. when we enter "fastboot boot path/to/TWRP.img" does it install the twrp recovery or just boot from it because if it is installing the recovery then I need to flash back the stock recovery?

thanks in advance

sorry for the simple ques......new to nexus device and adb
[Nexus 5 General] Chromium:
Wow, you could've saved yourself quite some hassle. All you needed to do was run "fastboot oem lock".

Anyways, onto your question. That command will simply boot the recovery (not install it). After rebooting you will have stock recovery again.

Sent using xda-developers app
[Nexus 5 General] varuntis1993:
But only that wouldn't have changed the tampered status to false..would it?
[Nexus 5 General] abaaaabbbb63:
Nope, it won't.
[Nexus 5 General] pgptheoriginal:
I used the second method to flash the factory images as advised, and everything seems to be fine but...

At the end of the guide, i read:

- When a small Android appears, press Power Button + volume UP

I did that, but nothing happened, so, I tried long-pressing those button until the phone rebooted (~5 sec.), and the phone rebooted as it was its first boot. So I jumped the others two steps:

- Select "Wipe data/factory reset"

and

- Reboot"

Now I can't exit from the first configuration wizard! Just after setting the language everything stops on "just a second" and never ends!!!

Please help me! Thank you!

EDIT: I can reboot, but if I reboot into fastboot and then choose Recovery I get the small Android with an exclamation mark, and pressing Power button + volume UP leads again to the reboot and the configuration wizard...
[Nexus 5 General] abaaaabbbb63:
You don't long press Power+Volume Up. Shortly press them at the same time.
[Nexus 5 General] pgptheoriginal:
Nothing happens this way...

This is the screen which appeared when "A small Android appears". Is it right?

---------- Post added at 01:22 PM ---------- Previous post was at 01:06 PM ----------

Solved :victory:

I re-flashed recovery.img and re-erased cache: after rebooting in recovery, I had to short-press the Power and volumeUP keys at least 6-7 times to get to the menu in which I could wipe data.

Now everything seems ok, thank you for your help!
[Nexus 5 General] gwolfu:
thank you for the info

really needed it
[Nexus 5 General] teambestyrandy:
Question. I'm on stock rooted with twrp. Let's say if there's a new update 4.4.2 or something and I want to flash it through adb with Google factory stock image. Can I just edit flash-all.bat and edit "fastboot -w update" and delete -w so it wouldn't wipe all my data? Would this work with twrp recovery still installed and rooted or should I go back to stock recovery?
[Nexus 5 General] abaaaabbbb63:
Well, it would be easier to just flash the OTA zip from TWRP.
[Nexus 5 General] teambestyrandy:
Thanks, is the Ota file accessible through Google developers site or would it happen to be posted here?
[Nexus 5 General] Chromium:
Someone will usually post it around here soon after it gets released.

Probably here: http://xdaforums.com/showthread.php?t=2523217
[Nexus 5 General] Noble Six:
Hey Guys, I'm having some trouble making the tamper flag to false. Everytime I try to use TWRP the Nexus 5 touchscreen doesn't work anymore when it boots into it. It's at a screen that says please enter password. The volume buttons don't work, the power button works, but it goes to a screen where it says slide to unlock. The touchscreen doesn't work...

I tried the latest version which is 2.6.3.4 and the two before it. The 2.6.3.3 actually doesn't boot onto phone, it just shows up on cmd.

I tried CWM and it says I can't mount anything. I'm not sure what to do right now.

Not sure where to go from here...

---------- Post added at 12:39 AM ---------- Previous post was at 12:35 AM ----------

Hey Guys, I'm having some trouble making the tamper flag to false. Everytime I try to use TWRP the Nexus 5 touchscreen doesn't work anymore when it boots into it. It's at a screen that says please enter password. The volume buttons don't work, the power button works, but it goes to a screen where it says slide to unlock. The touchscreen doesn't work...

I tried the latest version which is 2.6.3.4 and the two before it. The 2.6.3.3 actually doesn't boot onto phone, it just shows up on cmd.

I tried CWM and it says I can't mount anything. I'm not sure what to do right now.

Not sure where to go from here...
[Nexus 5 General] abaaaabbbb63:
Try doing a factory reset from the stock recovery before you boot TWRP. Latest version should be working properly. What method did you use to flash the factory images?
[Nexus 5 General] markorema99:
Nice

Thank you very much!
[Nexus 5 General] Noble Six:
Okay I will do a factory reset. I used Method 1 to flash factory images, should I use method 2? I do that first then I go and do the tamper flag right?

Once I do a factory reset, don't I need to configure the phone in order to put the zip file into internal storage?
[Nexus 5 General] abaaaabbbb63:
If factory resetting doesn't work, then, yeah, use method 2.

You can put the zip on your storage by using 'adb push' from cmd.

adb push path-to-zip /data/media/0
[Nexus 5 General] Noble Six:
Sorry about all this trouble, I did Method 2. When I tried to use adb push path-to-zip /data/media/0 command it says it can't find specified folder. I did put the zip folder through MTP. I used the TWRP.img using v2.6.3.4, it's the install and wipe screen, but the touchscreen just doesn't respond, the volume keys doesn't do anything. I think if I press the power button it will do the slide to unlock.
[Nexus 5 General] abaaaabbbb63:
Replace path-to-zip with the path to the Zip.. Like.. C:/Users/Name/Desktop/Nexus-Bootunlocker.zip
[Nexus 5 General] Noble Six:
WHOA, okay once I did that Android Debug Bridge version 1.0.31 and a list of commands shows up.

You've been a great help abaaaabbbb63!

It's the Nexus 5 touchscreen I'm having trouble when TWRP.img boots. It just doesn't respond to touch. So close to finishing this up.
[Nexus 5 General] abaaaabbbb63:
Then try with CWM non-touch

http://download2.clockworkmod.com/recoveries/recovery-clockwork-6.0.4.5-hammerhead.img
[Nexus 5 General] Noble Six:
Many thanks abaaaabbbb63!!! Got it to work! :highfive::victory: You have been very helpful!! Glad you're here!!:good:
[Nexus 5 General] bdkbaik:
my nexus is already on stock rom but already root and unlock bootloader..

which step should i start to follow to unroot ang get warranty purpose?
[Nexus 5 General] abaaaabbbb63:
Use the unroot option in "superSU", then , if you have a custom recovery, flash the stock one.

After that, follow the last step with the tamper flag.
[Nexus 5 General] bdkbaik:
I have twrp...what do you mean by "f you have a custom recovery, flash the stock one."?
[Nexus 5 General] PunchTheLion:
Silly question, but when I go to download the Android SDK, I should be choosing 32bit right?
[Nexus 5 General] Primokorn:
It depends on your computer :)

But take the SDK Tools Only (at the bottom). It's for Windows 32 & 64-bit.
[Nexus 5 General] abaaaabbbb63:
It means that you download the factory images, but only take the recovery from within the archive.

then, you flash it with this command:

fastboot flash recovery Path,to,recovery,recovery.img
[Nexus 5 General] bdkbaik:
but is i continue to the next step which is tempered flag... i must flash twrp it right to flash the Nexus BootUnlocker script ?
[Nexus 5 General] abaaaabbbb63:
You won't flash twrp, you will boot it. There's a difference. Twrp won't actually stick.
[Nexus 5 General] 95BlackGA:
This Tutorial helped tremendously when I had a failed CyanogenMod flash last night. Was put into Boot loop, couldn't access TWRP. Followed the guide and all was fine! Thank you very much!
[Nexus 5 General] DaMonster:
It works !!

Thanks a lto abaaaabbbb63!!! It took me a few pages to figure out how to get to the last step (tamper flag = false), but all's good now !
[Nexus 5 General] abaaaabbbb63:
Ok then..

Tomorrow I'll simplify the steps even more.. If possible
[Nexus 5 General] pgptheoriginal:
If I have everything stock except for the unlocked bootloader and root, do I need to reflash the stock image before locking the bootloader, or I can just uninstall SuperSU?

Thanks, again :D

Inviato dal mio Nexus 5 utilizzando Tapatalk
[Nexus 5 General] abaaaabbbb63:
Uninstall SuperSU by using the option in the app, the Unroot option, then follow the final part of the guide, the tamper flag one, if you want to return it for warranty.
[Nexus 5 General] carlherl:
Thak you to the tutorial.
[Nexus 5 General] bhanu423:
Thanks for the method. Helped me escape the boot loop .
[Nexus 5 General] dazz87:
Hey just wondering do i need to set my tamper flag to false if I am just returning my replacement? Planning on keeping my first N5. Or people doing it cause of warranty?
[Nexus 5 General] abaaaabbbb63:
I have no idea whether the replacement must be untouched. Considering good manners, you should bring it back the way they gave it to you :)
[Nexus 5 General] pgptheoriginal:
I read somewhere that LG accepted even unlocked phones with custom ROMs for warranty pruposes (it was referred to an Optimus G), but it's not that difficult to get back to stock, if you can rely on such an accurate step by step guide, so it's safer to restore everything as it was at the moment of the purchase before sending our phone back to LG :angel:

EDIT: I've just locked the bootloader, very simple procedure, just a few clicks and a couple of minutes were needed ;)
[Nexus 5 General] Redfield_87:
Thanks :good:! i followed this tutorial and now im back to stock and flag set false, ready to RMA... :(
[Nexus 5 General] jtdc:
Sorry for re-asking, but my ignorant question was : Could the tamper flag be reset back and keep bootloader unlocked?

Because the OP said:

That means when the Nexus Bootunlocker zip was installed using TWRP it did 2 things, relock bootloader and tamper flag set to false.

When bootloader is relocked, then the phone will be wiped new. So is there a way, that it remained unlocked bootloader (so no wiping) and the tamper flag set to false.

Hope my question was clear. Thanks!
[Nexus 5 General] Primokorn:
Actuall y I don't know if a such script exists but I don't understand what could be the aim of resetting the tamper flag and keeping an unlocked bootloader :confused:

If you are in the "custom world" you don't care about the tamper flag and if you want to go back to the "official world" you have to reset it and relock the BL so...
[Nexus 5 General] Chochiwpg:
Question:

I was on a custom ROM and decided since the Android 4.4.1 update is just around the corner, I would like to flash back to stock so I can receive the OTA update.

Here is what I did.

I restored my nandroid, then booted up the device to make sure it restored properly and it did.

downloaded the factory image and extracted the tar and the .zip

the I connected my phone to my computer and performed an adb reboot bootloader (to get into fastboot mode)

I then performed a fastboot flash boot boot.img (to get the stock kernel installed since I was on a custom kernel)

I then performed a fastboot flash recovery recovery.img (to get the stock recovery installed)

I rebooted the phone and everything works great.

However, I still have root access and root still is functioning.

Can I still receive the OTA update having the stock kernel and stock recovery but being rooted?

Also, how do I remove root? Just uninstall the SuperSU app? Or is there more to it than that? Thanks.
[Nexus 5 General] abaaaabbbb63:
You will receive the update, and you will lose root access when you install it.

You can however uninstall SuperSU using the in-app option, that also deletes the su binaries.
[Nexus 5 General] Chochiwpg:
Thank you very much for your reply, I will do that.
[Nexus 5 General] icy_virtuoso6:
I'm having a problem when I get to this part:

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

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

When the small android appears and I hit those buttons, absolutely nothing happens.
[Nexus 5 General] aavvaallooss:
Try few more times. Didn't work for me at the first time. Be sure to press both buttons at same time quickly
[Nexus 5 General] aeppacher:
I have the broken android logo when booting into recovery too
[Nexus 5 General] abaaaabbbb63:
Hit them both, at the same time, quickly. Like..not a long press. Don't hold them at all.
[Nexus 5 General] Chochiwpg:
Delete
[Nexus 5 General] aeppacher:
I must have sensitive buttons, I had to spam both buttons together for like 3 minutes til it finally recognized
[Nexus 5 General] mzeshanhakeem:
i used method 2, everything went smooth and got no error in flashing through cmd but i am unable to access recovery.

Device reboot and there is no network now, imei is unknows and i cannot wipe it from inside the settings..

Please help!
[Nexus 5 General] phonepersonality:
What did you flash?
[Nexus 5 General] biosfear:
Just a quick question.

i already am on the stock Nexus 5 ro, i am rooted but I am having some issues installing the OTA 4.4.1 update so i thought id reinstall the stock rom.

so if i JUST install boot.img, recovery.img and system.img that will keep all my apps +data?

i dont mind loosing root, i can easily reinstall root.

do i need to flash cache.img too? from my understanding i shouldnt flash userdata.img as that will wipe my data
[Nexus 5 General] killajoe:
nm fixed
[Nexus 5 General] blackdragoon:
Hi all,

I'm trying to flash boot.img to my phone prior to getting the OTA update just in case.

My bootloader is unlocked and I rooted it with CF-Auto-Root. I originally had Franko kernel and Xposed installed but restored my kernel backup from before I installed r14, and uninstalled Xposed. Also undid the battery% mod and unrooted/uninstalled SuperSU.

My phone is detected in fastboot when I run "fastboot devices".

However, when I run "fastboot flash boot boot.img", I get the following error:

FAILED (remote: not supported in locked device)

What does this mean?

Thanks for your help, in advance.

Update:

NM, I'm a goofball... forgot I used an app to lock my bootloader again... -_-"
[Nexus 5 General] xtremeryo:
If I would like to flash stock images just for the purpose of being able to upgrade OTA to 4.4.1 without deleting data, would I open command prompt with my N5 plugged in and type

fastboot flash bootloader C:/image-hammerhead-krt16m/bootloader.img

fastboot reboot-bootloader

fastboot flash radio C:/image-hammerhead-krt16m/radio.img

fastboot reboot-bootloader

fastboot flash system C:/image-hammerhead-krt16m/system.img

fastboot flash boot C:/image-hammerhead-krt16m/boot.img

fastboot erase cache

only?