Corrupt Data/Cache Partitions[FIX]

Deckoz2302

Senior Member
Dec 3, 2012
904
1,714
0
Raleigh
Everyone here has - I'm sure since the release of 4.3, experienced a partial corruption of their data/cache partitions.

What happens is you will go to wipe data/cache and you will get an error for a certain folder or subset of files, or the partition cannot be mounted. This ends up causing unbootable system, a force close of an app you cant clear the data for...and just the pure inability to wipe these partitions.

So most of us have taken the long road of flashing back to pure stock via ODIN, using casual to reunlock the bootloader ect ect...very very annoying process. The reason this works however is because ODIN uses a different method to wipe partitions then the custom recoveries we have available to us. Custom Recoveries wipe headers of memory blocks, this is the actual process that creates corruption to begin with. While on the other hand ODIN zero's out not only the headers but the entire blocks - thus fixing the corrupt blocks.

Guess what?! Stock recovery uses this same Zeroing process. So the short simple way to fix this...

1. ODIN Stock MC3 Recovery tar - http://www.androidfilehost.com/?fid=23501681358550082
2. Boot into recovery, wipe data/cache
3. ODIN your favorite custom recovery back onto the device.

How much easier was that then fooling around with unlocking again? Enjoy.

Thanks @krowley3 for the tarball.
 
Last edited by a moderator:

lacoursiere18

Senior Member
Jan 9, 2013
4,182
7,001
0
LbTs
I can confirm this does work. I flashed TWRP 2.7.0.2 the other day, on reboot of recovery got a message like this:

Code:
///////////////////////////////////error
/////////////
too many files open in data/media/com.blah.blah
///////error
I then proceeded to do an advanced wipe, wiping internal, data, system, cache.. data would freeze and not wipe.
This also will happen with cache partition..
Following these steps did in fact work:good:
 

abay1289

Member
Jan 30, 2013
19
12
0
Works

I can confirm this also works.

I had a corrupt data partition whereby after one rom flash or another I could no longer install one of my apps. What I found was that in the /data/data/ folder I had remnants of this app that I could not delete. In my case, I could not install facebook. There was a com.facebook.katana folder in that data directory. In addition, I could not backup my rom. Wiping the data partition in Philz recovery still would not get rid of the folder and files. However, using odin and flashing the stock recovery I was able to delete those files.

The recovery goes in the pda slot.
After flash, it automatically booted, so I pulled the battery and rebooted into stock recovery.
Wiped data and factory reset in the stock recovery.
Rebooted into download mode and flashed a custom recovery tar file.

It was super easy. Granted I had to setup my phone again, but no big deal.

And let me just say thanks to @krowley3, @lacoursiere18, and @Deckoz2302 for their support and for keeping this phone going. :highfive:

I flashed the I605 pit file while flashing the stock MC3 recovery. It can be found here.
SCH-I605_16gb.Pit- http://www.mediafire.com/download.php?05cj895zu3tls7z
I did not check repartition, so it may have been unecessary. See http://forum.xda-developers.com/sh... /URL]link to a good discussion of pit files.
 
Last edited:

viper31573

Senior Member
Aug 31, 2012
637
122
0
port st lucie
it doesnt say, but im assuming at some point we need to odin MJ9 again after doing this? also im not sure this is my problem. my problem is when i flash the stock 4.4.2 rom i cant donwload ringtones and wallpapers from zedge. just says download failed. will this fix my problem? if not then my other option is to try folder mount which was linked in the rom thread which some people said worked

---------- Post added at 06:58 PM ---------- Previous post was at 06:13 PM ----------

it worked. ty
 

abay1289

Member
Jan 30, 2013
19
12
0
it doesnt say, but im assuming at some point we need to odin MJ9 again after doing this? also im not sure this is my problem. my problem is when i flash the stock 4.4.2 rom i cant donwload ringtones and wallpapers from zedge. just says download failed. will this fix my problem? if not then my other option is to try folder mount which was linked in the rom thread which some people said worked

---------- Post added at 06:58 PM ---------- Previous post was at 06:13 PM ----------

it worked. ty
I was unsure at first also. You don't need to flash a new ROM at any point in this process. You will end up back on the same ROM you were working on before, but it will be same rom with data wiped. Just have to go through setup.
 
Last edited:

viper31573

Senior Member
Aug 31, 2012
637
122
0
port st lucie
I was unsure at first also. You don't need to flash a new ROM at any point in this process. You will end up back on the same ROM you were working on before, but it will be factory reset.
i didnt factory reset because i was worried i would end up without a rom. i just cleared cache with with the mc3 recovery. it may not be the right way and im not suggesting anyone follow my lead, but it fixed my problem
 

abay1289

Member
Jan 30, 2013
19
12
0
I wiped cache & factory reset. It did not get rid of my rom, which is stock 4.4.2. Factory reset just had me go through the setup when I rebooted.

Sent from my SCH-I605 using XDA Premium 4 mobile app
 
  • Like
Reactions: viper31573

DaRkL3AD3R

Senior Member
Dec 5, 2010
784
240
0
Yep spot on here. Same thing happened to me very recently and I was forced to Odin flash back to 4.1.2 and redo the entire process of unlocking my bootloader, upgrading firmware and modem to MJ9 etc all over again. Major hassle.

Question: why don't custom recoveries wipe the proper way? I mean if stock recovery can do it, surely the advanced recoveries we all use should be able to do it too no? I'm greatly looking forward to hearing about this topic in the future, it could be a great change for all custom recoveries.
 

bjhatch

Senior Member
Aug 15, 2013
181
40
0
I can confirm this does work. I flashed TWRP 2.7.0.2 the other day, on reboot of recovery got a message like this:

Code:
///////////////////////////////////error
/////////////
too many files open in data/media/com.blah.blah
///////error
I then proceeded to do an advanced wipe, wiping internal, data, system, cache.. data would freeze and not wipe.
This also will happen with cache partition..
Following these steps did in fact work:good:
Hey,

I'm getting this error as well after I went from 4.3 to 4.4 and I'l trying to backup to move over to the 4.4.2] DN3 (Ditto Note 3) ROM. I haven't flashed a bootloader only a stockrom...It there anything particular I need to do?

I'm currently on 4.4. SR KK with both TWRP and PHILZ imaged.

I'm going to fire up ODIN 3.7
download and flash the stock MC3 recovery. I assume I'm checking bootloader in ODIN

Then wipe and flash PHILZ...Is that it? I'll still be running 4.4 SR KK which I can then backup?


Thanks for the help!
 

lacoursiere18

Senior Member
Jan 9, 2013
4,182
7,001
0
LbTs
Hey,

I'm getting this error as well after I went from 4.3 to 4.4 and I'l trying to backup to move over to the 4.4.2] DN3 (Ditto Note 3) ROM. I haven't flashed a bootloader only a stockrom...It there anything particular I need to do?

I'm currently on 4.4. SR KK with both TWRP and PHILZ imaged.

I'm going to fire up ODIN 3.7
download and flash the stock MC3 recovery. I assume I'm checking bootloader in ODIN

Then wipe and flash PHILZ...Is that it? I'll still be running 4.4 SR KK which I can then backup?


Thanks for the help!
You dont need to check anything in ODIN. This has nothing to do with the bootloader..
download and flash the stock MC3 recovery
Then wipe and flash PHILZ
Those are the correct steps.. Youll need to flash PHILZ in ODIN though.. but yea it should fix that
 
  • Like
Reactions: bjhatch

Rootabaga

Senior Member
Sep 8, 2013
76
10
0
Only thing I would add is that, as per the advice I was given, I flashed the I605 pit file while flashing the stock MC3 recovery.

The pit file goes in the pit slot in Odin, and the recovery goes in the pda slot.
Pulled battery after flash and before it booted.
Rebooted into stock recovery.
Wiped data and factory reset in the stock recovery.
Rebooted into download mode and flashed a custom recovery tar file.
Can anyone else confirm the necessity and/or safety of performing these additional steps: adding the .pit file, battery pull, factory reset?

Thanks
 
Last edited:

bjhatch

Senior Member
Aug 15, 2013
181
40
0
Can anyone confirm the necessity of these additional steps? Adding the .pit file, battery pull, factory reset?

Thanks
I odin flashed the stock recovery. ..restarted but missed the recovery screen so I pulled the battery...restarted in download and flasked philz. That was all it took.

Sent from my SCH-I605 using XDA Free mobile app
 

Rootabaga

Senior Member
Sep 8, 2013
76
10
0
Reboot to Download Mode?

After you wipe Data/Cache with the stock recovery how do you reboot back to Download mode?

Do you have to pull the battery?

If you don't boot back to Download Mode, the phone will completely reboot and force you into the Setup Wizard.
 

bjhatch

Senior Member
Aug 15, 2013
181
40
0
After you wipe Data/Cache with the stock recovery how do you reboot back to Download mode?

Do you have to pull the battery?

If you don't boot back to Download Mode, the phone will completely reboot and force you into the Setup Wizard.
Hold volume down, menu key, power and you will get the android download triangle.
I didn't have to pull the battery, I just did when I missed chance to set the phone into download mode. It's easier to put into download when the phone is off.

Sent from my SCH-I605 using XDA Free mobile app
 
  • Like
Reactions: Rootabaga

Rootabaga

Senior Member
Sep 8, 2013
76
10
0
Hold volume down, menu key, power and you will get the android download triangle.
I didn't have to pull the battery, I just did when I missed chance to set the phone into download mode. It's easier to put into download when the phone is off.
Thanks. I hope I'm not misunderstanding you. I understand how to boot into Download Mode when the power is off. I wanted to know if there was a way to reboot into Download Mode directly from inside the MC3 Stock Recovery. The only option I see is a standard reboot.

After I perform the data/cache wipes in the Stock Recovery, I want to be able to go straight back to Download Mode so that I can flash Philz.

Thanks
 

bjhatch

Senior Member
Aug 15, 2013
181
40
0
Thanks. I hope I'm not misunderstanding you. I understand how to boot into Download Mode when the power is off. I wanted to know if there was a way to reboot into Download Mode directly from inside the MC3 Stock Recovery. The only option I see is a standard reboot.

After I perform the data/cache wipes in the Stock Recovery, I want to be able to go straight back to Download Mode so that I can flash Philz.

Thanks
That was my problem as well so when the phone restarted after the odin update to stock I wasn't able to get it into download in time.

I assume if you have the phone in hand you can hold the buttons as soon as odin completes the flash and catch it prior to rebooting all the way up.

Sent from my SCH-I605 using XDA Free mobile app
 
  • Like
Reactions: Rootabaga

abay1289

Member
Jan 30, 2013
19
12
0
I pulled the battery, because of the automatic reboot & what I think you are describing above.

As far as the pit file is concerned, it might not be necessary. See the thread linked below. Even though it is for a different device, the general discussion is relevant. From what I have read the pit file tells Odin what files belong in what partitions and the size of each partition. When you don't use odin to repartition your device, odin reads the pit file from the device itself. When I flashed with odin, I did not check the repartition button, so it was probably not necessary. But it couldn't hurt either.

http://forum.xda-developers.com/showthread.php?p=12221385

Sent from my SCH-I605 using XDA Premium 4 mobile app
 
  • Like
Reactions: Rootabaga

Rootabaga

Senior Member
Sep 8, 2013
76
10
0
That was my problem as well so when the phone restarted after the odin update to stock I wasn't able to get it into download in time.

I assume if you have the phone in hand you can hold the buttons as soon as odin completes the flash and catch it prior to rebooting all the way up.
I completely understand. That might be worth trying.

I pulled the battery, because of the automatic reboot & what I think you are describing above.

As far as the pit file is concerned, it might not be necessary. See the thread linked below. Even though it is for a different device, the general discussion is relevant. From what I have read the pit file tells Odin what files belong in what partitions and the size of each partition. When you don't use odin to repartition your device, odin reads the pit file from the device itself. When I flashed with odin, I did not check the repartition button, so it was probably not necessary. But it couldn't hurt either.[/URL]
I agree, it sounds like it probably isn't necessary to flash the .pit file unless maybe there is concern that the resident pit file has been corrupted.

Thinking further about pulling the battery, which I am reluctant to do...If in fact the only real risk of pulling the battery while in stock recovery is somehow corrupting or damaging the stock recovery, maybe it wouldn't be such a big deal since I am just going to replace it with Philz immediately afterward.
 
Last edited: