yashsingh1/xdaforums huggingface dataset:
[Nexus 4 Android Development] cpom1:
Ok someone please help as im about to throw this phone and my computer out the window.

Not matter what I do adb commands will not work. Ive installed and reinstalled every nexus 4 driver i can find. im far from a noob. it has never taken me more than 15min to root a device and this has taken 3 hours.

I found out that fastboot works but not adb. I saw someone else post a similar issue here and did what they said. ive installed pdanet and still does not work. installed the toolkit and/or sdk and still no go.

please someone help. thanks.
[Nexus 4 Android Development] Stryder5:
Do you reboot after uninstalling drivers or after installing new ones?
[Nexus 4 Android Development] kptnk:
I haven't managed to make adb work too, but i haven't tried very long : just use fastboot, it does the job perfectly. You don't need adb really for now...
[Nexus 4 Android Development] volcs0:
1. I rooted without problem according to the OP (CWM)

2. I then got the OTA. But when I try to apply it, it counts down to reboot but then gets stuck.

It says "Rebooting." and just hangs there. I can cancel this, but it won't apply the update.

Apart from restoring and trying the OTA - or not applying the OTA, what other options do I have?

Thanks.
[Nexus 4 Android Development] kptnk:
As previously said, you have to get the OTA before rooting your phone, it is much easier that way. Unless you can still get the OTA after, but only if you keep the stock recovery, and even in that case, i'm not sure it will work ....
[Nexus 4 Android Development] marty331:
Thanks HQRaja, I just rooted using the insecure boot method. All went perfect.
[Nexus 4 Android Development] volcs0:
Thanks. Yes - I've kept up with the forum, and I saw advice to do the OTA first, and I saw others asking if it would work after. If there was a definitive "no," then I missed it. But thank you for clearing it up.

I had thought the point of staying with stock ROM (which I plan on doing) was so be eligible for OTA updates, even it it meant rooting again. So, I was hopeful it wouldn't matter.

At this point, I'll probably just have to wait until someone builds 4.2.1 stock.

Thanks again.
[Nexus 4 Android Development] P00t:
im so freakin ready to root my phone. i just got it but i dont have the time for it!

DAMN!
[Nexus 4 Android Development] jimmyz:
As long as you have the stock recovery and haven't modified any stock components the OTA should work. You will lose root and have to reflash a custom recovery. Make sure busy box was installed in xbin
[Nexus 4 Android Development] plbelanger:
Worked great, thanks
[Nexus 4 Android Development] Stryder5:
I rooted before installing the OTA. Didn't have any problems. You just lose root so have to re-root. Not a big deal.
[Nexus 4 Android Development] grayson73:
Great! So this confirms that unlocking bootloader and rooting doesn't prevent us from receiving OTA updates?
[Nexus 4 Android Development] Stryder5:
Correct. However, I was on stock recovery. Don't know if that will affect anything.
[Nexus 4 Android Development] kptnk:
What is sure is that a custom recovery installed will prevent OTA.
[Nexus 4 Android Development] volcs0:
How do I revert back to stock recovery?
[Nexus 4 Android Development] HoOnZ:
Figured it out myself. :D
[Nexus 4 Android Development] kptnk:
I would say flash a stock google image using fastboot, but that will totally wipe your phone. I'm not sure if you can find and flash just the stock recovery :confused:
[Nexus 4 Android Development] chlehqls:
I didn't read the thread beforehand about OTA and it wouldn't boot. Just flashed factory image and now everything is rolling.

Thanks!

Sent from my Nexus 4
[Nexus 4 Android Development] P00t:
how do i use cmd?
[Nexus 4 Android Development] grayson73:
I would like to know this as well. What are the steps to unlock bootloader, root, and revert back to stock recovery so that the phone is rooted and will still receive OTA updates?
[Nexus 4 Android Development] cpom1:
I do...

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

ok cool. i dont feel as bad now. thanks
[Nexus 4 Android Development] Stryder5:
Read this for stock recovery:

http://xdaforums.com/showthread.php?t=1995440
[Nexus 4 Android Development] HQRaja:
Those asking about how to revert back to stock recovery after rooting, you don't need to 'flash' the custom recovery in the first place in order to root, as mentioned in the OP. If all you want to do is root without flashing the custom recovery, simply read the clockworkmod recovery flashing/booting step again (it's Step 7 of the recovery method), this time with more attention.
[Nexus 4 Android Development] Stryder5:
Yes, just follow the steps in the OP, skipping the part about unlocking the bootloader.
[Nexus 4 Android Development] volcs0:
Right. I had initially done this. But I've grown accustomed to having CWM recovery on my phones - mostly for installing things by zip, clearing cache, etc. So, I impulsively installed the custom recovery.

I never did get the OTA to run. So I just installed the stock google image and re-rooted. Now I have the latest (I think photosphere was the main difference).

Thanks.
[Nexus 4 Android Development] DroidRC1:
delete
[Nexus 4 Android Development] harpo1:
I followed the clockworkmod method and kept the stock recovery. Everything seemed to work but today I decide to check out the stock recovery but I can't access it. I've tried all the button methods, tried through adb and fastboot but it always ends up at the android guy with the red triangle. Any suggestions?
[Nexus 4 Android Development] Stryder5:
That's the stock recovery I believe?? Were you expecting something else?
[Nexus 4 Android Development] harpo1:
I don't believe it is. I know stock recovery isn't like CWM but from what I've read there should be a menu.
[Nexus 4 Android Development] jimmyz:
when you see the android press power and volume up together- you should get a menu
[Nexus 4 Android Development] harpo1:
No just shuts down the phone.
[Nexus 4 Android Development] ksocoolwitit:
Guys I don't see "Developer Options" on my Nexus. What should I do? I'm trying to root it
[Nexus 4 Android Development] kptnk:
Tap 7 times on the Build Number in About Phone menu.....
[Nexus 4 Android Development] D_Rob:
I kept getting hung at the splash screen while NOT using the insecure boot img. I selected to disable stock recovery reflash and I cleared dalvik and basic cache. That solved it, and of all things, it did not wipe all my data? Maybe someone else experienced this? All my files are still present. This is with the OTA, I took it before rooting and just uninstalled and reinstaled the busybox app and all is well.

Never ever, ever, ever rooted and NOT lost all my data having unlocked the bootloader. :laugh::good::cool:
[Nexus 4 Android Development] Stryder5:
A few people have reported that they were able to unlock bootloader and retain their data.
[Nexus 4 Android Development] VidMan:
Deleted
[Nexus 4 Android Development] Unconn:
Not true. I know it is not supported, but OTA update installed with CWM recovery installed.

---------- Post added at 11:46 PM ---------- Previous post was at 11:39 PM ----------

Kind of like he said. Once android is on the screen, to get into stock recovery menu you press volume up and then power. You may have to do it a few times. I know because I had to factory reset before my fits first full boot (tried backing up before first boot)
[Nexus 4 Android Development] ninjames:
So OK, I want to be able to get future updates and I don't want to remove anything ... doing what it says, getting to step seven and then just booting instead of flashing - will this leave me able to receive updates? Meaning, will I get an OTA update with the stock recovery, but am rooted?
[Nexus 4 Android Development] :
Let say if only booting in cwm not flashing it will I be able to flash zips created by titanium to transfer my apps + data, can the stock recovery do the same w/o cwm installed?
[Nexus 4 Android Development] D_Rob:
Yes. If you have stock recovery, and you are on a stock rom that has simply just been rooted, it will not interfere with your ability to receive and flash OTA's. However, they usually always break root. So after the OTA you will most likely need to root again. I just used "fastboot boot recovery.img" myself to not flash the recovery and I succeeded in rooting my device.
[Nexus 4 Android Development] zanael:
Worked flawlessly, thanks a lot :)
[Nexus 4 Android Development] eep2378:
Worked like a charm! Thanks!
[Nexus 4 Android Development] D_Rob:
No. Stock recovery is just that stock. You will need to use a custom recovery to do "custom things" like flash .zip's or make a nandroid backup. You can do these things if you "boot" into ClockworkMod recovery. Booting it runs the software the same as having flashed it and (keyword here) "re-booting" into recovery.

You may want to read up a little bit more on how recovery works to make the best decision for yourself.
[Nexus 4 Android Development] Stryder5:
I'm guessing you finally got your N4?
[Nexus 4 Android Development] Unconn:
No, but you can boot (without flashing) to CWM and then flash a root (SU) package. Titanium only needs root, once you copy your backups over using USB you should be good to restore them. If you want to run CWM again, you could just: fastboot boot cwm.img again.

As said above, you sound confused and need to read more.
[Nexus 4 Android Development] :
Thanks, confused, since if I chose not to flash cwm to root, I boot it n flash SU.zip to root as per OP then it should be the same concept as flashing zip w/o cwm installed instead just boot it n flash any custom zips?

Thanks, i m confused since w/o flashing cwm can boot n flash SU to root, then flashing custom zips n nandroid is the same concept here...

---------- Post added at 10:50 PM ---------- Previous post was at 10:30 PM ----------

I just want to be certain that at any time I need to flash zips I just boot into cwm using the same concept n I be able to run it w/o even install cwm? Just to ensure ota is active as I don't want to install cwm recovery.

I'm planning to boot into cwm, flash SU, flash my titanium created zips at the same time (if feasible?) else I just copy backup over

What about install voodoo ota keeper (restore root after ota) any comment? Thanks!
[Nexus 4 Android Development] Stryder5:
Booting into CWM is like temporarily flashing it to run your commands.
[Nexus 4 Android Development] :
Thanks I have a better picture now, as coming from gnote, my stock recovery was able to flash SU directly n temp flashing CWM was never happen in gnote so I'm just a little lost..n I'm certain now what to do next when my n4 arrive :)
[Nexus 4 Android Development] nefas83:
OK that all means that i have to re-flash the stock recovery to get OTA updates. Is it possible to re-flash without problems?

At the moment i have cwn 6.0.18 running

Greetings Nefas
[Nexus 4 Android Development] harpo1:
Reflashing the stock recovery is not a problem. My suggestion is to grab the stock recovery and boot image from this link and run CWM all the time. When an ota is announced just flash them do the ota update and flash cwm and the kernel of you choice. If you don't use a custom kernel you'll only need to flash the stock recovery image to get ota updates.

http://www.addictivetips.com/android/root-google-nexus-4-install-clockworkmod-recovery/
[Nexus 4 Android Development] evaradar:
After figuring out the recovery issue, I am now having this problem.

I installed CWM SuperSu v0.98 via TWRP and I hit reboot. Now I see the Google logo for a while. Then the Nexus logo. It doesn't boot into the actual phone. Still stuck on the Nexus logo. Any takes folks?

Man this Nexus 4 is sure giving me hell. I wish it had a removable battery. So much easy to do if you muck up when rooting or anything at all... I know holding the power button down for 10 seconds reboots the phone but I want to turn off the phone instead. Not effing reboot. Jeebus....

Edit: Works fine. Had to clear dalvik cache and cache
[Nexus 4 Android Development] D_Rob:
Yes, that was my issue, If the OP would be so kind as to remove "not necessary" from beside "wipe cache & dalvik cache" as it turned out that for me, I indeed had to wipe them to get it to work. Props to the OP though. I much prefer running the commands myself to using tool kits. It makes everything easier if you should ever have a problem
[Nexus 4 Android Development] ninjames:
Soooo just downloaded like 8GB worth of past apps and stuff and now to root I'll have to wipe it all, no way to backup in the meantime?

Joy! :[
[Nexus 4 Android Development] jasonbiggs:
Rooted and didn't delete anything as unlocking bootloader stated. nice! Rebooted and all apps there and also rooted.
[Nexus 4 Android Development] Imppy:
Got the same result as Jason

Thanks
[Nexus 4 Android Development] Fidiii:
Rooted using CWM method, no wipe either upon unlocking bootloader ! Very nice feat.

Sent from my Nexus 4
[Nexus 4 Android Development] eep2378:
Yup, finally! Looking forward to contributing to the N4 community:D

Sent from Nexus 4 muffin shop
[Nexus 4 Android Development] ra_grand:
Please Help!

Can some one please help me. I was trying to root using the Clokcworkmod and I was unable to see the super su folder in the sd connection. and i rebooted it anyways. Now after reboot the phone doesnt start up :( It just hangs at the X symbol at the startup. PLease can some one help me. Is my phone bricked?
[Nexus 4 Android Development] harpo1:
Hold the power button for about 10 sec. The phone will shut off. Then select the power and volume down to get back into the bootloader. From there select reboot recovery and find the file.
[Nexus 4 Android Development] namartlu:
Need help... followed the CWM procedure to gain root, flashed CWM also. But it seems to be not persistent. When I tried to boot into recover, I just see the green android lying down with the exclamation mark. After a while it boots normally. What should I do now? Was trying to flash another ROM...

Thanks!
[Nexus 4 Android Development] ra_grand:
I switched it off and then tried the power button and volume down. It shows the google page and then again its the same X glowing always. It doesnt seem to get past it. how long should it generally take? THanks a ton for the help! Please let me know.

---------- Post added at 08:03 AM ---------- Previous post was at 07:59 AM ----------

I switched it off and then tried the power button and volume down. It shows the google page and then again its the same X glowing always. It doesnt seem to get past it. how long should it generally take? THanks a ton for the help! Please let me know.
[Nexus 4 Android Development] namartlu:
This one I know, just found out. You press volume down+power until it vibrate, then you let go of power but keep volume down pressed. That will take you to the bootloader.
[Nexus 4 Android Development] ra_grand:
Great! that helped. Now can you guide me I have 4 options. Start, Recovery mode, Restart bootloader and power off. I am horribly new at these. Thanks for the help. Earlier the OP helped by telling reboot recovery and find the file. I am having a hard time understanding where reboot recovery is :(
[Nexus 4 Android Development] harpo1:
Select recovery mode.
[Nexus 4 Android Development] IINexusII:
in your System/ folder there is a recovery-from-boot.p file. rename that to recovery-from-boot.bak and reflash cwm. it shouldnt delete itself now
[Nexus 4 Android Development] ra_grand:
Thanks guys! that helped! :)
[Nexus 4 Android Development] cloud1111:
Can someone tell me how to get the command windows to read my device. I installed the adb drivers, but when I type adb devices in the cmd window it says command isn't recognized.
[Nexus 4 Android Development] jasonbiggs:
You'll have to do that command within the platform-tools folder from your download.
[Nexus 4 Android Development] BRKotucs:
Is there any other way I could rename this? I've found the file but I can't rename it because I'm not rooted.... I Unlocked the bootloader and flashed CWM recovery, when phone came back on everything was gone and I couldn't flash the SU file. Phone is working again and bootloader remained unlocked but every time I try to flash the recovery it tells me that there's an error . I hope someone can help me out over here please!!! Thanks.
[Nexus 4 Android Development] IINexusII:
You should be able to reflash the recovery as many times as you want with fastboot flash recovery recovery.img and then install a superSU root zip through CWM
[Nexus 4 Android Development] BRKotucs:
Thanks for your help bro! I've already tried once again and it tells me " error : cannot load recovery.img " . Is there something I'm not doing or perhaps I'm doing it wrong?
[Nexus 4 Android Development] harpo1:
You could flash the stock image from google and start over again. The only thing it doesn't do is lock the bootloader back up.
[Nexus 4 Android Development] androidsnax:
Really easy route to root! Didn't wipe my device (was concerned that it hadnt worked at first)

Used the CWM method.

Onwards to CM10.1 when its available!

;)
[Nexus 4 Android Development] godman_8:
I'm sure this question has already been answered

I flashed CWM + SU and I got SU and it works great!

Though I finally caved in and wanted to flash CM10.1 uno but when I reboot into recovery it gives an error message

is this normal or do I need to flash the recovery again?
[Nexus 4 Android Development] DarkShadowAy:
I've followed all these steps.

Installed the drivers, enabled debugging mode and then when I move on adb reboot bootloader it says device not found.

Even though under device management, the phone is clearly displaying as a ADB device (with the drivers) in debug mode.

Can anyone please help?
[Nexus 4 Android Development] jasonbiggs:
Are you running commands from within platform tools folder? Try alternate way of getting into bootloader by powering off phone etc.
[Nexus 4 Android Development] DarkShadowAy:
I am indeed. Used cmd to navigate to adb within platform tools.

Edit: Also tried it turning it off, still not working.
[Nexus 4 Android Development] jasonbiggs:
I grabbed my drivers from what Stryder5 had posted and that worked straight away. When you unplug and replug in your phone to computer, does it show that everything loaded fine in the task bar?
[Nexus 4 Android Development] DarkShadowAy:
I grabbed the same ones and it does indeed.
[Nexus 4 Android Development] snavid972:
Im having a hard time trying to install cwm on my nexus heres what I did.....downloaded sdk and installed properly with java jdk......I have debugger mode on my phone turned on......put the phone in fastboot mode...open up cmd prompt and go into the folder where I renamed the recovery.img file....and type the command fastboot flash recovery recovery.img enter and get error fastboot is not recognized as an internal or external command?
[Nexus 4 Android Development] jasonbiggs:
Re-read the instructions as I believe you may be skipping a step.
[Nexus 4 Android Development] DarkShadowAy:
Anyone able to help me with mine? My phone's is limbo :(
[Nexus 4 Android Development] ian577416:
Are you using Windows?

---------- Post added at 10:09 PM ---------- Previous post was at 10:09 PM ----------

Pm me and I'll get you up and running OK

---------- Post added at 10:10 PM ---------- Previous post was at 10:09 PM ----------

What's up mate how can I help?
[Nexus 4 Android Development] DarkShadowAy:
Hello, as per above really when using adb commands it says device not found even though I've used the drivers and followed instructions.
[Nexus 4 Android Development] ian577416:
Look at your device manager. See if it list the nexus. If it does try reinstalling the driver if it doesn't reinstall anyway. Not to sound condescending but is USB debugging enabled on the nexus?
[Nexus 4 Android Development] DarkShadowAy:
Hello,

It does indeed come up and USB debugging is enabled. I'm somewhat perplexed.
[Nexus 4 Android Development] ian577416:
I'm driving give me a sec
[Nexus 4 Android Development] DarkShadowAy:
Edit: Ignore me! It's in bootloader!

---------- Post added at 04:13 PM ---------- Previous post was at 04:13 PM ----------

[/COLOR]

Keep your eyes on the road! :silly:

---------- Post added at 04:20 PM ---------- Previous post was at 04:13 PM ----------

Once in bootloader, when I enter

fastboot flash recovery recovery.img

I get: sending 'recovery' then FAILED <data transfer failure <unknown error>>
[Nexus 4 Android Development] ian577416:
Ahh so you got it all sorted out?
[Nexus 4 Android Development] DarkShadowAy:
When I enter

fastboot flash recovery recovery.img

I get windows error fastboot.exe has stopped working. This is a nightmare!

Problem signature:
Problem Event Name:	APPCRASH
Application Name:	fastboot.exe
Application Version:	0.0.0.0
Application Timestamp:	509d7b8c
Fault Module Name:	ntdll.dll
Fault Module Version:	6.1.7601.17725
Fault Module Timestamp:	4ec49b8f
Exception Code:	c0000005
Exception Offset:	00033ab3
OS Version:	6.1.7601.2.1.0.256.1
Locale ID:	2057
Additional Information 1:	0a9e
Additional Information 2:	0a9e372d3b4ad19135b953a78882e789
Additional Information 3:	0a9e
Additional Information 4:	0a9e372d3b4ad19135b953a78882e789

---------- Post added at 05:10 PM ---------- Previous post was at 05:03 PM ----------

Anyone know why it says downloading boot.img?
[Nexus 4 Android Development] DarkShadowAy:
Ah snap, it's worked by, wait for it... changing the USB ports. I was using a USB extender and that was the bane of all my problems!
[Nexus 4 Android Development] Joshua3109:
Hey guys I am getting the error message

"adb" is not recognized as an internal or external command, operable program or batch file.

I am following the steps for the CWM method. My phone does not want to be read though I installed the drivers.. Help :)

Edit: I didnt have the android SDK package installed and so my Command prompt was going to the wrong directory!
[Nexus 4 Android Development] ian577416:
You need to edit your path variables. Right click on my computer, select properties. From there select advanced system settings. It may be worded differently I'm not sure I don't use windows I'm doing this from memory. Select advanced. Then select environment variables. Scroll till you see "path" then copy the entire path to your adb install into the end of whatever is already in there. Be sure to look at the syntax of the path lines before you just drop it in. I don't think you can have spaces or anything. After that type "echo $PATH$" it should return a line of directory paths and if you did it right you'll see your android SDK directory in there. You may have to reboot your computer but it should work after that. Cheers mate need anymore help you can pm me.
[Nexus 4 Android Development] Joshua3109:
C:\Users\Master Joshua\android\android-sdk\platform-tools

Thanks for the advice, I am unsure if my directory is correct above. I pasted that at the end of the "path" as you said reset the computer then typed echo $PATH$ into the Command prompt but I was only greeted by $PATH$ right back.

C:\Users\MasterJoshua\android\android-sdk\platform-tools on command prompt brings back the message "the system cannot find the path specified" What to do?
[Nexus 4 Android Development] ian577416:
I'm dull. Try just typing path into cmd. If all else fails you can CD straight to the directory and as long as adb and fastboot are in there they will work. I'm sorry I use Linux and though the principal the same the commands are different:)
[Nexus 4 Android Development] Joshua3109:
That brought up all the paths! The new one I put in was at the end as well! How do I command straight to the directory?

cd\C:\Users\MasterJoshua\android\android-sdk\platform-tools

That is what I am typing in but it is saying: "The filename, directory name, or volume label syntax is incorrect"
[Nexus 4 Android Development] ian577416:
Make sure you put a space between CD and what your directory is. Also for the sake of ease just copy paste your android-sdk folder into your desktop then:

cd C:\Users\MasterJoshua\Desktop\android-sdk\platform-tools. Though if your paths are correct then you should be able to type adb into cmd and it should work.