yashsingh1/xdaforums huggingface dataset:
[Nexus 4 Original Android Development] w4rheart:
Sorry, I was in a rush yesterday night.

But I can confirm: It worked!

Runnung Android lollipop 5.0 rooted now!

Just used wugfreshs great toolkit. No bootloop, no extra factory reset needed for me. Just be patient ;)

Happy flashing!
[Nexus 4 Original Android Development] Aashuk Mehta:
Thanks man, now I can use this without any concerns
[Nexus 4 Original Android Development] Midomad:
How did you root?and did you install a recovery it's working?
[Nexus 4 Original Android Development] w4rheart:
Well actually there aren't that many options, are there? ;)

Here is what I did (V1.9.7):

First I followed the 'Full Driver Installation Guide' to make sure I had the latest and proper drivers installed.

Secondly I did the 'Flash Stock + Unroot' method and flashed Android 5.0.

Third I booted my device, waited like 10-15 mins for my device to boot up, and set up android afterwards whilst installing all apps as usual.

Last but not least I enabled USB Debugging mode again and rooted my device with the 'Root' method in Wugfresh's Toolkit. I also ticked 'Custom Recovery' and have TWRP installed as well right now.

Simple as that ;)
[Nexus 4 Original Android Development] RASTAVIPER:
Personally I skipped the Unroot part and upgraded fine. The rest was as you described.

Although it sure needs much time and some reboots to complete the process.

If anyone wants to keep his data and just upgrade to Lollipop, should flash stock img files in this order: radio, bootloader, boot and system.

I am using Win 8.1 btw.
[Nexus 4 Original Android Development] buge boyo:
Is this normal little space left on system ROM after installing.
[Nexus 4 Original Android Development] n2d551:
I've had as little as 256mb so...

Got about the same running factory lollipop 865

Sent from my van down the river
[Nexus 4 Original Android Development] funk_doc:
Question for the feature "Back to Stock: Flash Stock + Unroot"...

If I use this, will my N4 always be unrooted or is there a possibility for just flashing a stock tgz and not getting unrooted?
[Nexus 4 Original Android Development] RASTAVIPER:
If u just need to get back to stock kernel, just flash it through custom recovery or through toolkit if you prefer it.

Unleashed by my Nexus 4
[Nexus 4 Original Android Development] funk_doc:
Yeah but CWM doesn't support tgz files? Also I can't find a feature where I can just flash a tgz file in the toolkit without unrooting my device(?).
[Nexus 4 Original Android Development] RASTAVIPER:
If you need flashables stock 4.4.4 kernel I can upload it here for you.

Unleashed by my Nexus 4
[Nexus 4 Original Android Development] funk_doc:
No I'm looking for 5.0...
[Nexus 4 Original Android Development] RASTAVIPER:
If you extract it from official Rom, it's the boot.img file which can be flashed through Wug.

Unleashed by my Nexus 4
[Nexus 4 Original Android Development] funk_doc:
The "bootloader-flo-flo-04.04.img" is 4MB and the "image-razor-lrx21p.zip" is 478MB... So I guess I can flash the zip via recovery and the img as the bootloader via the toolkit?
[Nexus 4 Original Android Development] RASTAVIPER:
This is the stock 5.0 kernel.
[Nexus 4 Original Android Development] WugFresh:
The moment the system.img is flashed, your root is gone, because that's where SuperSU resides... Your system partition.

Getting " unrooted" should never be a concern, as re-rooting is one click away.
[Nexus 4 Original Android Development] WugFresh:
There is a button in advanced utilities called "restore stock kernel". I have been automatically extracting, naming and uploading the stock boot.img for every build on every nexus device. You don't need to download the whole fpack.
[Nexus 4 Original Android Development] WugFresh:
It seems that you are confused.

That zip file is not intended to be flashed in recovery. It is not a "flashable zip" file and will not work. ROM.zips are what you flash in recovery.

The files in the tgz are intended to be fastboot flashed. There are apps like flashify that can do some magic and flash IMG files for you.

What are you trying to do.? You are majorly over complicating something.

Just use flash stock + unroot, then re-root.
[Nexus 4 Original Android Development] funk_doc:
That was my first thought overall. I've asked because I thought there might be another solution :laugh:
[Nexus 4 Original Android Development] nick2503:
Flashing 5.0 using 'Stock + Unroot' option

I just did flash my stock 5.0 image! A very easy to use interface by wugfresh! Simple with onscreen instructions! Read and follow them......probably wont end up messing with your device!

Backup of all your files is recommended!

A backup is necessary because in my case when i flashed the image is when it wiped the entire Internal Storage! I did not enter a bootloop or any other issues!

Though to avoid any issues I did a factory reset and Cache wipe! Becasue anyways my DATA was wiped completely!

Thought to share this.......great for newbies who wanna flash stock and root it easily!

---------- Post added at 02:40 AM ---------- Previous post was at 02:28 AM ----------

The only issue that I wanted to ask that if I now a flash a custom kernel and I want my stock kernel back.......the option in the advanced options under 'Launch in the toolkit saying Stock kernel will wipe my entire data again?
[Nexus 4 Original Android Development] WugFresh:
No, flashing stock kernel will not wipe your device. I made sure that all the message boxes have very explicit information, and use CAPSLOCK whenever things talk about wiping.

Here's a mini lesson though so you understand why:

The images in a factory package all correspond to a certain partition on your device:

bootloader.img > bootloader partition

radio.img > radio partition

recovery.img > recovery partitons

boot.img (aka stock kernel) > boot partition

cache.img > cache partition

userdata.img > userdata partion

system.img > system partition

...

Your "data" is the userdata partition, and your system settings (email accounts, stock home screen layout, etc) is the system partition.... So, whenever you are performing operations that have nothing to do with the system or userdata partitions, your data stays in tack - like flashing a custom recovery, flashing a custom/stock kernel, wiping cache, etc. Hope that helps.

Cheers,

{{ WugFresh }}
[Nexus 4 Original Android Development] nick2503:
That solves my issue and the understanding about the system! Thanks a lot wugfresh!!
[Nexus 4 Original Android Development] Zirillian:
Just to reiterate something that has been said a couple times now. When upgrading from 4.4.4 to 5.0 on a clean flash, do a factory reset first. It minimizes the chance of 5.0 not booting up. Didn't factory reset originally and was stuck on the bootup screen for 30+ mins twice just doing the normal flash stock + unroot command. Searched the thread, found that I needed to use the Advanced Utilities to get into TWRP to do a factory reset. Did so, and on the next flast stock + unroot, it booted in under 10 mins to 5.0.

Thanks Wug.
[Nexus 4 Original Android Development] RolF2:
Bug in 1.9.9 - I'm trying flash new recovery, phone already in bootloader mode -> advanced utilities, fastboot/bootloader mode checked - fastboot flash recovery = ADB device was not found

Why nrt is trying to use adb ?

R.
[Nexus 4 Original Android Development] Glorifyy:
You literally just saved my life
[Nexus 4 Original Android Development] server3249:
Nice program, I used it to revert to full stock before installing lollipop. Why is "Custom ROM - Lollipop" missing? There are custom roms like simple aosp for lollipop.
[Nexus 4 Original Android Development] vic_singh:
Hey,

When i try to do a normal flash+unroot i get an error about ADB not connected.

My device is stuck in bootloop still.
[Nexus 4 Original Android Development] funk_doc:
Same over here. Any solutions?

Edit: I didn't tried it yet, but maybe this one helps: Getting Google Nexus 4 to work on Windows 7
[Nexus 4 Original Android Development] WugFresh:
Rather than use "normal" use "bootloop/softbrick".. Since you are in a bootloop.
[Nexus 4 Original Android Development] Kees-Jan:
5.0.1 is on the developer site for download

I just checked to see https://developers.google.com/android/nexus/images?hl=en-EN#occam ;)
[Nexus 4 Original Android Development] shobuddy:
I'm on stock rooted 5.0 w/TWRP recovery and no other modifications. I've never used WUG's toolkit before. Is there a way to update from 5.0 to 5.0.1 using the toolkit?
[Nexus 4 Original Android Development] RASTAVIPER:
Flash stock reCovery through toolkit

Them sideload OTA.ZIP, which you will find in other thread.

Unleashed by my Nexus 4
[Nexus 4 Original Android Development] agrajaghh:
Thats not working, I'm getting this error: "/system/bin/install-recovery.sh" has unexpected contents, Error (Status 7)"

But if it would work, you would lose root anyway I guess... So I think we have to wait for root fix...
[Nexus 4 Original Android Development] RASTAVIPER:
Don't worry about losing root, cause there is option through toolkit to root again very easily.

When exactly did you get this error?

When you tried to sideload the OTA.zip?
[Nexus 4 Original Android Development] carlosmg2:
I get the similar error while trying to adb sideload ota zip. i'm on unlocked stock + rooted + twrp.

my steps:

- i select the option ADB sideload OTA update. select the .zip ota downloaded (e93b20be8653fe5fd9951f3d38c169d5710ea986.signed-occam-LRX22C-from-LRX21T.e93b20be.zip)

- it goes to fastboot -> android with exclamation mark > i press vol up+power to enter stock recovery

- i select apply update from adb and...

finding update package...
opening update package...
verifying update package...
Installing update...
verifying current system...
[B]"/system/bin/install-recovery.sh" has unexpected contents.
E:Error in sideload/package.zip[/B]
(Status 7)
Installation aborted

any ideas?
[Nexus 4 Original Android Development] RASTAVIPER:
My idea is that u don't pay attention to previous posts.

It's written clearly that you need STOCK recovery for sideloading OTA.
[Nexus 4 Original Android Development] carlosmg2:
I understood that, and that's why I used that option from Toolkit. I think it flashes stock recovery (if you don't have it) and then does the ota zip thing.

doesnt that option flash stock recovery? when it enters fastboot its in the stock recovery, and then I press update from adb

EDIT: I unrooted, flashed the stock recovery permanently and then made the same steps and fails in the same place with the same error.
[Nexus 4 Original Android Development] RASTAVIPER:
Are you sure that u r totally stock in your system?

Did you disable/freeze any system apps? Try and remember this.
[Nexus 4 Original Android Development] carlosmg2:
yes I unfreezed all the apps that I freezed.

lastly this is what i've done to update without losing data:

- download and extract 5.0.1 factory image

- launch this comands:

adb reboot bootloader
fastboot flash bootloader bootloader-mako-makoz30f.img
fastboot reboot-bootloader
fastboot flash radio radio-mako-m9615a-cefwmazm-2.0.1701.05.img
fastboot reboot-bootloader
fastboot update image-occam-lrx22c.zip

The last fastboot is without "-w". That will keep all your data and settings.

And now i'll root it

thanks for the help RASTAVIPER
[Nexus 4 Original Android Development] Cosanostra_OG:
I am on LRX21T with stock recovery, trying to sideload the LRX22C update.

I too am seeing the error:

verifying current system...

"/system/bin/install-recovery.sh" has unexpected contents.

E:Error in sideload/package.zip

(Status 7)​

Looking in the system recovery log, it says

Installing Update...

Verifying current system...

file "/system/bin/install-recovery.sh doesn't have any of expected sha1 sums; checking cache

failed to stat "/cache/saved.file": No such file or directory

failed to load to load cache file

script aborted: "/system/bin/install-recovery.sh" has unexpected contents.

"/system/bin/install-recovery.sh" has unexpected contents.

E:Error in /sideload/package.zip

(status 7)​

Any Ideas?
[Nexus 4 Original Android Development] atropo:
If you rooted the phone, supersu changed some file in system.

You can't update by OTA.

Maybe you may flash by fastboot system image and then retry,
[Nexus 4 Original Android Development] RASTAVIPER:
Flash 5.0 system.img and boot.img and then everything will be allright with sideload of OTA.
[Nexus 4 Original Android Development] Cosanostra_OG:
Thanks. Before reading your reply I ended up doing a Flash Stock + Unroot in No Wipe Mode. Then re rooting. Everything OK, no errors, and now on 5.01.
[Nexus 4 Original Android Development] shobuddy:
I've heard the no wipe mode can cause problems when applying an update. Any truth to this?
[Nexus 4 Original Android Development] Cosanostra_OG:
I did have my saved wifi access points and passwords wiped. No other issues so far, but this will vary from handset to handset.

The Wugfresh FAQ states the following:
[Nexus 4 Original Android Development] shobuddy:
Did the same thing and everything looks to be good. First time using the Wug toolkit and it was much simpler than going thru the manual process.
[Nexus 4 Original Android Development] quinte:
Thanks man, GREAT SUPPORT:good::good:!! But I dont really need to change the recovery ? If I dont wish to use other roms :) ?
[Nexus 4 Original Android Development] WugFresh:
There are other benefits to custom recoveries like making full nandroid backups which is the best backup solution available; it takes full imgs of all your partitions. That said you can do all that with the toolkit which uses temp recovery. It's really up to you. If you flash a custom recovery you can easily go back to stock recovery with the advanced utilities Restore Stock Recovery button. Cheers.

{{ WugFresh }}
[Nexus 4 Original Android Development] impruv:
Hey Wug,

I've unlocked, rooted, installed custom kernels all thanks to your wonderful tool. However, I can't seem to create a nandroid backup. When I select the backup option and swipe to backup... it keeps telling me failed and that it failed to location secure android partition or something along those lines. When I'm home again I'll copy off the exact log of errors.

Thanks!
[Nexus 4 Original Android Development] Traviizter:
Trying to flash a zip but it keeps telling me I need "openrecovery-twrp--occam.img".

The file doesn't exist. You've basically ruined my phone. Cheers though. Hands up, do not use this toolkit! Use the other one that is stickied in this forum section because this is utter crap.
[Nexus 4 Original Android Development] WugFresh:
I would appreciate it if you phrase that as a question rather than an insult.

Your device is not ruined. Select the latest build available for your device rather than the custom ROM setting and it should work. Its looking for the wrong file on that custom rom build. I will fix this in 1.6.3.

Calling my program crap is not appreciated.

{{ WugFresh }}
[Nexus 4 Original Android Development] Fr33L4nc3r:
:eek:

You're holding it wrong ... :rolleyes:
[Nexus 4 Original Android Development] Traviizter:
Lol trolled.

Seriously though, I did something wrong on my end... so yeah, sorry.

Good program! USE IT. yeah.
[Nexus 4 Original Android Development] mlj11:
Hi Wug,

Great work again.

I'd like to clarify something you said all the way back on page 2:

I actually used an older version of your toolkit (1.5.3 I think) to root my Nexus 7. I permanently flashed CWM recovery (6.1.0?) then, and have had no problems receiving and applying the two OTAs that came my way after that.

In fact I was going to apply the same recovery for my Nexus 4, because after flashing each update, CWM actually gave me a prompt to ask if I wanted to preserve root (and I believe the kernel). This has been very convenient, since I only needed to unlock and root my Nexus 7 a grand total of just once since I got it with 4.1; it's now on stock 4.2.1 via OTAs.

Question: Are you sure that I will need stock recovery if I want to receive OTAs in the future?
[Nexus 4 Original Android Development] WugFresh:
I mean if it works it works. There is no in between. I don't closely follow koush's development on cwm so I wouldn't know if he did something clever to make it work. I am not sure. Try it without stock recovery, if it works for you that's cool. If it doesn't then flash stock recovery.

{{ WugFresh }}
[Nexus 4 Original Android Development] sn0warmy:
I may need to hit you up on Gchat when I'm back in front of my PC next week. My auto update hasn't worked either. I didn't really care at first but it would be nice to get that up and running as it should.

Thanks!
[Nexus 4 Original Android Development] Austin Ag06:
I'm having a very strange problem it seems... After struggling the last few days to install the drivers on windows 7, I gave up and decided to try to unlock using a VM running XP. After installing service pack 3, it appears that I have the correct drivers installed. However, when I run the toolkit, it says that my adb drivers are good, the phone boots into fastboot mode which also says that my drivers are good, but nothing else happens. There is a window that flashes for a brief second after checking the drivers, buy it disappears before I can make out what it says.

The program says that it is rebooting the phone, but it stays in fastboot mode. Any help would be greatly appreciated.

By the way, I ran into similar problems with mskips toolkit.
[Nexus 4 Original Android Development] xflowy:
loving the tool so far.

just one question: how can i flash stock 4.2.1 without unrooting the phone?

i only see the option flash stock and unroot.

but i want to stay rooted and simply move from a custom rom to stock 4.2.1

thank you so much!
[Nexus 4 Original Android Development] sathkartha:
Did you not take a nandroid backup of the stock before flashing custom roms? You would only need to restore then!
[Nexus 4 Original Android Development] Riyanweb:
I ran into some problems with mskips toolkit on my windows 8 Pc, but i remember using Wug's Nexus Root Toolkit for my Nexus 7 and how easy it was. 15 mins later & im unlock & ready to go :good:
[Nexus 4 Original Android Development] WugFresh:
Just root again afterwards.. Or make a nandroid of your stock rooted device and restore that. Flashing stock with the toolkit uses Google’s factory images. Flashing those will always make your device fully stock.

{{ WugFresh }}
[Nexus 4 Original Android Development] dannaoj:
toolkit saved me from RED LED

thank you so much for this amazing toolkit, had a red led phone, phone cant boot only red led, used this toolkit, flash stock + unroot and after a couple of tries it revived my phone! :)

credits to the OP
[Nexus 4 Original Android Development] Austin Ag06:
Does anyone have any suggestions as to what I should try to unlock and my phone? By the way, when I connect my phone in fast boot mode, device manager shows adb interface, is this correct?
[Nexus 4 Original Android Development] 12Fully:
I soft bricked my phone and I'm trying to restore it back to stock. I put my phone in download mode and try to return to stock using Wug's. After the factory image gets done installing/extracting it gives me an error saying my phone can't enter bootloader. My drivers are updated to SAMSUNG Android ADB Interface. I've gotten this to work before, but it's not going so well right now.
[Nexus 4 Original Android Development] impruv:
In case you missed it!

Thanks.
[Nexus 4 Original Android Development] Fr33L4nc3r:
Issue highlighted :rolleyes:

Full Driver Installation is your next step.
[Nexus 4 Original Android Development] agrajaghh:
Will rooting of 5.0.1 work with Toolkit 1.9.9 without problems? Or will it flash an old modified 5.0 kernel or something like that?
[Nexus 4 Original Android Development] carlosmg2:
worked nice for me. root + twrp
[Nexus 4 Original Android Development] RASTAVIPER:
How is it possible to select root and to get another kernel??

Anyway, I have tested and is working great.
[Nexus 4 Original Android Development] xpdx:
My friend, you are a god among men.
[Nexus 4 Original Android Development] NYLoRD:
I don't get root bootloader are unlocked, but after root nothing happens.

SuperSU say no su-File installed.

please help me :(
[Nexus 4 Original Android Development] Ulriccc:
I have a quick question:

If I flash another system via "Fastboot flash", it will wipe my data ?

I just want to go from 5.0.0 to 5.0.1 without wiping!

Thank you :)
[Nexus 4 Original Android Development] RASTAVIPER:
Just read 2 last pages.

It's described like 10 times already.

Unleashed by my Nexus 4
[Nexus 4 Original Android Development] Ulriccc:
I just read it, and it doesn't answer my question.

In the last pages, carlosmg2 managed to manually flash to 5.0.1, and he said "The last fastboot (fastboot update image-occam-lrx22c.zip) is without "-w". That will keep all your data and settings."

But want to know, if I flash the 5.0.1 System partition with the NRT, will I loose all my data or not ? (i.e does NRT flash the image with or without the "-w")

Thank you :)
[Nexus 4 Original Android Development] RASTAVIPER:
Since you have already 5.0 , just sideload OTA.zip

You won't lose anything.

You need to flash 5.0 system.img, boot.img, recovery.img first only if you are NOT totally stock. Again, by flashing all these images you won't lose any data.

Finally, this is a toolkit discussion thread. This means that there is no need to talk about fastboot commands, since all these are done easily by using Wug's tool .
[Nexus 4 Original Android Development] Ulriccc:
I totally agree with you, that's why the solution in the previous posts has not helped me, it was about fastboot commands!

After flashing the system, boot and recovery with NRT, the OTA update worked perfectly and I didn't loose any data :good:

Thank you for your help :)
[Nexus 4 Original Android Development] WugFresh:
Site is temp down. For mirrors: https://plus.google.com/113329792100896065459/posts/cTJeV68ChFJ

{{ WugFresh }}
[Nexus 4 Original Android Development] Dude+:
Thanks!

NRT made rooting my N4 a breeze, thank you!
[Nexus 4 Original Android Development] snipinu:
Awesome tool

Thanks for this , made my life easier, I can do it manually but this is the most thought out tool I have seen so far! Suggestion if possible add the LTE Enabler for the Nexus 4!

Thanks again!
[Nexus 4 Original Android Development] xyomguix:
TWRP and 2.0.2 : scripting not working ?

Not sure what I am missing but with my N4, NRT 2.0.2, TWRP 2.8.3.2, the recovery scripting seems not to be working.

For instance, the nandroid backup is not automatically triggerred when recovery is launched.

I manage to do everything manually but I wanted to report that :confused:
[Nexus 4 Original Android Development] zhukoz:
Thanks for this great toolkit wugfresh, I've used it successfully to unlock/root my nexus 4 kitkat (now running xposed framework) and it works great, if you make sure the driver installation is good to go beforehand.

Question I have now is: I'm considering installing Liquidsmooth rom and need to learn a few things to get straight in my head before proceeding. I'm wondering if custom roms come with superSU included, since wiping data/cache/dalvik means I will lose root (I think lol, bear with me have only had an Android phone for a few weeks :o)

Or do you have to install superSU zip after the ROM and gapps, at that point in the toolkit? I've found the latest v2.45 on here so all good.

But I'm thinking, installing a new OS over stock Kitkat , will there need to be a factory reset as well to get a clean, uncluttered install. Since the NRT 'one-click' custom rom flash section doesn't include a factory reset. Just a bit confused about that.

In that case would it be better just to try the whole wipe/install using TWRP? Have already done a nandroid backup of the system as it stands now and have copies on the pc.

Sorry for so many damn questions all at once guys lol
[Nexus 4 Original Android Development] spider623:
Flash rom, gapps and then supersu, I suggest to wait for liquidsmooth, they rebasing it right now
[Nexus 4 Original Android Development] Poor Grammar:
Wug I just have to give you a shout out for your hard work I been using toolkit about a year now and must say it's easiest one to use IMO..Awesome work