yashsingh1/xdaforums huggingface dataset:
[Nexus 4 General] silvagroup:
All that time ended up being a usb port problem. Some how my usb extender was not totally working, anyway got stock flashed but using flash-all.sh have couple other N4 need to update now that I know problem will try what I originally wanted to do.

Thanks again. Happy New Year all.
[Nexus 4 General] Fubs261:
I'm new to the android modding scene, in fact I have almost no experience. I'll provide some background on my situation. I had a friend root my phone and flash paranoid android on my Nexus 4 because I had no idea how to do it and I wanted longer battery life. My friend had already done this and I trusted him to do it for me. Long story short, we eventually had issues that caused us to no longer speak to each and our friendship ended.

I had figured out how to update my ROM of Paranoid Android until recently, the latest version was released and I decided to update it to get it out of the way. However, the update failed due to it saying there was no context or something and my phone was stuck in a boot cycle (I assume?). It kept showing the Google logo then back to a black screen and then Google again.

I decided to return my phone back to stock and redo everything on my own and learning as I go so I actually understood what I was doing to my phone. I followed all the instructions in here to the letter except the optional step number 10 under section D. When my phone started up I was met with the message "System UIDs Inconsistent UIDs on the system are inconsistent, you need to wipe your data partition". I then went and redid the process and didn't skip step number 10. Now I don't have the message anymore but I still have a problem.

When I connect my phone to my computer to put files onto my phone such as music, there are no options to open a folder for my phone. The autoplay pops up but there's not options in there and the Nexus 4 is not listed under "My Computer". I was wondering if I were to delete the drivers from the device manager, would this fix it? If for some reason, in the future, i wanted to return to stock again, would I have to re-install those drivers provided in the guide again?

I wasn't sure if this guide would unroot my phone and it seems it has. Because I wanted to do everything on my own and learn how to and what exactly I am doing to my phone, I decided to follow the rooting instructions provided in this guide. I had entered the command to flash the custom recovery image however my phone has been on the Google window for over 15 minutes now. I was wondering if anyone could tell me how long the waiting usually is? Or if there is something wrong, could someone help explain what I need to do now?

Would following this guide make my device suitable to be sent back to Google for repairs if needed or would I have to follow the steps in the second post? If I follow the steps in the second post, do I do it after the steps in the first post? Or are they separate and it would be one or the other?

I apologize if any of the information I'm looking for could easily be found elsewhere.
[Nexus 4 General] efrant:
Yes, that's likely an issue with your drivers on your PC, and not your phone.

Probably. Make sure you restart your PC before you plug your phone back in.

If you want to flash the stock images again, then yes.

15 minutes is too long. Try again.

Follow the steps in the first post (except for the root part). The second post is separate and should really only be used if your USB port is defective.
[Nexus 4 General] Fubs261:
Thanks for the quick reply!

I'm trying to install Team Win Recovery Project because I am familiar using it, but the instructions seem to imply that the phone should already be rooted and to install it via GooManager. I went to their actual website and tried all 3 of their .img files (openrecovery-twrp-2.2.0-blaze.img, openrecovery-twrp-2.2.2.1-blaze.img, and openrecovery-twrp-2.6.3.0-t6vzw.img). I've had the same results with all three of them, my phone is getting stuck on the "Google" start window. I've followed the instructions to the letter (but I'm not sure if my bootloader is z20i so I haven't used that command). I've tried multiple times with the same .img files and they all get stuck on the Google start up window.

I was wondering if it's the .img files that I'm trying because I had to go digging through their site and it was not obviously labeled. If that's the case, where would I be able to find a proper image file for the custom recovery?
[Nexus 4 General] arffrhn:
Click on my signature and go to the last page. Someone had posted the mirror link for 2.6.3.3. :)

Oh btw it is a flashable zip file. So unpack it and look for recovery.img
[Nexus 4 General] efrant:
1. You are downloading TWRP images that are not for the N4. The N4 is "mako", not "blaze".

2. You cannot install TWRP via Goo Manager without root. Use the instructions in the first post, part E. (If you want TWRP to be flashed, change the command in part E to fastboot flash recovery customrecovery.img).
[Nexus 4 General] Fubs261:
Thanks to the both of you! I got it work and now I'm rooted. I apologize for my rookie mistake, I'm still not used to the different names/phrases being linked to a phone version, I always think that they're version names or the alias of the person who made the specific update. Other than my hiccups with the UIDs and my failure to realize I was trying to install the wrong version of TWRP, this guide was excellent!
[Nexus 4 General] ahsan007:
Nexus 4

http://xdaforums.com/showthread.php?p=48922512#post48922512

PLZ HELP ME ..............
[Nexus 4 General] Tartarus1:
I need to return my phone to stock for warranty purposes as my USB port is broken, but the link to the odexed ROM in the OP seems to be broken. Would anyone happen to have a mirror? Would be much appreciated.
[Nexus 4 General] efrant:
There are many stock ROMs in the dev section. Try using the "ota ready" version of this: http://xdaforums.com/showthread.php?p=48398523
[Nexus 4 General] IceKreem:
Could flash nexus factory image and remember to lock the bootloader ;)
[Nexus 4 General] silvagroup:
Thanks for the post.

Was using PAC 4.2.2 and Franco kernel 178.

Now on 4.4.2.

Downloaded OTA unzipped files.

Get into fastboot then

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

fastboot reboot-bootloader

fastboot flash system system.img

fastboot flash boot boot.img

fastboot format cache

fastboot reboot

As mentioned in op post didn't flah user.img, but also left my recovery intact did'nt flah stock recovery. Don't care if I get updates can do myself now.

Had to reboot couple opf times after having to change few program permissions and some setting to fix some small problems but so far everything appears to be working fine.

Update:

also had to do "adb shell am start -n com.google.android.setupwizard/.SetupWizardTestActivity" as posted in ealier thread to resolve syncing problem.

Thanks again what a time saver !!!!
[Nexus 4 General] Drmol:
He probably couldn't since his (micro?)USB port is broken, lol. :D
[Nexus 4 General] w1ndhawk:
Hi,

Can someone tell me if this method will clear Nandroid backups that maybe stored in the phone?

Thanks a lot.

:)
[Nexus 4 General] IceKreem:
This will wipe the whole device including including all data on the phone as your gonna flash the user data.img :)
[Nexus 4 General] fkloznica:
can i flash 4.4.2 on nexus 5 using your steps from the first post ? thanks
[Nexus 4 General] chrone:
http://xdaforums.com/showthread.php?t=2507905

[GUIDE] Nexus 5 - How to Unlock Bootloader, Install Custom Recovery and Root

There's another cache.img needs to be flashed as I recall.

Sent from my Nexus 4
[Nexus 4 General] Natakranta:
What's the story with cache.img ? I never flashed it as it was not mentioned in instructions on OP. Is it empty so that formatting cache partition equals to flashing cache.img ? Could somebody knowledgeable flash some light on it?
[Nexus 4 General] IceKreem:
The cache.IMG is the same as the command fastboot erase cache.
[Nexus 4 General] efrant:
Yes, but as chrone mentioned, you may have to flash the cache.img file instead of formatting cache.
[Nexus 4 General] aminntm:
problems getting back to stock

i have some problems in section (C) which im still not clear of how you put all the files in one directory. the files needed are the occam 4.4, and the attachments.. right ? is there anything else ? sorry im new here -,-"
[Nexus 4 General] silvagroup:
Yes occsm file you downloaded, extracted and unzipped and when in terminal make sure your in the same directory as extracted files then it's a simple fastboot flash "whatever".
[Nexus 4 General] arffrhn:
Well the only file you need from sdk for adb is platform-tools. Once you extract that platform-tools, just copy it and paste in the root of your C drive. And what does put all files in one directory is to put them (well to be easier) in that platform-tools in your C drive.

See this here how it supposed to look like.
[Nexus 4 General] Natakranta:
What's then the difference in Nexus 5 between:

fastboot flash cache cache.img and

fastboot format cache ?

Last time I was fastboot flashing 4.4.2 factory image to my N5 I formatted cache and I had some hiccups with losing half of storage. I had to go through the process twice to make it work as it should with some factory resets in between.
[Nexus 4 General] IceKreem:
You shouldn't have lost your storage are you sure you didn't type or flash the userdata?
[Nexus 4 General] Natakranta:
I'm sure I flashed right images to right partitions. It wasn't first time I was doing it. I was performing the same procedure few times for Galaxy Nexus, for Nexus 4 and recently for Nexus 5. It happened to me once on Nexus 4 as well. I had to do factory reset and/or fastboot reflash all factory images again. Both Nexus 4 and 5 have designated threads for people who had 16GB storage instead of 32GB after flashing Google factory images (or 8GB instead of 16GB in case of N4). Maybe it's LG thing, because it never happened to me on Galaxy Nexus.
[Nexus 4 General] IceKreem:
Oh you mean that it said you that the phone said a differently completely storage. Oh I have had that before and follow this guide its for the nexus 4 but works all the same apart from getting the right images :p

http://xdaforums.com/showthread.php?t=2033692
[Nexus 4 General] Natakranta:
Yes, that's what I meant, that settings storage was showing only half of available storage, like Nexus 4 suddenly downgraded from 16GB version to 8GB one :eek:

Of course I was using El Daddy's tutorial :good:
[Nexus 4 General] richie16171:
I got second hand nexus 4 having boot loop with 4 circles and thought it is easy to solve by flashing stock. I followed your every step and without any errors I flashed (did this twice)...by no joy. I still with the boot loop with not ending 4 circles. Then tried tool kit.. everything I did was without errors and still I cant through with the boot loop. If anyone can help me with any certain experience overcome. Even if anyone can put light on hardware side.. I cant send this one for warranty claim to google. Anyone's help would be greatly appreciated.
[Nexus 4 General] IceKreem:
Get into fastboot and recovery mode. Then hold power and vol + factory reset
[Nexus 4 General] richie16171:
I did everything on this post...It is mention in the post to wipe factory reset. Thank you
[Nexus 4 General] IceKreem:
So its working now?
[Nexus 4 General] richie16171:
No .., same result
[Nexus 4 General] IceKreem:
Stupid as it sounds but did you wait like a couple of mins? First boot after factory reset always takes a while.
[Nexus 4 General] richie16171:
Yes .., I waited 20 minutes.., that also not once 3-4 times.., also flashed 3 times stock already. Don't know why it wont boot. My phone communicates with the computer and fastboot also confirms connection..., flashing happens like should be... but end result is 4 circles endless.
[Nexus 4 General] IceKreem:
When you got it second hand did it work?
[Nexus 4 General] richie16171:
No..,I flashed many Samsung devices with Odine easily.., thought this is also easy and bought it... the flashing with the command prompt goes easily... but phone dont co operates... any brave hearts please help me.
[Nexus 4 General] CatsAreGods:
http://xdaforums.com/showthread.php?t=2347060

Try that thread.
[Nexus 4 General] tinytim888:
big thanks - worked for me

efrant, big thanks. i was stuck in recovery with no access to sdcard (nexus 4), and was in a boot loop.

followed your instructions - worked first time - have my phone back! :D

bookmarking this one
[Nexus 4 General] FPSAUS4EVER:
Dont Worry I Fixed IT :)
[Nexus 4 General] richie16171:
Thank you so much.., I will give it a try...In the mean time I got this thread http://xdaforums.com/showthread.php?p=49570274 and according to them it is the radio problem...And after struggling so much I just flashed 4.2.2. and I got through. But I cant flash 4.4 or 4.4.2. Any Idea?
[Nexus 4 General] soulsberry:
Thank you so much! You saved my life! : )
[Nexus 4 General] sordna:
For many people 4.3 is better than KitKat. Kitkat broke so many things like textwrap, flash, GPS aqcuisition icon, services get killed when clearing recents, vpn, etc so perhaps you can leave the phone in jelly bean. You should be very happy you were able to get a broken & bricked second hand phone up and running!
[Nexus 4 General] richie16171:
Yes indeed I am very happy.., But you really think the Kit Kat is so Bad? Still a mystery why my particular phone cannot handle Kit Kat.. I hope you answered it.... my phone already knows that I will be in trouble if I flash Kit Kat:laugh::laugh::laugh:
[Nexus 4 General] FreshNClean:
I was following the instructions in the original post to root the phone but I noticed that the latest version of CWM recovery has the option to root.

So it would appear that I don't need to flash the SuperSU zip, I can just use the recovery itself.

Is that correct?
[Nexus 4 General] IceKreem:
No you still need it I believe it's when you forget to flash root after flashing a ROM. If my memory serves me right.
[Nexus 4 General] FreshNClean:
Great thanks! The zip was needed but everything went smoothly and I'm now rooted.

I just have one more question. Can I still get OTA updates or will they screw things up or remove root?
[Nexus 4 General] IceKreem:
You can get it but I don't think you can install it but not sure. I think it breaks root but don't quote me on it :p
[Nexus 4 General] sordna:
Well, it's not bad, but it broke some things that are dealbreakers for some. I updated to KitKat and some of the new features (like the transparent bars and immersive mode) are cool, but browser text wrap which was present in Jelly Bean is a rather more important feature and they broke it knowingly in KitKat. Look at the bug report, the user comments, and how google closed it:

http://code.google.com/p/android/issues/detail?id=62378

Flash is broken as well, unless you use Dolphin and a special hacked flashplayer.

Anyway, use the phone for a few weeks, and you can always try to update to KitKat again later, maybe when 4.4.3 or whatever comes out.
[Nexus 4 General] richie16171:
I did not realized it earlier.., for flash there is a way out I know.., But you are right...Thank you for sharing.
[Nexus 4 General] doragasu:
I had a hardware problem with the volume down button, and I have to return my rooted N4 to Google. Do I have to follow the tutorial to return to stock? Or just unrooting (using the unroot option in SuperSU) and issuing a fastboot oem lock is enough?

I was trying to follow the steps to return to stock, but unfortunately, the download link of the odexed version of JDQ39 is down, so if following these steps is a must, I have a problem here.
[Nexus 4 General] arffrhn:
If you are still using everything stock with only root, then just unroot and lock bootloader is enough. If you are on custom rom/kernel/recovery, then it's better to go back fully stock. Better safe than sorry. :)
[Nexus 4 General] doragasu:
Everything is stock excepting CWM recovery. I only unlocked the bootloader, and flashed CWM to be able to root the phone, but everything else is plain stock.

If I just flash Google's KOT49H 4.4.2 Factory Image and then fastboot oem lock, it should also be OK for returning it to Google, right?

EDIT: I'm doing it right now BTW...
[Nexus 4 General] arffrhn:
Yeah it should be alright. :)
[Nexus 4 General] doragasu:
OK, thanks. I have already done so.
[Nexus 4 General] phillick:
I know you already did it, but just a heads up for everyone.

The Nexus 4 and Nexus 5 devices also keep a tamper flag that it's changed to True when you fastboot oem unlock. A way to reset the flag is the BootUnlocker app here:

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

Hope they don't catch it dude!
[Nexus 4 General] undiscoverednum666:
plz help

So I followed all the instructions and everything seemed to work but I am experiencing the problem where I cannot get past the x. I tried to boot into recovery, but recovery mode is not available. When I hold the power button and press volume-up at the android with a red triangle the screen turns off, a red LED flashes a few times, and then a charging animation comes up. I am currently trying this with 4.3 after experiencing the same problem with 4.4.2

Help would be very much appreciated, thank you.
[Nexus 4 General] IceKreem:
Close but yet so far. When you get into recovery mode it is power then suddenly hit vol +. You shouldn't be holding it down that's why the lights blinks and then data factory reset :)
[Nexus 4 General] efrant:
That's a good question -- I'm not entirely sure. The factory image for the N5 was the first time (I believe) Google included a cache.img file. Not sure what is in it, as I haven't tried looking.

In the end though, I think that we should skip flashing the userdata and cache images. Skipping the userdata image should eliminate all of the issues with losing half the storage.
[Nexus 4 General] Natakranta:
Thanks for reply! Much appreciated.

I'm sure I saw cache.img on Nexus 4 and I think it was as well on GNex. Maybe it appeared on later android version factory image packages. I have no way to check it at the moment.

So instead of fastboot flashing userdata.img at the end of the process just reboot to stock recovery and do a factory reset. It will clear userdata and cache. Am I right?
[Nexus 4 General] efrant:
Yup that would work.

When I have a chance, I'll revise the first post, but generally, to return to stock:

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

fastboot reboot

Or, as you said, skip the last three commands, reboot into recovery and do a factory reset.
[Nexus 4 General] Natakranta:
Thanks for your reply. I see you made a copy/paste error in third line. We don't want somebody to flash radio to bootloader partition.

Too fast too furious ;)

Even though I know these commands by heart now, I always open your tutorial in background to feel safe :good:
[Nexus 4 General] efrant:
Ooops. Good catch, thanks!
[Nexus 4 General] jake duh cake:
Um, I followed the guide but my n4 still gets stuck to the damn bootloop screen.
[Nexus 4 General] whitedragonz83:
Is "customrecovery.img" a recovery partition or actually the userdata partition? The naming indicates you are flashing the wrong file for the userdata.
[Nexus 4 General] jake duh cake:
It's the userdata partition.

"10) Optional, but read note. Flash the data partition: fastboot flash userdata userdata.img Note: this command will wipe your device (including /sdcard), EVEN if your bootloader is already unlocked. See note 2 below."

"2) Rename the file to customrecovery.img, and make sure it is in the same directory as your fastboot.exe file; "
[Nexus 4 General] arffrhn:
Uhh, userdata is the storage partition. Customrecovery.img will only overwrite recovery partition.

Btw note no 2 is this one,

2) There has been a lot of uncertainty and questions around stock ROMs and losing/wiping data. You CAN flash a stock ROM WITHOUT losing the data stored in /sdcard (and possibly even all apps and app data, although this depends on which apps you have installed). This can be done by skipping step 10 in part D. However, if your device goes into a boot loop, you will need to boot CWM, and wipe data

Edit: Although, it seems that you renamed userdata file to customrecovery. So it wouldn't be a problem. Have you tried factory reset after flashing factory images?
[Nexus 4 General] jake duh cake:
Oops, you're right. And yes, I renamed the userdata file to customrecovery.

So after doing all that I need to factory reset?
[Nexus 4 General] arffrhn:
Not really but sometimes necessary. Like in your case, try with factory reset. :)

Sent from a battery powered device
[Nexus 4 General] jake duh cake:
The phone won't go into recovery mode. I get that android with the red triangle. From there I did the 'Volume Up + Power' thing and selected factory reset. Still stuck in the bootloop.
[Nexus 4 General] arffrhn:
Hmm..if you can enter recovery, try pushing any rom using sideload. There have been cases where nexus 4 can't boot into 4.4 but works flawlessly on 4.2.2 and it still remains a mystery. If I were you, I would try redownload the factory images and try again and if it still doesn't boot, I would try sideload.

Sent from a battery powered device
[Nexus 4 General] Quest_in:
After being stuck on the boot animation for a while and having tried pretty much everything suggested, I followed your advice and flashed a cm 10.1.1 (ancient, I know) and voila, it actually booted and everything. None of the radios worked but it was progress. So then I decided to try and flash the updated version to 4.4 ....and back in the boot animation again. Once i get the radios working, will an updated rom do anything different than flashing the update fresh?

Update: Flashed the stock image for 4.2.2 and the cellphone radio does not work. Fastbooted the radio seperately as well. Actually, interestingly, the phone behaves the same in the presence or absence of sim card now. Could a hardware issue be the underlying cause?
[Nexus 4 General] arffrhn:
What do you mean behaves the same with or without sim card? Check in your setting/about phone/see if you still have baseband and imei.

Sent from a battery powered device
[Nexus 4 General] Quest_in:
Oh!. No. IMEI :unknown. Baseband : Unknown

Thanks for bringing this up. Is there a fix for this?

I read that installing CWM recovery helps fix it, though I'm not sure how. Suggestions?
[Nexus 4 General] chrone:
You might try to reflash the radio, system, and boot images. I did once and succeed. :)

Sent from my Nexus 5
[Nexus 4 General] arffrhn:
I am not sure myself. Let's wait for others suggestions. Sorry mate. :(

Sent from a battery powered device
[Nexus 4 General] howard bamber:
No there is not. Happened to me with a Samsung nexus. I got a lot of people thinking I was up to something shady, asking for info on putting imei numbers on a handset, even though it was genuine. I looked all over. Sorry about your experience. I've been there. Still have the dumb thing

Sent using reversed alien technology...[COLOR="Black "]
[Nexus 4 General] juadagu:
Mod edit: quote of the OP removed.

Please do not quote the entire first post.

Followed steps to the letter, and now I'm a happy owner of a Nexus 4 with Kit Kat!!

I skipped step 10 about flashing user partition, and everything seems to be working fine. I will post updates in case anything goes wrong.

I really thank you for this post! Incredibly easy to understand and follow, Congratulations! :good:
[Nexus 4 General] ticoombs:
Saved me heaps of time, great tutorial mate!
[Nexus 4 General] MosesTheTool:
Thank you for the great assistance,
[Nexus 4 General] Cluelius:
Hey guys Im a bit stuck. I am running stock Android 4.4.2 and I am trying to downgrade to stock 4.2.2. My phone is rooted and running a custom recovery (CWM). Do I need to follow all the steps in this how to and if not, which ones?
[Nexus 4 General] arffrhn:
Follow flash factory image steps. :)