It is really a great thing to own an Android device that facilitates installing stock firmware manually. If you are an adventurous user who loves rooting and trying different custom mods and ROMs, you might be caught in a situation when you have no other choice that flashing the stock firmware back to your phone or tablet.

It was just a few days ago that I had to flash factory images on my Nexus 5. I recently tried the Cover Lockscreen app on my phone but after uninstalling it, I found that my lock screen was not letting apply any background. All features working, but no background! I tried many things to solve the issue but none of them worked at all.

So finally, I flashed the stock images to my phone. Everything went well and the problem was fixed too. However, later I discovered that my 32GB Nexus 5 was showed only 14GB as available storage on the device. The thing surprised me and vexed a little too. If your 32GB Nexus 5 shows 16GB storage only and you’ve encountered a similar issue after flashing the factory images to your Nexus 5, the present tutorial will help you solving the problem.

Disclaimer:

The method described below has been tested successfully on Nexus 5 and it should fairly work on other Nexus devices like the Nexus 4, Nexus 7, Nexus 10 and others too. The procedure, however, might prove risky if not followed carefully. Proceed at your own risk.

Preparations:

  • Download the factory image file for your device if you do not have it already: Click to Download
  • Download and set up the latest Android SDK on your computer: Download
  • You can find more info about setting up Android SDK here.
  • Also, make sure you have installed the latest Google USB Drivers on your computer. Since it is the naked driver, read the instructions given here.
  • Enable USB Debugging on your device. You can do it by going to Settings> Developer options. In case you do not find this option under Settings, you can refer to our guide on making it visible.

The Procedure:

Having made the preparations mentioned above, we can now proceed to the steps to restore the device to its original storage capacity. We are going to layout two methods for that. Try the first method first and if that doesn’t help, you can attempt the second one.

Method 1: Via Stock Recovery

  1. Boot your Nexus in stock recovery. Turn it off, then hold the Volume Down + Power buttons together for a few seconds. Doing this will boot your phone into Bootloader Mode (see below). Now press any of the volume keys until you see “Recovery mode” written on the screen. Then press the Power key to select it. When you see a dead Android robot, press and hold the Volume Up + Power buttons together to enter the stock recovery. Please note that the procedure is a little tricky, so it might take more than one attempts before you can actually see the recovery mode.nexus-5-bootloader-screen
  2. In the recovery screen, scroll to the “wipe cache partition” option and perform it using the Power key.
  3. Then scroll to “wipe data factory reset” and wipe it too.
  4. Finally, go to “reboot system now” option and select it.
  5. When your Nexus device reboots, connect it to your computer to check how much available storage it shows.

 

Method 2: By Reflashing Factory Images

In case you see the same 16GB storage on your 32GB Nexus device after performing the Method 1 from above, perform the steps given below:

  1. Extract the downloaded factory image package with .tgz extension. In case the file you downloaded has .tar extension, change it to .tgz first so that you might be able to extract it.
  2. Open the extracted folder and also unzip the Zip file found inside it. Copy the contents of the zip folder to the main folder with other .img files.
  3. Now copy all contents to the “platform-tools” directory found inside the Android SDK. To get a fair idea, mark the path of the screenshot below:nexus-5-factory-image-flashing
  4. Boot your Nexus 5 into the Bootloader/Fastboot mode: turn off the device, then press and hold the Volume Down + Power buttons at the same time till you enter the Bootloader mode (see the above picture).
  5. Connect your phone to computer.
  6. Press the Shift button on your computer’s keyboard and right-click with the mouse at an empty space in the “platform-tools” directory. From the list of options, select “Open command prompt here” option to launch a command (cmd) window.nexus-5-factory-image-flash
  7. Now start issuing the following commands one by one. Do not forget to replace the names of the bootloader and radio files with the corresponding files downloaded by you.
    fastboot erase boot
    fastboot erase cache
    fastboot erase recovery
    fastboot erase system
    fastboot erase userdata
    fastboot flash boot boot.img
    fastboot flash bootloader bootloader-hammerhead-hhz11k.img 
    fastboot reboot-bootloader 
    fastboot flash radio radio-hammerhead-m8974a-1.0.25.0.23.img 
    fastboot reboot-bootloader 
    fastboot flash recovery recovery.img
    fastboot flash system system.img 
    fastboot flash userdata userdata.img
  8. When all is done, highlight the Start option on the Bootloader screen using Volume key and then press the Power button to reboot the device.

Your Nexus device will reboot. Perform the welcome setup and check how much storage it shows now. Your phone should now show 32GB memory. Enjoy!

40 COMMENTS

  1. your help is good intend but for ppl who dont know much about adb and fastboot it will be horrifying !
    u didnt mentioned to flash boot ! boot and bootloader are separate thing .
    i did what u said and u know whats happpended ? device wont boot and show even gogole logo at first 🙂

    add flash boot to your method and it will be okay without boot.img there will be no device boot .

This site uses Akismet to reduce spam. Learn how your comment data is processed.