• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Help Unable to mount cache while doing factory reset.

workonyou

Newbie
Feb 6, 2015
20
0
Hi everyone,

So I got a nexus 5 from a friend that he said was broken. He told me that he was doing and update and was taking too long so he rebooted his phone. Now the phone is stuck in a boot loop. Everything is stock on the phone and he said he never rooted it. I followed the steps on this thread(method 2 manually flashing each img) http://forum.xda-developers.com/goog...image-t2513701 Here is the output from the CMD window:
C:\Users\brad\Desktop\hammerhead-lrx22c-factory-0f9eda1b\hammerhead-lrx22c>fastb
oot flash bootloader bootloader.img
target reported max download size of 1073741824 bytes
sending 'bootloader' (2579 KB)...
OKAY [ 0.298s]
writing 'bootloader'...
OKAY [ 0.515s]
finished. total time: 0.813s

C:\Users\brad\Desktop\hammerhead-lrx22c-factory-0f9eda1b\hammerhead-lrx22c>fastb
oot reboot bootloader
usage: fastboot [ <option> ] <command>

commands:
update <filename> reflash device from update.zip
flashall flash boot + recovery + system
flash <partition> [ <filename> ] write a file to a flash partition
erase <partition> erase a flash partition
format <partition> format a flash partition
getvar <variable> display a bootloader variable
boot <kernel> [ <ramdisk> ] download and boot kernel
flash:raw boot <kernel> [ <ramdisk> ] create bootimage and flash it
devices list all connected devices
continue continue with autoboot
reboot reboot device normally
reboot-bootloader reboot device into bootloader
help show this help message

options:
-w erase userdata and cache (and format
if supported by partition type)
-u do not first erase partition before
formatting
-s <specific device> specify device serial number
or path to device port
-l with "devices", lists device paths
-p <product> specify product name
-c <cmdline> override kernel commandline
-i <vendor id> specify a custom USB vendor id
-b <base_addr> specify a custom kernel base address.
default: 0x10000000
-n <page size> specify the nand page size. default:
2048
-S <size>[K|M|G] automatically sparse files greater th
an
size. 0 to disable

C:\Users\brad\Desktop\hammerhead-lrx22c-factory-0f9eda1b\hammerhead-lrx22c>fastb
oot reboot-bootloader
rebooting into bootloader...
OKAY [ 0.016s]
finished. total time: 0.016s

C:\Users\brad\Desktop\hammerhead-lrx22c-factory-0f9eda1b\hammerhead-lrx22c>fastb
oot flash radio radio.img
target reported max download size of 1073741824 bytes
sending 'radio' (45521 KB)...
OKAY [ 1.622s]
writing 'radio'...
OKAY [ 3.120s]
finished. total time: 4.743s

C:\Users\brad\Desktop\hammerhead-lrx22c-factory-0f9eda1b\hammerhead-lrx22c>fastb
oot reboot-bootloader
rebooting into bootloader...
OKAY [ 0.000s]
finished. total time: 0.016s

C:\Users\brad\Desktop\hammerhead-lrx22c-factory-0f9eda1b\hammerhead-lrx22c>fastb
oot flash system system.img
target reported max download size of 1073741824 bytes
erasing 'system'...
OKAY [ 1.065s]
sending 'system' (981472 KB)...
OKAY [ 31.005s]
writing 'system'...
OKAY [ 66.272s]
finished. total time: 98.341s

C:\Users\brad\Desktop\hammerhead-lrx22c-factory-0f9eda1b\hammerhead-lrx22c>fastb
oot flash userdata userdata.img
target reported max download size of 1073741824 bytes
erasing 'userdata'...
OKAY [ 13.676s]
sending 'userdata' (137318 KB)...
OKAY [ 4.514s]
writing 'userdata'...
OKAY [ 9.179s]
finished. total time: 27.369s

C:\Users\brad\Desktop\hammerhead-lrx22c-factory-0f9eda1b\hammerhead-lrx22c>fastb
oot flash boot boot.img
target reported max download size of 1073741824 bytes
sending 'boot' (8852 KB)...
OKAY [ 0.485s]
writing 'boot'...
OKAY [ 0.749s]
finished. total time: 1.233s

C:\Users\brad\Desktop\hammerhead-lrx22c-factory-0f9eda1b\hammerhead-lrx22c>fastb
oot flash recovery recovery.img
target reported max download size of 1073741824 bytes
sending 'recovery' (9552 KB)...
OKAY [ 0.517s]
writing 'recovery'...
OKAY [ 0.782s]
finished. total time: 1.299s

C:\Users\brad\Desktop\hammerhead-lrx22c-factory-0f9eda1b\hammerhead-lrx22c>fastb
oot erase cache
******** Did you mean to fastboot format this partition?
erasing 'cache'...
OKAY [ 0.452s]
finished. total time: 0.452s
C:\Users\brad\Desktop\hammerhead-lrx22c-factory-0f9eda1b\hammerhead-lrx22c>



Now when I select recovery after I flashed everything the phone turns off and doesn't come back on until I push the power button. Is that normal?(Not sure if this matters as well but sometimes when I push the power button + volume up and down the phone won't turn on. I have to just push the power button and let it boot loop, turn if off with the power button and try getting into fast boot again.) So I pushed the power button and load back into fastboot go into recovery and get the droid with the red exclamation mark. Push power + volume up and get into the options.

At the bottom of the screen it says:
E:failed to mount /cache (Invalid argument)
E:Can't mount /cache/recovery / log
E:Can't open /cache/recovery / log
E:failed to mount / cache (Invalid argument)
E:Can't mount /cache/recovery/last_log
E:Can't open /cache/recovery/last_log
E:failed to mount /cache (Invalid argument)
E:Can't mount /cache/recovery/last_install
E:Can't open /cache/recovery/last_install
E:failed to mount /cache (Invalid argument)

When I try wipe data/factory reset I get:

--Wiping data...
Formatting /data...
E:failed to mount /cache (Invalid argument)
Formatting /cache...
E:failed to mount /cache (Invalid argument)
E:Can't mount /cache/recovery / log
E:Can't open /cache/recovery / log
E:failed to mount / cache (Invalid argument)
E:Can't mount /cache/recovery/last_log
E:Can't open /cache/recovery/last_log
E:failed to mount /cache (Invalid argument)
E:Can't mount /cache/recovery/last_install
E:Can't open /cache/recovery/last_install
Data wipe complete.
E:failed to mount /cache (Invalid argument)
E:Can't mount /cache/recovery / log
E:Can't open /cache/recovery / log
E:failed to mount / cache (Invalid argument)
E:Can't mount /cache/recovery/last_log
E:Can't open /cache/recovery/last_log
E:failed to mount /cache (Invalid argument)
E:Can't mount /cache/recovery/last_install
E:Can't open /cache/recovery/last_install
E:failed to mount /cache (Invalid argument)

So I tried to wipe cache partition command and basically get the same thing as above the only string that is different is:
E:Failed closing /dev/block/platform/msm_sdcc.1/by-name/mis(I/O error)

Anyone know where I can go from here?
 
I had the same thing happen after allowing the 5.0 update, as in the forever dancing dots screen. I tried manually flashing like you did but also ran into errors while flashing system partition, think it was something to do with available storage, which there was PLENTY of...

All in all, I had to downgrade to the OG KitKat, 4.4.1 I believe? Then followed with a factory wipe, and let the phone upgrade 3 times before reaching 5.0 that would actually boot up. And this was done by downloading the 4.4.1 TGZ image from Google, and running the flash-all script that comes with it. Hope that helps....

~Spec

Edit: I had TWRP for recovery and running DU at the time, was only able to get out of the boot loop by flashing DU once again. Wiped that clean, then ran 4.4.1 flash script!
 
Upvote 0
Thanks for the reply. That helped!!!!!! I got it to boot into kitkat. Now camera, google play and gallery are constantly crashing. As well when I try to do a software update it won't download. So I tried to download a random file using chrome and when I did it said "NO SD CARD." :( What can I do now?
 
Upvote 0
Oh wow..... That's not good, as there is no slot to insert one. Your onboard SD partition got messed up somehow. Weird, out of all of the bricking and flashing disasters I've done to my N5, I've never managed to do that. In fact I've never heard of that happening in the N5 forums either.

I wouldn't worry just yet, that can probably be easily fixed.

I would try doing a factory wipe (if possible) and/or flashing the firmware again. If you booted up, obviously the phone's share of the SD is working, just weird why your side of it is nonexistent...
 
Upvote 0
Odd things are going on. I am able to create folders in the internal storage on the phone with windows. So I thought maybe my cache is still messed up as all those apps that were crashing you cache. So I reflashed everything manually and now I am stuck on flashing the cache. This is what it shows:

C:\Users\brad\Desktop\hammerhead-lrx22c-factory-0f9eda1b\hammerhead-lrx22c>fastb
oot flash cache cache.img
target reported max download size of 1073741824 bytes
erasing 'cache'...


It's been like this for about 20 minutes.
 
Upvote 0
You also might be able to repair the partition if you can flash TWRP recovery or CWM. Recovery partition resides outside of user partition of the SD, it might work.

If reflashing the firmware doesn't bring it back, that's about the best I can do to help.

But getting it to boot up is a great start :) And if we can get some help with fixing storage partition, you'll have yourself a nice phone!
 
Upvote 0
Odd. Why does it write to cache when I flash the 4.4.4 cache IMG. See:
OKAY [ 14.446s]
erasing 'cache'...
OKAY [ 0.525s]
formatting 'cache' partition...
Creating filesystem with parameters:
Size: 734003200
Block size: 4096
Blocks per group: 32768
Inodes per group: 7472
Inode size: 256
Journal blocks: 2800
Label:
Blocks: 179200
Block groups: 6
Reserved block group size: 47
Created filesystem with 11/44832 inodes and 5813/179200 blocks
sending 'cache' (13348 KB)...
writing 'cache'...
OKAY [ 1.862s]
 
Upvote 0
Which would be better in my case TWRP or CWM?
Whichever has function that can partition your SD, if it can even be done in this manner, if at all. If system can't see any of your storage, I'm not sure if recovery will see it either. It's pretty much a hail Mary pass that I would take if I had the same problem there.

I've had no problems with TWRP. Try flashing that to the phone, worth a shot...

If it can't fix partition that way, flashing firmware once again will replace TWRP with stock recovery
 
Upvote 0
Well it looks like I ****ed up. I was following a suggestion of locking the bootloader and doing a factory/data wipe but that didn't work. So I went to unlock the bootloader again and it seems to be stuck. Shows this in CMD:

C:\Users\brad\Desktop\hammerhead-ktu84p-factory-35ea0277\hammerhead-ktu84p>fastb
oot oem unlock
...

And on the phone it says erasing....
 
Upvote 0
Hmmm..... How is your Nexus right now, is it bootable? Or is it still sitting there stuck in unlock?

If you can, get TWRP back on that phone. Have something you can try. In mean time, hit this link and down WugFresh Nexus Root Toolkit 2.0.4 It's a very useful program and does all of the flash work for you. Alternatively, just grab the NRT first and you can use it to flash a recovery image. Let me know when you have either recovery or NRT running!

http://www.wugfresh.com/nrt/
 
Upvote 0
It's not booting. I powered it off after it was stuck at erasing from unlocking it. I then installed CWM recovery. I saw options to format system, cache, data etc. I formatted the cache and data fine and it got stuck formatting system. I let it run for about 1hr and it was still stuck. I powered off the phone and then on and it booted into Kitkat? 4.4.4 Camera still crashes. It crashes even before android was done the setup. So same symptoms as before. When I download a file in chrome says no SD card. When I try to update software the download doesn't start.

So I guess now it is booting again. I have no clue what I did to get it to boot either.
 
Last edited:
Upvote 0
4.4.4 that you didn't install? It sounds like you may have revived what was on the phone when it was given to you, but how... weird. I had the same issue when I got into the 5.0 upgrade mess. Wondering how my DU was still there when it shouldn't have been. ?

There is an option to repair partitions in TWRP, something else worth a try. I strongly recommend downloading the toolkit that I gave you a link for. It literally does everything for you, so no typing a bunch of crap in ADB. You may have to wipe, format, repair, flash, crash and re-flash firmware several times before it may actually work right. At least that's how it happened for me.

Start with getting TWRP or use CWM to obliterate the internal memory. Do it twice, maybe even thrice. Then do a factory reset. Reboot and see what it does. I can't guide you through CWM, don't have it on my N5
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones