It will take some times to reach the OTA (over the air) update notification on your Nexus device. However, if you are comfortable updating your Nexus 4, Nexus 5, Nexus 6, Nexus 7, Nexus 9 or Nexus 10 manually to Android 5.1.1 (LMY48I), then read on to know how to update manually.

Stagefright vulnerability is critical, so you should update your device immediately to avoid any uncomfortable things in the future.

Manually Update Nexus 4, 5, 6, 7, 9 and 10 to Android 5.1.1 LMY48I to Fix Stagefright Vulnerability

Note: For manual update, your Nexus device should have unlocked bootloader (Read this instruction). Also, ADB and Fastboot drivers needs to be installed on your computer (Read this instruction)

  1. Install proper drivers for your Nexus phone on your computer (Windows)
  2. Enable USB Debugging on the phone (Settings -> Developer Options -> USB Debugging)
  3. Download the Android 5.1.1 build LMY481 Factory Image (.tar file) for your Nexus phone [HERE] on the computer (Download correct firmware for your device).
  4. Power off your phone and boot it into Fastboot/Bootloader mode. To do so, hold down the Volume up + Volume down + Power buttons together.
  5. Connect the Nexus device to your computer via USB cable.
  6. If the Lock state says locked, unlock the bootloader by issuing the command: fastboot oem unlock
  7. Unzip the downloaded firmware .tar file (LMY48I) and move the unzipped files to the same folder as the adb and fastboot driver installed.
  8. From adb directory, run the flash-all script. On Windows: Run the file “flash-all.bat”. On Mac: Run the file “flash-all.sh” using Terminal. On Linux: Run the file “flash-all.sh”.
  9. Wait for the process to complete. The phone will reboot automatically to the new firmware Android 5.1.1 build LMY481. Note: Once you installed the new firmware, you should lock the bootloader again for security. For that, boot your device into fastboot mode, and then issue the command: fastboot oem lock (source – Google)