yashsingh1/xdaforums huggingface dataset:
[Nexus 4 General] naxir:
I too have an issue. It's stuck during boot on the 4 "color dots". I was coming from CM10.2, and did the following (with cache clears/factory resets in between):

I tried the flash-all.sh first (with -w, wiping everything).

I then upgraded my fastboot/adb to the latest (oops) and tried again.

I followed this guide, flashing everything separately

I repeated several of these steps and to much frustration, I was always greeted with the colored dots boot animation. I left the phone starting for 15-30 minutes each time.

I have had this issue in the past. I can flash jdq39 (4.2.2) no problem. However, attempting to flash jwr66v (4.3), I get stuck while booting. This is why I initially installed CM10.2. I hoped that with 4.4 I could return to stock, but no such luck.
[Nexus 4 General] STiAT:
Boah, thanks for the "how to wipe data" in the standard bootloader, saved my a**.

I tried it before with the standard script, never worked, always got locked at booting (boot screen for 8 hours :p). After wiping /data my n4 perfectly fine booted.

Thanks for the guide!
[MENTION=2817101]naxir[/MENTION]: wipe your /data if you didn't, that solved the stuck-at-the-bootlogo thing for me (had that on 4.2.2, 4.3 and 4.4 images, until i wiped /data).ß
[Nexus 4 General] nnorton44:
Here are the commands I used in fastboot:

adb reboot bootloader

fastboot flash bootloader bootloader-mako-makoz20i.img

fastboot reboot-bootloader

fastboot flash radio radio-mako-m9615a-cefwmazm-2.0.1700.84.img

fastboot reboot-bootloader

fastboot -w update image-occam-krt16o.zip

fastboot reboot-bootloader

Good luck!
[Nexus 4 General] Green-Bot:
Awesome Tutorial......Best work...Much appreciated...just updated my nexus 4 to android kitkat 4.4...Thanks!!

Guys only do 2 things:

1. Just follow every step as mentioned in the tutorial Exactly as described.

2. Keep your head cool :)

As described, Read the entire tutorial first before doing anything.

---------- Post added at 08:31 AM ---------- Previous post was at 08:24 AM ----------

When your phone boots for the first time after Flashing, it starts to build Dalvik cache and it takes longer time comparatively to boot. Therefore, we must wait for the first boot to finish. Also there is no problem with th efactory images provided by google. So its us who do mistakes while flashing.

Just go through the following detailed and awesome fastboot tutorial http://xdaforums.com/show....php?t=2010312

Just follow the steps Exactly and keep your head cool :) i am sure you will do it for sure.
[Nexus 4 General] arffrhn:
If all the writing processes end with success then try factory reset. Well, it is recommended to perform factory reset and wipe cache after flashing to avoid any problems.
[Nexus 4 General] shubhdeep99:
I have followed you tutorial and successfully flashed latest kikkat 4.4 factory image by google... and everything works normal ... but when i am trying to go into STOCK recovery there i found no recovery only a dead android with a red triangle (i have tried twice to flash stock recovery as your tutorial). But custom recovery works fine...

Any idea?

Am i only here?

TIA
[Nexus 4 General] faddyie:
That same is the stock recovery. U need to press then vol up button
[Nexus 4 General] arffrhn:
??

Maybe you're quoting a wrong person?
[Nexus 4 General] MrKaupo:
Did you try all in guide by red text after section D? It worked for me.

"" Note that some users indicate that they can't get past the X on boot. If this happens to you, reboot into the bootloader and select recovery. Then, when you see the Android with the red exclamation mark, hold power and press volume up to take you to the menu. Wipe cache. If that still doesn't work, boot back into recovery and do a factory reset (this will obviously delete all your data & files in /sdcard...). "

**X was on previous version, now its 4 dots.
[Nexus 4 General] faddyie:
Yeah ma bad. Sorry
[Nexus 4 General] Drmol:
You haven't read the OP thoroughly enough then because that IS the stock recovery :D
[Nexus 4 General] ChungWingKeung:
locked bootloader?

excuse me is it a MUST to have unlocked bootloader to manually update to 4.4? :confused:
[Nexus 4 General] Drmol:
As far as I know yes
[Nexus 4 General] azrash:
To flash factory image, yes. To sideload an OTA update, no. But I don’t think anyone has posted an OTA link, yet.

So for now, factory image is the way to go.
[Nexus 4 General] naxir:
I did, many times, but it hasn't seemed to have helped.

---------- Post added at 02:27 PM ---------- Previous post was at 02:23 PM ----------

I have tried this. Just now, I wiped /data, flashed 4.4, then let it boot for 12 minutes, no dice. I unplugged it, worrying that might have affected something, wiped /data again, then rebooted. It has been booting for 18 minutes at the time I'm writing this, still stuck on 4 dots.

edit: Note that I have absolutely *no* issues when flashing 4.2.2, the initial reboot takes just over one minute and everything is great. I ran into this issue when I used the OTA for 4.3 initially and ever since then, I have not been able to flash 4.3/4.4 from factory images. CM10.2 worked great, however.
[Nexus 4 General] STiAT:
First flash, then wipe ;). But if you ain't got the issue with 4.2.2 it's strange.

First boot on 4.4 took like 2 Minutes for me after i flashed /data. Though, no idea then what you may have there. Wait for OTA?
[Nexus 4 General] naxir:
Well, part of the issue is that OTA had the same issue for 4.3. For example, I just flashed 4.2.2 and then let the OTA download/install. It's trying to boot into 4.3 now, but it's been sitting on the X for about 8 minutes. I'll let it sit a while longer, even though I'm sure it won't help. I'll end up rebooting and wiping data, but that won't help either. My only way to recover is to flash 4.2.2/custom rom.
[Nexus 4 General] anwedr:
4.4 is the first flash I've experienced that I do not get stuck in the boot animation. However, the device shows 8 gb instead of 16gb which is easily resolved as per efrants post.
[Nexus 4 General] hamedunix:
Can I use the ROOT method explained here to get root access on Android 4.4 KitKat?
[Nexus 4 General] Hmmy 4444:
this method worked out for me, wthout any problem
[Nexus 4 General] grgana:
Hey i have a question..i used Skips tool to unlock bootloader and root back on 4.2.2, then before i flashed custom rom, i made nandroid backup..now im running aokp4.3.1,

So if i wipe everything in cwm and flash 4.2.2 bootloader an radio an restore nandroid of stock 4.2.2 and relock my bootloader and unroot, is it safe to recive an official OTA and update,or its not the same thing like manulay flash stock and relock? Manny thaks!
[Nexus 4 General] arffrhn:
You don't need to relock your bootloader to get OTA. You just need stock rom, kernel and recovery to be able to update via OTA. It is safer and easier to flash the stock 4.4 images than having to do what you wrote there. Just flash-all.bat but edit it and remove -(W) to avoid wiping your device.
[Nexus 4 General] zaibrockstar:
Hi

The link for Odexed version of JDQ39 is broken. If you have any mirrors please share it

Thanks
[Nexus 4 General] efrant:
Here is an odexed version of KRT16O if you want.
[Nexus 4 General] grgana:
Yes but it seems that i cant configure my fastboot propperly, sorry for my noobnes but from your answer i should be able to recive ota by restoring 4.2.2 nandroid (if it contains kenrel) and get rid of the custom recovery and root?

Sent from my Nexus 4
[Nexus 4 General] zaibrockstar:
Thanks for the Rom. But if I use Kitkat Rom will the below JDQ39 stock boot image and Stock JDQ39 Recovery work ? If not please let me know what to do ?

Thanks
[Nexus 4 General] arffrhn:
Yeah. Btw, even with root you still can update via OTA if you are on stock rom, ketnel and recovery. It is just that your root access will be lost after the update.
[Nexus 4 General] efrant:
If you use the KRT16O ROM that I linked to, it has a boot image included, so no need to worry about flashing it again. As far as the recovery, you would need the KRT16O recovery. Just download the factory image from Google's website, extract the recovery.img from within, and copy that replace the recovery.img file in my zip and flash that.
[Nexus 4 General] zaibrockstar:
Cool. Thanks ! I am going to flash them now. Thanks.
[Nexus 4 General] azrash:
new build for nexus 4 just dropped

tagged Android 4.4 (KRT16S)

https://developers.google.com/android/nexus/images#occamkrt16s
[Nexus 4 General] Green-Bot:
Hold power button and press volume Up button....This will land you into stock recovery...!!
[Nexus 4 General] el_charlie:
Efrant,

In the latest bootloader (Z30d from KitKat), the -c "lge.kcal=0|0|0|x" argument to boot CWM or TWRP is no longer needed :)

Just the old fastboot boot customrecovery.img xD.

Cheers!
[Nexus 4 General] Natakranta:
I can confirm the above for Nexus 5 as well. Simple cmd: fastboot boot customrecovery.img does the job :good:
[Nexus 4 General] zaibrockstar:
Had the Same Issue. I tried to do same thing "Hold Power + Upper Volume" in stock recovery, the phone used to turn off with redlight Led. Never got into the stock recovery menu. Can anyone take a pic how it looks like options on stock recovery.

I could Clear it by using fastboot commands with correct boot image and recovery commands anyways but wanted to know why the menu didn't work ?
[Nexus 4 General] efrant:
Start off by holding the power button. And then, i.e., while you are holding the power button, press volume up.

As stated: hold power and press volume up, not press power and volume up together...
[Nexus 4 General] zaibrockstar:
Got IT ! hmm I was holding them together earlier ! Thanks, Now I learned both ways to factory reset !:highfive:
[Nexus 4 General] anwedr:
Just want to chime in and say thanks again efrant for this simple guide. There are many of the same tutorials but I always end up following yours since I bought my first nexus with 4.2.

I tried to use wugfresh 's toolkit because I upgraded from Windows 8 to 8.1 last night and I had to install the drivers from scratch and removing existing drivers, and call me lazy, but I felt adb and fastboot to be a much simpler method.

Anyways, on KitKat 4.4 krt16s and did not lose any data.:beer:
[Nexus 4 General] fabrizziop:
Hey guys, is the fastboot command to only boot CWM (not flash) still working on 4.4?. Thanks.
[Nexus 4 General] Danny.ns:
Yes i just did that to flash supersu 1.75. Used: fastboot boot customrecovery.img

Thanks again for this guide efrant - i've used it a few times (i basicly flash factory images whenever there is a new "big" release out).
[Nexus 4 General] looppingz:
I tried to go from 4.3 to 4.4 through .zip in TWRP. Failure again (I already failed 4.1 to 4.2 and later 4.2 to 4.3...).

I got it working back again (with kitkat) with this guide. No loss except the desktop shortcuts. A sumup of the command lines (added 44s to most .img files)

fastboot devices
fastboot reboot-bootloader
fastboot flash bootloader bootloader-mako-makoz20i.img
fastboot reboot-bootloader
fastboot flash radio radio-mako-m9615a-cefwmazm-2.0.1700.84.img
fastboot reboot-bootloader
fastboot flash system system44s.img
fastboot flash boot boot44s.img
fastboot flash recovery recovery44s.img
fastboot format cache
fastboot reboot

I kept a textfile for myself to avoid next failure!

Thanks again for the guide.
[Nexus 4 General] RohanM:
stock recovery not need either.. only stock rom + Kernel + Radio = OTA Done...

Any custome recovery will get overwritten after OTA & lose root also.. :cowboy:
[Nexus 4 General] xtrymind:
so after flash stock 4.3 image, my phone goes on bootloop,

how do i enter recovery mode? or how to get rid of bootloop
[Nexus 4 General] spicediablo:
Quick question, I have flashed cwm after upgrading to 4.4 but when I launch su app, it says no binary found. How do I fix this? Also i flashed cwm using fastboot flash recovery recovery.img but customer recovery doesn't stay. I keep getting stock recovery upon reboot...

Sent from Mako⁴
[Nexus 4 General] binaryfalcon:
Is there any difference writing this manually in cmd or using flash-all.bat that's included?

Do I need to extract the zip file containing system.img and userdata-img for flash-all.bat to do it's job?

Thanks.
[Nexus 4 General] hamedunix:
Turn off your device, hold volume down and press the power button to enter bootloader, now hold power menu and press volume up, you'll be brought to another page from where you should perform cache/dalvik format. Reset your device and see if it did the trick. If not, perform a factory reset (might loose data if you didn't backup) and see the results.

---------- Post added at 05:14 AM ---------- Previous post was at 05:11 AM ----------

Flash-all.bat does it. You don't need to extract the update file. Only the original file downloaded must be extracted to the same folder as adb tools. You'll have 2 image files and a zip file.

---------- Post added at 05:17 AM ---------- Previous post was at 05:14 AM ----------

That's a know issue with cwm. Look it up, I've seen somewhere there is a way to make it stay upon reboot. You can also switch to other costume recoveries.
[Nexus 4 General] spicediablo:
Reflashed and solved my problem...

Sent from Mako⁴
[Nexus 4 General] RASTAVIPER:
Just flashed normally the S Ota update and my TWRP recovery is still there.
[Nexus 4 General] xtrymind:
so how to turn off phone while bootloop?

i have pressed power button for a time, but it didn't turn off, it's just restart
[Nexus 4 General] RohanM:
Because your manually flashed it... It was not automate...
[Nexus 4 General] RASTAVIPER:
Nope.

Selected the normal update for this OTA.

Unleashed by my Nexus 4
[Nexus 4 General] RohanM:
You mean to say you got notification of ota and you tap on it like any normal non tech person will do ota ? Or you have downloaded any zip and flashed in recovery?

CWM got overwritten in my case...
[Nexus 4 General] RASTAVIPER:
Exactly in the normal way without any zip.

And as I mentioned before I have TWRP.

To explain a bit more, In my case I just wanted to check both solutions.

So first flashing, from 4.3 to 4.4 , was through toolkit.

But when I got the OTA notification for the small update of S (9 mb) version, I used the normal way after unrooting and putting back stock kernel.

Unleashed by my Nexus 4
[Nexus 4 General] RohanM:
Wow that's great then... CWM gets overwrite.... !
[Nexus 4 General] Drmol:
Never had to do that so I don't know if this actually works but you could hold volume down + power for 10+ seconds while in bootloop which should take you to your bootloader and you can power off from there.
[Nexus 4 General] Tetramorium:
too many open files?

ok I followed the guide trying to flash the factory image of the 4.4 kitkat .

it all went well until I try to flash the system image.

and it gave me something like this:

after that the boot loader just freeze and won't respond to anything until I reboot it.

And of course the system is erased i haven't been able to boot into system.

Could anyone tell me the reason and how to fix it?
[Nexus 4 General] efrant:
As it has been with every OTA update since the Nexus One: OTA updates place two files on your device that automatically re-flash the stock recovery on every boot.

Hold down the power button until it turns off.

Don't use toolkits - - they cause issues.

That is normal.

It could be a few things:

1) Bad download. Re-download or verify the factory image you downloaded.

2) Problem with USB cable or port. Use a high quality cable and/or use a different port.

3) Wrong drivers or bad driver install.
[Nexus 4 General] spicediablo:
My custom recovery stays. I selected fix before rebooting from custom recovery

Sent from Mako⁴
[Nexus 4 General] efrant:
Yes, it will stay if you "fix" it using TWRP or CWM. That doesn't change what is happening in the background: when you update via OTA updates, two files are placed on your device which are not normally there when you flash the factory images. These files re-flash the stock recovery on every boot. The "fix" in TWRP or CWM just renames them.
[Nexus 4 General] xtrymind:
yes, i have do that too, but it didn't turn off, just restart, whats wrong?
[Nexus 4 General] arffrhn:
Hold power button until your screen turns off. Then, quickly hold power button+vol down to boot into fastboot mode. Select power off from fastboot mode.
[Nexus 4 General] sordna:
Congrats on your N5 :)

I have a question, I downgraded my N4 back to 4.3 since kitkat gave me stability issues (taking photo in camera would reboot). Few days later I got the OTA notification and the zip downloaded automatically. I deleted the file from /cache and rebooted the phone which got rid of the notification. However if I go to Settings -> About -> System updates, the phone says that the 4.4 update is "downloaded and verified". If I hit "install" nothing happens (as expected).

I want to stay on 4.3 for now but the problem is that I will want to update to KitKat when 4.4.1 comes out (which I hope will have a lot of bugfixes), however my phone is in this weird state that it thinks it has the current 4.4 update "downloaded and verified" which is not true since I deleted (and even formatted) /cache. What can I do to make my phone check for future updates ?
[Nexus 4 General] CatsAreGods:
I don't think you have to worry. When a new update comes out, your phone won't register as having it, so it should download and install it as usual.
[Nexus 4 General] masoud70kg:
hi guys

I totally Wiped Data/Factory reset, formated system my nexus 4 via twrp recovery and there is no OS to boot :(

is there any Guide to fix my device

I have 4.4 OTA and factory image both
[Nexus 4 General] azrash:
Just follow the steps in the first post, and flash the factory image. Your N4 should be fine.

Your data would be gone though, since you already wiped /data partition. But if you have only did a factory reset, and wiped /system, your internal storage might be still intact. Follow the steps in the OP and skip flashing userdata if yours is the latter case.
[Nexus 4 General] efrant:
If everything is working as you want it to work, then don't worry about it checking for 4.4.1 - - just flash it when it comes out.

But the issue you are referring to (your phone restarting when you take a picture) is not normal. My N4 does not do that, so something was corrupt on yours. Sometimes it's good to wipe data and reinstall all your apps.
[Nexus 4 General] The1Shark:
Definitely use second option. phone won't boot if you erase the cache

the1shark
[Nexus 4 General] hamedunix:
Since I didn't find any other threads using your method of booting into a custom recover, I'm gonna ask my question here:

I was wondering is it possible to flash a custom ROM with just booting into a custom recover? ( without actually flashing a custom recovery)

If anyone did such thing?
[Nexus 4 General] efrant:
Yeah, I had been planning on editing the first post for a while now, but never got around to it. Soon though.

Yes, of course.

I think people are still a little confused about booting vs. flashing. It really makes no difference, as you can just as easily flash a stock recovery when you need it.

"Flashing" a recovery (i.e., fastboot flash recovery recovery.img) essentially means writing the image to a part of the flash memory, so that it will be available for future use. In this case, when you are in the bootloader menu and select recovery, the bootloader takes whatever is in the "recovery" partition and loads it into RAM.

"Booting" a recovery (i.e., fastboot boot recovery.img) means loading the kernel directly into RAM from your computer.

If you have use of a certain recovery, then just flash it. If you need a different, e.g., stock, recovery (for whatever reason), then flash it. The only real reason to use "fastboot boot recovery.img" is if you need to use the recovery that you are booting only once. If you are going to use it more than once, why would you continually want to plug your phone into your computer? Just flash it and eventually when you need a different recovery, flash that one.
[Nexus 4 General] arffrhn:
If you can't get the phone to be detected in adb fastboot mode, then sideload any rom that contains system and kernel in recovery. Better if you sideload the one with the same android version with the one you had before you format your system. Or you can just sideload the stock factory images made into flashable zip.
[Nexus 4 General] Goldenmeadow:
Thanks OP.

Was on 4.3 stock+root+CWM.

Now on 4.4. Had problem with 16GB detection - did factory reset.

One question though: I can't get into CWM... My bootloader version is makoz30d. Flashed it with fastboot -c "lge.kcal=0|0|0|x" boot customrecovery.img AND fastboot boot customrecovery.img commands. But when I try to access Recovery - it takes me to regular android-man with red sign... The same with TWRP...

Any ideas?

Thanks again!

UPDATE. I got CWM by renaming file into recovery.img (NOT customrecovery.img) according to this:

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

Did I do something wrong? What's wrong with just recovery.img and not CUSTOMrecovery.img?
[Nexus 4 General] efrant:
The "regular android-man with red sign" is the splash screen of the stock recovery. You still have the stock recovery because you use the "fastboot boot customrecovery.img" command, which does not flash CWM or TWRP -- it only temporarily loads it into memory. To actually flash it, you need to use "fastboot flash recovery customrecovery.img".
[Nexus 4 General] Goldenmeadow:
I want to give myself 10 facepalms! :)

Anyway, now I know new way to boot into custom recovery :)

If you don't mind, one more question:

I needed to flash hybrid radio, so I assumed I needed CWM. Now I know the way to boot into it without installing.

My question: why would I want stock recovery? What's wrong with having TWRP or CWM?

thanks!
[Nexus 4 General] arffrhn:
Imo, it's better to use custom recoveries if you are into flashing roms/kernel/mods. Before this, some people switched back to stock recovery so that they can update to 4.4 via ota. For ota, you need stock rom, kernel, and recovery. You can also use twrp to update ota but it might not patch up the update properly and resulted in bootloops as I have seen in many cases here in XDA.
[Nexus 4 General] efrant:
A lot of people worry about someone else being able to access their data on the device. With a stock recovery and locked bootloader and strong lockscreen password, your data is less easily accessible. I would say that is the main reason.

I won't get into too many details, but you do not need a stock recovery to apply an OTA update (although the way to update is a little different from a stock recovery). The bootloops that you have been seeing are due to people either modifying their system or kernel (and yes, sometimes root can be a system modification).
[Nexus 4 General] Goldenmeadow:
Thanks for explanations!

So, if the only thing I need is LTE and I achieve it using hybrid radio, may I get OTA updates? I read that in order to get OTA your radio should be stock too..

I don't mind updating my phone next time using your procedure (even though I did factory reset) but is there any guide how to update using OTA when you are not completely on stock?

Thanks again!
[Nexus 4 General] efrant:
Most OTA updates will check the radio as well, so you would need to flash the proper radio.

In order to update using an OTA update file, you need to be completely stock (i.e., stock system and stock boot, and sometimes stock radio). There is no way to update via OTA unless you have these (unless you want to edit the OTA update file, but that is a lesson for another day). Thus, the easiest way to update if you are not stock is to just flash the updated system, boot and radio images via fastboot.
[Nexus 4 General] Goldenmeadow:
Thanks! I'm fine with such method. Just hope to learn something new another day.

PS. Just read post from your signature (WHAT MATTERS IS UNDERSTANDING THE JOURNEY...) - it's so true!!!