[Q] Help: Nexus 5 bricked while clearing Cache Partition

Search This thread

iamjimmy

Senior Member
Dec 11, 2013
356
84
I was on Android 4.2.2 STOCK recovery and Rooted with Chainfire's Auto Root. Had sideloaded the 4.2.2 update.

I was stupid and I booted into Bootloader mode (Power+volume up + volume down)

Then I cleared Cache Partition. (not factory reset). On doing that, nothing happened for 10 minutes. The message was "Formatting Cache" I then switched off my phone.

Since then nothing is working. I cannot connect to phone network. The SD card folder is not working.

I went into Bootloader, and get the following error:

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)

______________________

I've tried sideloading OTA update files, but I get the same error above. On factory Reset/Data -- I get the same error. I cannot do anything at this point. As before I am on STOCK recovery.

Someone kindly help. Is my phone bricked. I am so nervous.
Everything was perfect until I cleared the Cache partition.

Thank you so much. I hope someone replies soon.
 
  • Like
Reactions: daviscr618

iamjimmy

Senior Member
Dec 11, 2013
356
84
http://xdaforums.com/showthread.php?p=48360203

You can fastboot flash cache.IMG from the stock image to fix the corrupted cache partition.

Sent from my Nexus 5 using xda app-developers app

Thank you so much. The linked thread talks about the same problem I am having.

Could you please point me to instructions on where to get Cache.IMG from the stock Image? Is it ok to fastboot flash Cache.IMG from 4.4.0 or is there a Cache.IMG for 4.4.2 as well?

Thanks.
 
Last edited:

xybur

Senior Member
Jul 30, 2010
197
60
Augusta
If you download the stock image from the Google Dev site, its in there.
https://developers.google.com/android/nexus/images

You will need 7zip or a similar program to read the contents of the file. Just keep unzipping until you find the directory with the cache.img file (there should also be a radio.img, bootloader.img, etc. Basically, all of the stock files. You're only interested in the cache.img file in this instance).

I flashed it after I did the 4.4.1. Ota update so you should be fine too fast boot flashing it as well.

Sent from my Nexus 5 using xda app-developers app
 

ddloco

Senior Member
Jun 20, 2010
580
137
Rialto,Ca
Samsung Galaxy Note 10+
This isn't 100% I've done this and full factory rest I ended up having to rma PS I had my Efs also it still didn't work my logs said that it couldn't create the SD partion because my system was read only so I'm without my phone for two weeks

Sent from my Desire HD using Xparent Green Tapatalk 2
 

iamjimmy

Senior Member
Dec 11, 2013
356
84
You will need 7zip or a similar program to read the contents of the file. Just keep unzipping until you find the directory with the cache.img file (there should also be a radio.img, bootloader.img, etc. Basically, all of the stock files. You're only interested in the cache.img file in this instance).

I flashed it after I did the 4.4.1. Ota update so you should be fine too fast boot flashing it as well.

Sent from my Nexus 5 using xda app-developers app

Thank you. Just downloaded the Cache.IMG file. And then placed it into the directory where the Android Fastboot is installed.

What should be the exact command for using Fastboot flash on Cache.img?

"fastboot flash cache Cache.IMG"

Is there anything else to it? Thanks in advance.
 

xybur

Senior Member
Jul 30, 2010
197
60
Augusta
Thank you. Just downloaded the Cache.IMG file. And then placed it into the directory where the Android Fastboot is installed.

What should be the exact command for using Fastboot flash on Cache.img?

"fastboot flash cache Cache.IMG"

Is there anything else to it? Thanks in advance.

Should be it.
Code:
fastboot flash cache cache.img
while in bootloader mode. make sure "fastboot mode" is displayed in the bootloader. i.e.
QOkkR84.jpg
 

iamjimmy

Senior Member
Dec 11, 2013
356
84
Should be it.
Code:
fastboot flash cache cache.img
while in bootloader mode. make sure "fastboot mode" is displayed in the bootloader. i.e.

Thank you so so much. I did this yesterday. It worked like a charm. I took the Cache.Img file (13 mb) from the stock Android 4.4 factory Image.

Then phone booted immediately and everything seems fine. I was still on 4.4.2 and did NOT even lose the root.

The only thing messed up was the notifications. I had to set the notification ringtone and also reintegrate Google voice voicemail. Everything else is perfect.

I really can't thank you enough. Much appreciated.
 

iboj007

Senior Member
Thank you so so much. I did this yesterday. It worked like a charm. I took the Cache.Img file (13 mb) from the stock Android 4.4 factory Image.

Then phone booted immediately and everything seems fine. I was still on 4.4.2 and did NOT even lose the root.

The only thing messed up was the notifications. I had to set the notification ringtone and also reintegrate Google voice voicemail. Everything else is perfect.

I really can't thank you enough. Much appreciated.

Another way to do this is to actually go back and clear the cache partition again. I had the exact same issue and thought that I was bricked until I went back and tried it again. Be patient, mine took between 10-15 minutes but eventually finished and everything was fine again.
 

xybur

Senior Member
Jul 30, 2010
197
60
Augusta
I really can't thank you enough. Much appreciated.

Not a problem, glad to be of service :)

---------- Post added at 07:33 PM ---------- Previous post was at 07:33 PM ----------

Another way to do this is to actually go back and clear the cache partition again. I had the exact same issue and thought that I was bricked until I went back and tried it again. Be patient, mine took between 10-15 minutes but eventually finished and everything was fine again.

If the cache is corrupt, it might not even be able to be mountable. YMMV, but when it happened to me, in my case, I had to use the fastboot flash method.
 

iamjimmy

Senior Member
Dec 11, 2013
356
84
Another way to do this is to actually go back and clear the cache partition again. I had the exact same issue and thought that I was bricked until I went back and tried it again. Be patient, mine took between 10-15 minutes but eventually finished and everything was fine again.

I tried doing that. But like in the previous post, the Cache is not mountable or corrupt maybe. Nothing really happened when I did wipe cache partition. It kept giving that error about Cache not mounted.
 

iamjimmy

Senior Member
Dec 11, 2013
356
84
Have you tried to fastboot flash the cache.img?

Yes. That's what Actually worked. Thanks to the guidance of user: xybur.

However I Flashed the Cache from the stock image on 4.4 Kitkat from Google servers on a phone which has been updated to Android 4.4.2.

I was not able to find the cache.img file in the OTA updates of 4.4.1 and 4.4.2 downloads.

So in other words, I have Android 4.4.2 but the Cache.img file flashed from Android 4.4 (base release). Not sure whether that would lead to problems down the road.

Also is clearing the cache partition ALWAYS recommended before sideloading an OTA update manually?
 

jd1639

Inactive Recognized Contributor
Sep 21, 2012
16,833
5,404
Minnesota
Yes. That's what Actually worked. Thanks to the guidance of user: xybur.

However I Flashed the Cache from the stock image on 4.4 Kitkat from Google servers on a phone which has been updated to Android 4.4.2.

I was not able to find the cache.img file in the OTA updates of 4.4.1 and 4.4.2 downloads.

So in other words, I have Android 4.4.2 but the Cache.img file flashed from Android 4.4 (base release). Not sure whether that would lead to problems down the road.

Also is clearing the cache partition ALWAYS recommended before sideloading an OTA update manually?

You're fine. If you were really worried about it you could flash the 4.4 to 4.4.2 zip that's in the general forum ota sticky. That zip patches, it's not the full rom, 4.4. I don't remember if there are any cache patches in it though. As far as clearing the cache before the ota, I've never done that and haven't had any problems.
 

iamjimmy

Senior Member
Dec 11, 2013
356
84
You're fine. If you were really worried about it you could flash the 4.4 to 4.4.2 zip that's in the general forum ota sticky. That zip patches, it's not the full rom, 4.4. I don't remember if there are any cache patches in it though. As far as clearing the cache before the ota, I've never done that and haven't had any problems.

Thanks. I did search the 4.4.2 big zip file which is supposed to patch from 4.4 to 4.4.2. I did not find a cache.img in that file. So it seems there is no new cache, so I guess Google patched the existing one.

In any case my phone is ok. Given that I'm on 4.2.2 already, will flashing the zip (which upgrades android from 4.4 to 4.4.2) even work? Doesn't that require the phone to be on 4.4?

Overall, I'm thinking of maybe not doing anything since the phone seems to work fine. I read that the cache is also not critically important to the OS and it only has logs, cache information and such.
 

iamjimmy

Senior Member
Dec 11, 2013
356
84
Did you use twrp to wipe the cache?? Sometimes it takes a while. its a known bug

It happened to me... Just waited it out like 15 mins.. It went through

Sent from my Nexus 5

Nope. I did NOT have a Custom recovery. It was the Stock recovery. My phone was all stock except it was rooted and the bootloader was unlocked. I used CF-Auto Root for this.

I think what threw me off was how much time it took to clear Cache. Whatever device I've handled in the past, it takes 10 seconds to clear cache. With the Nexus 5, I boot into the bootloader (stock recovery), chose the recovery option and then Wipe Cache Partition. Nothing happens for 10 minutes except "Formatting Cache".

At this point, I grew impatient and thought something was wrong. Made the mistake of switching my phone off. And then all hell broke lose. I did not get a signal, no storage was recognized and nothing was accessible. Even factory Reset wasn't working from the bootloader. Every time I went to the bootloader it gave me errors on unable to mount cache, storage not accessible etc etc.

Flashing 4.4 stock image cache saved my life. I was thinking I bricked my phone for good. Won't be messing around with the Cache ever again.

Quick question: Can I do a nandroid backup with Stock recovery? I realize it's easy to do this with CWM or TWRP recoveries, but I have not installed them as yet. Thanks.
 

iamjimmy

Senior Member
Dec 11, 2013
356
84
You can not do a nandroid with stock recovery

Wow. I didn't know that. That may be the single biggest reason to install a custom recovery.

The only reason I did NOT do CWM or TWRP was because I wanted to get OTA updates and be able to sideload them manually.

It seems with custom recoveries one has to flash to stock image every time an OTA comes. With Stock recovery I updated from 4.4 to 4.4.1 and 4.4.2 without any problems. I used adb to sideload the updates and then just used CF-AutoRoot to Reroot (my bootloader was unlocked). Very quick and painless.

Do you recommend installing a custom recovery to replace Stock?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    Thank you. Just downloaded the Cache.IMG file. And then placed it into the directory where the Android Fastboot is installed.

    What should be the exact command for using Fastboot flash on Cache.img?

    "fastboot flash cache Cache.IMG"

    Is there anything else to it? Thanks in advance.

    Should be it.
    Code:
    fastboot flash cache cache.img
    while in bootloader mode. make sure "fastboot mode" is displayed in the bootloader. i.e.
    QOkkR84.jpg
    2
    http://xdaforums.com/showthread.php?p=48360203

    You can fastboot flash cache.IMG from the stock image to fix the corrupted cache partition.

    Sent from my Nexus 5 using xda app-developers app
    2
    Thank you so so much. I did this yesterday. It worked like a charm. I took the Cache.Img file (13 mb) from the stock Android 4.4 factory Image.

    Then phone booted immediately and everything seems fine. I was still on 4.4.2 and did NOT even lose the root.

    The only thing messed up was the notifications. I had to set the notification ringtone and also reintegrate Google voice voicemail. Everything else is perfect.

    I really can't thank you enough. Much appreciated.

    Another way to do this is to actually go back and clear the cache partition again. I had the exact same issue and thought that I was bricked until I went back and tried it again. Be patient, mine took between 10-15 minutes but eventually finished and everything was fine again.
    1
    I was on Android 4.2.2 STOCK recovery and Rooted with Chainfire's Auto Root. Had sideloaded the 4.2.2 update.

    I was stupid and I booted into Bootloader mode (Power+volume up + volume down)

    Then I cleared Cache Partition. (not factory reset). On doing that, nothing happened for 10 minutes. The message was "Formatting Cache" I then switched off my phone.

    Since then nothing is working. I cannot connect to phone network. The SD card folder is not working.

    I went into Bootloader, and get the following error:

    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)

    ______________________

    I've tried sideloading OTA update files, but I get the same error above. On factory Reset/Data -- I get the same error. I cannot do anything at this point. As before I am on STOCK recovery.

    Someone kindly help. Is my phone bricked. I am so nervous.
    Everything was perfect until I cleared the Cache partition.

    Thank you so much. I hope someone replies soon.
    1
    Did you use twrp to wipe the cache?? Sometimes it takes a while. its a known bug

    It happened to me... Just waited it out like 15 mins.. It went through

    Sent from my Nexus 5