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 solve the problem.
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.
- 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.
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 lay out 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
- 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.
- In the recovery screen, scroll to the “wipe cache partition” option and perform it using the Power key.
- Then scroll to “wipe data factory reset” and wipe it too.
- Finally, go to “reboot system now” option and select it.
- 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 Method 1 from above, perform the steps given below:
- 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.
- 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.
- 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:
- 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).
- Connect your phone to computer.
- 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.
- 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-220.127.116.11.23.img fastboot reboot-bootloader fastboot flash recovery recovery.img fastboot flash system system.img fastboot flash userdata userdata.img
- 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!