yashsingh1/xdaforums huggingface dataset:
[Nexus 4 General] nfh:
Can you guys please help me?

My N4 is rooted, with unlocked bootloader and with a custom recovery (CWM).

I just updated my Nexus to JWR66Y from JDQ39 and everything went ok (I was able to boot). After that I tried to update to KK_KRT16S from JWR66Y and this is where my problems started.

I got some sort of error (which I don't remember now) that I think was related to the CWM version that I had installed. I flashed my N4 with the latest Touch CWM and installed the KK update again and this time I got no error at all.

Unfortunately my phone is stuck on that boot animation with the 4 coloured circles jumping around and merging.

What can I do that will not erase any of my data? Or, as a last resort, how can I solve it even if I loose everything that I had on my phone?

EDIT: I believe that the error I got the first time I tried to upgrade to KK was "nexus 4 set_metadata recursive some changes failed"
[Nexus 4 General] spicediablo:
If you had make a backup, you can try factory reset and see if it works..
[Nexus 4 General] nfh:
Unfortunately I only have a partial backup, because as I only have about 3GB of free data, it can't hold a complete Nandroid backup.

Is there any hope for this, or should I consider my data as lost?

BTW, is there any way to flash a stock ROM (which is available on Google's website) and keep my data?
[Nexus 4 General] efrant:
Have you read the first post in its entirety?
[Nexus 4 General] nfh:
I did read, but as I am kind of in panic mode, I might have skipped some critical info (I only remember reading that a stock ROM would clear all my data) :) .

I'll check it out again.
[Nexus 4 General] spicediablo:
There is,you can flash the factory image but do not flash the user image. it might just work.
[Nexus 4 General] nfh:
I did manage to get through the bootloop by flashing the boot.img and system.img files from the stock ROM file, so I couldn't be more glad :).

Nonetheless, I got some other strange effects on my KK installation. The Home button didn't work at all, the left area on the notification bar wouldn't appear at all, settings shortcuts on the notification area were unavailable as well and Airplane mode + Silent+Vibration+Sound options that appear when you long press the power button were also missing.

In order to solve this I had to run the following adb command:

adb shell am start -n com.google.android.setupwizard/.SetupWizardTestActivity

After entering my complete name and connecting to one available wifi network, I was all set up.

Oh, one final remark: Titanium Backup also complained about my Android ID being changed. I am not sure if this happened during the upgrade (while using OTA files) or when I flashed my N4 with the stock ROM image. Anyway, I restored my previous ID with Titanium and everything seems to be working ok.

I'll keep a watch on my battery level, as I also read some rumors about battery drains after installing KK.
[Nexus 4 General] jpborjav:
So im a desperate guy asking for help. Like 2 days ago my nexus 4 was on 4.4 on ran out of battery so i charged and in the morning i went to turn it on.

It couldnt pass the boot animation, so i started reading and first i used the wug's toolkit to flask stock KRT16S. It didnt work, then i tried KRT16O, JWR66V and same result.

And I found this thread, I followed the instructions step by step. I downloaded KRT16S and JWR66Y from google's site. Same result, I did enter recovery after every flash and wipe data/factory reset and clear cache. I even try other builds from the other site linked in this thread.

Nothing have worked for me so far! I am out of ideas. Please help, I can even make a donation if there is a solution.
[Nexus 4 General] efrant:
Reboot into the bootloader, plug into PC, open a command prompt where you have fastboot.exe and type: fastboot format cache
[Nexus 4 General] jpborjav:
Done that already. :(
[Nexus 4 General] Natakranta:
First switch panic mode to picnic mode ;)

As long as you can enter bootloader on your N4 and perform fastboot commands from your PC you are good.

From what I read you might have been overzealous. You don't need to go from bootloader to recovery to clear data/cache after every single fastboot flash command you perform on your PC. Just follow the instructions from the OP precisely.

Are you sure your fastboot flash commends actually flashed the img files to proper positions?

Is the fastboot command working at all on your PC?

What happens when you type

fastboot devices

On cmd window on your PC?

Are you using original USB cable?

Try different USB ports on your PC.
[Nexus 4 General] jpborjav:
When doing "fastboot devices" i get the id of the cell phone or whatever that is. During the process i dont get any error, all steps are finished with no problems. And cause of that i dont think it is the usb cable or port.

Also what i do after the flashing and getting stuck on the boot animation, i go to recovery, wipe data and cache, not everytime just like the note on this guide suggest.
[Nexus 4 General] efrant:
Try flashing the images again using these commands (replacing bootloader.img and modem.img with the names of the bootloader and radio images that you are trying to flash of course):

fastboot flash bootloader bootloader.img
fastboot reboot-bootloader
fastboot flash radio radio.img
fastboot reboot-bootloader
fastboot flash boot boot.img
fastboot flash system system.img
fastboot flash recovery recovery.img
fastboot format userdata
fastboot format cache

Unplug from your computer, and select "Start" from the bootloader menu. Wait for 5 minutes to see if it boots.
[Nexus 4 General] Natakranta:
Hmmm. Strange. Usually fastboot format cache solves the problem with bootloop after flashing factory images, but you wrote you had done it and it hadn't helped. Only thing which comes to my mind is that you had a bad flash for one or more of the partitions. I'd download latest factory image again and check md5 on it. For Occam 4.4 KRT16S it should be:

e60c3077c9bc9bd106eb3077992f0d6c

And fastboot flash as per commands above.

Edit: ninja'd by efrant, again :)
[Nexus 4 General] jpborjav:
Ima try again but i dont have my hope in a high ground. I should try this after work. I will post the results.

Do you recommend flashing KRT16S or JWR66Y ?
[Nexus 4 General] :
I ran into a problem. I did step 'D', step by step. The only thing I changed, was I installed CWM touch recovery instead of the stock recovery. Now I am stuck at the X & I can't get into the bootloader. I hold the power button down & it just boots to the X. I hold the power button + volume down, same thing. Power + vol up, same thing... I wish I could do a battery pull!

Any help would be appreciated. Thanks.

(also, this isn't my first rodeo. I've had several Androids & the GNex & have used fastboot many times. This just stumps me tho)

EDIT: FALSE ALARM! Sorry about that! I finally held down power + vol down for about 30 seconds. While the phone was off & I continued to hold the buttons (it stayed off because I was still holding the buttons down, otherwise it would have rebooted again), I plugged the usb cable cable into my laptop. I got a red l.e.d. light on the phone & windows said it was an unknown device & installed a usb storage driver. Then I let the buttons go & the phone stayed off. Finally got to boot into the bootloader.

Lets give this another shot. This time no deviations...
[Nexus 4 General] Barnyx81:
thx
[Nexus 4 General] Zurginator:
None of these work anymore.... anyone got a working link to stock?
[Nexus 4 General] El Daddy:
http://www.randomphantasmagoria.com/firmware/nexus-4/occam/

Sent from my Nexus 4
[Nexus 4 General] efrant:
Did you read step C3? It has the link that El Daddy posted...
[Nexus 4 General] Doggonit:
So let me get this straight: If I am using a Mac I follow the same instructions except that I don't need to download and install any drivers, right?

And also: If I follow the instructions, I will get OTA updates and will be able to install them, right?
[Nexus 4 General] efrant:
Correct. (And you need to put ./ before every fastboot command.)

Correct, assuming you don't skip any steps in part D.
[Nexus 4 General] Jess813:
Can we flash a stock ROM to go back to stock if we're rooted?
[Nexus 4 General] efrant:
The procedure outlined in the first post completely overwrites everything on your device. It doesn't matter what you had on there before.
[Nexus 4 General] Jess813:
What I mean is there a zip ROM that we can flash on our phones without a computer to go back to stock ..?
[Nexus 4 General] efrant:
I haven't made one up, no. Not sure if there is one floating around XDA or not.
[Nexus 4 General] Jess813:
Would you be able to put 1 together? That would be awesome! I know it can be done just need someone talented enough to do so.
[Nexus 4 General] undercover:
On htc you can flash everything from bootloader, just need to chuck all the IMG files into PGxxIMG.ZIP where xx is device ID. Should be possible to do something similar here as well I guess.
[Nexus 4 General] Jess813:
you could also do this Samsung forums
[Nexus 4 General] efrant:
I've put something together quickly here. I've just tar'd up the stock JOP40C ROM and included the stock boot image, and packaged it up to be flashable in recovery. You will likely have to wipe data (and maybe even do a factory reset) if you end up with a bootloop, so have a nandroid backup handy. I'm not responsible if you lose any data.

Yeah, that was convenient, but unfortunately it is HTC-specific.
[Nexus 4 General] citizenkaine:
Possibly Messed Up

So I just ran into a problem today. I've had my 16gb less than a week. Day one I followed these instructions to do an upgrade to 4.2.1 and unlock/root the phone. Today I noticed my device shows only 5.6GB of space. Also the serial number does not match the one on the box the phone came in. Is there any possibility that this process overwrote the serial number? Or did Google ship me a dud in the wrong box? Ideas anyone?

Edit:

Re downloading the 4.2.0 system image and using the included flash-all.bat fixed space issue. Serial still doesn't match box sticker, while IMEI does. Very puzzling, and possibly something for other people to watch out for.

Edit 2:

And didn't even realize this is covered in OP. Didn't read as thoroughly as I thought. Must have been too excited to finally get the phone. :)
[Nexus 4 General] El Daddy:
The serial number on the box is different from the one in settings. The one is settings in the CSSN and the one on the box is the SSN. It's normal.
[Nexus 4 General] erikieperikie:
Great guide! I've done some stuff on my Desire, so I know a little. I still consider myself a n00b, though. I'll be using this guide when I get my Nexus 4, if ever. ;) Still waiting for the second order batch in Spain............

Some n00bs like the toolkits though:

Maybe someone (not me, I'm not qualified) should make a t00lkit4n00bs that doesn't just do the tricks, but is an interactive YouTube video instead. It tells n00bs what th3y are doing, step by step (like this guide), but it also shows how to do it and what th3y see. Everytime a step is taken, the n00b has to click on a link in the video based on what th31r phone does. That way, it would be possible to capture many (if not all) the possible outcomes of the right or wrong button presses, errors half-way through, etc. Every time the appropriate link in the video is clicked, the n00b will get to a video with the next steps to take to bring the n00b's phone a step closer to being unlocked/rooted/whatever, but actually while learning about the different steps and what they do.

The advantage would be that the video could be more n00b tailored and therefore give better/more exact instructions and information. Example: in the beginning the n00b selects what operating system will be used. All the following video's requiring PC/Mac/... actions will have OS specific instructions. Another advantage would be that it will become less probable that an instruction is misinterpreted. If a n00b sees how it's done and how not to do things, it's a question of copying while learning about Android, without screwing up the phone.

The downside is the creation of such a video guide.

If such a project would eventually exist, it could even be adapted for usage with different phone types... (Am I being too ambitious? Certainly, but it wouldn't be impossible if you think about it).

Anyone interested in a ground-breaking project? ;)
[Nexus 4 General] zim2dive:
N00bish question....

how does flashing the various imgs compare to an OTA update... ie. the OTA updates are nice b/c they do NOT seem to wipe any user data.. its a nice painless update.. nothing to restore. Is that essentially the same as skipping step D10 in the OP? (ie. not flashing userdata.img)

thanks,

Mike
[Nexus 4 General] efrant:
An OTA update is not a full ROM. It patches certain files to update your existing build to the the new build. Flashing the full images just replaces what you have with the new build.

Skipping step D10 will keep all of your data and, assuming you are coming from a stock ROM, it should work just fine. So, in effect, it will end up being the same as an OTA update, although the process to get there will be different.
[Nexus 4 General] Natakranta:
Personally I'd flash 4.4 straight away so I don't have to bother with OTA letter on, but I don't have any experience with KitKat on Nexus 4, I sold mine before it got OTA and before 4.4 factory images were available as I managed to put my hands on Nexus 5 few days after it was available :)

Other thing which came to my mind is that you could try get new fastboot.exe file. I read once that someone had problem with flashing images and it helped when he got updated SDK with new fastboot.exe but you said that flashes went fine.
[Nexus 4 General] jpborjav:
Well i have the latest fastboot.exe according to this post.
[Nexus 4 General] __GOLD_:
I use this thread and perfect explanation...

I can Have OTA without clear my phone.

But I have a question how I install a custom recovery? I can go there by the comands but after I lost custom recovery.

I can't instal to receive or install the OTA's only after?

What is the comand?

Thanks for your excelent post now I'm feeling an expert ;)
[Nexus 4 General] efrant:
Download the recovery you want, rename it to customrecovery.img, reboot your device into the bootloader and plug into your computer. Then type: fastboot flash recovery customrecovery.img

You can install it before or after the update, it doesn't matter.
[Nexus 4 General] queerquirks:
Is there 4.4.1 stock kernel available
[Nexus 4 General] efrant:
I never bothered to dump it from my device before I updated to 4.4.2. I think I read someone saying that franco has a repository of stock kernels in his kernel threads. Why do you want it?
[Nexus 4 General] jpborjav:
SO It didnt work, i tried this process with 4.3 and 4.4 factory builds downloaded straight from google's servers.

What else i can do, do i start to panic?
[Nexus 4 General] jpborjav:
Efrant suggestion didnt work and the fastboot.exe is the last one.
[Nexus 4 General] Natakranta:
Sorry, I'm out of ideas.

I was following this process on Galaxy Nexus, Nexus 4 and 5. I have never had any problems.

Did you try to fastboot flash recovery customrecovery.img (eg. CWM) and use it to flash any custom ROM on it just to see if it boots?
[Nexus 4 General] jpborjav:
No, i will try it out today. Thanks tho.
[Nexus 4 General] fathocker:
So what you are saying is, that i can flash a custom recovery after i received 4.4.2 (yes, my bootloader is unlocked) and then get ROOT with the newly installed CWM in 4.4.2 - all without losing my data? Would be wonderful!
[Nexus 4 General] efrant:
Yes.

(The things that wipe your data are: 1) unlocking the bootloader, 2) flashing the userdata.img, or 3) wiping. Root or flashing a recovery or any other image does not wipe anything.)
[Nexus 4 General] fathocker:
thank you for your detailed answer, I really appreciate it ;)
[Nexus 4 General] a g bell:
Anyone know where l can DL z20 bootloader from?
[Nexus 4 General] angel_pineiro50:
I love you Thanks for your hel.

I got my cell back thaaaaaaaaankkkkkkkkkkssssssssssssssssssssss. I am more happy than a dog with 3 tails.
[Nexus 4 General] efrant:
From the bootloader thread.
[Nexus 4 General] CloudyPear:
Cheers for this thread mate! :good:
[Nexus 4 General] Jase07:
downgrade

Hi, i have been following your guide to upgrade to 4.4.2. but i am thinking of going back to 4.3.

Do i just do the same steps with the 4.3 images?
[Nexus 4 General] howard bamber:
That's what I'd have done

Sent by reversed alian technology.
[Nexus 4 General] efrant:
Yes. Don't flash the userdata image (i.e., skip step D10), and your data will still be there.
[Nexus 4 General] jpborjav:
So im back, i read someone with a similar problem flashed 4.2.2 and he passed the X logo. I flashed and passed too but now the radio is not working and sometimes things getting touch without anyone touching the screen. I formatted the userdata, cache bla bla bla. I even flasehd 4.3 and 4.4 and see if now I can pass the boot animation, but nothing. I flashed again 4.2.2 but with a more updated radio, but same radio is not working.

And only on 4.2.2 i can pass boot animation, also i keep getting random touches on things.
[Nexus 4 General] Jase07:
thanks efrant.

so i assume there is no special step like downgrade from 4.4.2 to 4.4 then to 4.3 right.
[Nexus 4 General] IceKreem:
As long as you have the nexus factory image you can go straight to 4.3 ;) Not sure why you would want to tho
[Nexus 4 General] D_RiDeRs:
4.4---->4.4.2 update on nexus 4

Hi,

I am on 4.4 & have downloaded OTA 4.4.2 zip file (52MB).

When I am booting phone using "adb reboot recovery" it shows android chest with "RED EXCLAMATION" screen. :confused:

Now volume down is not working at this screen, by which I can flash my zip file to update to 4.4.2. :rolleyes:

I am on android 4.4 with stock ROM, stock kernel & stock recovery.
[Nexus 4 General] faddyie:
go to stock recovery.

select adb side load option

connect device with computer

goto command prompt

type: adb sideload update. zip

make sure u copy the zip in your computer and change the name to update

that's it
[Nexus 4 General] D_RiDeRs:
"select adb side load option" :confused::silly:

From where to get this option???? In the android chest with red exclamation mark it doesn't show any option I mean the volume down key doesn't work at this point.

Rest all is ok.....

Please help..
[Nexus 4 General] faddyie:
At the red exclamation mark of press vol up + power button at the same time. I don't remember vol up or down exactly but try both which one works. Then you will see options
[Nexus 4 General] IceKreem:
It is vol up + power :)
[Nexus 4 General] sordna:
It's tricky, but in stock recovery this sequence works every time: hold power, hit vol up, then release power.
[Nexus 4 General] silvagroup:
Total noob stuff, after reading post several times trying this for my first time with using fastboot have used tools previously trying to learn the correct way now;

So I have custom recovery, I boot into recovery - Green Droid with door open says FASTBOOT MODE, LOCKED STATE -unlocked both in red, in Green have SECURE STATE - enabled and bunch of other product info in white.

"Fastboot devices" shows a device

"Fastboot " whatever other than devices does nothing

I am assuming (you know what happens when you assume) that if you are unlocked have a recovery and bootloader that you can just go to into fastboot mode and fastboot flash to your hearts content, looks like I am wrong but again just trying to leran the right way so please be gemtle:

Do I have to fastboot oem unlock even tough I am unlocked already?

If not why cant I fastboot flash anything?

Thanks in advance.
[Nexus 4 General] D_RiDeRs:
That worked!! ;):cyclops:

But when I selected "apply update from zip" it shows ADB device no found, though it is showing in normal mode. :(:rolleyes:
[Nexus 4 General] efrant:
What are you trying to flash? What does it do when you try to flash something?
[Nexus 4 General] Federico_96:
The tutorial is very clear, but i don't understand only a specific part. I'm on stock android 4.4.2 with unlocked bootloader, i would like to flash twrp recovery via fastboot, do i need to type "fastboot format cache" after typing "fastboot flash recovery twrp.img" ? Or "fastboot format cache" is needed only when i flash a whole factory image? Thanks in advance
[Nexus 4 General] nitin.chobhe:
[MENTION=5330130]Federico_96[/MENTION], no it is not required.
[Nexus 4 General] silvagroup:
Trying to flash 4.4.2 stock system, radio, and boot. When I enter flashboot boot boot.img or what ever does nothing. No errors just sits there.
[Nexus 4 General] IceKreem:
Its fastboot flash boot.IMG, boot is only temporary and that's for the recovery not bootloader.
[Nexus 4 General] whitedragonz83:
The command is:

fastboot flash boot boot.img

If boot.img is the name of the file in the fastboot directory.

And it is fastboot not flashboot.
[Nexus 4 General] silvagroup:
Sorry typo "fastboot flash boot boot.img" is what was entered.

For example I do fastboot reboot-bootloader, should reload boot loader, terminal shows - rebooting into bootloader... but nothing happens,

if I then go to device push power button then terminal shows - reboot-bootloaderFAILED (command write failed (Timer expired)

finished. total time: 145.645s.

Expected I suppose since I basically shutdown the device and of course time limit depends on how long before I push power button.

Thought boot.img was kernel, so if I want to go to stock will need to flash bootloeader, system and radio? Current rom PAC, kernel is franco 4.2.2 therefor the change.

Thank you all this is great.
[Nexus 4 General] silvagroup:
Well OK.

I am thinking that I must have to do a full system restore to stock and use stock recory to use fastboot to do any of this.

Doesn't appear that fastboot mode in custom recory (cwm) does anything in so caled fatboot mode.

Thoght might have been linux related, but same happening on Windows pc. Not my phone does same with other phone with defferent version cwm, so appears to me is the recovery itself.

So whats the need for a custom recovery then if I needstock to do any fastboot ?
[Nexus 4 General] efrant:
What recovery you have has nothing to do with fastboot. Please read the first post.
[Nexus 4 General] spicediablo:
This is strange. I flashed v1.86 supersu using cwm but upon reboot, there is no super su in my apps list. What am I doing wrong? I am on kot49h.
[Nexus 4 General] arffrhn:
Which version of cwm did you use? Use latest version.
[Nexus 4 General] spicediablo:
6.0.4.3. If I were to manually install su apps from play store, will it be a problem?
[Nexus 4 General] arffrhn:
Use 6.0.4.5 the latest. Search in the forum for it. Or use the latest twrp 2.6.3.3 also search in the forum. You can try to install from store but it may not installed properly and it won't be installed as system app.
[Nexus 4 General] spicediablo:
Yes. Now I can't see it from my app list in settings but I can see it in my apps drawer.... Gosh...

Digging further, the app is listed under all apps and not under downloaded...
[Nexus 4 General] arffrhn:
Lol..so nothing to worry then. It means it is installed as system app. Download root checker and see if root privilege is given. Then install busybox:thumbup::D
[Nexus 4 General] efrant:
This happens sometimes when you update SuperSU via the Play Store and then you update (a later update) via recovery.

The way to fix it is, once you update via recovery, reboot normally, go to Settings ==> Apps, and uninstall updates for SuperSU.
[Nexus 4 General] spicediablo:
I managed to install supersu but now it appears in my all apps instead of downloaded apps. Previously, it appears in downloaded...

Mako⁴
[Nexus 4 General] efrant:
If you install it via recovery, it becomes a system app, so it will show up in "all". If you subsequently update it via the play store, it will show up in "downloaded".

In any case, this discussion is off-topic for this thread. Please continue in the SuperSU thread, or in a Q&A thread.
[Nexus 4 General] spicediablo:
Now I understand. Thanks!

Mako⁴