yashsingh1/xdaforums huggingface dataset:
[Nexus 4 General] tigerCHINA:
boot into the bootloader and run these commands...

I want to know

should i run CMD.exe in the flashfactory folder or just run CMD in my WIN8 or run WIN8 CMD then type cd:/... into the flashfactory folder which has

bootloader-mako-makoz10o.img and image-occam-jdq39.zip in.

Thanks,i am from china
[Nexus 4 General] gie62001:
You have to have cmd.exe in the same folder plus some stuff from SDK like fastboot command. Otherwise you won't be able to execute adb commands.

Hope this helps
[Nexus 4 General] FeintDoxx:
Actually as long as all the files you want to use with adb or fast boot whether it be ROMs kernels or factory images as long as they're in the same directory as fast boot and adb all is well. Cmd is not necessary to have in the same directory and as long as you CD to where fast boot and adb is located you should be able to run everything nice and well.
[Nexus 4 General] hp420:
there are lots of people who have been using this guide...especially lately with ffOS and ubuntu requiring different userdata.img files...this should have been stickied a LONG time ago :D
[Nexus 4 General] robyr:
This is not working for me. My bootloader says I have a 16GB variant, whats the deal here? Should I try using the old 4.1 image?
[Nexus 4 General] TecQuality:
just updated @ 4.3, i got the storage issue, just did the 2 wipes and fixed without any pain and fear :)
[Nexus 4 General] meetXD:
perfect

happened to me too! got stuck at 8 gb but the only simple solution is reflash stock rom and then through the setting>backup and reset you have to factory data reset the phone and then it'll be fine
[Nexus 4 General] vn00914361:
my CMD is stuck at

what should I do next then, guys? :crying:

I'm currently upgrading to JB4.3 using the lastest lib from Android SDK. Please help :fingers-crossed:

On the phone, it doesn't say 'writing...' any more. Considering this step of writing system is done?

---------- Post added at 07:42 PM ---------- Previous post was at 07:23 PM ----------

nvm guys, it's gone through after couples of tries :angel:
[Nexus 4 General] ivan5150:
hello I've exact the same problem :( stuck at Writing System... tryed several times no success... :(( any advices please?? :fingers-crossed:
[Nexus 4 General] sank912:
i flashed my 16gb nexus 4 from 4.2.2 to 4.3 and after flashing i get only 5gb of space.

bootloader version is bootloader-mako-makoz20i

image-occam-jwr66v.

What do i do?
[Nexus 4 General] elcaro:
I had the same problem, Did the following and back to 16GB

-Boot into STOCK RECOVERY (If you are running a custom recovery you must flash to stock)

-Clear cache

-Factory reset
[Nexus 4 General] hp420:
This happens sometimes if I use my old Nexus S cable with my Nexus 4 for adb and fastboot. Are you using one other than the one that came with the phone? You should only use the original cable. Some have wires inside that are thinner than the ones needed to work properly with Nexus 4.
[Nexus 4 General] ivan5150:
Yes sir! Used just the original LG cable :(

Btw after a couple of hours I've interrupted the process, restarted the phone and everything seems ok ;) android 4.3 works fine !
[Nexus 4 General] bas-r:
A factory reset from the OS does the trick as well.
[Nexus 4 General] Cuzz1369:
wow all this crap in the op and all you have to do is go to settings and factory reset from there. No fastboot, no stock recovery. OP needs to be updated, much easier this way.

---------- Post added at 06:10 PM ---------- Previous post was at 06:09 PM ----------

This^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ x 10000. Thanks
[Nexus 4 General] El Daddy:
I created the post in December, soon after the N4 was released. In earlier versions, just a factory reset would not fix the problem. Later, with the 4.2.2 update it was discovered a factory reset with the stock recovery would now fix the issue. I included that in the OP and left the legacy method in case the new method did not work.

Sorry to offend you with my verbose instructions...
[Nexus 4 General] Cuzz1369:
Sorry I really didn't mean to be offensive. I just wasted an hour doing all that stuff when all I needed was a simple factory reset.

Sent from nexus 7(2013) flo or razor or whatever
[Nexus 4 General] GeneticSponge:
Whenever I go to stock recovery all I see is the red exclamation mark but I can't select anything. I tried VOL UP + power and it just shuts off. I need help.
[Nexus 4 General] Mercado_Negro:
Press and hold power and the press vol up one time.
[Nexus 4 General] GeneticSponge:
Nvm I got it. Had to flash the stock recovery from somewhere else. (:
[Nexus 4 General] eddy4823:
cant get my phone to 16 gb.. everytym i follow the procedure, i end up into bootloop.. 5.67gb max space even after factory reset..
[Nexus 4 General] vlatkonexus4:
just to say that the comands are more likely to work for most of the people like:

fastboot format system

fastboot format cache

fastboot format userdata

for me 'erase' didn't work for cache,system and userdata
[Nexus 4 General] dave99999:
These methods worked for me...

I had this problem after flashing back to stock (too many bugs in cm10.2 --bluetooth stuttering was just killing me).

I've been using TWRP 2.6 ...

I made a nandroid of my crappy 8Gb buggy deal, using adb pull to bring it to my PC for safety.

Went to fastboot and erased boot, system, userdata, recovery and cache. For good measure, I then formatted system, userdata and cache.

Then I flashed system.img, boot.img, userdata.img from Google's 4.3 image, and re-flashed TWRP 2.6

After doing a "backup" of my empty data partition in TWRP, to create the TWRP backups directory, I then adp pushed the previous nandroid back to TWRP backups and restored.

Now, I'm golden, with a 16Gb ROM in place, and I don't have to re-build everything.

No idea what I did wrong the first time.

Thanks to all of you in this thread for your help.
[Nexus 4 General] scottx .:
After all this time I've just had this happen once. Did the method here and it worked perfect.

I did the fastboot wipe not long ago and I'm really wondering what caused it to lose 8gb of space. Oh well it's fixed and that's what counts.

I restored my nandroid (twrp) and pushed my TitaniumBackup directory back over. All is well.
[Nexus 4 General] pinepple.:
Hi i am having the same issue but in the code you posted I see

fastboot -w update image-occam-jdq39.zip <----

I have the latest version jwr66y and the file you said to flash is an update zip of an older version

What should I do? Should I flash the same version I already have ? ( I don't have the zip version I have the separated files)

Or should I flash an older version and update from there ?

Thanks !
[Nexus 4 General] Indian9990:
I'm sorry this may be a newb question but when we follow these steps we won't have s custom ROM anymore will we? It seems like these steps will return me back to stock?
[Nexus 4 General] Chromium:
Yes you will return to stock. But you can create a nandroid now, complete the steps in the op, reflash your custom recovery, restore nandroid.

Sent using xda-developers app
[Nexus 4 General] Indian9990:
Damn well I tried flashing just stock recovery and i got the android with red ! so I guess I'll have to go back to wipe everything first :(

Any other ideas before I do that lol?
[Nexus 4 General] efrant:
Please have a read of the threads in the sticky. The Android laying on its back with a red ! IS the splash screen for the stock recovery. You can access the menu by holding power and pressing volume up.
[Nexus 4 General] Indian9990:
I've tried that without any luck. That's why I was asking

Here are my steps..

I went into boot loader

Then did fastboot flash recovery recovery.IMG (stock recovery)

Pressed up on the volume key and selected recovery

Hit power button to start up recovery

Then I see android with chest open and red !

I hit volume up and I don't see anything.

Did I miss something?
[Nexus 4 General] Chromium:
Hold power first, then press volume up, while continuing to hold power.

Sent using xda-developers app
[Nexus 4 General] efrant:
Yes, you missed something.

When you are at the screen with the red !, that is when you hold power and then press volume up. This is all stated in the 101 thread linked in the sticky.
[Nexus 4 General] Indian9990:
Thank you!!

---------- Post added at 04:19 AM ---------- Previous post was at 04:16 AM ----------

Sorry! I could of sworn that I read it over and over again and I tried it multiple times. I finally got it. Thanks!
[Nexus 4 General] Arb184:
Desperate need of help

Hey everyone,

I used efrant's guide to update my phone to 4.3 JWR66Y using Google's factory images and I come to find that my max memory is 5.67 GB (I have a 16 GB Nexus 4). I went in to my Custom Recovery (TWRP) and did a wipe (top right corner) and that didn't change anything.

My question is: How are the second set of directions in OP's post different from Efrant's guide? What about them will fix everything? I remember instead of erasing everything I would be flashing it, no?

I'm sorry I'm a noob, please bear with me.

Thank you so much for the help.
[Nexus 4 General] walidhiphop:
Do i have this problem guys...cos i bought the phone from a guy that he told its a 16gb but i found it 5.67gb only.....so....what do you think...should i test this method..??
[Nexus 4 General] Chromium:
Yep give it a try. The guy might just be lying to you, but you can hope thats not the case :)
[Nexus 4 General] walidhiphop:
but when i boot into stock recovery it says "mako 8gb".....is it 16gb or 8gb now....
[Nexus 4 General] Chromium:
Yes that means its actually an 8GB model. Looks like you've been ripped off :(
[Nexus 4 General] walidhiphop:
:(:(:(:(:(:(:(:(:(
[Nexus 4 General] jwhatts:
Fear not! I am a fellow 8GB user. Here are a few tips:

For photos, use the auto-backup to G+. I recently just uploaded all of my photos to G+ anyways, so now I have all of my personal photos, plus those that auto-backup from the gallery. G+ has a much better online editing suite than most sites, and the photos you upload will appear automatically in your gallery app. After they auto-backup, just delete the photos from phone memory.

The same goes for music, use the Play Music app and sync with your local files on your computer.

The killer is apps. You really have to be mindful of how large your downloaded apps are. I have only have 3 games, since they are usually the largest in size. If you like the board game Risk, check out Landrule. Only 5MB and incredibly fun.

Overall, just always be thinking of ways to keep your memory free. I always keep one Nandroid backup, my current ROM zip package, GApps, and Kernel in the onboard storage, but in my eyes all of this is necessary.
[Nexus 4 General] efrant:
I'm not entirely sure, but I think what is happening is that the "fastboot -w update" doesn't actually flash the userdata or cache images. It just formats those partitions. Although I haven't tried it myself, I'm guessing that if you take my instructions, and replace step D10 with "fastboot format userdata" and step D13 with "fastboot format cache", it will give you the same result.
[Nexus 4 General] twistywizard:
I have tried all the methods in the original post. Nothing has worked :( Any suggestions?
[Nexus 4 General] activexda:
Thank you so much :)
[Nexus 4 General] SWEagle:
Yeah, i think i just found a easy way to go around this problem of the small partition!

I came across this because the last command of El Daddy guide was crashing my CMD.

Very simple:

1. After flashing the stock rom use Nexus Root Toolkit to do a OEM Lock

2. Run CMD fastboot and use this command: fastboot oem unlock. You will see a prompt on your device. This will wipe your entire device (including the /sdcard folder). Accept.

3 Restart and that's it! Your back to 13GB again :D
[Nexus 4 General] hp420:
Has anyone actually discovered a way to prevent this issue from even occurring? I'm tempted to contact Google and see if they are willing to work with me in any way, since this is obviously a wide-spread hardware issue that is not being fixed by the factory images. I'm getting a little tired of having to go through this every time I flash an android factory, ffOS, or Ubuntu touch image!!
[Nexus 4 General] bmakk2055:
Need help
[Nexus 4 General] RohanM:
wow that worked like a charm.... Thanks. :) :good:
[Nexus 4 General] Dkouyou:
Booting sotck recovery

I did'nt see it any where, but to pass the Android guy laying bown with the red exclamation mark, you have to HOLD POWER BUTTON and press ONE VOLUME UP. I read everything and it was jsut mentionned to press one after the other.

But simply using stock recovery brought me back to 16GB(12.9GB free)! Thank you very much, i messed up flashing N5port, but I succeeded and now have 16GB =D
[Nexus 4 General] Metal5150:
Thanks a LOT (8 giga thanks, and that is a lot for somebody without external SD)
[Nexus 4 General] stonebear:
(It mentions it further down but) I agree some of us needed to know that. :)

Anyway it worked. :)
[Nexus 4 General] Dkouyou:
Oups, sorry then ^^! I was probably too anxious fixing my phone to read properly. At least now, the information is in more than one post and be easier to find =D
[Nexus 4 General] guru_dhiru:
nexus4 16gb : updated to 4.4 then only 5.7gb

hi,

i have nexus4@16gb, with jelly bean 4.3,

yesterday i updated it to kitkat 4.4, everything went fine.

But now my storage is 5.7gb only.

then i followed all the steps, but alas its only 5.7gb.

now my question is can i get back to JB4.3?

or is there any way to get 16gb with KK4.4?

Thanks in advance.
[Nexus 4 General] gm007:
Try a factory reset.
[Nexus 4 General] guru_dhiru:
thanks

thanks ... i was in trouble since last 10 hours. you saved me.

---------- Post added at 09:12 AM ---------- Previous post was at 09:08 AM ----------

dear sir,

i had TWRP-2.6.3.3 which was the cause.

i used stock recovery and WOW i got my storage.
[Nexus 4 General] cyan41:
Hi guys,

I have still the same problem. I tried all solutions that you explained but nothing changed. Moreover, i turned back to 4.3 and did the same solutions at here but it did not work again. Do you have any idea?

Thanks in advance,:crying:
[Nexus 4 General] bmakk2055:
If using a custom recovery just format your internal storage. That will fix it but make a backup before doing so.
[Nexus 4 General] cyan41:
thanks for your reply but while my phone is not rooted and has a stock recovey, i tried to format storage, also did the same instructions on the first post but nothing changed, it is still 5.67 GB.i will try the same things after rooting and custom recovery, it seems that is my last chance.
[Nexus 4 General] Sc0rt:
Same issue here, been through all fixes, all ways; but still stuck on 5.67Gb.

When I had my bricked phone, I found a guide on loading some LG tools and a development image - I did that before finding the amazing Nexus Root Toolkit (thanks Wug!). When this booted, it was prompting for a password to decrypt, but I didn't know it (never set one) and couldn't reach Google support...

I'm wondering if a portion of my storage is now encrypted and cannot be seen? Only reason I think this is because all tool and manual fastboot commands confirm settings are being sent for 8Gb capacity and not 16Gb...

I'll be watching this thread like a hawk, but will also update on any progress I make.
[Nexus 4 General] pincher65:
flash userdata.img from fastboot
[Nexus 4 General] Sc0rt:
Spent an hour or so this evening trying to get my 16Gb back, but no joy so far...

Used the Nexus Root Toolkit (version 1.7.8) to do the following:

Flash Stock + Unroot

Stock Recovery (under advanced)

Stock Kernel (under advanced)

-- Factory reset from within the phone, and also a factory reset/cache clear via the Stock recovery

Flash userdata.img (under advanced) - I believe this was a recent suggestion

-- Factory reset from within the phone, and also a factory reset/cache clear via the Stock recovery

Boot Temporary Customer Recovery - used CWM to factory reset/cache clear and dalvik clear

-- Factory reset from within the phone, and also a factory reset/cache clear via the Stock recovery

OEM lock

-- Factory reset from within the phone, and also a factory reset/cache clear via the Stock recovery

Still showing 5.67Gb of storage... like others here, it use to be ~13Gb previously.

I'm open to any suggestions now, I have followed both methods in the OP and also steps others have advised in later posts, I have tried 4.3 and 4.4, but nothing has worked to date; next logical step I suppose it to try 4.2.2 - I think that is what my N4 came with originally before I started using Paranoid Android.

I've attached some print screens showing a few events from both a manual fastboot attempt, and also the entire Nexus Root Toolkit result - it looks to me that for whatever reason, both procedures are sending my phone settings relating to a 6Gb capacity!
[Nexus 4 General] bmakk2055:
Try formating it from your pc "the drive".
[Nexus 4 General] rodney864:
great !!!

Wonderful,

the procedure is ok for me :fingers-crossed: :victory:

merci beaucoup pour votre aide.
[Nexus 4 General] titmus:
None of the suggested fixes has worked for me (after about 5 hours of tinkering!)

Is there a way of formatting the SD card from a pc without removing whatever is the bios equivalent?
[Nexus 4 General] bmakk2055:
What recovery are you using?
[Nexus 4 General] titmus:
Stock recovery, as suggested by all the fixes in this thread.
[Nexus 4 General] Sc0rt:
http://xdaforums.com/showthread.php?t=2347060

Fixed mine - just did the 16Gb bit after the screenshots
[Nexus 4 General] Winesnob:
Thanks for this thread! Just picked up a used Nexus 4 as we prepare to ditch Verizon, and after flashing the KitKat factory image I was surprised to have half the memory. Cleared cache and factory reset, and the full 16 gb was back.
[Nexus 4 General] mor_1228:
how much is the normal internal memory after wiping though recovery ? i get 13gb
[Nexus 4 General] riieener:
I have tried all methods and none work mentioning me, I can do?
[Nexus 4 General] chiewable:
Worked for me. I used nrt to reflash stock 4.4
[Nexus 4 General] riieener:
NRT?
[Nexus 4 General] Cuzz1369:
All you need is stock recovery and a factory reset. It works every time for any device.

---------- Post added at 11:32 PM ---------- Previous post was at 11:31 PM ----------

Nexus Root Toolkit
[Nexus 4 General] riieener:
nrt does not work: (, help me who will pay $ $ $
[Nexus 4 General] Cuzz1369:
What are you trying to do?
[Nexus 4 General] riieener:
follow these steps to the letter factory reset and nothing is, use nrt and nothing: (
[Nexus 4 General] Cuzz1369:
What recovery are you using?
[Nexus 4 General] twistywizard:
This worked for me as well when nothing else did as well. Worth trying.
[Nexus 4 General] castironpuppet:
Okay, so I had this problem the other day and fixed it by flashing all of the stock 4.4 images. Afterwards I was back to stock with 12.92gb total storage. Cool it worked.

However, I have since flashed a custom recovery (Multiboot TWRP), SuperSU, ROM (GNOME II) and coupled kernel, and the multirom patch. I noticed this morning my storage is back to a lame 5.87GB total.

I don't know if it has to do with MultiROM or TWRP (There are no backups), but I just wanted to share that I was able to recreate the issue of halved storage
[Nexus 4 General] clenceo:
No fix has worked...Need a little HELP PLEASE

Hello everyone, I hope someone can help. I've tried all fixes described here. But without out success. I'm not a pro nor a noob, so I'm able to following directions in regard to this fix fairly easily. Now, I'm a bit confused on what Nexus 4 variant I have.

In AnTuTu, I have the following info:

Storage-Internal SD Card; 5503.5/5803.1 MB (5.37/5.66 GB)

Internal Phone Storage; 5.67GBs

In Fastboot Mode, I have the following info:

Product Name- MAKO

Variant- MAKO 16GB

I've tried different "fixes" and my internal storage always ends up with 5.67GBs. So, what am I to believe my phone should have?
[Nexus 4 General] damiensgs:
I have the same clenceo's issue. No one can help?

Inviato dal mio Nexus 4 utilizzando Tapatalk
[Nexus 4 General] jpchopper:
Not sure which ones you tried, I had to reinstall stock recovery via fastboot and used it to wipe cache etc then reinstalled twrp and I was good.
[Nexus 4 General] mavishow:
octobus box v1.4.1... change imei with . After storage shrank. (5.67), but everything I did everything. negative results. still 5.67 GB
[Nexus 4 General] cyan41:
it also worked for me. this is the exact solution, thanks to all instructors...
[Nexus 4 General] clenceo:
FINALLY I HAVE 12.92GBs INTERNAL STORAGE!!!!

Long story short. I have a 16GB Nexus 4 that only showed 5.67GBs of internal storage. No one, I mean no one was able to help in any way other than tell me if I followed the directions posted here in XDA. I followed every instruction posted that I could find to help correct the internal storage issue. I tried every "occam" file there was.

Honestly, I do not even know how I corrected this issue. I am however on KitKat, build KRT16O. So, I'll try to run you through what I was mindlessly doing...LOL

I again was following the directions posted here by the OP. With again, NO LUCK! I rebooted my phone, checked internal storage still at 5.67GBs

So on and so forth. Rebooted back into fastboot. Using command prompt (Windows 7) I started to type in random commands: fastboot format, fastboot format internal storage, fastboot format internal memory, fastboot anything that had to do with internal storage.

Some command suggestions would come up...blah blah blah, I dont know what they mean. Then I used Nexus Root Toolkit v1.8.0. In the Back to Stock area, I ticked "Device is on/Normal" clicked on "Flash Stock + Unroot. It downloaded files & did some stuff. Phone rebooted and I checked internal storage. Voila!! 12.92GBs!!!

Before anybody says it may likely have been Nexus Toolkit, well I dont know. I've used it the last 8 times before and it's never made a difference.

So it may have been it, maybe a combination of my rambling commands. I dont know.

I'm really sorry that I dont have a definitive direction to this solution, but I can say I've been spending hours for the last month trying to get internal storage back. I'll root my phone and install CWM and see what happens!
[Nexus 4 General] Cuzz1369:
All you have to do is a factory reset with stock recovery, or simply format you SD card( this gets done during a factory reset w/stock recovery) Not rocket science.
[Nexus 4 General] clenceo:
Really??? If it was just that easy, I would not have been trying to figure this out for almost a month. Not sure if you read my post, but I did try everything listed on this thread which includes just doing a factory reset with the stock recovery & simply formating the non existent SD card (since its an internal storage) No its not rocket science. But for some of us, it has not been that simple.

But thanks for your input.
[Nexus 4 General] Cuzz1369:
Sdcard is a partition on your internal storage bud. And it is that easy. You just weren't doing it right obviously.
[Nexus 4 General] jaxadv:
Will try it now

Thank you for this, I shall try it now but do you know why this happened? :)
[Nexus 4 General] erkamt:
I had the situation after IMEI repair.
[Nexus 4 General] jaxadv:
Worked

The steps in the first post will do!

This worked beautifully! One thing will add though, flash the radio as well after bootloader if you have an older baseband the update will fail.

Reboot in bootloader after each flashing step.

Thank you!
[Nexus 4 General] damiensgs:
Greeeeat!!!!! Everything worked fine for me! Thanks erkamt!!!! :highfive:
[Nexus 4 General] pedyspider:
i have the same problem on galaxy s i9000 - 16GB

now the usb storage is 5.58GB + system storage 1.79GB equals total 7.37GB

any idea how to fix it?
[Nexus 4 General] karthikraobr:
WIFI Tethering

Delete
[Nexus 4 General] borgerapper:
Thank you! I have the problem, but now not more!! :)
[Nexus 4 General] pedyspider:
is it possible to use this method with the same numbers for galaxy s GT-I9000 16GB ?
[Nexus 4 General] consolation:
It's worth a try, just replace the nexus4 images with ones for your phone.