yashsingh1/xdaforums huggingface dataset:
[Nexus 5 General] vivek0418:
No flash-all.bat in latest 4.4.4 factory image (KTU84Q)

Hey guys... I am trying to unroot my Nexus 5. I downloaded the latest factory image 4.4.4 Release 2 (KTU84Q), but after extracting it, I found only one file with no extension. There is no flash-all.bat file in it(see attached image). Could anyone please tell me how to proceed now?
[Nexus 5 General] vin4yak:
Right click on that file and open it with Winrar/winzip/7-zip and extract all the files. You'll find the files you are looking for! :)
[Nexus 5 General] jd1639:
Use winrar or 7-zip to extract it. If you used one of these already then try to re-download it
[Nexus 5 General] vivek0418:
Thanks a lot!!!

Hey thanks buddy, it worked... :

---------- Post added at 09:22 PM ---------- Previous post was at 09:18 PM ----------

Thanks for the help buddy!!!
[Nexus 5 General] Andromendous:
thank you so much! that did the trick! I've been trying to figure out what was causing that for a while now, thank you!! seems like it might have made some things work better also. I've been having issues with my data connection and other things I'm hoping for some reason that may have been the problem. will check back in in a few days. thanks again!
[Nexus 5 General] samgcw:
error in process, and phone is not able to boot. please help.

Please see attached picture.

Thanks in advance.
[Nexus 5 General] samersh72:
Try other usb port. Make sure that only your phone is connected
[Nexus 5 General] samgcw:
Many thanks! Ok now after changed USB port to use.
[Nexus 5 General] Xiedian:
Bad installation of carbon rom

I tried flashing carbon rom and the installation failed and now im stuck in a bootloop, will flashing the stock images help in any way?
[Nexus 5 General] jwhyte:
Reflash your old ROM, restore a nandroid or flash a different ROM. No need to fastboot stock.
[Nexus 5 General] winamp26:
i want reset tamoer flag.

if i flash Nexus BootUnlocker script erase my phone data?
[Nexus 5 General] aavvaallooss:
No. NBU not need to be flashed, just download it from Play Store
[Nexus 5 General] winamp26:
can you give link?
[Nexus 5 General] aavvaallooss:
1. Open Play Store

2. Type BootUnlocker for Nexus Devices

3. Voilá
[Nexus 5 General] winamp26:
tell me about this pic please
[Nexus 5 General] vin4yak:
It states whether or not your phone can charge while it's shut down.. If it's true, your phone will remain switched off and keep charging. If it's false, the phone will boot up as soon as it's connected to the charger.

I believe this is the command to toggle it: "fastboot oem-off-mode charge 0".. Never tried it though..
[Nexus 5 General] donnabelmartie:
"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."

Does this mean I should type on the cmd prompt "fastboot flash-all.bat script"? Do I have to first type as well the folder where the file is in like in unlocking the bootloader, "cd Desktop/android-sdk-windows/platform-tools"?

So sorry, I had my ex do all these, and he used a toolkit. TIA!
[Nexus 5 General] jd1639:
Just double click on the flash-all.bat
[Nexus 5 General] donnabelmartie:
Hmm, just wondering, why in the OP, it doesn't include the file flash-all.bat?
[Nexus 5 General] jd1639:
Method one does, but it doesn't tell you it's as easy as double clicking on it
[Nexus 5 General] donnabelmartie:
I see. Thanks!
[Nexus 5 General] oldpreowner:
Did this work for you? Just wondering for when I need to flash back to stock for android l.
[Nexus 5 General] donnabelmartie:
I haven't yet as we basically have the same purpose haha. But I guess not too soon as I just learned that my internal storage on twrp showed 0 mb.
[Nexus 5 General] chris2365:
9494

So, I got my Nexus 5 yesterday. Like a dumb computer-illiterate (don't know what came over me), I decided to root my phone, without researching it at all, so I could make a backup of the stock base factory ROM. After realizing how dangerous this was (could have bricked it or whatnot), I've been wondering if I should undo the process and unroot it. I know there are some extra security risks when it's rooted, and I can't help but feel that if something goes wrong software-wise on my new phone it's going to be because of the rooting process.

You guys know this best. Am I making a big deal out of my rooted phone, or are the risks legitimate? Should I just leave it as is?
[Nexus 5 General] coolek33:
Nexus without root is like a hot dog without a sausage inside.
[Nexus 5 General] giwrgos:
How i can reset the tamper flag without having the superroot installed later?
[Nexus 5 General] jd1639:
Not sure what you're trying to do. What do you mean by resetting the bootloader?
[Nexus 5 General] giwrgos:
resetting the tamper flag. sorry
[Nexus 5 General] jd1639:
If you're rooted the easiest way is to get bootunlocker from the play store and use that.
[Nexus 5 General] giwrgos:
no the phone is not rooted and i don't want it to be rooted
[Nexus 5 General] jd1639:
Then you'll have to download the bootunlocker zip and put it on your internal sdcard. Then download a custom recovery image file, twrp is my preference. Boot into the recovery, fastboot boot recovery.img. Then flash the bootunlocker.zip in the recovery.

This all assumes your bootloader is unlocked
[Nexus 5 General] giwrgos:
if you use twrp the installs the superuser, but if you use clockwork touch is working fine without installing the superuser ;)

thanks for your help
[Nexus 5 General] jd1639:
Twrp only does it if you want it to. You can deny it
[Nexus 5 General] shdwslayer:
I followed all the steps and I'm back to stock with bootloader locked and flags set to false so I can send my phone into LG tomorrow for repair. But, SuperSu Installer keeps showing up in the notification tray. I've tried factory resetting from in the phone and from recovery and it's still there. I can't go through the steps again with the bootloader locked. How do I get rid of this before I send it in?
[Nexus 5 General] Primokorn:
Adding the step of flashing the factory images would be better IMO. Actually all your data are still there including root stuff.
[Nexus 5 General] shdwslayer:
That's what I meant by "followed all the steps". I flashed the factory image, erased all the data, locked the bootloader and reset the tamper flags.

My phone is fully stock unrooted, with no data of mine whatsoever.

It's just following the very last step on the OP "Optional, but necessary for warranty purposes - Locking your bootloader+ Resetting the tamper flag" then restarting my phone gives my the SuperSu message.
[Nexus 5 General] Primokorn:
Well when I flash factory images all my data are gone including SuperSU...
[Nexus 5 General] shdwslayer:
I don't think you're understanding what I'm saying in my previous posts. But I got it removed now. Thanks.
[Nexus 5 General] Primokorn:
Well I'm understanding that you have a message from SuperSU even after having flashed factory images. This is something that I can't understand ^^

Anyways what was your solution?
[Nexus 5 General] Cris7ianO:
Hey first of all THX for this guide :) i want to unroot and go back to stock so that i can sell my phone ^^

I am doing everything just as stated in OP.

Edit: ok i totally ignored how i get correctly to the commands in the stock recovery. after pressing power and volume up and releasing them all works fine in the recovery.

one last question: after i use the bootunlocker script to get the tampered flag to false through booting with twrp i always get the message of twrp wanting to root me?? is that supposed to be like that? i click dont install and all seems fine. flags are false bootloader is locked. no sign of root. is my nexus now safe to sell?? :D
[Nexus 5 General] shdwslayer:
I went into Play Store and updated SuperSu, opened it then went into the settings and clicked "remove root" and that did it.
[Nexus 5 General] tailsthecat3:
Well, if I have no choice, I'm fine with it.

I want to revert back to 4.2.2 or 4.3 on my nexus 5. I can't(looking for an hour)find any factory images for use in fast boot. Anybody have any insight or links to images or a ROM? Thank you.
[Nexus 5 General] jd1639:
Google nexus 5 factory image. Extract it
[Nexus 5 General] joachim1:
After I used method 2 my screen is shaking very hard and my phone is unusable. I have tried flashing other images, like Android L but nothing helps. Did I break my phone? The shaking is also in fastboot mode, recovery, ...
[Nexus 5 General] jwhyte:
If it's shaking in fastboot then it's a hardware issue.
[Nexus 5 General] joachim1:
Yeah that's what I thought :(
[Nexus 5 General] OzmodRom:
tutorial

excellent tutorial!! thanks :laugh: :good:
[Nexus 5 General] Ok_Kaleidoscope5109:
You should add detail that this is the small dead Android and not to freak out. I really flipped out before I realized that you can still pull up the menu. I usually think dead android = bad recovery image.
[Nexus 5 General] abaaaabbbb63:
Right on it!
[Nexus 5 General] JedTech:
I am attempting to return to stock with lock state flag set to locked and the tamper flag set to false. However the steps provided in the OP leave you with a locked phone and TWRP recovery. Attempting to flash recovery.img proves futile because my phone is locked. Anyone know how I can have stock, lock state set to locked, tamper flag set to false, and stock recovery all at the same time?
[Nexus 5 General] BirchBarlow:
Download and install BootUnlocker to reset the tamper flag while your phone is still rooted (but don't lock the bootloader). Then use fastboot to flash the factory image and lock the bootloader.
[Nexus 5 General] jcsww:
If you still have TWRP, then you more than likely flashed it instead of booting to it. You should be able to unlock it, flash the stock recovery, and then follow the steps again to reset the tamper flag and lock the bootloader.
[Nexus 5 General] JedTech:
Thanks! This pointed me in the right direction!
[Nexus 5 General] newb3e:
there is no system.img and boot.img in my extracted files.whhat do i do?
[Nexus 5 General] argrr101:
Thank you for this. Extremely easy to follow and worked flawlessly!
[Nexus 5 General] abaaaabbbb63:
Um... there should be?

Try downloading again.
[Nexus 5 General] sutobe:
I don't know if this has been mentioned before, but when you edit the flash.bat file by removing the "-w" parameter, the flash procedure won't wipe your phone.

I searched this thread for "-w" but there were no results, so blame the board for don't letting me find what I want to find ;)

You download the factory image as usual, then right click on the flash-all windows batch file and edit it or open in the Windows Editor.

There you only have to look for "-w" (without the quotation marks) and delete it, save when closing the batch file.

then you just proceed with the flash process. Nothing gets wiped, the only thing you have to do is re-root your phone.
[Nexus 5 General] clutch3672@gmail.com:
problems with fastboot

I was on android 4.4.4 kitkat on the sprint nexus 5. I rooted with towelroot, then i used boot unlockr and then flashify to load twrp recovery i flashed the android l developer preview. I had some issues and glitches so wanted to go back to stock and it wasnt there on the download file. i used fastboot to get it back to stock now i get to the bootloader and follow all the steps with fastboot and it still will not get pass the open screen I have to recovery and when I try fastboot to update image it says not enough space when i use the flash-all command. I cant load anything this sucks if i fix this i will probably not root again.
[Nexus 5 General] Jesmer:
I am rooted through towel root, and flashed the one plus one rom, I want to go back to unrooted and completely stock, how do I do that?
[Nexus 5 General] jd1639:
Flash the factory image in fastboot
[Nexus 5 General] :
Post #1 ?
[Nexus 5 General] Jesmer:
I forgot to mention My Bootloader was locked
[Nexus 5 General] :
So unlock it and follow post one, when you're done lock it again if you wish. ?
[Nexus 5 General] vishnukkanth:
Need Help !!!

1.	Backed up my mobile

2.	Installed adb and fastboot drivers

3.	Downloaded latest factory image

Am struck after this step, in the video you attached, you are showing a folder “UnrootNexus5” on the windows desktop – From where should I get that.

The Latest factory image downloaded from the link (https://developers.google.com/android/nexus/images#hammerhead) has a different folder name and the file contents are not exactly the same as that of the “UnrootNexus5” folder as shown in the video.

Please let me know where I can download “UnrootNexus5”

Note – I have cyanogenmod 11 on my Nexus 5.
[Nexus 5 General] jd1639:
Just double click on the flash-all.bat file and you'll be fine. You'll find it where you extracted the factory image
[Nexus 5 General] furius:
Not able to enter recovery

Hi all,

I'm following method 2 of this procedure ... all is ok, but at the end of the steps I'm not able to enter the stock recovery... selecting recovery from bootloader, it hangs on the Red Triangle Dead Android icon ... any idea?? phone boots up and on the welcome page i get some error message like "unfortumately camera has stopped"

I'm confused, I'm not a noob and I usually don't have any problem in doing staff like this ...

thanks in advance for any suggestion

EDIT: forgive me ... I solved: I found a little difference in the procedure described in the OP ... after all the steps the phone auto-rebooted and not stopped on the bootloader ... so I booted again into bootloader then I selected "enter recovery" and here the main difference: to really enter recovery I hade to select only "volume up" and not the "volume up + power" as mentionad in this tutorial ... good!
[Nexus 5 General] wolfsbay:
Hello, I'm trying out method 1 but the command line says that fastboot isnt recognized as an internal or external command.
[Nexus 5 General] jd1639:
That's because you don't have fastboot installed. Google 15 second adb install xda. That'll fix you up
[Nexus 5 General] Cowboy_Dan:
I followed the video exactly from the OP post. I just input the command fastboot -w update image-hammerhead-krtm.zip

I got all of the messages the command prompt that show in the video but it's been stuck on "writing 'system' ..." in command prompt and "writing" on my nexus 5 screen at the fastboot screen for over 5 minutes. How long should this take? What is happening?

EDIT: just tried wiping the data and flashing the .imgs, now stuck on writing cache.img

fastboot erase boot

fastboot erase cache

fastboot erase recovery

fastboot erase system

fastboot erase userdata

fastboot reboot-bootloader

EDIT2: all fixed, read somewhere else in the thread to try a different usb port. seems to be working now.
[Nexus 5 General] ronak383:
need help!

my nexus 5 suddenly switched off and after that it is not turning on :crying:

whenever i try tried to reboot, it just stopped at the google logo. so i unlocked my bootloader and tried to flash the stock image for 4.4.4 , but i am getting this error:

sending 'bootloader' (2508 KB)...

OKAY [ 0.226s]

writing 'bootloader'...

FAILED (remote: flash write failure)

finished. total time: 0.407s

rebooting into bootloader...

OKAY [ 0.123s]

finished. total time: 0.123s

sending 'radio' (45409 KB)...

OKAY [ 1.582s]

writing 'radio'...

FAILED (remote: flash write failure)

finished. total time: 2.802s

rebooting into bootloader...

OKAY [ 0.111s]

finished. total time: 0.111s

archive does not contain 'boot.sig'

archive does not contain 'recovery.sig'

after searching on google, i came across a post where users had flashed each file individually.

i tried doing that but still no success :/

i even tried that erase before flashing method but then i get this error:

C:\image-hammerhead-ktu84q>fastboot erase recovery

erasing 'recovery'...

FAILED (remote: failed to erase partition)

finished. total time: 0.217s

can anyone please help me? :crying::crying:
[Nexus 5 General] abaaaabbbb63:
I think your whole memory chip is corrupt, which means that RMA is the only way to go...
[Nexus 5 General] Winterstorm59:
Resetting Tamper Flag

Hello, I am about to root my Nexus 5 and I am just doing my homework and reading all I can. I just want to ask if I can use Clockwork Mod recovery instead of TWRP? I am a NOOB so I know Clockwork and would like to stick to what I am familiar with.

Thank you in advance and btw your tutorials/guides and all your work is just great!

Nick
[Nexus 5 General] :
Of course. Though out of it, twrp and philz, most will tell you it's the worst of the 3 and a little behind the times. ?
[Nexus 5 General] BirchBarlow:
You can use CWM to root, but don't use the built in root function, flash the SuperSU binary instead. Note that even after rooting, every time you exit \CWM it prompt you to root because it can't detect the SuperSU binary files because it's based on an outdated version of Android. That being said, TWRP is as easy to use, if not easier than CWM.
[Nexus 5 General] dmarco_:
How and where can I see the tamper flag?

I just relocked my bootloader, but how do I check the tamper flag?

"These don't contain the tamper flag reset step. Follow the steps above to reset your tamper flag value to "False" for warranty purposes."
[Nexus 5 General] jd1639:
fastboot oem device-info
[Nexus 5 General] vishnukkanth:
Thanks, I tried following the same instructions in CMD as given in the video tutorial for windows in page 1.

When i entered this command "fastboot -w update image-hammerhead-krt16m.zip"

i got the following error and it doesnt proceed further

"archive does not contain 'boot.sig'

archive does not contain 'recovery.sig'

failed to allocate 709571364 bytes

error: update package missing system.img

The image-hammerhead-ktu84p.zip file has system.img when unzipped which seems weird.

Could someone please help ?
[Nexus 5 General] tech7:
OK I only have towelroot and I installed su and install binary from busy box just for the hotspot how can I unroot completely I have stock recovery never unlock or flash or moded for the hotspot fix what the easy way to go back to stock and thanks
[Nexus 5 General] jwhyte:
Uninstall busy box, go to supersu/settings and select full unroot option.
[Nexus 5 General] joho5:
Can I run the bootlocker script through fastboot?

I cannot boot into my phone and sending it back on RMA...I cant mount the sd card to put the file on it.

I can get into bootloader and run fastboot commands.
[Nexus 5 General] gamer.11:
Guys how many flash cycles do you think our devices have(re-flashing/unlocking/relocking?) this is a hardware and there should exist some type of limit to how many times it can be flashed.
[Nexus 5 General] coolek33:
Dunno what you're talking about. Never heard of such this as flash limit. I didn't flashed factory images but custom ROM once a week (at least) for almost 1 year on n5.
[Nexus 5 General] abalam:
Nice
[Nexus 5 General] asared89:
Hi guys,

does anyone knows the solution as this problem keep happening to me.

i'm unable to flash this system.img.

appreciate your help guys.
[Nexus 5 General] jd1639:
Try downloading the factory image again, it could be a bad download
[Nexus 5 General] pankajramnani:
everything went well.. but now I am left with a stock, bootloader locked, and a false temper device with custom recovery on it.. how do I flash the stock recovery without having to unlock the bootloader again?
[Nexus 5 General] jd1639:
If you flashed the factory image you should already have the stock recovery
[Nexus 5 General] Luckymoi:
<waiting for device> YIKES!

Method 1

. Easy method.

★Power off your phone.

★Boot it in fastboot 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.

★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. :good:

=========================================================

So I have a problem when trying to reflash factory image:

When I: "★Execute the flash-all.bat script (for Windows)"

I get a cmd window with a msg:

"<waiting for device>"

any ideas?

As ever, thanks for your help.

=========================================================
[Nexus 5 General] jd1639:
Before you flash the flash-all.bat user the commands

fastboot devices

Does your device show up? You probably have a driver issue
[Nexus 5 General] Luckymoi:
well ok...

so fastboot devices shows nothing (hence the msg)

and then following the driver idea:

when I attach the N5 (USB debugging is on) to Win7 I can in fact see the flies on the N5 from Win7 but fastboot cant.

I suppose there could still be a driver problem

My other thought (thanks Tony) is to mimic the bat file.
[Nexus 5 General] jd1639:
Google 15 second adb install xda. Use those drivers
[Nexus 5 General] BirchBarlow:
The device must be in FASTBOOT mode, i.e. the bootloader.
[Nexus 5 General] Seox667:
Need to reset tamper

Hello

Recently from my stock unrooted nexus 5 i installed the official android L beta from google. I've decided to go back to 4.4.4 as it's more stable, so ive flashed the official 4.4.4 factory image using Minimal ADB and Fastboot.

It came to my attention that my nexus 5 now says tampered:true.

So I tried the steps listed on first page to reset tampered to false,.

I get up to the part where i'm using the command promt to fastboot boot twrp.img etc but when i do it says FAILED not supported in locked device

I've come to the conclusion this wont let me do it on an unrooted device, but then why does my phone say tamper:true? (I'm noob sorry)

How would i go about turning my tamper to false? its never been rooted or installed custom roms.

Thank you.
[Nexus 5 General] skhan23:
Failed root on nexus 5

When I plug in my phone it doesn't get detected by my computer any ideas on what to do? Also, my phone doesn't boot because of my failed attempt to root the phone and I factory reset my phone from the bootloader so I'm pretty sure USB debugging is unchecked. Please help! Thanks
[Nexus 5 General] Primokorn:
Did u correctly install USB drivers? What did you do exactly? Because you can't factory reset from the bootloader (there's no option for that).

USB debugging doesn't need to be enabled while being into fastboot or recovery mode.
[Nexus 5 General] skhan23:
Sorry I had installed the newest version of clockworkmod and used that to factory reset. I downloaded the drivers using this link: http://xdaforums.com/google-nexus-5/development/adb-fb-apx-driver-universal-naked-t2513339

I downloaded the attachment but I wasn't sure what to do next. I would plug in my phone but my computer still wouldn't recognize it. My computer's os is windows 7 by the way.
[Nexus 5 General] rkkaranrk:
Root 4.4.4 with towel root install bootunlocker from play store from the app click on the untemper and done.
[Nexus 5 General] skhan23:
I installed the drivers but everytime I try to execute the flash-all batch file it says "fastboot is not recognized as an internal or external command, operable program or batch file." Anyone have any ideas? Thanks
[Nexus 5 General] jd1639:
You need to have fastboot installed too. Google 15 second adb install xda and you that
[Nexus 5 General] magicfrappe:
Hi I'm a huge novice when it comes to everything. I recently purchased this Nexus 5 and it has the Android L Developer preview installed on it.

Here is what's happening:

I executed the flash-all batch file for Windows like the guide and in the command prompt/fastboot thing it fails to download everything to my phone.

I downloaded the correct factory images, and everything else in the guide. USB debugging is turned on as well. The bootloader is unlocked. The only thing I can think that might be causing it is that the image-hammerhead file is just a regular ZIP file instead of a WINRAR ZIP archive, and it has a 7zip icon next to it instead of a WINRAR icon like in the image in this guide.