yashsingh1/xdaforums huggingface dataset:
[Nexus 5 General] Apokalypzx:
Fastboot-arm

Just an FYI to anyone without a PC/MAC/LINUX box available, you can download a fastboot executable compiled for arm. I'm not sure where it's hosted, but I know it's out there and only took me a few mins to find it via search.

Anyway, you can copy the fastboot binary to a rooted android tablet (or phone) that has 2Gb or more RAM and put it in the xbin folder. Then set permissions to be executable and you can just type the name of the binary file (I believe it's called fastbootarm) and plugin your nexus 5 via USB OTG and that's it. You use it like you would on the computer.
[Nexus 5 General] abaaaabbbb63:
Well.. Yeah. But backup your data first. If you end up in a bootloop, then you'll have to wipe data too.
[Nexus 5 General] xtremeryo:
Few questions I want to fully understand what each command is doing.

For the bare minimum of what I want (update OTA KitKat 4.4.1) I could just open cmd and type

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

to restore stock. What precisely happens to my previous system and boot? Do those get deleted as the new (stock) images are installed?

The following code

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

When would it ever be necessary to flash the stock bootloader and radio? Most mods don't change these values do they? And after flashing each, is it imperative to reboot the bootloader? However, when flashing the rest - for example - the system, it is not necessary?

Also say I created a recovery from TWRP - what exactly is this recovery of? Is this is considered what is called a Nandroid backup? It only system state backup - the kernel, ROM? App data does not get backed up and should be done through other means such as TitaniumBackup?

Also I would like to know about the following code:

fastboot erase cache

Does this code only erase Dalvik's cache?

Lastly a step you described as:

★Select "Wipe data/factory data reset"

what type of data is it wiping and is it required for me to upgrade to 4.4.1? Should I skip this as I am trying to retain my data (appdata, contacts, msgs)?

Sorry for all these questions but I'm new to Android and would like to clear out some of these noobie questions. I did read a bunch of guides and want to know for sure what I'm doing.
[Nexus 5 General] Lettuce!:
Not trying to spam but this method worked for me...

http://xdaforums.com/showpost.php?p=48212456&postcount=268

Only flashed system and boot using the adb/fastboot method.

Lettuce
[Nexus 5 General] jd1639:
That will get you what you need for the 4.4.1 update but won't get you the full return to stock
[Nexus 5 General] abaaaabbbb63:
Yes, they will be replaced, and deleted.

Not necessary. Only in case of a brick or weird stuff happening.

Twrp- nandroid backup. It restores everything except the storage, including app data.

Titanium backup should be used when you flash and change the system, so it only restores apps + data.

It erases the /cache partition. Dalvik cache is stored on the /data partition.

Yes, skip that. You might want to use Titanium Backup, and do a factory reset from TWRP. This way, your storage will not be wiped, and you can restore your apps.

If you're coming from a custom ROM, and don't wipe, then there's a chance of you getting stuck in a bootloop. But you can try though.

No problem. That's why we're here :D
[Nexus 5 General] Lettuce!:
Yep you're right, was just referring to xtremeryo saying "For the bare minimum of what I want (update OTA KitKat 4.4.1)"

I should have quoted... My error...
[Nexus 5 General] abaaaabbbb63:
Nice. @xtremeryo

take a look
[Nexus 5 General] dannydro:
I just recently returned to stock,and I'm not sure if I'm crazy but I remembered on the stock recovery when you would wipe cache or something like that the android would be animated but now its just a regular ass pix idk im pretty sure I did everything right. Great guide by the way :good:
[Nexus 5 General] NiruBhai:
I am getting the below message while trying the 1st method :(

sending 'bootloader' (2506 KB)...

OKAY [ 0.307s]

writing 'bootloader'...

OKAY [ 0.480s]

finished. total time: 0.788s

rebooting into bootloader...

OKAY [ 0.116s]

finished. total time: 0.117s

sending 'radio' (42033 KB)...

OKAY [ 1.842s]

writing 'radio'...

OKAY [ 2.888s]

finished. total time: 4.731s

rebooting into bootloader...

OKAY [ 0.102s]

finished. total time: 0.103s

archive does not contain 'boot.sig'

archive does not contain 'recovery.sig'

error: update package missing system.img

Press any key to exit...
[Nexus 5 General] abaaaabbbb63:
Did you move your system.img? Open the archive. Is the system.img there?
[Nexus 5 General] Teczeus:
I do not have stock recovery but followed all steps.

I followed all the steps but seem to not have stock recovery. I get archive does not contain Boot sig , recovery sig, system sig
[Nexus 5 General] Teczeus:
I have reached this part and it tells me i can not open ---i have tried every method to no avail??
[Nexus 5 General] Chromium:
If the flash-all.bat worked you should have stock recovery. Turn the phone off, then go into the bootloader. From there, use the volume keys and power to select Recovery mode. What do you see when you go into recovery mode?
[Nexus 5 General] Teczeus:
I did that but i keep comimg up with TWRP recovery...not stock...luckily i backed up my stock recovery and flashed it using TWRP (forgot i did this)-- But now when i follow the steps i still get archive does not contain boot.sig, recovery,sig and system sig,. I am now trying everything again now that i have stock recovery!

Sorry, It was late and my brain was jarred. What I mean to say was I used recovery tools to install TWRP and luckily I backed up stock recovery. I reloaded it and I am now on stock recovery and was able to un root my device. Now that I am completely stock and un rooted I am using this method as per El Daddys post.

Section A: adb sideload

NOTE:Make sure you have the latest version of adb. It seems people are having issues with older versions. Its attached at the bottom

1) Download the OTA.zip on your PC, rename the file update.zip, then place file in the same directory as adb.

2) Make sure you have USB Debugging checking in the Developer Options, then connect your phone.

3) Open the command prompt from the directory above on your PC and type the command: 'adb reboot recovery'

4) When in recovery, you’ll see an android laying down. Press power then immediately press volume up and release. The menu will appear. Select “apply update from adb”

5) Using the command prompt type: 'adb sideload update.zip' The file will load and the update will begin.

6) When completed, select reboot.

I still can not get OTA to load... I get "cannot read update.zip" error when trying to sideload or "can not find device" error. I have tried various USB cords and all my USB ports. I've typed everything correctly even using zip.zip. as per instructions.
[Nexus 5 General] xsbear:
Great!

:good:Thanks for your work!
[Nexus 5 General] redcheese:
After trying to re-root my device by flashing the supserSU.zip through TWRP 2.6.3.2 and having it fail, my HW buttons stopped working in the OS. As they still functioned in the bootloader by allowing me to toggle and select recovery/power off/etc., I assumed flashing everything to stock would be the best move. Unfortunately, I'm unable to interact with the stock bootloader as it doesn't seem to be registering me pressing power + volume up. So it seems the volume rocker and the power button will not work within the OS nor a non-touch based recovery. I've erased and wiped everything, including cache, but everytime I boot into a freshly flashed image (I even tried Cataclysm) I encounter the same problem. Sorry if this would be more relevant in the Q&A section, but so many new threads are getting posted that my thread keeps getting pushed down.

If it helps, I've provided more detail in this post in the OTA help desk thread http://xdaforums.com/showpost.php?p=48228007&postcount=293.

Edit: Btw, this is a very helpful and well made tutorial. Thank you for the write up. I've become more comfortable toying with my device this way versus using a toolkit.
[Nexus 5 General] abaaaabbbb63:
This statement is like music for my eyes.
[Nexus 5 General] H4CK_H0PP3R:
Guys If you getting Samsung Note 3 for say INR Rs.35000 Total new with warranty, Will you buy over Nexus 5 or LG G2 ? Please answer..

Sorry wrong thread.
[Nexus 5 General] Bane99:
After following the directions for Method 2

I noticed in the stock recovery, I have the following displayed

E:failed to mount /cache (invalid argument)

E:Can't mount /cache/recovery/log

E:Can't open /cache/recovery/log

E:failed to mount /cache (invalid argument)

E:Can't mount /cache/recovery/last_log

E:Can't open /cache/recovery/last_log

E:failed to mount /cache (invalid argument)

E:Can't mount /cache/recovery/last_install

E:Can't open /cache/recovery/last_install

E:failed to mount /cache (invalid argument)

Any ideas? Hope I won't have any issues. The flash-all.bat in Method 1 didn't work at all. Had to use Method 2.

EDIT: So far no issues :)
[Nexus 5 General] abaaaabbbb63:
Try erasing the cache partition:

fastboot erase cache
[Nexus 5 General] fugn:
It will still flash without the .sig stuff just wait for it to continue
[Nexus 5 General] Teczeus:
This is where im at now.Thank you in advance!
[Nexus 5 General] fugn:
Type adb version in command prompt. If it doesn't say:

"Version 1.0.31" (I just checked mines) you might have to update your platform tools with SDK manager.

Did you remember to navigate to your adb directory before you issue the commands?
[Nexus 5 General] Teczeus:
I am on the current version and I run CMP from directory Still nothing.
[Nexus 5 General] fugn:
Well to make sure you have the current drivers install, power your phone on, connect it to usb cable

adb devices

then adb reboot bootloader to enter bootloader

fastboot devices

If you see your serial number twice, you should have the correct drivers and we solved that issue.

Then I'd download the ota.zip again...rename it to "ota.zip" place it in the platform-tools folder.

open recovery, press pwr then volume up, select apply update from adb, then flash ota.zip with cmd.
[Nexus 5 General] pauleandro:
Silly question: since there is a cache image between the files, I`m wondering if there is no need to flash that cache image?
[Nexus 5 General] Teczeus:
ok i do not see my serial number twice on CMP or the phone

Edit: do you mean i should see my serial twice after typing fastboot devices or once after adb devices and once after fastboot devices?
[Nexus 5 General] fugn:
From that, the problem sounds like your usb drivers...that explains why you were using different usb cables and ports. To avoid driver conflictions I would uninstall the nexus driver and re-install it via universal naked driver. Here is a guide I found:

http://xdaforums.com/showthread.php?t=2513339
[Nexus 5 General] masim8:
Rally thanks four this thread. Really interesting.

Sent from my Nexus 5
[Nexus 5 General] Android_Medium:
Keep CWMR and return to stock image?

Hello, and thank you so much for the wonderful guide! A quick question: I've flashed a custom ROM, kernel & recovery, and I would like to go back to stock 4.4, but I would like to keep my custom recovery (clockwork) and my custom kernel (franco).

My plan is to try out Xposed Framework, which I understand works best with the stock image. Do you know how I could do this?

Thanks again!
[Nexus 5 General] abaaaabbbb63:
You can flash a stock rooted ROM from the dev section.
[Nexus 5 General] villankd47:
does having an unlocked boot loader void any warranties, and if so. Can you "relock" the bootloader?
[Nexus 5 General] jrny99:
radio and baseband question

a little of topic, can you put together a flash-able radio and baseband zip for recovery for those of us who updated our radios and want to go back? thank you for all you do.
[Nexus 5 General] abaaaabbbb63:
It does, but this whole guide is about getting your warranty back.

Follow it, and you should have no problems.

I'll try :)
[Nexus 5 General] makopronto:
Very useful thread

Thanks!
[Nexus 5 General] abaaaabbbb63:
http://xdaforums.com/showthread.php?t=2514095

Btw, baseband=radio :)
[Nexus 5 General] housry23:
OK guys, I've been using Nexus devices for a long time. I'm very familiar with adb, fastboot, rooting and returning to stock. Especially on Nexus devices. On my Nexus 5, when I flash stock images, it starts hanging. On the screen of the command prompt it still says writing or erasing or whatever step it's on. But on the phone where it says writing or erasing it goes away and nothing is happening. It never finishes in command prompt and I end up having to reboot the bootloader and then the Command window says failed((too many files open in system)) or something like that. The phone works. But I think something is borked. I boot into recovery and I get a bunch of errors in stock recovery. Failed to mount cache, failed this, failed that. I tried to wipe cache and it just hangs. It does nothing, but then I reboot the phone and it has no signal. It's no longer reading my SIM card. Now I did another factory image reset and it does the same thing as before. Just hangs. It never finishes writing the images. Usually hangs on userdata.img flash if I do a flash-all.bat. If I try to flash each partition separately, it'll hang on each partition. It's really weird. I'm on Windows 8.1 Pro 64-bit. I just recently went back to Windows after using Ubuntu exclusively for a while. I'm going to install Ubuntu and try to flash in terminal instead of Windows. Hopefully it'll restore all the partitions correctly. But...if anyone has any ideas, I'd love to hear them. Thanks!
[Nexus 5 General] Primokorn:
Big quote, isn't it?
[Nexus 5 General] housry23:
Not that anyone cares, but I was able to flash the factory images in Ubuntu and luckily the 4.4.2 images were available. I don't know why it was failing in Windows.
[Nexus 5 General] xdm9mm:
great information, will come in handy when the time comes... thanks for the freat info op...
[Nexus 5 General] baco200:
I have a question....

I had 4.2.1 installed, I flashed a battery mod and then the 4.2.2 update came.

I couldn't update OTA because of the mod.

When I flashed the 4.2.1 update I flashed the system.img of the 4.4 factory image first to be stock again.

But there is no factory image of 4.2.1 just the 4.2.2

So I flashed the system.img of the 4.2.2 factory image. Now it says 4.2.2 in system/about phone.

But are there other things like radio I'm missing now??
[Nexus 5 General] jd1639:
I would flash the system and boot image from 4.4 then use the 4.4 to 4.4.2 update zip. This way you won't lose data. The alternative is to flash the 4.4.2 full rom which is available now
[Nexus 5 General] andre512:
On android 4.4.2. We can update manually like 4.4.1?? Or have to do something more??

Enviado desde mi Nexus 5 mediante Tapatalk
[Nexus 5 General] abaaaabbbb63:
If you are on 4.4.1 stock, then yes, you can update though adb sideload using the OTA zip, or wait for the notification to appear.
[Nexus 5 General] llewelld:
HELP - Exhausted all options

Hi Guys, I'm in a bit of a panic with my Nexus.

Looked in my pocked yesterday and the phone was randomly in a boot loop, just getting up to the google logo, then rebooting.. this was weird as the phone was working throughout the day. The day before I had installed Faux v5 (and I have cataclysms rom)..

Followed the instructions to rever to stock image.

I run the flash all (using method 1 from Post1), which seems to complete successfully, but after this the phone gets stuck at the Google logo

- I cant get to the final two steps (whicdh is wife data/factory data reset), because in the step before where I select recovery, it just boots back to the google logo - no recovery. It will stay there all day, unless I hold power & volume down, then I can get back to the bootloader.

Since this failed (I have flashed the flash-all batch twice using different usb ports... but no joy.

If I run the fastboot device info, - it correctly shows my bootloader is unlocked...

I have tried to relock it, but hit the same problem, (if I run the fastboot boot c:\twrp.img etc) - it just wont boot into a recovery..

I am at a loss.. any help would be greatly appreciated...

THANKS!
[Nexus 5 General] blankoi:
My phone now is rooted 4.4.1 with stock recovery, Franco kernel r19. My question is, how do I update to 4.4.2 when there is no 4.4.1 factory images available?
[Nexus 5 General] jd1639:
This http://xdaforums.com/showthread.php?p=234
[Nexus 5 General] abaaaabbbb63:
Then try manually resetting. Use this command from cmd:

fastboot -w
[Nexus 5 General] llewelld:
I tried fastboot -w

It erased successfully, and finished with Ok, but after reboot, I get the google logo, then the swirlying colors for about one second, then crash.

Starting to think I have a hardware fault.

Would be great if I could relock the bootloader.. but that's not possible because I cant get into recovery... aaargh..

Can't believe I have a bricked phone that is possibly not going to be covered by warranty....

I also tried just downloading the stock image again, and noticed a 4.4.2 image has been posted, (and used winrar this time ), instread of 7zip..

but no difference.. Flash-all goes without a hitch, but back at the same place.. just cant get into recovery.. and cant boot...
[Nexus 5 General] Nephilim-Giant:
I'm a bit confused on updating to 4.4.2:

"You have two options to do this:

Option #1 Flash the KRT16M stock image. Follow [MENTION=4346614]abaaaabbbb63[/MENTION] guide if you need help.

If you want to keep data intact flash only the boot.img, system.img, and recovery.img (optional)"

How do you ONLY flash boot.igm, system.img and recovery.img?

Do you just delete the cache.img and userdata.img or will that brick the device?

I tried updating my phone via OTA, but it failed twice. I uninstalled Xposed installer and it still failed. Maybe SuperSU is the reason why it failed? I don't know.
[Nexus 5 General] abaaaabbbb63:
Use Method 2, and only flash system.img and boot.img. And skip the factory reset part.
[Nexus 5 General] rinderkappajoe:
Hi There,

i try to follow your guide but i have a problem, i hope you can help me:

I download KRT image from your mirror.....when i extract the zip file with winrar it only contains one file "hammerhead-krt16...."

The archieve doesnt look as it should....

You postet a screenshot with the archieve and it shows more files ...bootloader, flash, image, radio.....

Why do i only get one single file when extracting the archieve from the mirror? i am confused and can´t continue :(

I would appreciate it if someone could help me out :good:
[Nexus 5 General] jd1639:
Try using 7-zip. That's all I've ever used and have had no problems
[Nexus 5 General] rinderkappajoe:
I tried 7zip and still get the same archieve with only one file....i don´t understand whats wrong,

the download wasnt corrupt and i dont receive any error

---------- Post added at 03:48 PM ---------- Previous post was at 03:45 PM ----------

i downloaded the zip file with my nexus yesterday, then transferred it to pc via usb today, but this can´t be wrong!!?????

---------- Post added at 03:56 PM ---------- Previous post was at 03:48 PM ----------

downloaded it again. everything is fine now *confused*
[Nexus 5 General] jd1639:
Probably got corrupted when you moved it from your phone to the pc
[Nexus 5 General] rinderkappajoe:
didn´t thought this could be a problem, but seems so.

So now i followed the final steps....i used method 1 and just clicked "flash all"

That was everything i needed to do....following steps weren´t necessary

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

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

★Select "Wipe data/factory data reset"

★Reboot. Your phone should be stock.

I don´t know why but i´m happy and stock again.

Just installed the 4.4.2 update and am very thankful for this guide.

Can i make a donation to the creator anywhere!?

I love this forum :victory::good:
[Nexus 5 General] rakesh595160:
i want to downgrade my rooted n unlocked bootloader nexus 5 to stock 4.4 with complete stock to claim warranty from 4.4.2 so is it possible to downgrade???
[Nexus 5 General] jd1639:
Yes, just flash the 4.4 factory image. Google nexus 5 factory binaries. There's a flash-all batch file
[Nexus 5 General] abaaaabbbb63:
I do this for fun :P Make the donation to the forums directly:

http://xdaforums.com/donations.php

Anyways, those steps are just in case something happens. Many phones enter a bootloop if the owner doesn't do those steps.

Man... if I would have accepted all the donation offers, I could have got a Nexus 5 :D
[Nexus 5 General] Nephilim-Giant:
I keep getting "FAILED (remote: partition table doesn't exist)"

Now what? :(.. is it always going to be this hard to update the OS?
[Nexus 5 General] abaaaabbbb63:
Are you sure you wrote everything correctly?
[Nexus 5 General] Nephilim-Giant:
I hope so? I'm following this:

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

fastboot flash userdata C:/image-hammerhead-krt16m/userdata.img ---------X

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

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

fastboot erase cache

--------

The X's are the ones I don't do right? If I'm updating from 4.4-> 4.4.2
[Nexus 5 General] jd1639:
You flashed everyone, but the ones with x's? You were supposed to flash only the system.img and boot.img.
[Nexus 5 General] Nephilim-Giant:
I originally tried: system.img & boot.img ---which I got the same error.

Then I tried: boot.img & system img---which I got the same error again

After that, I tried everything on my last post except the X's. I get the same error every single time.

I didn't know upgrading would be this complicated :(.
[Nexus 5 General] jd1639:
At this point I'd use method #1 in the guide. If you still get the same error there is something wrong with your phone. You're going to lose all data on your phone, but it's probably already gone anyway
[Nexus 5 General] abaaaabbbb63:
Thank you for helping with this thread :)

I'll add you in the credits!
[Nexus 5 General] jd1639:
No problem. I enjoy helping and hopefully teaching those with less experience
[Nexus 5 General] Nephilim-Giant:
Thanks for all the help! Both of you are great! I just did step 1 and used Titaniumbackup to restore all my app data :)

4.4.2 is quite nice :)
[Nexus 5 General] jd1639:
Glad you got it working again:)
[Nexus 5 General] abaaaabbbb63:
Wait.. You were trying to flash both system.img and boot.img with a single command?
[Nexus 5 General] Nephilim-Giant:
haha no. I tried system.img first and then boot.img. Second time I tried boot.img and then system.img.

I thought it might be failing because I'm not doing it in the correct order. I just think there was just something wrong with my phone. Maybe messing with too many kernels or maybe a bad restore from titanium backup? I have NO idea!

I tried upgrading my little brother's Nexus 5 with your instructions and I was done within 5 minutes. I had to re-root the phone and download SuperSu from the app store because even after a re-root, there was no SuperSu app on his phone. Which took another 2-3 minutes. :victory:

As always, thanks a billion! You two are providing excellent instructions, help and knowledge to all of us! :highfive:
[Nexus 5 General] ohad123454:
How do i return to stock rom ? Im on cataclysim rom and i wanna return to rom stock. How to do it ?
[Nexus 5 General] jd1639:
Read to OP. That's what this thread is all about
[Nexus 5 General] ohad123454:
i know but i did method one and it didnt work
[Nexus 5 General] jd1639:
You don't have adb/fastboot set up correctly then