yashsingh1/xdaforums huggingface dataset:
[Nexus 5 General] jd1639:
If the bootloader didn't lock I think your emmc has failed. Sorry to say but rma is your option now.

Sent from my Nexus 5
[Nexus 5 General] jd1639:
Dude, I have no idea what you're trying to say. But I've seen you in a couple of threads. If you're trying to get your post count up there are more productive ways to do it. I hope you'll do it more productively.

Sent from my Nexus 5
[Nexus 5 General] jaladhjin:
I didn't want or try to lock the bootloader..

it should have just done it anyway ?
[Nexus 5 General] jaladhjin:
what I mean is.. I didn't relock the bootloader intentionally I left it unlocked..

Can I flash TWRP with flashify & everything else including recovery as stock ?

Or do I need to use fastboot flash recovery recovery.img ?
[Nexus 5 General] coolek33:
If Ure not rooted flashify won't work. U can use the command U wrote or root and custom recovery with some toolkit (wugs for example).
[Nexus 5 General] jaladhjin:
yeeeaaah that's what I figured.. I suppose I'm still not clear on just what root does specifically & what it doesn't..

So.. is it safe to say anything major that happens on the actual operating rom.. needs root to happen.. or it won't ?

Is that a fair description of root to someone who doesn't understand the actual technical complexities ?
[Nexus 5 General] coolek33:
If you want to modify your system with certain apps U need root for it. They will be asking for root permission. But if you don't want to mod anything leave it alone.
[Nexus 5 General] coolek33:
I don't think this is the right place for such a question...

But U can use this tool

http://xdaforums.com/showthread.php?t=2517778
[Nexus 5 General] gee2012:
No place is suited to advice these kind of tools bro :p

---------- Post added at 08:54 AM ---------- Previous post was at 08:36 AM ----------

Read the first 4-5 threads in the General section bro to get educated and to do it right. Here is a tutorial for how to setup adb http://xdaforums.com/showthread.php?p=50380483. Thats all you need.
[Nexus 5 General] Sir Rrerrington:
thanks, that was really nice.
[Nexus 5 General] knicknut:
Thanks for a great guide!

Apologies if this has been mentioned, but I couldn't find it after a thorough search.

My screen is dead and I need to RMA it. I'm fine doing most of this "blind" as the threads have suggested, but how do I do the "BootUnlocker" to remove the tamper flag without a screen? I guess I can at the least relock it, but I wouldn't be able to navigate through TWRP without using the screen to install the zip. (EDIT: I guess I'd also need to navigate through the opening screens after flashing stock to be able to add the zip to the internal storage.)

Thank you!
[Nexus 5 General] jd1639:
I'd just lock it. Without a screen is going to be just about impossible to find and flash the tamper zip.

Sent from my Nexus 5
[Nexus 5 General] knicknut:
Got it, thanks. No way to change the flag via fastboot, I presume?
[Nexus 5 General] ColdFire InOx:
How do I revert back to stock kernel?
[Nexus 5 General] jd1639:
You can fastboot flash boot boot.img from the factory image

Sent from my SAMSUNG-SGH-I727
[Nexus 5 General] Is.Nasif:
Looking to RMA, not sure if the return to stock was effective. Please Help.

Hello there. First of all I would like to thank you for making this guide. I found it to be the easiest and most straightforward as compared to the YouTube videos.

Now I tried my best to follow this guide word by word to Un-root and lock my Nexus 5 for an upcoming RMA. So I followed Method 1 and while waiting for everything to flash, I get a notice on the CMD prompt that everything has completed. But all of a sudden my phone restarted itself and went directly to the Google/Android setup (like when I first turned on the phone). After setting up, I then tried to go back to recovery but was instead met with the image of android with a red triangle. So since I couldn't "Wipe data/factory data reset" through the recovery, I just did a normal factory reset from Settings-->Backup & Reset--->Factory data reset. So I am now wondering if this was sufficient to to reclaim my Nexus 5 warranty.

Also: I successfully changed the tampered value to "false", locked the boot-loader, and checked with a root-checker App that said the phone was un-rooted.
[Nexus 5 General] gee2012:
Reboot in bootloader and type in cmd: fastboot oem device-info, if the top 2 say false and the bootloader is locked you`re good to go.
[Nexus 5 General] aavvaallooss:
Factory reset from stock recovery is posible using volume + key
[Nexus 5 General] brenmi:
Ready for RMA

Hi all,

Could someone please confirm that to reset the tamper flag i need custom recovery and AFTER which i should then flash factory image?

Also, the Nandroid backup i will do, i should drag and drop onto my PC.

Then when successfully rooting the new phone, and installing Custom recovery, drag and drop the entire backup file into the TWRP folder?

Its just that i have seen something regarding problems with restoring the nandroid backup onto a new device?

Sorry if this has been mentioned already.
[Nexus 5 General] abaaaabbbb63:
You flash the factory images, only BOOT (not flash) twrp, and install the tamper flag zip.

And restoring a nandroid from a different device to another is impossible.
[Nexus 5 General] brenmi:
How would I boot TWRP. Not sure I understand?
[Nexus 5 General] jd1639:
Fastboot boot recovery.img. where recovery.img is the twrp image file.

Sent from my Nexus 5
[Nexus 5 General] Paiyne:
I must be missing something. I used the link in the OP to download the lastest factory images not 2 days ago, but had to restore my laptop to factory (long story). Now, when I download the link, all I get is a .tar file that neither WinZip nor WinRAR are able to open. Any suggestions?
[Nexus 5 General] aavvaallooss:
7zip?
[Nexus 5 General] jd1639:
Don't think you're missing anything. I just went and tried to download and it is a .tar??? It's supposed to be a .tgz file. Always used to be a tgz. If I can figure anything out I'll let you know. Not at my pc or I'd put the tgz up at my dev host account for you.
[Nexus 5 General] Paiyne:
7zip worked, thank you
[Nexus 5 General] fourdigit:
I had the same problem, I had to open the flash-all.sh with a text editor and add "./" in front of all the lines that start with fastboot.

Probably because that file is written for a unix system, not a mac. OP should make note of that in his post.
[Nexus 5 General] abaaaabbbb63:
Yes, maybe I should. Thanks! :D
[Nexus 5 General] [XIX]Secutor:
Forgive me for the stupid question, but better be sure than sorry :laugh:

If i have a custom recovery, but i'ld want to return to the stock one (for OTA purposes for example), can I simply flash recovery.img rather than the whole rom?
[Nexus 5 General] Alecjw:
nice thank you so much, got me out of a bind!
[Nexus 5 General] abaaaabbbb63:
You can flash OTA updates with the custom recovery too. You only need the stock ROM and kernel.
[Nexus 5 General] [XIX]Secutor:
I know, following "section b" of this guide, right? :)

But if i wanted to return with the stock recovery (for no particular reasons, I'm asking only for knowing) could i proceed as i wrote in my previous post?
[Nexus 5 General] jd1639:
Yes, you can flash the stock recovery as you asked in your previous post. Just fastboot flash recovery recovery.img.
[Nexus 5 General] [XIX]Secutor:
Thanks! :) Again, I'm sorry for my noobish questions, but I'm coming from two sammy devices (sgs2 and gnote), nexus5 is a new world for me :laugh:
[Nexus 5 General] jd1639:
No problem. Glad you want to learn
[Nexus 5 General] skells:
Thanks a lot for making this guide, woulda been in heaps of trouble without it :p
[Nexus 5 General] admiralriker:
Stuck on Android Chest Cube

Not my phone, but trying to recover for a friend.

I have successfully done this on my own phone/roms/kernels/etc...

His phone bricked after it was power down during a cache clearing in recovery.

All files pushed OK, should be factory.

Boot phone, goes through "Google" image OK then goes to the little android with a blue tetrahedron in his chest, ears wiggling, and a blue progress bar that doesn't really have any progress.

Phone has been powered down and attempted to do a factory reset through recovery menu; recovery doesn't boot, goes back to the image with the tetrahedron in his chest.

Any thoughts and ideas? Does the phone need to powered down again and the factory image pushed to the phone again? Is it just building the file system?
[Nexus 5 General] abaaaabbbb63:
Yes, try to flash the factory images again.
[Nexus 5 General] admiralriker:
Erasing userdata

Everything seems to write OK, but when it get to erasing userdata (or just saying "erasing..." on the screen), it doesn't seem to move forward.

Friend believes it to be a hardware issue, but everything else wrote OK to the flash.
[Nexus 5 General] abaaaabbbb63:
And it still doesn't boot? Try flashing a custom recovery. Does the recovery boot?
[Nexus 5 General] admiralriker:
Unable to Mount

Custom recovery flashes OK, TWRP boots just fine.

Factory Reset? Negative. It advises it is unable to mount anything. Cannot mount system, cache, persist, firmware, or storage.

Unsure as how to proceed.
[Nexus 5 General] abaaaabbbb63:
In this case, it's probably a hardware issue. You should flash the factory recovery, do the tamper flag thing, and RMA it.
[Nexus 5 General] LeeSta108:
After I flashed all on method 1, then I went to recovery mode and proceeded to wipe data, my phone froze. I powered it back, and it is now stuck in a bootloop.
[Nexus 5 General] samersh72:
what did you mean with "froze"? in stock recovery, wiping data sometimes take a time.
[Nexus 5 General] LeeSta108:
It stopped showing the animation for the bar. I waited for 15 minutes
[Nexus 5 General] abaaaabbbb63:
Does the phone boot?
[Nexus 5 General] shashankj:
A noob question guys, but aren't the radios variant specific? Does the tar contain images for all variants?
[Nexus 5 General] coolek33:
TWRP 2.3.2.1? Shouldn't it be 2.6.3.4 at least?
[Nexus 5 General] aavvaallooss:
Or 2.7 better. It's official now
[Nexus 5 General] neriamarillo:
This might be a stupid question but does flashing a factory image erase all folders from the root folder? I know it erases system and data but I want to know it it erases all the root folders as I want to verify if an issue is gone. Thanks and sorry for the stupid question lol.
[Nexus 5 General] gee2012:
Flashing a data factory image erases all files except the OS, unless you don`t erase and flash userdata.img. There are also stock (de)odexed pre-rooted stock images available that you can flash with TWRP/CWM recovery.
[Nexus 5 General] neriamarillo:
The thing is that I want to have a clean slate of all my root folders not just the system. I don't know if that can be done or if this does it.
[Nexus 5 General] gee2012:
Flashing a factory image will also erase root folders, after that just reroot and you start from zero again.
[Nexus 5 General] JNMM:
Your phone will be just like the way it was when you got it
[Nexus 5 General] Pwnjabi:
During LOCKING THE BOOTLOADER + RESETTING TAMPERED FLAG

I keep getting this error.

c:\nexus>fastboot boot recovery e:\TWRP.img

cannot load 'recovery': No such file or directory

I tried placing the TWRP.img in D & E drive aswell.Still the same result

My fastboot files are in "C:\Nexus" folder & I placed TWRP.img there aswell.
[Nexus 5 General] samersh72:
open cmd (shift + mouse right click) where the recovery is present ant type:

fastboot devices
fastboot boot name_of_recovery.img
[Nexus 5 General] Pwnjabi:
after fastboot devices it shows my device.

I tried these

fastboot boot TWRP.img

fastboot boot recovery TWRP.img

fastboot flash recovery TWRP.img

same error in all cases.

"cannot load 'recovery': No such file or directory"

"cannot load 'TWRP.img': No such file or directory"
[Nexus 5 General] Primokorn:
1. Your TWRP image is really named "TWRP.img" or is it something else?

2. Check your system PATH: do you have your C:\Nexus directory?

3. Is your N5 in fastboot mode?

4. Try another usb port.

5. Do not forget "fastboot devices" before the other commands.
[Nexus 5 General] Pwnjabi:
1.Yes

2.Yes I have put both the fastboot files & TWRP.img in C:\nexus

3.Yes it was,I ran "fastboot devices" command & it was showing my device there.

4.But if the "fastboot devices" command worked,it means usb port is working fine?no?
[Nexus 5 General] Primokorn:
4. Yep

Do you open cmd from the directory where TWRP.img and fastboot.exe are located?

On any need check your setup with this guide - 2. Installing a Custom Recovery.
[Nexus 5 General] Pumå:
I was going to sell my Nexus 5 to get a Phablet, found this great guide - thanks alot for it and the factory reset with such ease.

Everything worked fine, I didn't even had to do anything further than just executing the file and wait for the phone to reboot. The script included all the wipes already. It rebooted with all data ereased, with a fresh and clean factory image :good: Now ready to sell the device
[Nexus 5 General] Pwnjabi:
Yes all the adb & fastboot files + TWRP.img were in Nexus folder.

For now I just used "fastboot oem lock".

Can you please tell me the difference between using this command & the method thats mentioned in the thread?

Thanks for your time:)
[Nexus 5 General] Primokorn:
'fastboot oem lock'??? So you currently have a LOCKED bootloader?

You need to have an unlocked bootloader to be able to flash a custom recovery. The related command is 'fastboot oem unlock' then you can use 'fastboot flash recovery TWRP.img' :)
[Nexus 5 General] :
So long story short...

I wanted to go back to a completely Stock Nexus 5, but still have root and ability to flash roms (if needed) but wanted a clean slate.

All I did was follow the first set of instructions (flashing the "Flash-all", and then pushed TWRP back to the device. Do I need to go further and relock everything just to unlock again? Or am I good?

Thank you!
[Nexus 5 General] samersh72:
no need to re-lock bootloader.
[Nexus 5 General] gee2012:
Nope you`re good, just flash the latest superSU.zip or a custom rom in recovery.

[MENTION=4975115]samersh72[/MENTION] Simultanious response :)
[Nexus 5 General] :
Thank you.

Apparently I dont have a Custom recovery anymore. I'm not sure how I deleted it, but it was there when I first wiped the phone? SU wouldnt install. but I have root, so just downloaded from play, updated binaries via app, and flashed recovery via Rom Toolbox.
[Nexus 5 General] gee2012:
Rom Toolbox and Rom Manager are buggy apps afaik. Next time better use Flashify to flash a .img file. You can also boot into recovery (TWRP or CWM) without istalling it. Place the recovery in the fastboot folder and in cmd type: fastboot boot namerecovery.img and you`re in and can flash .zip files while you keep the stock recovery (if you want that).
[Nexus 5 General] :
Thank you.

Now one last thing (I swear!), I noticed that if I do a full wipe, then SU is not installed, and it asks me to manually install it. Should I make it a system app? Or is there an easier process to do so?
[Nexus 5 General] gee2012:
A data/factory reset will wipe everything, you could make it a system app or just reroot with CF Auto Root. It takes 30 seconds to do that and always went fine for me.
[Nexus 5 General] Pwnjabi:
Nooo.

I had rooted nexus 5 & unlocked bootloader right?

So i unrooted it

& then it says

"Optional, but necessary for warranty purposes - Locking your bootloader+ Resetting the tamper flag "

^I was following this process in the thread,in order to get locked bootloader & u know getting back to 100% stock as I got it out of the box.

I was getting error,so I used "fastboot oem lock" & now bootloader is locked.
[Nexus 5 General] Primokorn:
No you need an UNLOCKED bootloader to reset the tamper flag. The zip file will lock your BL and reset tamper flag.

Read again the original post:
[Nexus 5 General] theganguly:
Every time I try to get 4.4.2 factory ROM from Google developer's website, I get error half-way through the download. Is this a known issue? Any workarounds?
[Nexus 5 General] gee2012:
Turn off the firewall and ant-virus temporarily before the download, that may help. I never have had this issue so far.
[Nexus 5 General] theganguly:
Thanks for the help. I ended up using Firefox/IE to download it. It still stopped midway, but they have a resume button I could use and then, I could finish off downloading easily.

Thanks once again.
[Nexus 5 General] oprahsbs:
Edited, Posted in 3 Threads
[Nexus 5 General] mdpatterson:
been messing with this stuff for about a year now, still pretty noob, but can easily do basic functions...using adb, fastboot, flashing this and that....would love to start learning how to build apps next. But im going to pose a noob question before I do all that. I just had to wipe my laptop and reinstall windows, and so im taking this opportunity to gather any and all necessary modification tools needed for my nexus 5 and 7. I can find all the files and downloads I need except for the stock recovery. Does the stock recovery come with the stock image from google, so that If I do a data wipe and flash a stock image, would I also be wiping TWRP at that point? or is there a place I can download the stock recovery for the N5 and N7 for safe keeping?
[Nexus 5 General] gee2012:
Yes, its called recovery.img and can be flashed in fastboot. After the flash of the recovery its advised to type in cmd: fastboot erase cache.
[Nexus 5 General] mdpatterson:
I asked my question incorrectly last night. Not sure what my deal was. Your answer may still be the same.... But I meant to say.... When I flash the stock N5 image from the Google download page, am I replacing TWRP with the stuck recovery (I.e. does the recovery image come with the stock image download) or dies the stock recovery need to be flashed separately? And if so, where do I find the download for that...... Besides the wugfresh toolkit. (I.e. if I wanted to do it manually)?
[Nexus 5 General] samersh72:
Stock recovery will overwrite custom recovery.

It is included in stock images package
[Nexus 5 General] mdpatterson:
Excellent! Precisely what I thought and what I was asking for. Thank you very much.
[Nexus 5 General] JNMM:
How come when I download factory image its a tgz file? Isn't it supposed to be a zip file?
[Nexus 5 General] abaaaabbbb63:
Nope. That's why I recommended WinRAR to extract the archive.
[Nexus 5 General] JNMM:
Thank you. Once I figured that out it worked perfectly??
[Nexus 5 General] naski666:
Dear All,

I've followed this guide (and many others like it) but I'm having a problem. I was running paranoid android (latest version) an this morning i updated it using the app. Anyway I went to my phone later this morning and it was bootlooping.

I can get to the official recovery (android robot open chest) but I cannot get to a custom recovery.

I have reinstalled customer recovery (CMW latest version, and tried TWRP again latest 2 versions) and it seems to install ok using adb but then when i try and boot into recovery it just starts bootlooping.

I'm at the end of my tether, have followed various methods using adb to try and return it to a factory image but to no avail.

I've had a search but all i can find is how to put it back to stock which is not working for me.

I'm getting desperate now, I have access to normal recovery, adb is working fine and is pushing data to the phone, custom recovery is just not working :(

help please!!

Nask
[Nexus 5 General] jd1639:
Can you lock the bootloader, reboot and have the bootloader still locked? If not you're emmc may be bad.

Sent from my Nexus 5
[Nexus 5 General] :
Am I suppose to copy these files to my phone? My phone is in recovery mode, and I type in terminal the commands and get:

error: cannot open 'radio-hammerhead-m8974a-1.0.25.0.23.img'

That's from method 1 and method 2.

Be advise, reason I'm doing this is because I deleted my OS on accident.
[Nexus 5 General] gee2012:
If you deleted your OS you should sideload or push a custom rom to your phone if you have a custom recovery or flash a factory image in fastboot if you haven`t.
[Nexus 5 General] naski666:
thanks for the advice, but it was ok. After charging for the night on a QI charger, removing the sim card and changing the USB port i used on my computer it seems to be behaving now (using Kwonggers toolkit). I did all this last night so not sure which of the things i changed managed to get it to work, (perhaps just trying again once resigned to the fact it was broken!).

Thanks for the advise anyway though

Nask
[Nexus 5 General] mr.b4rt:
thx for this tutorial :good:
[Nexus 5 General] :
Is there a tutorial on how to do this? My computer doesn't detect The phone.

And how do I fix that error?
[Nexus 5 General] gee2012:
Look in this thread in the OP here for how to flash a stock rom. Run in cmd: `fastboot devices` while the phone is in bootloader and connected to the pc to see if the phoe is detected.
[Nexus 5 General] :
I did that, I see serial number and a name. After that, the other fastboot commands don't work. Stating cannot open filename.img

Do I need to fastboot oem unlock?
[Nexus 5 General] gee2012:
Yes, you need to unlock the bootloader first.
[Nexus 5 General] :
Okay, once unlocking the boot loader, it should fix those errors?
[Nexus 5 General] gee2012:
It will completely wipe your device, you should flash the factory image anyway after that if possible. So just reboot into the bootloader after the wipe as no system can be loaded atm.
[Nexus 5 General] :
How do I flash he factory image. Reason I'm asking is I believe it'll give me the error again.
[Nexus 5 General] gee2012:
Look in the OP, its discribed perfectly and easy to be read. Method 1 is easiest.
[Nexus 5 General] :
Okay, bootloader is unlocked. I do method 1 by executing flash-all.sh, doesn't work, I even edit the file and put ./ in front of all the fastboots, and it tells me wrong directory.

So I try method 2, doesn't work.

Both methods are telling me

error: cannot open 'bootloader-hammerhead-hhz11k.img'

error: cannot open 'radio-hammerhead-m8974a-1.0.25.0.23.img'

error: failed to load 'image.zip': No such file or directory

Yes all the files are in the same directory.

Edit: Cancel last, method 2 seems to be working right now, I will report back.
[Nexus 5 General] gee2012:
Did you see the same files in the window where you clicked flash-all as in the image shown in the OP? Have you placed all files in the android-sdk platform-tools folder?
[Nexus 5 General] :
Yes, I'm on a mac so method 2 I'm sort of on my own and seems to be working now. I'll let you know if my phone comes back on.

Edit: I went into Recovery and now I have an Android icon with a ! icon as well.

Edit #2: I rebooted the phone, it seems to be loading the OS. Now my question is I didn't get to go into Recovery Mode, see the android logo, do Volume Up + Power, Wipe data/factory data reset. Do I still need to complete those steps?

Edit #3: All Google services are not working, and not detecting my cellular network. I am connected to WiFi currently.

Edit #4: I installed TWRP again, and wiped through there and everything seems to be in working order now.
[Nexus 5 General] gee2012:
Great, hope all turns out well mate :)

---------- Post added at 02:33 PM ---------- Previous post was at 02:00 PM ----------

Edit 3: no need to data factory reset usualy if userdata is erased allready during the flash :)