How to install the Android L developer preview on Nexus 5 and Nexus 7

New Android Logo

Google has just released the developer preview images of Android L for the Nexus 5 and Nexus 7 (2013), triggering a reaction from many clueless Android lovers on how they could install it on their device.

Since these preview images are essentially factory images, you need to flash them using ADB/Fastboot. Follow the steps below to find out how. 

Since this is a developer preview, users are bound to run into some stability issues and bugs occasionally. This is strictly for developers to test and build apps in advance for Android L and is not meant to be used as a daily driver.

Flashing a factory image also require users to unlock the bootloader of their device, which in turn wipes its internal memory clean of all data. So, make sure to create a backup before you proceed to the steps below.

Step 1: Download all the files linked below and extract their contents inside a new folder called “android” on your desktop. To make it clear, all the files must be inside the same directory (android here) and not inside any other folder.


Step 2: Open up a new Terminal or Command Prompt window and use the ‘cd’ command to navigate to the “android” folder created in previous step on your desktop.

Eg code below in case you are not well versed with the ‘cd’ command:

cd USERNAME/desktop/android

Step 3: Switch off your Nexus 5 and Nexus 7 and reboot them into bootloader mode using the key combination mentioned below

  • Nexus 5: Volume Up + Volume Down + Power
  • Nexus 7: Volume Down + Power

Step 4: Before flashing the factory image, you need to make sure that your Nexus device is being detected by the PC.

fastboot devices

If you are using a Mac, then you need to prefix a “./” before every Fastboot command. So, the above command will look something like this on a Mac -:

./fastboot devices

The above command should confirm if your device is indeed being detected by your PC or not. If it is, then proceed to the steps below. If not, repeat the above steps again. Make sure to check that you have properly installed the drivers and are inside the correct folder.

Step 5: Unlock the bootloader of your Nexus device by executing the below command.

fastboot oem unlock

Make sure to confirm the selection on your Nexus 5 or 7 by pressing the Volume up button. Once the bootloader has been unlocked, proceed to the next step.

Step 5: If you are running Windows, copy-paste the following command in the Terminal/command prompt window -:


On a Mac, copy-paste the following command -:


The script will then automatically flash the full factory image on your Nexus device after which it will automatically reboot. Keep in mind that the first boot is going to take an extremely long time, so be patient and don’t start panicking,  thinking you have bricked the device.

If the script gives you a fastboot not found error on your Mac, open up the file in Text Edit and add a “./” before every fastboot command.

If you want to flash back to Android 4.4 KitKat, follow this guide.


Like this post? Share it!

  • smith

    where is flash-all.bat ?

    • not-dumb-unlike-smith


      • Brian Utne

        That username though, hahahahaha.

      • pro0

        Shut up and help!

        • not-dumb-unlike-smith


    • Rajesh

      Extract the files from the factory image.

  • Josh Meade

    can i flash this using clockworkmod?

    • bcsc

      Just don’t. You may want to avoid this is that is a legitimate question. The instructions on the ONLY way are directly above.

  • Liam

    how to do step 2 in terminal???????????? Im getting this -bash: cd: Liam/desktop/android: No such file or directory

    • new

      its not actually android, you need to find your platform-tools folder..and according to you have to map it..

    • Rajesh

      Did you create that android folder on your desktop I mentioned in Step 1?

    • Mattnm Atkinson

      i have the same problem, and i followed the instructions please help!!

      • Rajesh

        Where did you create the “android” folder?

        Try cd desktop and then cd android.

        • Mattnm Atkinson

          The folder is on my desktop

          • Rajesh

            Is the “cd desktop” command working for you?

          • Mattnm Atkinson

            No, for some reason no CD commands are working

          • Rajesh

            Umm very strange. I am clueless here. Try another PC perhaps?

  • Skin

    flash-all.bat is not recognized?!

    • rabbit

      Me either!

    • Rajesh

      Don’t double click on the file. Navigate to it via command prompt.

  • Guest

    doesn’t seem that the nexus 5 android L image is a zip file. it’s .tgz. I usually don’t consider myself a complete idiot, so is there something i’m doing wrong?

    • not-dumb-unlike-smith

      you can still extract the files using win-rar

      (smith is a dumbass)

  • Socker

    Please help! flash-all.bat command doesnt work! I’m dumbass but help!

    • truth

      If you can’t figure it out, just use the wugs fresh toolkit. Select flash stock/unroot> other/browse then select the .tgz file you download from the Google website. It will ask you to confirm the md5 sum then it will decompress and flash it for you. I normally wouldn’t recommend any toolkit, but wugs fresh is a really good toolkit, I use it sometimes when I’m feeling lazy. Note they this will obviously wipe your data, and your boot loader needs to be unlocked.

    • Bad_Attitude

      Android sdk installed? Bootloader unlocked? Drivers installed properly? If all above is yes the easiest way to do this would be to open up the folder that has “fastboot.exe” inside of it and shift-right-clilck, choose “Open command window here” then type fastboot devices, hit enter. You should see an alphanumeric device id if it’s working. ALL of the contents extracted for the L image have to be inside the folder with fastboot.exe. Double left-click the flash-all.bat and it should start installing. If you are NOT already familiar with adb/fastboot you DO NOT want to do this. You’ve been warned! 😉

      • Devalchemist

        Where do we get I downloaded the image for for the os, installed the SDK and I have all the drivers working but I dont have the so i get stuck at that step. I can manually flash the single OS image with fastboot flash system system.img but I cant get into recovery mode to clear cache because recover leads to the android robot with his heart out ;/

    • Rajesh

      Are you double-clicking on the flash-all.bat file or navigating to it via the command prompt?

  • hi there

    Use 7zip to extract the .tgz, then extract the .tar inside, there will be a folder, inside that folder, surprises await.

    • Thank you!

      Thank you very much! You are good person. I like you very much! Have a nice summer!

  • james

    I keep getting fkash-all.bat is not recognized as an internal or external command, operable program or batch file.

    • Rajesh

      Its “flash-all.bat”.

      • james

        that was just a typo. And i sorted it out now turns out i didn’t have adb installed as i thought. 🙂

  • Nate Sotomayor

    Someone please help me! When I type “flash-all” my Nexus 7 turns off, then back on into the bootloader. I get the following messages in the command prompt.

    “archive does not contain ‘boot.sig’

    archive does not contain ‘recovery.sig’

    failed to allocate 704979448 bytes

    error: update package missing system.img

    press any key to exit…”

    • Rajesh

      Did you extract all the files? The “system.img” file is missing. Re-extract.

      • Nate Sotomayor

        I have extracted everything. I re-downloaded the files from Google as well. I still get the same error

    • Nexu713

      did u manage to solve the problem? im also having the same issue…

      • Nate Sotomayor

        Yes, but it lead to a new one. My device never booted.

        • Nexus713

          how did u pass the part where it says error: update package missing system.img?
          i’ve re downloaded the file from google multiple of times and keep on getting the same error. am i extracting the file incorrect. first, i’ll open the tgz with 7zip. then double click on the .tar file. It will then give me a folder. i’ll extract that folder.

          • Nate Sotomayor

            It worked for me after I downloaded a new fastboot.exe.

          • Nexu713

            ill give that a go :).. will let u know shortly… did u manage to get ur device to boot up?

          • Nate Sotomayor

            No,unfortunately. I did manage to get into the bootloader after some time. I’m trying to flash 4.4 again, but even this is having trouble

          • Nexus713

            sorry to hear your trouble, hope that will be sorted out soon

          • Nate Sotomayor

            Me too… I’m running out of options. I don’t want to buy a new one (even though prices are coming down) because I want to save for a Moto 360 😀 But still I hope I can save it

          • Nexus713

            by the way, where did u get a new file?

        • Shrawan

          having the same problem. phone is stuck at the google logo :/ what do you think is the problem?

          • Nate Sotomayor

            I don’t know. Currently my tablet is just sitting there useless. I haven’t had the patience to try again haha

          • Lord_Santa

            If you’re having this problem, extract everything from “”.

            Then manually flash each image file using the instructions here:

            After flashing the image files then enter recovery mode and wipe data/factory reset. Reboot your phone and it should work 🙂

  • Jos Spencer

    No offense, but I’m against guides like this, because so many “stupid” people have problems and then annoy everyone else, “flash-all.bat isn’t recognized”, well if you aren’t smart enough to fix that should u really be doing this to your phone…..

    • مهند

      How would be smart if you have no experience and you never tried it before?

  • Ashish Dewan

    there is no need of unlocking boot loader in 4.4.3,update then why in this one?? will u please tell me,. i am in this field :p

    • truth

      This is a developer build. It is not an official update, it is still in beta.

    • Joshua Dempsey

      You will have to wait at least a few months for this to be an OTA update. You have to unlock the bootloader as this is a developer preview, meant to be used by developers for testing their new applications with the new APIs

      Hope this helps

  • usamaisawake

    I’ve flashed successfully but it doesn’t look like the Nexus 7 2013 32GB wants to boot. It’s stuck on the new boot animation (4 dots representing Google colors flying around each other). I’ve tried going back into recovery and deleting data, deleting cache, but that has not helped, it refuses to boot. I’ve also re-flashed the L preview release, but still no luck. — EDIT: I guess I’m inpatient. It took longer but did boot up. Maybe it was switching over to ART.

    • Fabian Forsström

      Just a follow up question; How long did it end up taking? Have a nexus 5 which has been on boot screen 45 min to 1 hour. :/ Do you rekkon I have to try flash again and clear cache? I am using dual boot with multiboot app from play store with Franco kernel (which I know is working with L ).

      • Oh my, that’s a along time for sure. My Nexus 7 took about 15 minutes to get to the boot screen itself. But I was doing a clean install. I imagine you are too? If not then maybe it’s trying to change a lot of the apps to ART which would take a while. If it persists on that screen for more than a total of 1.5 hours I would definitely try again after clearing cache and clearing everything you can clear. I am sorry I would not know about how dual boot would affect all this. As for Franco kernel, I was using stock kernel but had also heard Franco did not pose problems with L.

        • Soupi

          Had the same problem, I solved it by locking the phone again.

  • Joshua Dempsey

    How long did it take people to flash it onto Nexus 5? Becoming slightly worried at the length of time this is taking (about 30 min now)

    • Bad_Attitude

      Woops! It’s never taken me anywhere close to that amount of time to flash a factory image.

      • Joshua Dempsey

        No matter, I found out I was doing it wrong (first time), fixed it now 😀 Thanks for replying..

        • Shrawan

          i had the same problem. it was stuck at the boot screen for a long time. what do you think is the problem?

          • Joshua Dempsey

            Sorry it took me ages to reply. Have you fixed the problem yet?

          • After flashing my device my N5 restarted and it is now stuck on the Google logo (with a little lock at the bottom of the screen).

            Do you know how to fix this ?


          • Joshua Dempsey

            Yes I do tony. Turn your phone off, then hold power down and up, then at the same time power it on. Just wait and you will see activity “downloading” etc… the flashing has begun

          • Thanks!

            But in fact, my problem was something else but I fixed it successfully.

            Here’s how I fixed my problem:

            1. I booted in fastboot mode (“adb reboot bootloader”)

            2. I locked my phone again (“fastboot oem lock”)

            3. I unlocked it to wipe everything once again (“fastboot oem unlock”)

            4. I flashed my phone (“./”)

            5. BINGO!

          • HI

            i have the same problem but the problem is that i my device cant be detected by the computer. i’ve tried different drivers and changed computers but i still cant get the computer to detect my nexus 5

          • HI

            the device is in bootloader mode by the way because it cant boot up properly as it would get stuck at the “google” page

          • jef

            Hey thanks so much for this. I was hung up on the Google logo for 40+ minutes and just redid it based on your instructions and all is well. Thanks!

          • Guest

            I still have the problem. So all you did was lock it, then unlock it and then run “flash-all.bat”? Or what do you mean with step 4?

        • Michael Josh Villanueva

          I’m stuck at the animated logo as well. What did you do?

  • jose

    Can android L be rooted?

    • Rajesh

      Yes, it can be.

  • josh

    Where can I find the flashall file that’s supposed to be in the platform tools folder? I have everything else in there. It never let me extra anything from the preview I downloaded. It is some file that has no way of being used.

    • Rajesh

      Did you extract the contents of the factory image file to the Android folder? The flash-all file is in the factory image. Also, copy/paste the fastboot/ADB files inside the platform-tools folder to the Android folder. *all* the files must be present in the same directory.

  • Noname

    what about nexus 7 wifi 2012 , can it use android l image of nexus 7 wifi 2013 ?

    • Ian

      Nope Sorry

  • Nexus713

    who else is getting this error????

    “archive does not contain ‘boot.sig’

    archive does not contain ‘recovery.sig’

    failed to allocate 704979448 bytes

    error: update package missing system.img

    press any key to exit…”

  • krash

    I tried and got
    failed to allocate 699970328 bytes
    error : update package missing system.img

    • Pece

      I had the same error, solved it by logging in with administrator account on my PC and executing flash-all.bat again.

  • edj809

    I have this issue

    “archive does not contain ‘boot.sig’

    archive does not contain ‘recovery.sig’

    failed to allocate 704979448 bytes

    error: update package missing system.img

    • Akshay

      I’m also getting this error.

      I’m on windows XP. Is this anything to do with Windows XP??

      Anyone has got solution for this??

    • Akshay

      Update: This is windows RAM issue… Not available enough memory on computer. I have not tried yet.

    • Slepice1

      Just try to get the most space on RAM memory (close webbrowser and other programs) and it would hopefully start updating.

  • Shrawan Sapre

    I followed all the steps.Flashed it properly. However, phone is stuck on boot screen for the past half an hour. Tried re-flashing also. Nothing seems to work. What is the problem?

  • Twan

    It stays on the new loading screen, please help!

  • Andrey Bogdanov

    Hi guys, I have the same problem with system getting stuck at the boot animation, but recovery also doesn’t work. When I try to load it, it shows the opened android icon with red exclamation mark, which, I think, means that recovery is damaged.
    I flashed the original image using the flash-all script for my Nexus 5. Someone else had that kind of crap?
    P.S.: later I want to try to install TWRP right away and see how it goes. I’ll post it here, if helps.

    • The red exclamation mark screen throws me too, everytime it’s been a while since I’ve tried to enter stock recovery. In fact that screen is an expected screen when going to stock recovery. From there you would need to press the following 3 simultaenously, power + volume up + volume down and you might need to do it a few times, that’s when you get into recovery (stock). — Anyway I remember my Nexus 7 took a long time at boot screen so please be sure it isn’t stuck and is just taking a while to boot L for the first time.

  • minibit

    Great guide. I didnt need to write ./ before the fastboot commands, Im running OSX Mavericks (just sharing experience).
    i also got the errors that the image didnt contain boot or recovery. Im guessing they are either contained within the main image file, or not needed, as the update worked great.Writing the image was done in about 90s, and the 1st boot took maybe 3-4 minutes.

    REMEMBER TO BACKUP YOUR DEVICE!! The update wipes all data, including pictures.

  • Shashanka

    Awesome…Your Blog and Android L…Worked like Charm…!!!!!

  • Ziaur Rahman

    while run ” ./ ”

    This below message is showing on terminal.

    error: failed to load ‘’: Cannot allocate memory

  • Lethe

    1. Unzip ‘’, it contains image files.
    2. Boot in fastboot mode (adb reboot bootloader)
    3. ‘fastboot flash bootloader bootloader-hammerhead-hhz12d.img’
    4. ‘fastboot flash radio radio-hammerhead-m8974a-’
    5. ‘fastboot flash boot boot.img’
    6. ‘fastboot flash recovery recovery.img’
    7. ‘fastboot flash system system.img’
    8. ‘fastboot flash userdata userdata.img’
    9. ‘fastboot flash cache cache.img’

    It will cause storage error, so do ‘factory reset’.

  • Rodrigo Sanguanini

    the flash-all script will erase my phone? I mean, if I have my apps in my Nexus 4, for example, and try to install this image, but my phone is unlocked already, when execute the flash-all script i will erase my data?

  • Did you download the correct version of the factory image? And was your tablet running on Android 5.0 or KitKat?