.

How to install Android L on Nexus 5 or 7

Google has released a beta version of Android L, the as-yet unnamed next release of the mobile operating system. Anyone can install this on their Nexus 5 or Nexus 7, but it’s unwise to do so if it’s your main smartphone or tablet.
As Google states, “The Android preview system image is not a stable release, and may contain errors and defects that can result in damage to your computer systems, devices, and data. The preview Android system image is not subject to the same testing as the factory OS and can cause your phone and installed services and applications to stop working.”
So, you have been warned, but the good news is that you can uninstall the Android L preview and revert to factory settings. Just make sure you have backed up everything that you can’t afford to lose before you install Android L, since the process will wipe your device.
We’ll explain step by step how to install the preview on a Nexus 5, using Windows 7 or 8, and also how to go back to the original software that your device shipped with.

How to install Android L

Step 1. Download the minimal 2MB installer from this XDA thread this XDA thread which includes the Android ADB and fastboot tools.
You need these to install the Android L image, and this is the quickest and easiest way to install the tools without downloading the entire Android SDK, which is huge and contains stuff you don’t need to get Android L.

Follow the instructions (don’t change the installation path when asked where to install it) and you should end up with a command prompt window:

How to install Android L on Nexus 5 or 7
Step 2. Download the appropriate file for your device:

Download Nexus 5
Download Nexus 7 

You will also need a utility such as 7-zip which can extract the files from the .tgz archive. In fact, you’ll need to unzip the files twice, as there’s a .tar file inside the .tgz file. Extract the files to the same folder as the Minimal ADB and Fastboot, which is c:\Program Files (x86)\Minimal ADB and Fastboot.
Once extracted you should have a list of files as per the image below.

 How to install Android L on Nexus 5 or 7

Step 3. Head to Settings, and scroll down to About phone at the bottom. Scroll down to Build number and tap it 7 times. This unhides the developer options, which aren’t displayed in Android 4.2 and later. In the Developer options menu, enable USB debugging.

How to install Android L on Nexus 5 or 7

Step 4. Download the Google USB driver from here here and extract the zip file somewhere.
Step 5. With your Nexus connected via USB and powered on, go to the Control Panel and click Devices and Printers. You should see your device in the list. On our Windows 8 machine, it was listed as ‘MTP’ under Multimedia devices. Right-click on it, and choose properties. Click on the Hardware tab, then select the Nexus 5 in the list, and click Properties. Now update the driver, pointing Windows to the folder where you extracted the Google USB driver. Once done, it should report the device as Android Composite ADB interface. Plus, you should get a prompt on your device’s screen asking “Allow USB debugging?”. Tick Always allow from this computer and tap OK.

How to install Android L Step 5

Step 6. Now, Power off your device, and leave it connected to your computer’s USB port. Now start it using the appropriate key combination to put it in “fastboot” mode.
For the Nexus 5, that’s by holding down the volume up, volume down and power buttons simultaneously. You should see a screen like the one below
 Alternatively, you can leave your device on and type adb reboot-bootloader to restart in fastboot mode.

How to install Android L Step 6

Step 7. If the LOCK STATE says locked (which it should) then type ‘fastboot oem unlock’ at the command prompt, without the quotes, and press Enter. You’ll see a screen like the one below. To change from no to yes, use the volume rocker, and to select the option, press the power button.
This WILL erase your device, so make sure you’ve backed everything up first.

How to install Android L Step 7

Step 8. With the bootloader unlocked, you can now install the Android L firmware. Simply type
flash-all
and the process will begin. You will see alternating downloading… writing…. erasing… on your device’s screen.

How to install Android L Step 8

Step 9. When the process finished, you should lock the bootloader again for security. Start the device in fastboot mode (as in Step 6), and then type fastboot oem lock
Locking the bootloader won’t wipe any data, but if you unlock it again, it will erase the device of all user data and settings.

How to uninstall Android L and return to factory settings

Reverting to the version of Android you had before installing Android L is pretty much the same process as you’ve just completed.

Step 10. First, download the correct version of Android KitKat for your device from Google's images page
You can choose which version of KitKat you want.

Step 11. Then, extract it as in Step 2 above. You’ll need to delete the Android L files from the c:\Program Files (x86)\Minimal ADB and Fastboot folder before copying the extracted files there. These are the files to remove (in case you forgot which were which).
How to install Android L Step 11
Step 12. Repeat step 6 to 8, and you'll have a box fresh Nexus 5 (or 7).