yashsingh1/xdaforums huggingface dataset:
[Nexus 4 General] silvagroup:
Mind you haven't had time to try it myself, but I don't believe you need stock recovery. But you'll need everything else. Your going to loose root. I recall seeing there is a new root for L worked out by Chainfire you'll need that if you want root again.
[Nexus 4 General] Dylan. Veldhuis:
Thank you very much!

I didn't think I need to flash the stock recovery but I also didn't want to brick my phone :P

So, even if you don't flash recovery.img twrp is removed and so is root. hmmm. It's not a big deal, but it is interesting.
[Nexus 4 General] LeoFalto:
It worked perfectly while flashing the new 5.0 image. But how is it possible that it still remembers my home screen icons, wallpaper and the old trebuchet laungher is still there? Even stuff like the old messaging app is still there. I did the optional step and I even wiped everything using cwm before starting this procedure so how is old data still on the phone?
[Nexus 4 General] mammenj:
I flashed twrp image via fastboot but still don't have twrp, neither stock recovery. Any idea what's going on?
[Nexus 4 General] efrant:
Wallpaper, Wi-Fi settings and other things are backed up to your cloud Google account, so they get restored when you sign in. As for the apps, I'm not sure.
[Nexus 4 General] steviemch:
A little more info would probably be beneficial if you want some help. How did you flash the factory image. Manually or with the flash-all script? When flashing twrp, did you boot straight to recovery after flashing, or did you reboot into the system?

Sent by Borg neural subspace transceiver node.
[Nexus 4 General] LeoFalto:
Yeah the fact that apps are still there is really confusing me.
[Nexus 4 General] mammenj:
Flashed using flashall script without modification. Then set up the system and rebooted to boot loader and flashed recovery.img using flashboot. I restarted the boot loader and went to recovery, I was able to access twrp. Then I rebooted normally to system. Then I went back to boot loader and then tried to goto recovery, did not find twrp.

Hope this helps, not sure what's going on.
[Nexus 4 General] steviemch:
Flash the TWRP img file again. After flashing is complete, from the bootloader boot straight into recovery. From the newly flashed TWRP recovery, reboot into system. No need to restart the bootloader.

Sent by Borg neural subspace transceiver node.
[Nexus 4 General] efrant:
Boot into TWRP right after you flash it then delete this file: /system/recovery-from-boot.p

Then TWRP should stick.
[Nexus 4 General] s0ro05h:
I unlocked my N4 bootloader previously. Now, I must begin whit flashing lollipop bootloader?
[Nexus 4 General] n2d551:
Just follow the instructions to #8 and just type in the command prompt flash-all .bat and it'll do its job.

Sent from my van down by the river

---------- Post added at 12:47 PM ---------- Previous post was at 12:36 PM ----------

And give it time. After it writes the boot and the radio it says it can't find 2 files. I thought it was stuck but after it paused for a few minutes it worked. Do what efrant said above to keep recovery or place recovery image in that folder and do fastboot flash name of recovery. Image

Sent from my van down by the river
[Nexus 4 General] Dan1234567890:
When I flashed the lollipop factory image with flash-all command I watched carefully what are the messages in command prompt, and I think everthing is ok, but these messages got me a bit confused:

"archive does not contain: 'boot.sig'

archive does not contain: 'recovery.sig'

archive does not contain: 'system.sig'

archive does not contain: 'vendor.sig'"

everything else seems ok, at the end I got the message "finished- total time: 96.810s", booted the device and everything works OK, but I'm confused by these messages....does someone knows why these messages appeared, what do they mean and is this normal? Does everybody have these messages when they use flash-all script?

Why would google put in factory image commands that are trying to run files that do not exist in image?

thxxx :D
[Nexus 4 General] n2d551:
Don't know it worked but said that it couldn't find stuff Soo..

Sent from my van down by the river
[Nexus 4 General] rrohanjs:
i flashed the factory image and had adb set up .. ran it for few days and rooted it as well .. now when i went to flash twrp recovery my device doesn't show up when i type adb devices .. i tried setting it up again and same problem .. what should i do now﻿
[Nexus 4 General] Dan1234567890:
seems like a driver problem, I quess you are using windows?

try to get some help here:

http://xdaforums.com/google-nexus-5/development/adb-fb-apx-driver-universal-naked-t2513339

:cowboy:
[Nexus 4 General] n2d551:
I had the same issue. Had to use usbdview to remove everything Android related, rebooted, Plugged in the mako, and in device manager select Android composite driver. Adb devices returned
[Nexus 4 General] Mord_Savant:
Just used this guide to install Lollipop 5.0, works perfect. Only thing I did different was instead of flashing recovery.img, I flashed openrecovery-twrp-2.7.1.0-mako.img.

Also note for others out there that with Lollipop 5.0, to root it you must use "CF-Auto-Root-mako-occam-nexus4"... I tried installing BETA-SuperSU-v2.25.zip like normal through TWRP, and it ended up making my phone stuck at the boot screen and I had to reinstall Lollipop to fix it.

:good:
[Nexus 4 General] anshumandash:
Did your format sd card? Some people complained lollipop couldn't read their sd card after flashing factory images. They had to format sd card and then it worked.
[Nexus 4 General] Mord_Savant:
I erased everything, started from scratch. Lollipop was working perfect, it only stopped working once I incorrectly tried to root it. It's working fine now, though.
[Nexus 4 General] delly47:
lollipop root

couldnt get superSU to root,

CF-Auto root wont install, says installation aborted.

edit: my bad just saw this article literally right next to my post...

http://www.xda-developers.com/android/supersu-beta-lollipop-root-stock-kernel/
[Nexus 4 General] RealVarun:
Nexus 4 Update Problem

Hi,

I got a system update from Google from Kitkat to lollipop on 27th Morning. I accepted it and started the setup. Everything went fine including the app update.

As it was taking longer for the app to get updated i pressed the start button. The phone started once and it showed me an error when i clicked to it, it restarted and from than it is just showing me flying dots. I am able to go past android screen and enter my password but after that it just keeps on rolling.

Is there a solution for it to be resolved? I have my contact restored but want to save data in the inbuilt memory. Any guidance?

I have already done system recovery and restart. No success till now.

Thanks

Varun
[Nexus 4 General] Christ972:
Thanks

Hi,

i have erased my OS by mistake and i've just followed your tuto. And now everything works perfect, my Nexus 4 is updated to Lollipop.

Thank you very much. You save my N4 :)

Christ
[Nexus 4 General] jafazec:
Hi all! I need help..Did everything according to instructions in OP,but i got stuck at flashing system.img where I get an error saying there is no enough space?! Tried erasing partitions,but no avail...What to do,please respond,phone is dead now..Thanks !
[Nexus 4 General] Sekas:
HELP

Hello guys!

I have slim kat 4.4.4. and I want to upgarde to stock 5.0.

Do you know how to flash the factory image from google developers because when I go to TWRP it itsn't ont th place I putted it in because TWRP doesn't recognize the file. Can you help me please? I prefer this to sideload, adb, toolkit.

I really appreciate.

Best
[Nexus 4 General] RASTAVIPER:
You don't have an option.

You should wipe your custom Rom and use one of the ways that you said.

I recommend the wug toolkit.

Unleashed by my Nexus 4
[Nexus 4 General] Drmol:
The new 5.0.1 factory images have a cache.img file as well, should I just flash that instead of using format cache command?
[Nexus 4 General] steviemch:
I'm sure I remember reading that some users experienced issues after flashing the cache.img file on 5.0. Personally I just stuck to running the format cache command.

Sent by neural subspace transceiver node.
[Nexus 4 General] Drmol:
Okay I guess I'll do that as well, I was just confused whether I need to flash it or not because I never saw it in factory images before.

Thank you for your quick reply :)

---------- Post added at 06:59 PM ---------- Previous post was at 06:05 PM ----------

Ugh, does it take more time to boot up for the first time then previous android versions? Because I followed the tutorial and it was booting up for over 5 minutes. I can assume that's a bootloop, right? Both KK and JB only took like two minutes afaik. Wiping data and cache in recovery doesn't help, I also tried downloading LRX21T files instead, same thing happens, any ideas? :(

Never mind, wasn't a bootloop, just took a lot more time than I'm used to :D
[Nexus 4 General] dramalicious:
how mutch?

how mutch time did u wait?:-s i w8 for 20 minutes :-s 5.0.1
[Nexus 4 General] Drmol:
Around 10-15 minutes
[Nexus 4 General] steviemch:
I've been running Lollipop since the first dev preview was released, so I'm used to the extended boot up time. It usually averages about 10 minutes for me.

Sent by neural subspace transceiver node.
[Nexus 4 General] Fatty1212:
It takes longer to boot now because 5.0 uses ART now instead of Dalvik runtime.
[Nexus 4 General] muratturatci:
Hello, i updated my nexus 4 to latest stock 5.0.1 version. But there is something interesting. Remaining system memory is 31mb. Isn't it very low?

And root sometimes gives fail (used latest auto cf root). I don't like Lollipop and ART. I think i'm going to install JB or Kitkat again.
[Nexus 4 General] JustinSang:
Nice bro ! thanks you for guide !
[Nexus 4 General] Madfysh:
CF Auto root is not needed any more. UPDATE-SuperSU-v2.37.zip from http://download.chainfire.eu/636/SuperSU/ is working fine flashed from recovery.
[Nexus 4 General] cobyman7035:
Same process if u got a nexus5? Iwanna go back to stock 5.01 from franco

Via my NeXus™ 7FHD on XDA Premium app
[Nexus 4 General] efrant:
Yes, the process is essentially the same for all Nexus devices.
[Nexus 4 General] hamedunix:
It's a known issue. Perform a factory reset via recovery and you'll be fine. Please note that you'll lose all your data. A full backup is highly recommend.
[Nexus 4 General] GroteBozewolf:
Not true, there is an issue with the user partition. But this is something else.

After the 5.0.1 update your SYSTEM partition will only have 30 MB left. No problem there, as it is read only anyways (unless rooted) and does not grow in size.
[Nexus 4 General] insaneadj:
sry
[Nexus 4 General] muratturatci:
I'm reverting back to an older version. Which do you offer me? 4.4.4 or 4.3 i don't like ART at all. I never tried kitkat.
[Nexus 4 General] abaaaabbbb63:
Go for 4.4.4. You can choose Dalvik, and it's smoother, and looks better than 4.3.

May I ask why you don't like ART?
[Nexus 4 General] muratturatci:
I reverted back to stock 4.4.4 and wiped data cache and factory reset. İt looks good but i'm experiencing very slow downloads on wifi with my nexus 4.
[Nexus 4 General] dmb4444:
Tried Stock Lollipop, Barfed, Returned to Cyanogenmod

Google Nexus 5 is my phone. I've been running Cyanogenmod 11 on it since I got it a year ago, quite happily. I love the control andlight weight of CM. I use root to enable things like Titanium Backup and AdAway.

I wanted to see what I might be missing in stock Lollipop, so restored my Nexus 5 to stock, following the EXCELLENT instructions at the head of this thread.

I lasted about six hours, submerged in a sea of google flotsom and jetsom. Four hours of that time was spent away on errands or I would've purged the demons much sooner. I don't see how people can stand having their devices owned in such a manner as google pushes.

Seeing NOTHING beneficial, I RAN back to good old CM 11. I'll patiently wait for CM 12 for my phone.

Flies over to Cyanogenmod.org to make a contribution.

db
[Nexus 4 General] niilartey1:
Not read the full thread but am I right to say this method will work for Nexus 6?
[Nexus 4 General] Dan1234567890:
In general, yes.
[Nexus 4 General] niilartey1:
Thanks .
[Nexus 4 General] LondonBenji:
Perhaps I have missed something or a step somewhere but my device wasn't recognised nor was I able to run 'fastboot oem unlock' until I had done 'adb reboot bootload' .
[Nexus 4 General] efrant:
Yes, you missed step C7. :)
[Nexus 4 General] Austin Ag06:
I read the last few pages, but I didn't see anything similar to the issues I am having trying to flash either LRX21T or LRX22C. I have been using custom ROMs on my N4 for the last year or so and when updating from a 4.4.4 ROM to a 5.0 ROM, none of my sensors would work and I was told that I would need to flash a factory image to get them to work again.

This weekend I tried installing both of the factory image versions mentioned above using both NRT and the tutorial posted in this thread, but my phone won't boot past the spinning dots. I have also tried rebooting into recovery and wiping cache and factory reset and I am still stuck at the spinning dots for over an hour.

Recently, I tried installing Rastapop and it worked, but I still did not have the light sensor or gyroscope sensors.

Does anyone have any other ideas for what I could try? Thanks in advance for your help.
[Nexus 4 General] abhishekjain.ims:
Recently I have downloaded v5.0.1 official image from the Google image page, but I only have found a single file with no extension inside .tgz. I dont know how to flash it because it dont have any flash-all.bat or any other .img files. Please guide me how to update my N4 to official Lollipop, currently I am using v4.4.4
[Nexus 4 General] Dan1234567890:
You have to extract it with 7zip to the level where you have flashall script and all 6 partitions... They all have to be in the same folder. Than run flashall, wait it for the flash (look at the progress on phone) and that's it... [emoji106]
[Nexus 4 General] abhishekjain.ims:
I flashed v5.0 as the zip of v5.0 contained all the files including flash-all.bat etc, but the zip file of v5.0.1 doesnt contained anything except a single file which was without any extension. I dont know what to do with that file & how to sideload v5.0.1 manually without all the neccessary files like flash-all.bat etc.
[Nexus 4 General] atulclassic:
unzip the file with 7zip ir winzip and all 6 files will be there
[Nexus 4 General] abhishekjain.ims:
No dear, there is only a single file in v5.0.1.. :rolleyes:
[Nexus 4 General] atulclassic:
can you post a screenshot of your system
[Nexus 4 General] RASTAVIPER:
Are you sure that you downloaded the correct file from this page?

https://developers.google.com/android/nexus/images

It should be:

occam-lrx22c-factory-86c04af6.tgz

P.S. No reason to demand from other people to Thank you, especially when you don't do the same yourself.
[Nexus 4 General] abhishekjain.ims:
Yes I have downloaded it from the above mentioned source & I also verified its MD5 checksum....
[Nexus 4 General] efrant:
Use 7zip to unpack it. The .tgz file contains a .tar file which needs to be unpacked. The .tar file contains a .zip file and some other files.
[Nexus 4 General] Dor-b:
error 404

Hello,

Can you please re upload ? link is dead

Thanks
[Nexus 4 General] berniedc:
great how to
[Nexus 4 General] srdjannj:
Hello.

Does anyone have a link to stock lollipop nexus 4 kernel?

Thank you, never mind. I've managed.
[Nexus 4 General] chrone:
Oh I forgot I deleted it. Here you go platform-tools-v21.zip
[Nexus 4 General] ssbnasa:
N5 Dead/Soft Brick: Only Vibrating

I tried almost all methods around. Even tried flashing stock via wugfresh's toolkit but its giving me error "not supported in locked device"

Phone is vibrating when i long press power + vol down, only display isnt coming up no matter what i do.

Also fone gets detected in fastboot devices, just display isnt turning up.

What should i do now? Any help?

Thanks
[Nexus 4 General] RASTAVIPER:
Probably then you need to unlock your bootloader.

Did you try this?
[Nexus 4 General] ssbnasa:
yes sir i did using wugfresh's toolkit, even it successfully does so, in the stage where it asks to press power button to confirm in the laptop, i do that also, but no display comes whatsoever, n matter what i do. Is my display gone ?

Thanks
[Nexus 4 General] RASTAVIPER:
I hope your phone is charged.

So doesn't even start by pressing only power button?
[Nexus 4 General] ssbnasa:
Yea fone is charged enough. And exactly thats what i'm saying, even if i long press the button it just vibrates and nothing else.

Also it even shows as media device/drive in my laptop, only this is that display isnt coming up and nothing happens apart from the vibration part. :confused:

Thanks
[Nexus 4 General] Green-Bot:
Hi,

My wife just replaced pattern on Nexus 4 running android 5.0.1 with PIN Code yesterday night. In morning, she just doesn't remembers it (Girls are Girls :P) Wi-Fi, Bluetooth and mobile data connection settings are turned off.

Phone has Android Device Manager installed and activated as well. But unless it doesn't have a working internet connection, its of no use. Lots of pictures, very precious

It was never rooted. USB Debugging is enabled and its bootloader is unlocked(i did it during kitkat update).

1 Is there any way through which i can recover the data? maybe pulling through adb?

2 Maybe i can root it in some way or install any custom recovery through which i can take backup/copy the data?

3 Is there any way to get this phone connected to internet i.e. reverse tethering or anything?

4 Can i flash the previous or same factory image so that i can get into the system and access the data?

Please help guys, XDA is my last hope of ray !!
[Nexus 4 General] atulclassic:
most important is your data (pics)..so lets try to save them first

as you said bootloader is unlocked (its lucky for you)..flashing custom recovery like twrp can save all your data since twrp has mtp enabled option.

download adb and fastboot drivers from here http://xdaforums.com/showthread.php?t=2588979

download twrp for N4 from here http://techerrata.com/file/twrp2/mako/openrecovery-twrp-2.8.5.2-mako.img

save this file on your desktop

after installing adb and fastboot drivers, connect your device in bootloader mode to usb

open a command terminal from desktop and give following command

fastboot flash recovery openrecovery-twrp-2.8.5.2-mako.img

this will flash custom recovery into your device and now reboot your device to recovery with usb on

you will see a pop-up on your computer screen showing device partition..open up and copy whatever you want

Another way is to just wipe data/cache from stock recovery..this will wipe your data (not the pictures) and also the lock will be removed

How to enter stock recovery..watch any video on youtube or refer the first post in this thread
[Nexus 4 General] Green-Bot:
I cannot thank you enough for your helpful post. I will definitely give it a try and will let you know the output.

One question: If i wipe data/cache from stock recovery, as per you only the data will be deleted, not the pictures. I guess pictures are also stored on data partition as nexus 4 doesn't have ext sd card.
[Nexus 4 General] atulclassic:
here the data is a partition used for external apps

pictures are stored in internal memory which is secure while wiping from stock recovery

P.S. if you are wiping from custom recovery, make sure not to check the internal storage else your data will be gone.
[Nexus 4 General] Green-Bot:
Thanks for your response and making it clear the difference. But i am confused which method should i follow: wiping data,cache,dalvik cache from stock recovery or use cutom recovery as you described earlier.

What do you mean by not checking the internal storage through custom recovery?
[Nexus 4 General] efrant:
Wiping data from the

stock

recovery will delete ALL data, including pictures, etc.

Wiping data using a custom recovery should keep your pictures.
[Nexus 4 General] Natakranta:
That's what I thought, but couldn't verify as I haven't seen neither N4 nor stock recovery for year and a half ;) [MENTION=1566190]efrant[/MENTION], I'm assuming lock screen pattern or pin is saved on /data and wipping it will reset system to factory removing security from lock screen. Am I right?

[MENTION=4930936]vinay28761[/MENTION]

In custom recovery user can distinguish between wiping data = partition: /data (user applications, their data and system apps data) or wiping internal storage = partition: /data/media (pictures, videos, downloads, movies, music...).

When wiping data in TWRP it even says "wiping /data without wiping /data/media.

Stock recovery "wipe data" will delete whole /data partition including /data/media because it works as factory reset - to clean the phone from all user data.

What I would do:

Have adb/fastboot set up on PC with drivers to recognise phone with at lest fastboot.

Download latest TWRP 2.8.5.2 for mako (Nexus 4) and rename the file from:

openrecovery-twrp-2.8.5.2-mako.img

to:

twrp.img

Then on PC in terminal (cmd window) type:

fastboot boot twrp.img

This will boot the phone in TWRP without actually flashing it to phone's internal storage - stock recovery will be still there intact.

From there you can enable MTP and access phone internal storage (/data/media) to copy your pictures, music, downloads, ect to PC.

When you have them safe you can try to recover your phone. From main menu go to Wipe. There go to Advanced. There tick these 3: data, cache, dalvik cache and swipe to confirm wipe.

Now reboot.

Phone should boot to stock system without any user settings or apps, but pictures, movies, downloads, music will be still there.

All you need to do now is let her reinstall all her user apps from Play Store as a punishment for not memorising pin.

:D

The Answer to The Ultimate Question of Life, the Universe, and Everything is: CLEAN FLASH.
[Nexus 4 General] efrant:
I believe it is stored in a file somewhere in /data (at least that's how it used to be done on old versions of Android). Technically, one should be able to just delete the file and it should boot with no PIN/pattern. vinay should be able to find the name of the file with a quick search. I know it has been discussed on XDA at some point.
[Nexus 4 General] Green-Bot:
I did search this and found the pattern is located at /data/system/gesture.key For password/pin code we need to delete /data/system/password.key

[MENTION=1566190]efrant[/MENTION] Please correct me if i/m wrong :o:p
[Nexus 4 General] efrant:
That sounds right, but I can't really confirm. Try it, and if it doesn't work, you can always just wipe data using a custom recovery, and just reinstall all your apps as was mentioned above. All your photos (Assuming they were stored somewhere in /sdcard) will still be there.
[Nexus 4 General] Green-Bot:
So /sdcard partition on our 16GB Nexus 4 is a separate partition? Wiping data through custom recovery will only delete apps and its data?
[Nexus 4 General] efrant:
No. Yes.

/sdcard is a symlink to /data/media. Wiping data through a custom recovery deletes everything in /data except the /data/media folder.
[Nexus 4 General] jokermithun:
Hello guys...need some help regarding internal storage issue

when i flash custom rom based on android 5.0 the internal storage shows '0' subfolers like emulated/0/0/0

but flashing factory image solves this issue:confused:

---------- Post added at 06:45 PM ---------- Previous post was at 06:43 PM ----------

How to avoid this internal storage issue???

ur help greatly appreciated:o
[Nexus 4 General] efrant:
Flash stock (to make sure everything is gone) then update your custom recovery to the latest version. (I would recommend TWRP. Latest is 2.8.5.2 and can be found here for mako.) I believe that should solve the issue.
[Nexus 4 General] And_you_are:
Due to the age of the OP, is this still the best guide for a noob trying to root their Nexus 4?

The two reasons for rooting is to regain control of the toggling of mobile data for the app Deep Sleep Battery Saver, and to enable the recording of phone calls if desired.

I have zero knowledge of rooting my N4, or what to use after rooting.