yashsingh1/xdaforums huggingface dataset:
[Nexus 4 Q&A, Help & Troubleshooting] sid.8491:
i have tried both ADB method & ROOT TOOLKIT to root my nexus 4, but haven't got any success.

on adb method it shows device offline and i tried all the ways to install drivers.

on root toolkit its stuck on "waiting for your device" in bootloader mode.

what should i do? do i need to unlock the bootloader before rooting device or am i doing anything else wrong?

people are really skeptical about unlocking bootloader thing
[Nexus 4 Q&A, Help & Troubleshooting] Ibrahim.Rahman:
Unplug device

Adb kill-server

Toggle USB debugging

Connect device

Adb devices

This solves the offline issue in most cases.

Or maybe your adb is out of date (unlikely)

And yes you need to unlock the boot loader before you can root.

---------- Post added at 08:57 PM ---------- Previous post was at 08:54 PM ----------

It works as long as you do everything properly. You can backup SMS by SMS backup and restore app then when you backup your sdcard, your SMS will be preserved.
[Nexus 4 Q&A, Help & Troubleshooting] sid.8491:
that did not solve the problem in my case.

adb version is 1.0.29

ok then i'll unlock the bootloader later after uninstalling heavy games so that backup size remain small.

edit - updating to version 1.0.31 solved the issue.
[Nexus 4 Q&A, Help & Troubleshooting] Praveer:
Yeah I was able to root and do everything. Used a toolkit though.

Thanks
[Nexus 4 Q&A, Help & Troubleshooting] Ibrahim.Rahman:
I've heard that for some users, trying out different USB ports worked.

And to unlock bootloader, you would need fastboot. Is your device being detected in fastboot mode or is that showing offline too?

---------- Post added at 09:17 PM ---------- Previous post was at 09:15 PM ----------

Hmm.. Try refraining from toolkits because you if you get stuck, you won't be able to tell what the error was or what caused it.

Manual is always safer.
[Nexus 4 Q&A, Help & Troubleshooting] sid.8491:
device is being detected in fastboot mode. now its also being showed in adb devices.

gonna try to root once again without unlocking.

edit - failed..not supported in locked devices. :(

is there any way to root without unlocking?
[Nexus 4 Q&A, Help & Troubleshooting] Ibrahim.Rahman:
No. Unlocking the bootloader is essential. you can skip using a custom recovery and root using Chainfire's CF-Auto-Root but as far as bootloader is concerned, there's no way round other than unlocking it. If you're worried that unlocking it will make your device more vulnerable to problems, it won't as long as you are careful with what you flash.

If you're worried about losing your data, you can backup using adb

adb pull /sdcard/ /sdcard/

-Backs up all the contents of your sdcard

adb backup -apk -noshared -all -nosystem

-Backs up all app and data

You can also backup apps and data using Helium app by ClockWorkMod

Heck you can even back up using Helium and the use adb pull /sdcard/ /sdcard/ to backup the Helium Backup (This can allow you to have two different backups of the same data incase something goes wrong)

If you want to backup SMS, do so by using SMS backup and Restore app BEFORE backing up your phone

Your contacts will be synced with google but still you can back them up by going into dialer/people app and selecting export to storage BEFORE backing up your phone

-

After unlocking your bootloader, restore your backup

adb restore backup.ab

copy the sdcard folder in your C to platform-tools/adb directory and

adb push sdcard /sdcard/

Restore SMS from SMS backup and restore app

Restore Contacts by selecting import from storage in dialer/people app.

If your app data was not restored properly due to some error, you can always restore from Helium.

Sign in to your accounts.

Your phone is exactly how it was before+unlocked bootloader.

I recommend unlocking it now as in the future you might have a greater load of data which would be hard to backup.

As a safety measure, if you think they are valuable, you should also copy your camera pics and paste them in your computer.
[Nexus 4 Q&A, Help & Troubleshooting] bmoke:
Oops. Entered my reply against the wrong thread.
[Nexus 4 Q&A, Help & Troubleshooting] Drtro:
What am I doing wrong here?

I am unlocked and rooted. I have created a Nandroid of stock KK 4.4.

I do a factory reset, install the ROM, then PA gapps, then restart. Yet nothing changes. No matter what ROM I try.
[Nexus 4 Q&A, Help & Troubleshooting] hidequick:
On my 4.4.2 nexus 4 it wont stay rooted after i reboot the phone once. i can get out of cwm and its fine but after i need too reboot it goes away. any fix for this?
[Nexus 4 Q&A, Help & Troubleshooting] Berrydroidcafe:
Try flashing SuperSU. The latest is 1.85

Sent from my Nexus 7 (2013)
[Nexus 4 Q&A, Help & Troubleshooting] hidequick:
hey i just did that and still once i get into it and say i need to reboot is goes away
[Nexus 4 Q&A, Help & Troubleshooting] josefiilho:
Hey, Thanks!
[Nexus 4 Q&A, Help & Troubleshooting] Berrydroidcafe:
How are you rooting and/or flashing? Toolkit or adb?

I would try flashing twrp instead of cwm, then flash your rom.

Sent from my Nexus 7 (2013)
[Nexus 4 Q&A, Help & Troubleshooting] myd0j0:
Additional assistance, please...

Android 4.4.2

Kernel 3.4.0-perf-g2cae413

Build KOT49H

UPDATE-SuperSU-v1.65.zip

recovery-clockwork-touch-6.0.2.3-mako.img

Though I've unlocked my device, after booting into android, SuperSU, Titanium Backup, etc all let me know that I don't have root access. So I've followed additional information regarding using adb to further the rooting process.

C:\Users\MyPC\Desktop\Nexus\sdk\platform-tools>adb devices
List of devices attached
00284563d9528329 device

C:\Users\MyPC\Desktop\Nexus\sdk\platform-tools>adb shell
shell@mako:/ $ su
su
1|shell@mako:/ $ mount -o remount,rw -t ext4 /dev/block/mmcblk0p1 /system
mount -o remount,rw -t ext4 /dev/block/mmcblk0p1 /system
mount: Operation not permitted
255|shell@mako:/ $ adb version
adb version
Android Debug Bridge version 1.0.31
shell@mako:/ $

After several attempts to step through everything using multiple guides, I am still left with an unlocked, secure boot - enabled device...

Any other ideas or assistance to get this cracked?

Many thanks for the guide, OP!
[Nexus 4 Q&A, Help & Troubleshooting] Berrydroidcafe:
There's a new update to SuperSU. 1.85

Just a thought, why not try a Toolkit? At this point, can't hurt. ;):cool:

Sent from my Nexus 7 (2013)
[Nexus 4 Q&A, Help & Troubleshooting] myd0j0:
partial? root? huh?

I haven't tried a toolkit as it is my understanding that they are just scripts that automate the use of the fastboot and adb commands.

By the time I read your reply, ver 1.86 was out and I used that. :cowboy: So...partial success anyway. :confused: SuperSU now runs without complaint; ES File explorer allows me to set root explorer; busybox installs nicely; ROM manager updates. However, my vpn client, which requires root, doesn't think it has root. It tells me /system is still read only and even though ES File Explorer says it has root explorer enabled, I still can't rename /system/etc/install-recovery.sh

Something is not on the up and up with this problem. How is it that a some apps that require root are fine and others aren't?!?!
[Nexus 4 Q&A, Help & Troubleshooting] Berrydroidcafe:
Why do you need BusyBox? Usually it's a companion to superuser, at least as far as an app. I have SuperSU, but don't have BusyBox. Maybe that might be an issue? Maybe someone who is more learned than I am will pipe in on this?

Sent from my Nexus 7 (2013)
[Nexus 4 Q&A, Help & Troubleshooting] thesuperbian:
Just signed up to try and let people know that this so-called "Ultimate Guide" is severely lacking in information (i.e.not 'ultimate') you need, and extremely slow.

I found this article to be far clearer and explanatory of what it's telling you to do:

reviews[dot]cnet[dot]co[dot]uk/mobile-phones/how-to-root-your-google-nexus-4-50010361/

Gotta love it when subpar technical writing gets glorified as "Ultimate" and hits the top results in forum searches.

And before anyone goes all apenuts,

No, I don't appreciate this author taking the time to write some so-called guide that could be better written by a 10 year old on a respected mobile development/hacking forum. And yes, I could - anyone could actually, write a far superior set of notes yet have the humility to not call it "Ultimate" especially when it doesn't actually consolidate all the information into one page.
[Nexus 4 Q&A, Help & Troubleshooting] myd0j0:
the need for busybox

I don't need it, but my VPN client does. My understanding is that without root, some vpn types are locked out. Frankly, I don't want Google telling me which encryption techniques or ciphers I can use. The default VPN capabilities are NSA approved. **** those traitors.

---------- Post added at 01:27 AM ---------- Previous post was at 01:09 AM ----------

Do you always sh1t on people who try to help you? The article helped many people, as noted in the years worth of replies. If your technical prowess was "all that and a bag of chips," you wouldn't have needed to look here at all, now, would you?
[Nexus 4 Q&A, Help & Troubleshooting] Glorifyy:
Great Work!

Great work bro!

You should consider putting up a guide on how to use 1 Click Roottoolkits like WugFreshs'. (Even though there quite self explanatory it's still nice to have" But, that's up to you. Nice work man! :)
[Nexus 4 Q&A, Help & Troubleshooting] htrapy:
After flashing custom recovery, when i flashed SuperSU.zip file it flashed with no issues and without any errors my phone rooted but then when i rebooted , in recovery it show an error,"Your phone is possibly unrooted, press yes to fix it...",even after selecting this option ther same error persists.Then I flashed same recovery again but again no luck....but then flashed custom rom because i knew phone had been rooted(i could access root and i even checked with an app(root checker)), but after flashing custom rom (beanstalk 4.4.200), phone showed error,"Phone crashed", I couldn't accessed my phone so then i restored my n4 using recovery and now my n4 is running smoothly on stock android(4.4.2) but stil i can't flash the custom roms.
[Nexus 4 Q&A, Help & Troubleshooting] Berrydroidcafe:
If you're not rooted anymore, and your bootloader is still unlocked, there shouldn't be any reason why you can't flash a custom rom. If by chance the bootloader is locked and you lost root, you'll have to unlock the bootloader and root again. I would start over again from the beginning, but that's me. ;):D

Sent from my Nexus 7 (2013)
[Nexus 4 Q&A, Help & Troubleshooting] htrapy:
no, it's unlocked and also rooted but the error in recovery somehow further creating problems in flashing....So i wud also like start fresh but how....can u tell the procedure (fyi my phone is unlocked)......Please let me know is it imp. to reset google wallet settings although i haven't used even once(although its not available in my country)
[Nexus 4 Q&A, Help & Troubleshooting] Berrydroidcafe:
What recovery are you using? I don't think Google Wallet would cause this issue.

Sent from my Nexus 7 (2013)
[Nexus 4 Q&A, Help & Troubleshooting] htrapy:
i'm using cwm(the same mentioned in this guide)
[Nexus 4 Q&A, Help & Troubleshooting] Berrydroidcafe:
Maybe try out TWRP?

Sent from my Nexus 7 (2013)
[Nexus 4 Q&A, Help & Troubleshooting] htrapy:
i just flashed twrp using gomm manager now it working fine

thanks four help
[Nexus 4 Q&A, Help & Troubleshooting] Berrydroidcafe:
No problem!

Sent from my Nexus 7 (2013)
[Nexus 4 Q&A, Help & Troubleshooting] kahila:
Hi,

I had my Nexus 4 rooted and unlocked with Paranoid Android RC-2 and wanted to switch rom. Backed everything up including nandroid and started to flash Gapps and rom. Now after flashing im stuck with black screen with "Google", the bottom lock tells me I'm still unlocked. The main reason I don't know what to do is I can't get to recovery any more.

I'm kind a new to these things so any help would be happily appreciated! :)

Ps. Merry christmas to everyone
[Nexus 4 Q&A, Help & Troubleshooting] Slender Troll:
What ROM?
[Nexus 4 Q&A, Help & Troubleshooting] Berrydroidcafe:
At this point, it (rom) wouldn't matter. At least it shouldn't.

Sent from my Nexus 7 (2013)

---------- Post added at 02:17 AM ---------- Previous post was at 02:16 AM ----------

Do you know how to boot into recovery or the bootloader?

Sent from my Nexus 7 (2013)
[Nexus 4 Q&A, Help & Troubleshooting] kahila:
I found the solution. Thanks anyway.

Just one question, can I loose my root easily and why?
[Nexus 4 Q&A, Help & Troubleshooting] Berrydroidcafe:
Without knowing the solution you have come up with, that's a hard question to answer, so what is the solution that you've come up with?

Sent from my Nexus 7 (2013)
[Nexus 4 Q&A, Help & Troubleshooting] kahila:
Not really sure. After multiple of tries it just went back to recovery. Before this I have have flashed just one rom so this didn't go as planed. IMO my earlier phone (Htc Desire) was much more easier with these things. Maybe just a question of getting used to I guess.
[Nexus 4 Q&A, Help & Troubleshooting] htrapy:
after superuser.zip file now whenever reboot through custo recovery, i get an error

Root Access Possibly Lost Fix?

THIS CANNOT BE UNDONE

1. YES fix root (/system/xbin/su)

2. NO do not fix

I also faced the same problem earier and i think bcz of which i was having problems on flashing custom roms (whenever i flashed custom rom my phone won't get through initial setting(settings that we get after full system wipe), it continously used to show an error that "Phone crashed, press ok or cancel" and on selecting ok i would get same error, so get rid of this problem i returned to stock rom,stock recovery, locked bootloader but no again i'm facing the same problem....
[Nexus 4 Q&A, Help & Troubleshooting] Berrydroidcafe:
I'm afraid that I'm still confused. :confused::eek:

As far as the Desire being easier, the basics are the same. I have a Desire Z (the ORIGINAL G2) which I will be flashing KitKat on a little later. :cool:

Once the phone you have is unlocked (bootloader) and rooted, flashing a rom should be relatively easy. The problems usually start when people start experimenting with things they don't quite understand, like this or that kernel, or mods, or simply trying to go back to stock in order to grab the latest ota, which sometimes cause more headaches than it cures.

The biggest mistake people do is jumping into it head first and not seeing that the water is only a couple feet deep. Read this guide, read another one, look at this video, and look at that video. After that is done, ask a question. State what you want to do, how you think you're going to do it, then ask if this is the best way of doing it. You'd be surprised that more people will help you without hesitation because it showed that you have done your homework and have done some legwork first before doing what a lot of people do, and that's this: "I just bought this Nexus 4, can someone tell me how to root it?"

Think the majority of the responses are going to be positive? :eek::confused:

Anyway, didn't really mean to rant, and it's not directed at you, but hopefully it will help in the general sense. Thing is, if people don't read the OP (First post), I hold no hope that they will stumble upon this one. :rolleyes::D:cool:

Sent from my Nexus 7 (2013)
[Nexus 4 Q&A, Help & Troubleshooting] abaaaabbbb63:
Desire : adb+fastboot drivers, hboot drivers, s-off, flash custom recovery, partition sd-card

Nexus 4: adb+fastboot drivers, unlock bootloader, flash custom recovery

How is the Desire easier? :P
[Nexus 4 Q&A, Help & Troubleshooting] punitthereddevil:
Press and hold volume down+power...u will see the android robot screen...that is bootloader mode...navigate to the recovery from there...

________________________________

| Nexus 4

| Purity 4.4.2 (23/12)

| Hells Core OTG Kernel By justvarshney

| TWRP 2.6.3.3
[Nexus 4 Q&A, Help & Troubleshooting] gaikokujinkyofusho:
Error: Device offline?

Hi I managed to get through installing the SDK etc and for the life of me everything looks online (no little yellow error thingys in the dev manager <attachment>and I can access the internal sd on my nex4 via win7) but when i type "adb reboot bootloader" it keeps returning "error: device offline" I've tried rebooting, uninstalling/reinstalling the driver (the PDAnet one) but so far no go.

Any thoughts would be appreciated.

ok, no replies yet, its just after new years but just to be on the safe side a bit more info:

here is a copy/paste from my command prompt:

C:\android-sdk-windows\platform-tools>adb reboot bootloader

* daemon not running. starting it now on port 5037 *

* daemon started successfully *

error: device offline

I also have a sgs2 etc (for those scratching their heads looking at my sig) but this post is for a stock Nexus4 that i just got which has Android v 4.2.2 on it kernel 3.4.0 build no KOT49H.
[Nexus 4 Q&A, Help & Troubleshooting] ArtOfSnaila:
Check to see if USB Debugging is enabled.

Also, have you tried using the official drivers instead of the PDAnet ones?
[Nexus 4 Q&A, Help & Troubleshooting] gaikokujinkyofusho:
USB debugging is on, I have like triple checked (seemed logical given the error). As for the official driver do you mean like a driver from LG? The only thing I have tried is just trying it directly on windows default, then tried the PDAnet, haven't tried anything else. Do you know the best place to get this driver? Thanks!!!
[Nexus 4 Q&A, Help & Troubleshooting] Slender Troll:
Go here http://www.lg.com/us/support-mobile/lg-LGE960 and click on the software update and drivers option.
[Nexus 4 Q&A, Help & Troubleshooting] gaikokujinkyofusho:
Much

appreciated! Will give it a try!
[Nexus 4 Q&A, Help & Troubleshooting] Berrydroidcafe:
This is the part that has me scratching my head is the "no", are you are you saying there's no KOT49H, or build number? I'm just trying to follow along. Thanks!

Sent from my Nexus 7 (2013)

---------- Post added at 12:49 AM ---------- Previous post was at 12:44 AM ----------

Going to bookmark this one. :) I have Samsung drivers installed.

Sent from my Nexus 7 (2013)
[Nexus 4 Q&A, Help & Troubleshooting] gaikokujinkyofusho:
Doh! Yeah, that was just a bit ambiguous, sorry, it was supposed to be no./number KOT49H. Apologies (and thanks for pointing that out).
[Nexus 4 Q&A, Help & Troubleshooting] gaikokujinkyofusho:
Ok, at the risk of seeming like a real pain (and I am starting to feel like I am being a pest but I am stumped) I followed the link, pretty straight forward but when i try to go to the software and updates page i get a fairly strangely blank page (attached), I tried opening it up with a vanilla browser no addons blockers etc (ie IE) and nada. Perhaps its not accessible from some countries? (I am not in the US)
[Nexus 4 Q&A, Help & Troubleshooting] Berrydroidcafe:
Ok. Also KOT49H is the build for Kit Kat 4.4.2

Sent from my Nexus 7 (2013)

---------- Post added at 01:12 AM ---------- Previous post was at 01:09 AM ----------

You might want to try this one:

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

Sent from my Nexus 7 (2013)
[Nexus 4 Q&A, Help & Troubleshooting] simonhausmann:
Thanks, man
[Nexus 4 Q&A, Help & Troubleshooting] sibeans:
i recently unlocked and rooted my n4 [A big thanks to the OP for posting this] and did run into trouble using windows to update the drivers, and turning to PDAnet worked out well for me
[Nexus 4 Q&A, Help & Troubleshooting] Chromium:
Shouldnt have used the toolkit. If you did it manually (the way explained in the first post of this thread) you probably would have been done with no problems. Rooting a nexus is very easy, and isnt meant to be some hacky exploit. Theres really no need for a toolkit.

Try rebooting the phone to see if it boots. If its in fastboot use the volume rockers to highlight "Start" and power to select it.
[Nexus 4 Q&A, Help & Troubleshooting] xanthrax:
A factory reset Sometimes fix the problem

sent from my Darkside of Nexus 4
[Nexus 4 Q&A, Help & Troubleshooting] gaikokujinkyofusho:
The irony is that i started down the toolkit route because i was trying to do it manually as was explained originally in this thread. Not faulting the thread, i just got hung up at the driver part and then (unfortunately) deviated which lead me here :(

Thank you, it rebooted no problems apparently. It seems the driver issue has been resolved, so will retry using this threads method (minus the driver bit) and hope for the best.

Thanks for the help!
[Nexus 4 Q&A, Help & Troubleshooting] gaikokujinkyofusho:
solved. ends up the copy of the android dev kit/adb that I got wasn't working out. I got another copy of adb from somewhere else and viola, everything worked, without a hitch! geeze, that was really quite painful, especially now that i know it didn't have to be... sigh. Thanks again to all for your patience. For what its worth, the phone is not for me but for my sig other who arrives this evening from visiting thier folks for a few weeks (I wanted to root it to ward off adverts, lock down some of the priv stuff a bit more etc), its a surprise. nothing like last minute. thanks again for trying to help.
[Nexus 4 Q&A, Help & Troubleshooting] Madikan:
Thanks for this super useful tutorial ! :)
[Nexus 4 Q&A, Help & Troubleshooting] wullieb1:
Used this to root my Nexus 4, Titanium backup, and worked flawlessly after i got the drivers working (reboot required :))

Thanks
[Nexus 4 Q&A, Help & Troubleshooting] TheCrow1372:
This works on KitKat 4.4.2 Canadian phones right, just want to be sure also is there a reason why when I plug my phone in my computer can't find the drivers?

TheCrow on his Nexus 4
[Nexus 4 Q&A, Help & Troubleshooting] Berrydroidcafe:
Try this:

http://xdaforums.com/showthread.php?t=2588979
[Nexus 4 Q&A, Help & Troubleshooting] Samigg:
Nice guide, thank you.
[Nexus 4 Q&A, Help & Troubleshooting] smokewagon:
One problem....

Thank you for the awesome guide! I was able to follow it easily, while learning how to use ADB and Linux for the first time.

One problem I am having...I can't get my N4 to stay rooted! I have tried all the suggestions at the end of the guide. I still have CWM recovery, but when I reboot I loose root access.

When choosing "reboot system now" in CWM 6.0.4.6 it says...

Root access possibly lost. Fix?

THIS CANNOT BE UNDONE.

-No

-Yes -Fix root (/system/xbin/su)

I am on android 4.4.2.

Any ideas?
[Nexus 4 Q&A, Help & Troubleshooting] Berrydroidcafe:
Flash TWRP then SuperSU. :cool:

Sent with my Nexus® 10 minus 3
[Nexus 4 Q&A, Help & Troubleshooting] milestegfreeze:
Thanks for your work. It is an amazing guide. It helps me a lot

Envoyé depuis mon Nexus 4 avec Tapatalk 4
[Nexus 4 Q&A, Help & Troubleshooting] knistercracker:
It is an amazing guide, thanks.
[Nexus 4 Q&A, Help & Troubleshooting] luci78:
Root Nexus 4 whithout pc

Hy. I want to know if there is a method to root the Nexus 4 without PC.Thanks
[Nexus 4 Q&A, Help & Troubleshooting] youcef.83:
nexus 4 adb devices offline

so i try to root my nexus but adb always say devices offline how to do ?
[Nexus 4 Q&A, Help & Troubleshooting] arffrhn:
Have you on usb debugging in development settings of your phone?
[Nexus 4 Q&A, Help & Troubleshooting] youcef.83:
yes SIR , im with windows 7 and aleardy installed sdk, when i type adb devices , always offline , usb debugging ON
[Nexus 4 Q&A, Help & Troubleshooting] xanthrax:
Drivers issue, try this tool, read the OP how to

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

sent from my Darkside of Nexus 4
[Nexus 4 Q&A, Help & Troubleshooting] youcef.83:
it's work and i have custom rom :good: , thnk's a lot :D
[Nexus 4 Q&A, Help & Troubleshooting] smokewagon:
YES! It worked! Thanks so much friend! Feels SO GOOD to finall be rooted and running a custom ROM. :D