# Problems with /datadata? Causing force closes for Google apps.



## stalls

Hey jus wondering if anyone has had any problems with there /datadata folder being to full. It causes issues for force closing for google apps, browser, an the market. Maybe others as well.. Anyways is there a fix for this? I dont have that many apps only like 60 that includes system apps as well..

Im running CM7 with Glitch on a Mes.

Any help or insight would be greatly appreciated Thanks!


----------



## foxfire450

stalls said:


> Hey jus wondering if anyone has had any problems with there /datadata folder being to full. It causes issues for force closing for google apps, browser, an the market. Maybe others as well.. Anyways is there a fix for this? I dont have that many apps only like 60 that includes system apps as well..
> 
> Im running CM7 with Glitch on a Mes.
> 
> Any help or insight would be greatly appreciated Thanks!


When /datadata fills up, things start to FC because this is where apps store their data. You can use diskusage (from the market) to find out which apps are taking up the most space. The easiest solution is to get rid of some apps, or you can try following this suggestion, but you'll be moving the data to slower memory.


----------



## dsk04

are you sure your partitions are right, check settings/storage, it will say 0.0 free if they got messed up, don't forget to clear data on the apps your having problems with in settings / applications / manage apps, 'all' tab select app / clear data


----------



## stalls

I got a 32g card an its no where near full... Also my internal storage is not near full as well 1.53gb total space an 1.3gb free..


----------



## foxfire450

stalls said:


> I got a 32g card an its no where near full... Also my internal storage is not near full as well 1.53gb total space an 1.3gb free..


/datadata is on the phone's internal memory, not the SD card. The partition should be only around 168MB. If you run "df -h /datadata" from a local terminal session, it will show you how much of that partition is free. For reference, mine is 155.8M used (93%) with 12.2M free.

The 1.3G/1.5G you referenced is probably the /data partition, not /datadata.


----------



## stalls

I understood what that all meant... I guess I am lookin for a more concrete solution cuz I have already deleted all the apps that i dont use. Still keep fillin it up pretty fast


----------



## wizayne

Yeah I had that problem months ago. After talking to the guys on freenode (think even asked dfgas and jt), imnuts (I think, if I'm wrong who it was that told me this feel free to chime in) informed me that it would be most difficult to fix this problem

He showed me the section of code from jt's github that controls the partition table ... Looks very complicated to me and would definitely be work since /datadata WASN'T THERE!

Its too bad that over 85% of my internal was free but I was experiencing fc's. It seems like /data is far too large and should have some space given for /datadata.

Wish it was better news...my eventual fix was removing tons of apps ...like you I got rid of every app I didn't use and came up short so I had to delete useful spoofs to make do.

If you find a fix please do let us know though


----------



## scarmon25

Is this effecting all builds of CM7 / MIUI? Or just certain ones. I just checked mine and have 80% free. I don't think I've had any issues with this at all and I'm running CM7 with Glitches kernel. Just makes me wonder.

Also I guess I should have mentioned I'm on a Mesmerize.


----------



## foxfire450

scarmon25 said:


> Is this effecting all builds of CM7 / MIUI? Or just certain ones. I just checked mine and have 80% free. I don't think I've had any issues with this at all and I'm running CM7 with Glitches kernel. Just makes me wonder.


From what I've gathered from reading, it's an AOSP issue that doesn't exist with TouchWiz ROMs because, in AOSP, /datadata has its own partition in faster memory instead of the /data folder that is in slower memory, like on TW ROMs. It's a performance issue. That's also why /datadata's partition is so small.


----------



## jt1134

On MTD ROMs, /data/data is symlinked to another partition (/datadata) for performance reasons. Since we have limited space on the nand, its size is what it is.

Easy fix:


Code:


<br />
adb reboot recovery<br />
adb shell<br />
rm /data/data<br />
mkdir /data/data<br />
cp -a /datadata/* /data/data<br />

That will keep everything on mmc, allowing you to use the full mmc space. It will stay that way until you wipe data.

This will never be changed upstream, as it would cause complications with existing installs and what-not, and is already part of the standardized partition scheme.


----------



## scarmon25

Awesome. Thanks JT. Only one question. Is there a way to confirm the results from the above syntax took. Should I be looking for something specific once its been done.


----------



## jt1134

df -h

install an app

df -h
again

should show the new app's space being taken up in /data instead of /datadata


----------



## stalls

Hell ya thanks JT ur the man!!


----------



## scarmon25

jt1134 said:


> df -h
> 
> install an app
> 
> df -h
> again
> 
> should show the new app's space being taken up in /data instead of /datadata


Awesome. So I used titanium to uninstall all user apps. Formatted datadata. Did the commands and restored and now datadata shows 1% full. Awesome man. Learned me some new tricks too


----------



## shag_on_e

"scarmon25 said:


> Awesome. So I used titanium to uninstall all user apps. Formatted datadata. Did the commands and restored and now datadata shows 1% full. Awesome man. Learned me some new tricks too


Have you noticed any performance differences since doing this?


----------



## scarmon25

It seens some of my apps open a little quicker, but that could just be me. But I also wasn't having the issues some others were having. I had close to 127 MB free on /datadata. I did this more as a preventative measure.


----------



## shag_on_e

"scarmon25 said:


> It seens some of my apps open a little quicker, but that could just be me. But I also wasn't having the issues some others were having. I had close to 127 MB free on /datadata. I did this more as a preventative measure.


I'm not having that issue either I was curious though. I'm just sick of this low signal app closing. I wonder if it's related at all. I pulled a logcat after some popping and closing, but I don't know who to ask to check it out.


----------



## scarmon25

JT would be my guess. I'm sure there are others but he's the first one I would ask.


----------



## stalls

Ill say it made a difference for me! I dont have any apps force closing an yes it seems it could have helps thnigs run smoother... But it could because of my previous memory was at 300kb now im am more then golden 1.3G!


----------



## fifreak

jt1134 said:


> On MTD ROMs, /data/data is symlinked to another partition (/datadata) for performance reasons. Since we have limited space on the nand, its size is what it is.
> 
> Easy fix:
> 
> 
> Code:
> 
> 
> <br />
> adb reboot recovery<br />
> adb shell<br />
> rm /data/data<br />
> mkdir /data/data<br />
> cp -a /datadata/* /data/data<br />


Using the CWM that comes with the nightlies this doesnt work. When I end up in CWM, /data/data already exists as an empty directory and /datadata doesnt exist at all. Help please.


----------



## HardcorePooka

"fifreak said:


> Using the CWM that comes with the nightlies this doesnt work. When I end up in CWM, /data/data already exists as an empty directory and /datadata doesnt exist at all. Help please.


Try mounting the various directories through CWM. That should fix it. Also, you will probably need to do "rm -rf /data/data"... I did


----------



## weeuweed

is the method above confirmed working?


----------



## 123sit

The method above worked for me, I did do the "rm -rf /data/data" though. I also noticed a substantial improvement in Quadrant from the low 2000s to low to mid 3000s. I haven't made any other changes so this is the only thing I can attribute it to. Thanks JT for all your work guy.


----------



## Mesmerizeuser

This worked great for me. Improved quadrant scores, solved the force closes, and now I don't get an insufficient storage error when I download the gun bros pack.

For the record, I was able to implement this fix with terminal emulator (followed by a fix permissions & a reboot).


----------



## sageDieu

I followed JT's instructions and have spent the last 2 hours trying to get my phone to boot, it was force close hell after doing his commands and then same after reinstalling miui and stuff. Had to do a data wipe.


----------



## akellar

"sageDieu said:


> I followed JT's instructions and have spent the last 2 hours trying to get my phone to boot, it was force close hell after doing his commands and then same after reinstalling miui and stuff. Had to do a data wipe.


Did this last night and it worked great. Make sure to mount everything in recovery first.


----------



## sageDieu

"akellar said:


> Did this last night and it worked great. Make sure to mount everything in recovery first.


That seems like a good idea.


----------



## enderst

jt1134 said:


> Easy fix:
> 
> 
> Code:
> 
> 
> rm /data/data<br />
> mkdir /data/data<br />
> cp -a /datadata/* /data/data
> 
> That will keep everything on mmc, allowing you to use the full mmc space. It will stay that way until you wipe data. This will never be changed upstream, as it would cause complications with existing installs and what-not, and is already part of the standardized partition scheme.


for whatever reason my phone isn't detected in windows or linux on several pcs and different cables, the phone doesn't even show its connected usb anymore. i ran the last three commands as root using better terminal.


----------



## radda

jt1134 said:


> On MTD ROMs, /data/data is symlinked to another partition (/datadata) for performance reasons. Since we have limited space on the nand, its size is what it is.
> 
> Easy fix:
> 
> 
> Code:
> 
> 
> <br />
> adb reboot recovery<br />
> adb shell<br />
> rm /data/data<br />
> mkdir /data/data<br />
> cp -a /datadata/* /data/data<br />
> 
> That will keep everything on mmc, allowing you to use the full mmc space. It will stay that way until you wipe data.
> 
> This will never be changed upstream, as it would cause complications with existing installs and what-not, and is already part of the standardized partition scheme.


I tried doing this in the Terminal Emulator and nothing worked. Explain it to me like I'm five, please. I'm pretty new at this and these weekly force close extravaganzas are getting on my nerves.


----------



## JB2005

radda said:


> I tried doing this in the Terminal Emulator and nothing worked. Explain it to me like I'm five, please. I'm pretty new at this and these weekly force close extravaganzas are getting on my nerves.


I have never tried to do this on Terminal Emulator only through adb, that being said.
"adb reboot recovery" > go to mounts and storage (in CM recovery options on your phone), mount /datadata & /data > then (on PC terminal) "adb shell" > "rm /datadata" > "mkdir /datadata" > " cp -a /datadata/* /data/data"
Then reboot phone > reboot recovery > wipe (format) /datadata > reboot phone =done Hope this helps


----------



## Mesmerizeuser

If you are trying to perform the fix in terminal emulator, run the following commands:

su

rm /data/data

mkdir /data/data

chown system:system /data/data

cp -a /datadata/* /data/data

This should apply the fix while preserving your apps and data. Your phone may act a bit janky, but if you fix permissions a couple of times (with a reboot or two in between) and wipe your dalvik everything should be fine.


----------



## kastorma

Mesmerizeuser said:


> If you are trying to perform the fix in terminal emulator, run the following commands:
> 
> su
> 
> rm /data/data
> 
> mkdir /data/data
> 
> chown system:system /data/data
> 
> cp -a /datadata/* /data/data
> 
> This should apply the fix while preserving your apps and data. Your phone may act a bit janky, but if you fix permissions a couple of times (with a reboot or two in between) and wipe your dalvik everything should be fine.


I read about the datadata problem and the solutions mentioned here as well as in other places, but the problem I have with applying any of those is that I do not seem to have /datadata folder at all. It also is not listed within CWM recovery and not possible to mount, so mounting is not the issue. Following commands give me an error: No such file or directory. Am I the only person experiencing this?


----------



## Azaurath

kastorma said:


> I read about the datadata problem and the solutions mentioned here as well as in other places, but the problem I have with applying any of those is that I do not seem to have /datadata folder at all. It also is not listed within CWM recovery and not possible to mount, so mounting is not the issue. Following commands give me an error: No such file or directory. Am I the only person experiencing this?


Are you sure you are running the commands as in a root session?

You can run df -h to list out all of the partitions on your device and their sizes.


----------



## Mr. Compromise

jt1134 said:


> On MTD ROMs, /data/data is symlinked to another partition (/datadata) for performance reasons. Since we have limited space on the nand, its size is what it is.
> 
> Easy fix:
> 
> 
> Code:
> 
> 
> <br />
> adb reboot recovery<br />
> adb shell<br />
> rm /data/data<br />
> mkdir /data/data<br />
> cp -a /datadata/* /data/data<br />
> 
> That will keep everything on mmc, allowing you to use the full mmc space. It will stay that way until you wipe data.
> 
> This will never be changed upstream, as it would cause complications with existing installs and what-not, and is already part of the standardized partition scheme.


Can I please get a step-by-step instruction on how to apply this fix? I am very new to messing with adb, and I dont even fully understand what it is (I get the concept of it I just dont know how to access/use it).

Thanks, much appreciated!


----------



## Azaurath

Mr. Compromise said:


> Can I please get a step-by-step instruction on how to apply this fix? I am very new to messing with adb, and I dont even fully understand what it is (I get the concept of it I just dont know how to access/use it).
> 
> Thanks, much appreciated!


adb is part of the Android SDK, in the platform-tools package. You run adb in a command/terminal window.
Then its just a matter of entering the commands in order.

If you want to know what the commands do, just google them!


----------



## Brentless

[sub]When you run this code in adb, should this be done A) before you install your apps or







when your apps are already installed?[/sub]


----------



## nemeth2027

Brentless said:


> [sub]When you run this code in adb, should this be done A) before you install your apps or when your apps are already installed?[/sub]


I do it before BC you are removing, deleting, the data dir first.

Sent from my SCH-I500 using RootzWiki


----------



## Brentless

is there a trick to getting adb to work with ICS, i'm not having any luck


----------



## JB2005

Brentless said:


> is there a trick to getting adb to work with ICS, i'm not having any luck


 If you're on Windows you may have to ?Nexis? drivers. I'm not %100 sure that is the right phone drivers but Windows does not see it as the Mez on ICS. If you're on Linux it should just work.

Sent from my GT-P7510 using Xparent Blue Tapatalk


----------



## exzacklyright

If you aren't familiar with ADB just use the app "cache cleaner ng". You can set it to run daily or however many times you want and it clears your apps cache.

Typing


Code:


df datadata

in terminal emulator will tell you if you have any free space in data/data. If it's low that is the cause of the force closes.

You can find which applications use most space with:



Code:


du -sk /data/data/* | sort -rn | head

TBH I hate adb. It's a bitch to install.


----------



## Syndacate

Alright, I may be misunderstanding this, but I'm a big confused.

If you destroy the symlink pointing to /datadata from /data/data and use a folder as /data/data we take the performance hit which was the whole reason /datadata was created, no?

Also, when we copy everything from the /datadata partition, the /data/data folder will get updated, sure, but won't the contents of the /datadata (our fast cache) be completely stale until wipe?

I'm not bashing here, I'm just trying to understand why this works:
A. Without a performance hit
B. Without stale data in the cache


----------

