yashsingh1/xdaforums huggingface dataset:
[Nexus 4 Android Development] rushfunn:
Revert to Stock

I followed this guide and I could root my device and install twrp ... everything was fine ..

Now, my n4 is having buzzing earpiece issue and I decided to get replacement. Customer rep agreed and started the process...

Now, I need to revert the n4 to stock. I tried flash_all.bat from the takju source. But it said, can't find the boot.sig/recovery.sig/system.sig and did not reverted those. So I went ahead and flashed those through fastboot ...

But now, I'm not able to boot into n4, it's stuck on Google logo ... Also, when I go to recovery all I see is Google logo ...

Please help me through guys ... :panic:

My bad, I was trying to upload with takju where as it should be occam ... everything fine now ...
[Nexus 4 Android Development] uEih:
Wanted to root and install a new kernel but having second thoughts because of the OTA updates. Maybe in the future when my phone could use a refresh to make it feel new again.
[Nexus 4 Android Development] naja_return:
After I flash CWM Recovery. My Nexus 4 stuck on the X sign boot logo.

fastboot flash recovery recovery.img

Any ideas?

-------------------------------------------------------------------------------

After do some search i found that I have to WIPE CACHE via CWM then it'll boot fine.
[Nexus 4 Android Development] julandroid:
I had the same issue although in the first post wiping the cache is noted as been not mandatory!

If some one else stuck in the same situation, he can proceed like this:

1. Power down the phone. Press again and hold Power button + Vol Down and wait to see the recovery menu.

If you kept the stock recovery you need to boot into CWM recovery again by running:

# fastboot boot recovery.img

2. "Wipe cache" from the CWM

3. Reboot

Other thing worth mentioning is that the "oem unlock" command really doen't wipe current settings and programs. That's really cool!

Offtopic: I hate installing apk files from unknown sources, so what you really need to do is download the CWM-SuperSU-vX.XX.zip from the official source (chainfire) http://xdaforums.com/showthread.php?t=1538053 and flash that file from the CWM recovery.

Can anyone explain me why I need busybox to root the nexus 4? For me rooting the phone went fine without busybox!
[Nexus 4 Android Development] WiseManWhite:
Thanks for that google driver file. Solved all of my problems.
[Nexus 4 Android Development] euki69:
Thanks for the guide! I've had 4 nexus 4s so far (all RMAs for screen problems -.-) and im waiting for the 5th one. needless to say this is the thread I go to everytime lol. but I just want to point out the link for SuperSU and Busybox is down :o
[Nexus 4 Android Development] uman01:
hello, but i can't download the "SuperSU package with Busybox" file

it says invalid or deleted file at mediafire,

please update the link :)
[Nexus 4 Android Development] Lexus fan:
Please update the link for SuperSU
[Nexus 4 Android Development] skyjumper:
I used this one, but it doesn't include busybox:

http://download.chainfire.eu/310/SuperSU/UPDATE-SuperSU-v1.04.zip
[Nexus 4 Android Development] rejanmanis:
Thanks for the tutor ;

i did this many times before ; but forgot everything:silly::silly:

Its a good idea if you update the SuperSu with busybox link

Thank You.

and also thanks button sent :victory:
[Nexus 4 Android Development] _kolle_:
because the mediafire-link is broken...what about this superSu and Busybox package ? http://d-h.st/iMY

can it be used for nexus 4 ?
[Nexus 4 Android Development] jpde:
So, I have what may be a stupid question.. I flashed CWM a few days ago and just did a backup in recovery mode.. but I can't seem to find it in the storage when connecting it to my PC.

I had about 3.5gb of free space before and have 1.22 now so it definitely did create files. And it also didn't report any errors when creating the backup.

edit: So, in recovery mode it does show the backup and it says "sdcard/clockworkmod/backup".. but even in root explorer it doesn't show any files in that location.

edit2: Oh, so a quick google research showed it being at data/media/clockworkmod/backup.. and there they are :) although I still haven't figured out how to access those files from my pc, if that's at all possible
[Nexus 4 Android Development] androidfoshizzle:
What are the advantages of rooting the nexus 4?

"Vanilla android >jail broken iOS>90" TV's"
[Nexus 4 Android Development] Benignoid:
Did this work?
[Nexus 4 Android Development] Software Guru:
Apologies if this has been answered before

I've flashed the latest CWM (6.0.2.3) and when I boot into recovery the text is really small

Anyone else experience this and if so is there a fix

Thanks in advance
[Nexus 4 Android Development] sammyycakes:
I have been going at this for hours. I have gotten the bootloader unlocked but keep getting the error error: cannot flash 'recovery.img': no error. I have updated the drivers and googled like no other and cannot get this to work. Help?
[Nexus 4 Android Development] thebryceee:
Did you rename it to recovery.img and place it in the folder you're typing the cmd lines in with the rest of the SDK tools?

Sent from my Nexus 4
[Nexus 4 Android Development] dobah:
The link to the supersu program is still broken. This is the one I used and it works.

http://download.chainfire.eu/282/SuperSU/
[Nexus 4 Android Development] xpresotw:
Confused :confused:
[Nexus 4 Android Development] P8TRIOT:
sudo: fastboot: command not found

Alright So I am having some major roadblocks on how to get Linux (LMDE) to see fastboot. The interesting thing is, is I can get it to successfully pass ADB commands but NOT Fastboot. I have been Googling all morning and have not been successful, can someone please point me to an updated guide of how to setup fatboot for Linux so that I can start flashing in Linux?:
[Nexus 4 Android Development] nfh:
I think that another way to prevent the recovery from being restored is to rename the "recovery-from-boot.p" file that is stored on the root of the N4 storage.

Nonetheless, I am curious about what does the "YES" option does exactly. What script does it disable and what can one do in order to revert it back to its original state?
[Nexus 4 Android Development] jlear3:
Thank you very much!
[Nexus 4 Android Development] johN_is_war:
You need to ./fastboot from the directory your in, or add fastboot to your PATH.
[Nexus 4 Android Development] Tungst5n:
I'm coming into s nexus 4 so I have some dumb questions. If i simply root without flashing a custom recovery, will that interrupt any future updates from Google?

Secondly, when using command prompts, does it automatically recognize the phone when typing those commands in?
[Nexus 4 Android Development] SerkSerk:
Hello, i can't find my backup, where it is? I know it's in the phone because my storage is used but I don't see it on my sdcard :confused:

I can't copy it to my computer :banghead:

Envoyé depuis mon Nexus 4
[Nexus 4 Android Development] casonswag:
Trying looking in data/media/clockworkmod/backup
[Nexus 4 Android Development] johann2204:
I cant find my backup folder to. sdcard/data/media/ and sdcard/clockworkmod is nothing.
[Nexus 4 Android Development] Gokh:
Its data/media in the root of the phone, not in the sdcard

Tapatalked With a Nexus⁴
[Nexus 4 Android Development] strausd:
SuperSU package with Busybox link doesn't work.
[Nexus 4 Android Development] johann2204:
i found it thx. and how can i copy this backup to my pc and if needed back to my phone. i try it with root explorer but it doesn't work.
[Nexus 4 Android Development] Gokh:
Copy the backup to the phone sdcard and then move it to the PC using USB cable

Tapatalked With a Nexus⁴
[Nexus 4 Android Development] RickyBO89:
OTA after rooting

hi all :D

i received my nexus 4 today and the first thing i did was rooting it :P

btw now i've the message of the ota update and the phone can't install it. it just stops after the countdown and stays on the message "rebooting now"

i've flashed CWM and i've read in another thread that it may be the cause of this problem, so i'm gonna ask: how do I perform the ota update?

thank you for your time
[Nexus 4 Android Development] johann2204:
I have try to copy the backup via rootexplorer to phone sd. but nothing happened. the file is not copied. and via pc i cant find the clockworkmod file only with rootexplorer.
[Nexus 4 Android Development] anto.danny:
Check the posts few pages back :good:
[Nexus 4 Android Development] RickyBO89:
do you think there will be any kind of problem/issues/things_to_think_about_it when the android 5 OTA update notification will arrive?
[Nexus 4 Android Development] meher91:
Hi guys!

i am a newbie and i want to root my device...in the OP it says to download latest cwm recovery, but there are two options on their website "Download Recovery" & "Download Touch Recovery"...

what is the difference between them and which one do i download to root my device..?
[Nexus 4 Android Development] blahquader:
the difference is the touch ;)

It means that u can operate your revovery with the touchscreen.
[Nexus 4 Android Development] meher91:
Hey thanks for the reply...

i have rooted my device and while i was doing that i have see a few other options...

can cwm be used to create a backup of the whole phone including messages, apps, app settings, etc..?

if not which is the best app to do so..?
[Nexus 4 Android Development] blahquader:
Yes. Threre is an Option backup and recovery in cwm. Thats what we call a nandroid backup :)
[Nexus 4 Android Development] jdh10475:
If you do a nand back up its like making a carbon copy of your phone. Normally as soon as you have root access you want to do one so you can go back to stock rooted form if you ever want to.
[Nexus 4 Android Development] meher91:
I'hv heard that Nandroid backs up the ROM aswell...what if you want to change the ROM and restore only the app data...is it possible with CMR?
[Nexus 4 Android Development] blahquader:
Nope, but try with Titanium Backup from Playstore.
[Nexus 4 Android Development] mohamed.qadiqadi:
Incremental Updates

I just wanna ask didn't CWM 6 introduce incremental updates instead of huge backups,because i was running paranoid android and i had a backup of it.Before i updated to the new pa version i made another backup.However the two nearly identical backups were both 1.8 gb....
[Nexus 4 Android Development] BigPickle80:
I'm having an issue, I've installed the latest cwm recovery v6.0.3.1 but it wont mount my sd so i can put roms on it, currently im having to side mount my roms. Is this a know problem? Can anyone help me correct it if its not?

Thanks
[Nexus 4 Android Development] bebop_:
Question about using the boot.img method.

I've done that and used it multiple times successfully in a script, but in the past few days the boot.img gets stuck in a boot loop. Anyone know why this would occur?
[Nexus 4 Android Development] dli615:
Start the cmd.exe as administrator, i.e. right click the app icon, and click run as administrator.

It could also be the device has not been detected yet - type fastboot devices or adb devices to check - check if it says offline or online next to the device id

bit late, but hope it helps,

D
[Nexus 4 Android Development] Drmol:
Updated to latest 6.0.3.3 with ROM Manager and when i boot into it, I get "warning: No file_contexts".. what's that? :eek: It seems to work though, but I didn't try to flash anything yet
[Nexus 4 Android Development] GroteBozewolf:
Same issue here. Was wondering the same. Can this be ignored? I seems to be a warning that zip file was passed on as a parameter to start an automatic update process and so it can be ignored, but I might be wrong.
[Nexus 4 Android Development] ekerazha:
Same thing on my Nexus S with CWM 6.0.3.3.
[Nexus 4 Android Development] RickyBO89:
does anyone have already received the ota update to 4.3? did everything go smooth?
[Nexus 4 Android Development] Drmol:
Just a little update, the warning is still there in 6.0.3.4 for me
[Nexus 4 Android Development] ohmer:
My N4 was rooted with this method (I only booted the recovery, not flashed it). I installed the 4.3 update today, so I'm trying to boot recovery to install superuser again.

Now I'm unable to boot again the recovery. When I "fastboot boot recovery-clockwork-touch-6.0.3.5-mako.img", the N4 reboot and then I only get a blank/black screen. I tried to boot the previous version I used last time and this is not working more.

The phone still answer to adb commands (I can "adb reboot bootloader" to reboot again into the bootloader). I can also "adb shell".

/tmp/recovery.log end with:

Any idea?

---------- Post added at 08:53 PM ---------- Previous post was at 08:45 PM ----------

Ah crap, I think this is because my internal memory is encrypted :(

Any way to boot recovery with encrypted storage and flash superuser?
[Nexus 4 Android Development] XDA_Bam:
Same problem here. Not able to fastboot CWM after the 4.3 update. Memory is not encrypted, bootloader state is 'unlocked', blank screen after booting CWM.

I'm thinking about locking the bootloader and unlocking it again, but I'm currently too lazy to set everything up again...

[EDIT]

Just did a

fastboot flash recovery recovery-clockwork-6.0.3.5-mako.img

After choosing 'reboot recovery', CWM actually started and I was able to flash the SU update ZIP. Since the stock recovery will be reflashed automatically on the next reboot, everything is fine now :)

[/EDIT]
[Nexus 4 Android Development] ohmer:
So instead of booting the recovery you flashed it and then the recovery booted fine?

What do you mean by the stock recovery will be reflashed automatically on next reboot? I don't understand why.
[Nexus 4 Android Development] XDA_Bam:
Yes.

It's a feature of the Nexus 4. The stock recovery is reflashed on every boot if the installed recovery is non-stock. When you exit CWM, you will be asked if it should prevent the reflash of the stock recovery - just select 'NO' and everything will return to stock.
[Nexus 4 Android Development] H3PB:
Tried it still dead Android robot with warning after entering the recovery :rolleyes:
[Nexus 4 Android Development] reqmon:
You are clearly doing something wrong. :D
[Nexus 4 Android Development] RickyBO89:
just to make it clear: I'm still with 4.2.2, rooted with this method and with flashed CWM recovery, do I have to unroot first (via SuperSU app?) if I want to update to 4.3? Do I also have to let the stock recovery be re-flashed during the update process instead of blocking it (like I did when updating to 4.2.2)?

thanks in advance :)
[Nexus 4 Android Development] teddybt:
My N4 was also rooted with this method. After triggering the OTA update it boots always into CWM.

Any Ideas what to do?
[Nexus 4 Android Development] deftoner:
the download link for SuperSU package with Busybox is dead :(
[Nexus 4 Android Development] evaradar:
So the root process will become official once the phone has been received by people? Meaning the good ol fashioned way? Unlock the bootloader, flash the CWM recovery image, then boot into CWM, then install the SuperSu zip and then reboot, viola?

Or will this method based on this thread have to be done even if we receive the phone?
[Nexus 4 Android Development] Stryder5:
Until a working CWM is released, this is the only way to root our device. I'm sure someone will get CWM recovery fixed soon enough.
[Nexus 4 Android Development] 3Shirts:
Works perfectly! Thanks. Had the device for 40 mins and it's already unlocked and rooted. Hurrah!
[Nexus 4 Android Development] marty331:
Thanks for putting this together!
[Nexus 4 Android Development] Oggy512:
I can confirm, root works for me. (Nx4 16 GB, german, after OTA).

but the "su" command in adb shell does not work... i made the other steps and it seems to work so far :)

good job guys! thanks!
[Nexus 4 Android Development] kn100:
Worked beautifully, thank you!
[Nexus 4 Android Development] HQRaja:
Errr, my apologies to you and those who came across this error earlier on due to the su commands. It was stupid of me to add that command there needlessly, plus before even settings permissions and adding the necessary symlinks for the su binary itself. Just edited the OP to remove the su command from there. Everything should go fine now.
[Nexus 4 Android Development] tro11:
Got root. Thanks!
[Nexus 4 Android Development] chrlswltrs:
Worked for me

I used this method last night and successfully rooted my Nexus 4. THANKS!!!!
[Nexus 4 Android Development] raze599:
I have just booted the insecure boot.img, it took a long time on the splash screen and it seems to be taking even longer on the boot animation. I unlocked the bootloader immediately before booting the image. How long is it supposed to take?
[Nexus 4 Android Development] Tmender:
Edit: Just realised my question was answered in the first post.
[Nexus 4 Android Development] Stryder5:
It is supposed to only take the normal boot time. I would reboot and make sure it boots normally then try again.
[Nexus 4 Android Development] raze599:
Yep thats what I'm doing now. It booted fine when I rebooted. Going to try again.

EDIT: Got through the process with no problems. Going to download a root app and see if it worked.

EDIT 2: It worked! :)
[Nexus 4 Android Development] :
Instead of having to boot the insecure boot.img then manually push and set permissions you could boot the CWM recovery and just sideload the SuperSU.zip:

fastboot boot recovery.img

Then instead of choosing install .zip from sd card choose install .zip from sideload.

adb sideload filename.zip

Done :o

EDIT: Added the recovery I made and the superuser.zip that I sideloaded.
[Nexus 4 Android Development] mat.hen:
If I do a reset phone from Settings, will it keep root? I'd like to start from initial set up so my phone restores from Google.
[Nexus 4 Android Development] NonoKawa:
Thank you but does'nt work for me !

When command fastboot boot boot.img done, my phone reboot to Android right ?

But after, adb commands are not recognized (device is note recognized)

Have to reboot on fastboot mode to type adb commands or not ?

Thank you
[Nexus 4 Android Development] grayson73:
Forgive the noob question: Do the steps in post #1 unlock bootloader and root? Does this mean that bootloader needs to be unlocked in order to root?
[Nexus 4 Android Development] :
Yes and Yes :)

---------- Post added at 07:40 PM ---------- Previous post was at 07:35 PM ----------

Do you have USB Debugging turned on and the Google USB drivers from the SDK installed?

Turn your phone on and connect it to the computer and type:

adb kill-server
adb devices

Do any devices appear?
[Nexus 4 Android Development] Stryder5:
Did you actually do the CWM method yourself? Or is this speculation?

I haven't tried your recovery yet but the last 2 recoveries I tried didn't work. I tried the sideload option and ADB didn't detect the device.
[Nexus 4 Android Development] shahabk818:
umm i have a question do guys know that when google might want to sell more phones in us? like if i stay up the night do i have a chance to get the phone by refreshing the page???
[Nexus 4 Android Development] :
Yep this is the option I used to root my phone last night, before this guide and worked perfect.

Does adb work when booted into android for you?
[Nexus 4 Android Development] NonoKawa:
Yes of course usb debugging activated ;)

And already done a adb devices but no device found !??

All steps before where done (bootloader unlocked)

Probably usb issue with my notebook, will try with another one as soon as possible...

Or wrong boot.img file ?

Thank you very much !!!!
[Nexus 4 Android Development] Stryder5:
Wow, TOTALLY WRONG page to ask this on.

But to answer your question, current orders aren't expected to ship for 3 weeks so everything is on backorder right now. You have no shot of getting it but I welcome you to stay up as late as you want.

---------- Post added at 02:24 PM ---------- Previous post was at 02:22 PM ----------

Yep, I already got root working yesterday afternoon with the help of the OP and some of the other devs, but I'm just surprised your sideload option worked for you.
[Nexus 4 Android Development] :
And also there is a backorder of N4'S, Google are emailing some buyers stating that there will be up to three weeks before they get more stock, so at the moment no chance.

Anyway on topic but yes I tried a few ways to get SU working and used the factory images a few times to remove any changes until I realised I didn't even need to use the insecure boot.img haha, but if it works for others like it did for me its a much easier root method, until one clicks out anyway.

---------- Post added at 08:41 PM ---------- Previous post was at 08:39 PM ----------

Yes try on a different computer, as long as Google's USB drivers are installed and USB Debugging is on there shouldn't be an issue, but I've ran into that wall before on certain computers.
[Nexus 4 Android Development] Stryder5:
Interesting.

I already have root but am going to update to the OTA tonight. If I lose root, I'll give your recovery a shot with the sideload option.
[Nexus 4 Android Development] NonoKawa:
Tried with my girlfriend computer and all is good now !!!

Thank you guys for this thread !!!

Will install cwm recovery later, don't need it for now
[Nexus 4 Android Development] :
Gratz you got it working :) but don't install CWM, all we can do at the moment is "boot" it. I think it has something to do with the "Secure Boot" stated in bootloader mode, if you do flash it it will revert back to stock recovery.
[Nexus 4 Android Development] jimmyz:
Thanks! If I root via this method I will still be able to update OTA right? or does installing busybox prevent the OTA from working?
[Nexus 4 Android Development] xenmonkey:
Thank you. works like a charm!
[Nexus 4 Android Development] :
You will still be able to update via OTA but you will lose root after, the bootloader will still be unlocked and its easy enough to re-root using this method though.
[Nexus 4 Android Development] smirkis:
did you guys have to update your fastboot? i had my gnex and my N4 side by side and couldn't get my computer to read my N4 in fastboot. so i just skipped unlocking the bootloader for now.
[Nexus 4 Android Development] :
Just update platform tools and the USB driver through the SDK and give see if it works then :)
[Nexus 4 Android Development] Topgun966:
Hey guys need help here. When I just boot to the boot.img it works fine. But when I try flashing it, well did flash it, its in a boot loop. Thoughts?

Edit: I did extract the boot.img from stock and flashed that to fix. But just thinking what is up with it.
[Nexus 4 Android Development] Stryder5:
Don't flash it. Just boot it.
[Nexus 4 Android Development] zarch1972:
Worked a treat, thanks. :good:
[Nexus 4 Android Development] keepittidy:
Works perfect thanks... First time unlocking bootloader and rooting so thanks for the easy guide :good:
[Nexus 4 Android Development] himeshladva:
How long should the phone be on the nexus logo for after "fastboot boot boot.img" ?

Been about 10 mins for me using the boot.img linked in the OP!
[Nexus 4 Android Development] bohmy1190:
Hey guys, how can I remove root again? I have to send it back to Google, the Speaker isn't working anymore :(

pls help!
[Nexus 4 Android Development] 3Shirts:
Don't worry. I had that and had to force a reboot (power and volume up). That then booted but obviously not from the insecure image so I repeated the process of fastboot flashing the boot.img. It worked the second time.

---------- Post added at 12:15 PM ---------- Previous post was at 12:13 PM ----------

Fastboot oem lock.
[Nexus 4 Android Development] jaxenroth:
Hold all three buttons to shut down device and try again. I got stuck in a bootloop as well, did that, got back into fastboot mode and pushed the boot.IMG, than did the root process.

---------- Post added at 07:26 AM ---------- Previous post was at 07:24 AM ----------

Thx for this. Easy peasy 1 2 threesey.