How to manually install Android Lollipop on a Nexus device (Windows and Linux)

by: Joe HindyNovember 12, 2014

The official Android 5.0 Lollipop images have been released to the Android Developer site and we’d wager that means you’re ready to get those installed on your Nexus device. In this quick tutorial, we’ll show you how to manually install Android Lollipop on a Nexus device. If you need to see it done, check the video above.

How to manually install Android Lollipop on a Nexus device (Windows and Linux)

What will you need before you get started?

  • A Nexus device along with a USB cable to connect it to your computer.
  • The Android SDK installed on your machine with ADB and Fastboot command successfully working. Here’s a tutorial on how to do that.
  • You’ll also need the appropriate factory image for your Nexus device. Go to this website to download them and make sure you get the right one for your device. It’s worth it to spend a moment to make sure you have the right one rather than have to deal with the issues of downloading the wrong one.
  • You’ll also need 7zip or a similar program that can handle .tgz and .tar files. You can download 7zip for free here.
  • You will also need to unlock your Nexus bootloader. Beware, this will erase your data. It’s also worth noting that flashing a factory image will also erase your data. Make sure to back it up!

How to manually install Android Lollipop on a Nexus device (Windows and Linux)

How to manually install Android Lollipop on a Nexus device

  1. Boot your Nexus device into fastboot mode. You do this by turning it off and holding down the volume up + volume down keys and then pressing power. That should work for all modern Nexus devices but if not, you may need to Google Search how to do it on yours.
  2. On your computer, use 7zip to extract the .tgz file you downloaded from the Android Developer website. Use 7zip a second time to extract the .tar file you extracted from the .tgz. When you’re done, you should have a folder with several files in it.
  3. Copy all of these files and paste them in the platform-tools folder in the Android SDK on your computer. If you followed the above tutorial, this should be under the C drive, then under Program Files (x86) on Windows. Linux users, you know where you put it.
  4. If you have not already done so, connect your Nexus device to your computer. ADB and Fastboot commands should already work at this point if you’ve been following along.
  5. There are two flash-all files. If you’re in Windows, you’ll want to double click the one that has the gear logo and says “Windows Batch File” on the right. If you’re on Linux, you’ll want to double click the
  6. At this point a box should pop up and you should see the installation taking place. While this is going on, do not unplug your device for any reason. Let it do its thing.
  7. Once the installation process as finished, your device will automatically reboot and you should see the official Android Lollipop boot animation start up. You can now safely disconnect your device from your computer. Congrats, you now have Lollipop!

If you have any issues, check out the Android Authority Forums and ask there. If you need to watch the step by step instructions performed on video, we have it embedded at the top. Good luck, have fun, and we hope you enjoy Android Lollipop!

  • Krysak

    i am on l dev preview, is it going to be without problems if i flash it directly via this dev preview, not over kitkat?

    • dunes

      It makes factory reset anyway so it dosen’t matter

      • Prashant Tathe

        Following error appears on my Nexus 7 wifi

  • Andrei

    Is this method going to factory reset my phone?

    • thehouseofho

      Yes, but if you edit the flash-all script by removing the ‘fastboot erase userdata’ line and removing the ‘-w’ parameter from the last fastboot line, it won’t wipe your data. Obviously, this is not guaranteed and not supported. All I’ll say is that every time I’ve done it, it’s been successful.

      • Bob

        Didn’t work for me, neither did it when I tried dirty flashing the developer preview. I was left with a black screen and only the back button visible. Tried the adb -d shell am start -n fix but that still didn’t cut it so I’m currently in the process of wiping and reflashing.

      • Rene

        @thehouseofho how can you edit the script? where do i see and do this?

        • thehouseofho

          Open flash-all.bat or (depending on your OS) in a text editor. Make the changes, save the file.

          FYI – The Android 5.0 script doesn’t contain the ‘fastboot erase userdata’ line so all you have to do is remove the ‘-w’ parameter at the end.

          • Rene

            i don’t even know where to find or i am searching for it. Been in all the folders. or i am missing something here.

          • Rene

            Never mind @thehouseofho i found it. i am running windows so i will need to open flash-all (windows batch file)

          • eilegz

            so basically this flash over and overwrite the rom files over the older one, it doesnt matter if i have xposed, custom recovery like TWRP that its having problem… and of course mantain my data?

      • Ste

        but if the status is on locked this is not going to work right?

    • got


  • amak77

    no 5.0 image for nexus 4?

    • Wolfgang Marcos

      Not yet, neither OTA flashable zip

  • JSo

    People have been reporting that the flash-all script is giving errors (at least on the Nexus 5). You may have to do the long method of flashing each image separately.

    • james

      yeah i had problems with my nexus 5 trying to flash it, but the nexus 7 worked as normal

    • Tamal

      simple download and install wugfresh nexus root toolkit & use the option “flash stock & unroot”, browse to the image you downloaded (don’t need to extract the files from the image) and follow the on screen instructions.

  • GB

    Worked fine for my Nexus 7 2012 coming from 4.4.4 stock. Thanks!

  • Will I need to have debugging on for the manual installation? And do I “check” the USB connection as MTP or PTP? Thanks!

  • Droan Malik

    I prefer using “nexus root toolkit”

    • Will

      i cant seem to flash the stock image. MD5 Hashcheck always shows “Mismatch”

      • Stephan Lee

        Same i have that problem as well, anyone know how to fix them?

      • Saksham Shrestha

        Be sure to check if the file is .tgz nexus root toolkit does have prblm using .tar files! Hope it fix ur prblm!!

    • VAVA Mk2

      WugFresh is an Android God

  • Myamo

    I’m a retard, so I’m not going to try this. I’ll have to wait to get it OTA like the other dorks.. :(

  • And when I get to “Flash ALL windows batch file”, I have to choose to extract all or run. Run doesn’t work. Extract all has 12,000 items.

  • ROnaldo

    Mine cant do the fastboot stuff after i run the batch. My phone is in fastboot mode

  • Alchem1st

    Is it possible to upgrade from the developer preview to final version without wiping the data? (I own N5).

  • Guest

    I tried to flash my nexus 5 from developer preview, but my update has stucked at ‘writing userdata’ for 20 min. What to do now?

  • dsasad

    Cannot generate image…

  • Anonymous

    Im on a Mac and when I double click on flash all sh it just opens it in Xcode. Doesn’t do anything else. Help please

    • Bestnameever

      I mean the title clearly says
      (Windows and Linux)

      • Jedd Macaraeg

        Isn’t Mac a Linux-based OS? I’m having the same problem. Does that mean this procedure will not work using a Mac?

  • Its pretty bad that the article doesn’t say in bold red font that this will wipe your data and how you can avoid that…

  • Paul1981

    I’ve followed everything and have extracted tar files in the SDK -> Platform tool directory. When I run the flash all batch file the cmd prompt shows any idea what i’m doing wrong? when I start the phone in fastboot mode, the recovery mode and restart bootloader are in red, the only options I can select are power off or start, have I missed something?

  • Hubes

    When i hit Flash-all , it goes to rebooting into bootloader , then it says
    archive does not contain ‘boot.sig’
    archive does not contain ‘recovery.sig’
    failed to allocate 1005154516 bytes
    error: update package missing system.img

    but when i check at the folder , i see all of this archives.. what is happening?

    • Steve

      Same thing happened to me, how do I fix this guys?

      • Hubes

        i’ve had to use this program called , Nexus Root Toolkit , and on the options “force flash mode”

        • Steve

          I tried using that too Hubes, and when I flash the image, it says that it is mismatch when I tried to load it. What should i do?

          • HdzBlue

            Make sure the drivers are correct. I was having problems because apparently my Nexus 5 driver was under ClockworkMod’s name for some reason. Other than that, a factory reset should help as well.

          • Steve

            Fixed mine already, thanks :) I reinstall the wugfresh program and it worked for me.

          • HdzBlue

            Awesome! Gotta say it’s pretty darn cool!

        • Steve

          Fixed it! I re install the program and download a fresh one from the web and now running Android 5.0 :)

        • I love NRT on Windows. Is there any Mac equivalent? I’ve yet to find anything.

    • David Osborn

      Unlock the bootloader first

      • Beqa Gordadze

        yah !! first unlock bootloader with command ” fastboot oem unlock ” .At the and dont forget to lock with command ” fastboot oem lock “

        • Kylebn

          Hi Hubes,

          Had same issue. Here’s how I got around the errors:

          1) go to:

          Download: adb-setup-1.4.2.exe (Version 1.4.2 from one of the links provided)

          (This contains the necessary files for ADB with out all the SDK that we don’t need, **MAKE SURE YOU INSTALL THE GOOGLE USB DRIVERS and all the other options)

          1) On your phone go to *Settings* then *About Phone* then tap *Build Number* x7 times till it says your now a developer.

          2) Go into *Developer Options* and turn on *USB Debug*

          3) Now Open CMD as Administrator by right clicking on CMD and selecting *Run as Administrator*

          (All commands are to be run in CMD)

          4) Run the command: adb devices (This checks connectivity between your computer and the device)

          5) While the phone is ON run the command: adb reboot bootloader (This will reboot your device into fastboot

          6) Run the command: fastboot oem unlock

          7) Then run the command: fastboot flash bootloader [bootloader file].img

          8) Then run the command: fastboot flash radio [raidio file].img

          9) Same command can be done for each .img files as follows:

          a) fastboot flash system system.img (This take a few minutes because its a large file so be patient)

          b) fastboot flash userdata userdata.img

          c) fastboot flash boot boot.img

          d) fastboot flash cache cache.img

          e) fastboot flash recovery recovery.img

          I recommend after each flash of each file that you reboot fastboot with the following command:

          fastboot reboot-bootloader

          10) Last step you will need to lock the boot loader with the following command: fastboot oem lock

          • yalamanchili rupesh

            hiik ylebn can u help me out here,should we do all that process when phone is switched,i mean when phone not in fastboot process???and another question-‘after locking directly should we click flash boot??

          • koopus

            Thank you :) Only your method worked!

          • Diego Sanjines

            Hi! One qeustion I’ve installed all files following a tutorial, but now i just realized that i didnt installed the userdata.img is that an important file?

          • Andrei

            when i try fastboot flash bootloader [bootloader file].img it says “error: cannot load [bootloader file].img”

        • miten

          how do i lock the bootloader after the script has run?it just says press any key to exit and i cant type anything. my nexus 4 is stuck on google logo for 25 min

          • Kyle

            Search google for Wug’z Nexus Toolkit and install that. It can install and repair any drivers issues, or root and install custom recoveries for you. Including unlocking and locking bootloader.

  • Getting errors. Says its missing boot.sig and recovery.sig but they show in the file. Bueller?

  • Alejandro Malaver

    if your nexus 5 is root and have a rom, this video work?

    • Mark Atkisson

      Should work, but you will lose root, and custom recovery, and your data will be WIPED!

  • Sayed Zweighardt

    Is the first boot after this supposed to take a while? I’m using a nexus 7 2013 wifi 16 gb, coming from 4.4.4 to 5.0, its currently at the boot animation and has been for almost 10 minutes now

    • Dan

      I have the same issue :(

  • Pan

    Sorry I’m still kinda new at this. If I flash my N5 instead of waiting for the OTA update, is the end result the same? (Ignoring the fact that my phone will be wiped clean)

    • HdzBlue

      Yup. Same end result whether you wait for the OTA or flash.

  • Thilan kavindu

    Is this method going to factory reset data on my n5?

  • or for those who don’t want to wait but don’t wanna work for it let the nexus root toolkit do the work for for you.

  • Anonymous

    my device shows up on both ADB and fastboot tests but when i do ./, it says fastboot command not found! Any help?

    • aurorwlh

      open with any editor, add ‘./’ to each line beginning with fastboot, and save the file.

  • Hussain Bootwalla

    Hey guys! Doing this for the first time… Just a quick question: Is it needed to flash the nexus device binaries too? If yes can you tell me how?

  • Connor Bent

    Do you NEED to root?

  • Ansh

    Nexus 4 factory image isn’t available!

  • Val Sankar

    I used instructions from which didn’t mention anything about the Android SDK – which I don’t have. I flashed the factory image to my phone. I’m just wondering is the SDK is super necessary?

  • Dzulsallehhuddin Bin Mohd Zol

    Same goes to me..
    archive does not contain ‘boot.sig’
    archive does not contain ‘recovery.sig’
    failed to allocate 1005154516 bytes
    error: update package missing system.img

  • valid1993

    What a hell. After flashing 5.0 it reduced my internal storage from 32GB to 16GB( i am in panic. What should i do?

  • Guest

    Every stock app that updates is crashing, have to uninstall updates to get the apps to work again. Anyone else having this problem and or a fix?

  • Tom

    Having a problem with most Google apps crashing, stock apps after update and new apps. Anyone else having this problem or found a fix, other than uninstall updates?

  • KoteKhutsishvili

    Any news for Nexus 4?

  • Born2Rune

    No problems here. Flashed my Nexus 7 2013 Wifi. I don’t think I’ll attempt my Nexus 5, it looks like folks are having problems.

  • o:<

    pulgosos no sirve

  • Elislav Atanasov

    Hey! I want to share my experience with the installation. It took me couple of hours, just because I had a minor problem with the usb driver and I didn’t know it. I hope if you are in my situation you will see the comment asap. To fix it you can visit these sites Maybe it’s a good idea to add this to the main tutorial, because it is a common problem.

    PS I love Lollipop!

  • Sebastian

    I really need an advise, due to this update it’s so important, what is the best option, restore the phone, for example, the nexus 5 whit this tutorial and flash it, or wait to the OTA update. And finally if we flash the phone with the Factory Image, it will get the next updates normally???

  • Colin Stulp

    hey guys i have a problem with flashing , when i hit the flash-all . i get: error: failed to load ‘’: no such file or directory. On my N5, can someone help me?

  • Faiz Dar

    I just flashed Lollipop using this tutorial and like houseofhu suggested I removed the ‘-w’ parameter from the last fastboot line so that it won’t wipe my data.

    So far I am having 3 problems:
    1) my notifications are not expanding (i.e the second swipe is not working on notifications)
    2) home button is not working (it’s vibrating when I press it, but it’s not taking me to home screen)
    3) screen is not locking

  • Hasnain Khattak

    I gave up on the first step adb…. I can’t get the adb to work. I guess I am not the type of person to flash. Will wait for OTA.

  • Seth

    Anybody knows when the Lollipop image for Nexus 4 would go live on ?

  • Anand Eashwar

    Oh and people , when testing your devices on the adb / fastboot devices command , be sure to get your phone into the bootloader interface before you run the “fastboot devices” command . Although ” adb devices” works when the phone is normally switched on , the “fastboot devices” works only from the bootloader .
    ( Oh and to avoid the annoying hassle of changing the directory to your sdk location on command prompt , you can navigate to the sdk folder on windows and hold shift and press right click to start the command prompt from there . This works anywhere as long as you have access to such rights :D )

  • Sanj

    when i click flash-all it says unrecognizeable

  • Calvin Nobel

    Done Upgrading to 5.0 using my Nexus 4. I wonder how to get my root access back. I’ve tried NRT, but SuperSU says “There’s no SU binary Installed, and SuperSU can’t Install it. I should manually re-root it. Someone help me please :)

  • Sorry, I haven’t read the whole article, so I don’t really whether this is addressed in the article or not, but I have a quick concern… When installing lollipop, what happens to the information stored in the phone? Is it wiped out or does it remain in the phone?

  • koopus

    I personally had problems using the Nexus Root Toolkit and the flash-all.bat script,so I had to flash the images manually…
    BTW,it’s great! Follow Kylebn’s tutorial if the above does not work!

  • Manan

    Is It important to unroot ? Cause my nexus 7(20!2) is rooted..

  • Yuri

    [email protected]:~$ ‘/home/yuri/Desktop/occam-lrx21t/’

    error: cannot load ‘bootloader-mako-makoz30f.img’: No such file or directory

    rebooting into bootloader…

    OKAY [ 0.001s]

    finished. total time: 0.001s

    error: cannot load ‘radio-mako-m9615a-cefwmazm-2.0.1701.04.img’: No such file or directory

    rebooting into bootloader…

    OKAY [ 0.001s]

    finished. total time: 0.001s

    error: failed to load ‘’: No such file or directory

  • Darren Ng _96

    i need help on fastboot devices not recognise.

    i try to flash my nexus 4 but when i open the folder name ‘platform’, n in there i open cmd then i type ‘fastboot devices’ it say fastboot not recognised

    but at folder ‘platform-tools’ i open cmd n there can recongnise my device.

    what should i do?

  • Eddie

    i kinda have a problem booting my nexus 7 2013… everytime i update my driver software, the only compatible hardware is MTP USB Device..

  • Dimitris Arampatzis

    On the factory images should I choose the version I own or the version I want to upgrade the device

  • Giwrgos Xaralampidis

    i’m about to buy an oppo find 7 is it possible to update it to android 5.0?

  • Guest

    i’m about to buy an oppo find 7 is it possible to update it to android 5.0?

  • sakib islam

    bro my n7 isnt turning on it says boot failed

  • sakib islam


  • sakib islam

    bro help!!!!!!

  • sakib islam

    y the fuck isnt it turning on

  • hari

    please can u tell me about the factory image of nexus 5 “KTU84Q” as it still shows the version 4.4.4

  • Dimitris Arampatzis

    Can I do the same thing to downgrade

  • Rob Hoy

    Reading something recently left me to believe you shouldn’t root lollipop devices…

  • Kyle

    Anyone having trouble flashing ROM’s/recoveries, unlocking, rooting, etc.. search google for Wug’z Nexus Toolkit. It’s an AIO tool that can do all of the above, plus more. It can boot you into recovery/bootloader, easily flash single items such as bootloader, kernel, baseband, recovery, or system, install apk’s, push/pull files, and change display density.

  • Ben Foggon

    ok i said wating for device i have pluged in and everthink