yashsingh1/xdaforums huggingface dataset:
[Galaxy S I9000 Android Development] upichie:
Essentially this is what the script is for. You can have apps not store there data on /datadata, but then your apps will be slower—performance will be degraded. Moving apps to sdcard does free up space, but it does not mean they won't use any space on /datadata. And some apps use a lot of data there, such as Currents and Flipboard, which store their cache there—and their caches get huge. (The other apps you listed may too, but I haven't personally used them.)

Using the 2903 script moves the lib files to /data and out of /datadata, which frees up a lot of space. Lib files are static and therefore being moved to a partition with slower read/write access does not slow them down.

The script in the OP moves both lib and cache files to /data, freeing up even more room from /datadata. The downside to this is that an app's cache needs to constantly be written to. Moving it to /data, which has a slower read/write, means the apps will perform slower.

The conclusion is that the 2903 script maintains the performance you're accustom to by using CM (and similar) based ROMs. The OP's script, on the other hand, frees up more room at the cost of performance.

Apps such as Currents and Flipboard will take up a lot of room in /datadata even with the 2903 script. Personally I do not use those apps for this reason. If you really want to use them you'll either need to not have many apps or use the OP's script, but at the cost of performance for some apps.

Wendigogo is working on a script which will enable us to move certain apps cache to /data, allowing customization of sorts. This is the ideal solution. And this is why I'm looking forward to his next update.

Sing your praises, people. Wendigogo deserves every thanks he gets. :)
[Galaxy S I9000 Android Development] anil76:
Thanks a lot for the detailed explanation... will look forward to the new script...till that time I will keep clearing data manually whenever I hit this low memory situation..

I am wondering how stock rom avoid this without any performance penalty..
[Galaxy S I9000 Android Development] snapper.fishes:
-snip- nvm

Btw, where the search in thread function go?
[Galaxy S I9000 Android Development] basily:
If I'm not mistaken, stock rom doesn't handle it without any performance penalty. Remember the lag?
[Galaxy S I9000 Android Development] snapper.fishes:
I have a question. The first time I used the script, I forgot to turn on "follow symlink" in titanium backup, and as a result none of my backups worked but I was able to restore an older version of my backup.

Now that I have turned on the "follow symlink" option, I want to know will the backups work on a non-scripted rom? Aka if I want to go back to stock for some reason, would the backups still work? I am not too sure about how this symlink work on titanium backup. I have used symlinks on Windows before, but never on linux. From what I gather from this thread, is it copying the content that the symbolic link points to instead of just copying the symbolic link? Then what happens when you try to restore it? Does it restore everything to /datadata minus the symbolic link? (so placing the contents in /datadata instead of /data)

Edit: Does the install location option matter? Normally I just leave it as "default location".
[Galaxy S I9000 Android Development] anil76:
Not sure about this. I have used 2.3.3 & 2.3.6 (JVU, JW4 and Jw5) but did not really experience the lag. JW4 and JW5 GB roms are quite good.
[Galaxy S I9000 Android Development] Wendigogo:
Main Issue is that this datafix is reverted at each boot : every libs are extracted from apks and copied back to /datadata (removing symlink etc.). So if it fulfilled your /datadata when booting your phone will bootloop or fc.

Unfortunately it's harder than expected : I have to modify initramfs of kernel cause this issue comes from here (mount order, cache moving etc.).

Drawbacks is each kernel as is own initramfs so it may be done for each of them :(
[Galaxy S I9000 Android Development] RootTheMachine:
So what causes it to bootloop?

Sent from my ICS Samsung Captivate
[Galaxy S I9000 Android Development] mialwe:
What changes would be needed to be of help here? The initramfs has to be compiled with the kernel to work which is the reason it cannot be modified (easily) afterwards. If the needed changes do not interfere with the boot process maybe I can adjust the initramfs. Feel free to pm :)
[Galaxy S I9000 Android Development] Wendigogo:
If /datadata is full and system wants to put more on it at boot it will fail ...

As you say it's not easy to modify initramfs ... :(

I'm trying to do this on Devil kernel but unpack/repack of same files doesn't give me the same result (different sizes and content). I suppose problem comes from mkbootfs (I can't find how to build my own one) but I'm not really sure of this. I follow a lot of wiki/xda topic etc. to unpack/repack a kernel (windows xp or linux64 system) but none of them works kindly (have to modify a perl script or so). If you have a good tutorial for recent kernels it would be nice. ;)

Concerning the datafix, I think that libs are extracted from apks because symlinks are "dead" when checking their existence. So I want to test by changing the mount order or introduce some delay after /datadata is mounted and everything is done in some intramfs files.

But before this, I want to modifiy /sbin/setupdatadata.sh to make some checks.
[Galaxy S I9000 Android Development] basily:
manually move some things out of datadata?

I understand that it will be difficult to modify the script to be able to select certain app's caches to be moved out of datadata, so it will probably be a while...

How difficult is it to manually move the cache from certain apps over? I suppose even if I do that every time datafix runs it will move the cache back to datadata, no?

If you have gmail syncing mails, as well as currents and chrome beta installed you're kinda screwed for space right from the start...
[Galaxy S I9000 Android Development] loonieryan:
Crap I used the 1103 version first and did not try the 2903 version. Can I somehow revert the changes back without doing a complete data wipe? Should I just replace the 1103 version with the 2903 version?

I've noticed my phone has slowed down some what since flashing the 1103 version.

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

Is there any way to reverse the changes of the 1103 script and then apply the 2903 script? Do I need to do a complete data wipe to achieve this?
[Galaxy S I9000 Android Development] RootTheMachine:
Just remove the old script from init.d, and flash the new one.
[Galaxy S I9000 Android Development] diSty:
Thanks. works like a charm.
[Galaxy S I9000 Android Development] hohassan444:
works nice..slow and laggy after 1st boot...after another boot very smooth and fast ( cm9).
[Galaxy S I9000 Android Development] stfudude:
nah, i'm using custom kernel with init.d support. i was on aokp official build 27-3 previously.

now i'm on aokp milestone 4 (with full wipe) and also using the same kernel. i can say that it works after installing about 75 apps but it doesn't work after restoring 100+ apps (with its data). the low on space notification persists. guess i'm going to have to move a few of my apps data to sd card one-by-one till it start working again.
[Galaxy S I9000 Android Development] aerospacemango:
Hi,

Have looked through the thread but can't see any mention of ICSSGS and Semaphore kernel...

Will this work with that set up?

Thanks!
[Galaxy S I9000 Android Development] piccobit:
Had the same problem and solved it by putting an empty file called .nodatadata into the /datadata subdirectory and rebooting. After the reboot the /datadata dir was completely empty. Then I installed naTrium's script and to my suprise the .nodatadata file disappeared and the /datadata dir was filled again, but not completely. At the moment it is filled around 50%.

HTH!
[Galaxy S I9000 Android Development] arianesfahani:
I guess it does since semaphore support init.d
[Galaxy S I9000 Android Development] stfudude:
Sorry my bad! it's working flawlessly now! the problem is that Devil kernel lost its init.d feature if used with official AOKP (nightly or milestone). :p
[Galaxy S I9000 Android Development] DarknessWarrior:
just flashed on Team ICSSGS 4.2 and Semaphore ICS 0.9.5b and it seems to work, 12mb free on /datadata before, 133mb free now.

Although, it seems to be just a little bit more laggy on the menus, homescreen and drawer, but it might be nothing.

btw, if i want to remove it i can just hit "clear init.d" from semaphore's CWM recovery, right?
[Galaxy S I9000 Android Development] nemanja066:
It should be! Or, manually delete \system\etc\init.d\30datafix :D
[Galaxy S I9000 Android Development] kathees:
I'm sorry I don't understand this. Can you explain why we need to think this? I have lot of apps moved to sd card so if I use this script is it going to affect those?

I thought even when we move the apps to SD card data still exists in internal memory. So should be just like flash then reboot right?

Anyone in ICSSGS 4.2 uses this? ANy lagging?
[Galaxy S I9000 Android Development] DarknessWarrior:
just read 2 posts above :eek:
[Galaxy S I9000 Android Development] stfudude:
Please ignore my previous posts. The script didn't come into effect when I flash it on aokp with devil kernel.

I'm now using glitch kernel, and the script works! I don't have to do anything, it just works!

Sent from Ice-Cream flavored Samsung GT-I9000 using Tapatalk
[Galaxy S I9000 Android Development] Ingmar89:
Had alot of FC's up to the point that my phone wouldn't start anymore. Did factory reset and tried to restore a back-up. Directly same situation...

This fix helped me and my phone is back without FC's and smoother than ever!!

This is on Drz MIUIv4
[Galaxy S I9000 Android Development] abitzsong:
I had .nodatadata applied on my phone so the synlink is already broken.

Could I just flash the script directly?
[Galaxy S I9000 Android Development] kathees:
How to find how much free space I have now in datadata? The time I flashed this script I didn't had any storage low message so no way to know whether this script worked....

Titanium Backup has a System Rom but it's says same as before only 18+MB free (Out of 262MB)

------------------------------------------------------------------------------------------------------------------------------------------------

Never mind I found how. Just used the android terminal emulator. (For new in this you can use "df" command to list off your partitions and free space)

Now mine says out of 172M, 46M used and 125M Free. So script works :)

BTW I read somewhere ICSSGS has 240MB allocated for datadata. How come mine less than that???
[Galaxy S I9000 Android Development] silly83:
http://ics.samsung-updates.com/trouble/LatestDataFixer.zip

I used this to circumvent the problem and the phone then becomes somewhat laggy because everything is out of the datadata.

This script seems the solution: Thanks!!

Can i install this script for it to work, or do i have to reinstall the rom (with or without factory reset?) , install script, install TB and restore apps

(ROM= ICSSGS onecosmics 4.2 Kernel semaphore 0.91)
[Galaxy S I9000 Android Development] piccobit:
Do you have a link where this is stated?
[Galaxy S I9000 Android Development] stfudude:
it's not stated anywhere, it's not my opinion, it's my experience. you shouldn't use devil 1.1.6 on aokp (nightlies or milestone), because script inside init.d folder will not load at boot which ultimately render the datafix script useless. all i'm saying is that the kernel doesn't play well with official aokp rom just yet.. next version of devil kernel might fix this issue. for now, just use glitch. it's essentially the same.
[Galaxy S I9000 Android Development] Helloworld294:
this causes such huge lags in my phone... it makes the pics and videos from the external sd card corrupted... btw is this compatible with AOKP?
[Galaxy S I9000 Android Development] nemanja066:
This support kernel with init.d :D
[Galaxy S I9000 Android Development] loonieryan:
What about all the apps whose cache has already been moved to /data/data by the old script? How do I revert those changes?
[Galaxy S I9000 Android Development] RootTheMachine:
If you want, you can wipe the cache, but it's not like it will matter

Sent from my ICS Samsung Captivate
[Galaxy S I9000 Android Development] upichie:
Like korockinout said. The data is symlinked; it'll get moved properly.
[Galaxy S I9000 Android Development] Wendigogo:
Sorry I didn't see your post ... When you check "symlink" in TB in backuping you can restore your apps data with and without datafix applied. It matters only in the backup process. But you have to be careful when restoring : everything will go back to /datadata (if no datafix is applied) and if you have too much apps you could "break" your system (factory reset will solve the problem but you need to restore again your apps).

Location part is only for app2sd stuff. In SGS there is 2Go to store apps so imho this part doesn't concern us.

That's why the new datafix is designed : selecting other subdirs than 'lib" to move on /data partition.

And this is the point I don't understand : with previous datafix (1103 and 2903) there's no problem at boot : everything stay where it was before (no symlink on "lib" subdirs). This include cache subdirs too.

I think about a specific init script to move selected apps cache on /data/data2 (like what's done with /sbin/setudatadata.sh script included in initramfs). But your right with a datafix applied before it will revet this at boot. Those two parts have to be included in the same script.

The 2903 datafix is only an evolution of op script. It just moves back more stuff on /datadata than 1103.
[Galaxy S I9000 Android Development] Grizonic:
Hey! Any way of excluding an app from this process? I'd like to have google chrome entirely in the datadata folder.. I've noticed some slow down in the app after running this script. And also, my datadata only has 14MB occupied, so I feel like I could take more advantage of it..

Thank you for the great script! :)
[Galaxy S I9000 Android Development] Wendigogo:
:eek:

Why using a datafix script if you've got only 14MB used in /datadata ???

I'm not sure you need to let all Google Chrome on /datadata cause its cache is also in /datadata and will fulfill it quickly.

Depending of the script you use, there is a variable "skip_apps". Just add the google chrome /datadata dirname in it.
[Galaxy S I9000 Android Development] Grizonic:
14MB after using the script :P In the meanwhile I found out that I was using the 1103 version and there was a newer one, 2903 (or something similar), over the last pages. Installed this newer one and already have quite more chrome data in datadata (around 11MB). I guess this will already boost its performance! :)

Thanks for your quick reply!
[Galaxy S I9000 Android Development] basily:
About that "skip_apps" variable - how does it work if you want to have more than one app in there? Is it a comma separated list?
[Galaxy S I9000 Android Development] loonieryan:
Separated by whitespace would work, like in the following example:

skip_apps='bn.ereader com.amazon.kindle'

As for whether it's worth applying this fix: I applied this script and thus lost the symbolic link from /data/data to /datadata and I noticed significant application performance degradation. I think I would rather leave my app data on the faster yaffs filesystem.

Unfortunately, the only way I could find to revert the changes and get everything back on the yaffs was to clear my data and reflash my ROM. That was a long and tedious process!
[Galaxy S I9000 Android Development] Calient_Boy:
Is Icy Glitch V14 supporting int.data?
[Galaxy S I9000 Android Development] Wendigogo:
I suppose you ask about init.d support. :D

If so, Glitch kernels support these scripts since a long time now (with or without "S", I don't know ...).
[Galaxy S I9000 Android Development] johnhazelwood:
I get rm failed for -rf when I manually run the script. Any ideas? I'm on a Samsung captivate and cm9.
[Galaxy S I9000 Android Development] upichie:
The original script moves the cache, the 2903 one keeps the cache in /datadata. So the 2903 script is exactly what you're looking for.
[Galaxy S I9000 Android Development] fylim:
Do keep in mind that keeping cache in /datadata requires more maintenance to keep space in check. For me it was too much trouble and I was willing to live with slightly slower performance. So I am back to original version.
[Galaxy S I9000 Android Development] upichie:
Great point, thanks for adding that. What's your take on the performance difference? Is it noticeable? Is it bad?

Personally I haven't tried the original script, but there's a few apps (Chrome, Flipboard, etc.) that essentially require it. I'd like to hear your comparison.
[Galaxy S I9000 Android Development] -=|MisterY|=-:
Thank you very much for the post. While the script did not work for me, it prompted me to do this

http://alensiljak.blogspot.com/2012/05/space-on-samsung-galaxy-s.html

and sort things out (for now).
[Galaxy S I9000 Android Development] fylim:
Using original script, i know chrome performance is bad. I believe its performance is significantly better with cache on /datadata but problem with such apps is the cache grows too fast and you will run out space very soon needing frequent cache cleaning.

So i eventually is gave up.

Original script gives a halfway performance. Better than stock but less than 2903 I can say.

My 2 cents worth. Hope it helps you.
[Galaxy S I9000 Android Development] adrianmak:
I have still running low on space warning with script ran.

cm9 build 0516 + mnics kernel
[Galaxy S I9000 Android Development] Bejda:
Must be S30datafix named with Mnics.

Only scripts with "S" will be runned with Mnics and if it still doesn't work you can check after boot the user.log you'll find in /data,read it as text at the bottom the init process is described.

Init.d must be activated in recovery too.
[Galaxy S I9000 Android Development] adrianmak:
the datafix script is prefixed with S

I checked the user.log and found

/data/local/midnight_options.conf not found. no init.d execution, skipping...
[Galaxy S I9000 Android Development] dark_knight35:
Activate init.d in midnight app.

sent from bubbleGUMMYng GALAXY S
[Galaxy S I9000 Android Development] adrianmak:
thanks.

the datafix script did executed.
[Galaxy S I9000 Android Development] Wendigogo:
Just remove the "f" from each "rm" command.

But it seems you're using the April script which is not recommended and buggy.

I'm working on a "next generation" script running flawlessly since 3 days. Like the 2903 datafix libs are on /data and everything else is on /datadata. But now, you could move selected applications cache (like Chrome or so) to /data. And this could be reverted ;-)

I have to test this when updating rom then create a new topic here. :-P.
[Galaxy S I9000 Android Development] dastinger:
Yo,

First of all, thanks for this script. I'm using Slim ICS with the terminal emulator + gscript workaround to the datadata issue. My question is: I'm about to wipe my phone to flash 3.7 and wanted to flash this afterwards instead of using the same method I'm using atm. I'm gonna make a Nandroid backup and then restore only data. Will the old configuration come back with a data restore using CWM?

Thanks
[Galaxy S I9000 Android Development] upichie:
Make sure you post a link to the new topic in this thread stop we don't miss it! :)
[Galaxy S I9000 Android Development] upichie:
I'm not familiar with that script. What does it do?

Regardless, it's very likely that you will be able to restore the backups successfully.

Flash the script and then restore the backups in groups—not all at once—and be sure to run the script after each group, as to ensure /datadata does not fill up and create huge problems. And you don't have to reboot to run the script, just get an app to run it. I use Script Manager, although I don't remember if it's free or not.
[Galaxy S I9000 Android Development] dastinger:
The goal is the same but I can't really tell you what it does differently than this one. If you want, you could check HERE for more info.

Anyway, I ended up backing up/restoring with Titanium and all is good.

I tried running the script using Terminal Emulator but I got the 'rm failed for -rf' message. I don't know if it's working properly or not but I will try with Script Manager and report back.

Thank you :)
[Galaxy S I9000 Android Development] dastinger:
I got the same message trying to run it using Script Manager. Does that mean it's not running on boot as well? Should I do what Wendigogo said? What does he mean removing the 'f' from each 'rm' command? Edit the script and delete all 'f's on each 'rm' line? Like this?

Original:

Modified:

PS: Sorry for the double post. Thought the posts would automatically be embed.
[Galaxy S I9000 Android Development] upichie:
I'm not entirely sure what Wendigogo's suggestion does. When I run the script with Script Manager I get that error as well, but it continues on and does what it's supposed to. I verified by checking /datadata and /data/data—everything appears to have moved correctly.

Maybe Wendigogo can inform us further. :)
[Galaxy S I9000 Android Development] :
Does this work on ICSSGS 4.2? I really want this.
[Galaxy S I9000 Android Development] :
Also, does this wipe all the files? Because apparently it does.
[Galaxy S I9000 Android Development] upichie:
Yes it will work (if your kernel supports init.d), and no it does not delete your data.

Just install -> restore some apps -> run the script -> restore some apps -> run the script... and you're done!
[Galaxy S I9000 Android Development] :
What do toy mean by Just Install? And what do you mean by restore some apps? I'm on devil kernel so it supports init.d.
[Galaxy S I9000 Android Development] upichie:
Flashing the ZIP will install the script. Well not really install, just put it in init.d, but you get the point.

And I guess you probably aren't going to be wiping your apps, so disregard what I said. Duh.
[Galaxy S I9000 Android Development] Aerofreak360:
since installing this my phone processed/keyboard etc all fail... help?
[Galaxy S I9000 Android Development] upichie:
As in they're force-closing?

Do you have any room in /datadata?

Please describe what you did. Did you just install the ZIP and then had force closes? What script are you using?

If /datadata is full you can try uninstalling apps until you have free space, running the app, and then restoring a few apps at a time and running the script after every few restores (to ensure /datadata does not fill up).
[Galaxy S I9000 Android Development] Bonta768:
I just installed the latest nightly update-cm-9-20120519-NIGHTLY-galaxysmtd-signed.zip, and manually ran the script, and now I am constantly getting "android.process.media has stopped" msgs. Argh.
[Galaxy S I9000 Android Development] ew:
Go to manage apps and delete data from "downloads" and "Download Manager "
[Galaxy S I9000 Android Development] Wendigogo:
Well if there's no option for "rm" command, you have to also remove the "-" sign. So if there is "rm -rf" it should become "rm -r" and if there is "rm -f" it should be "rm" alone.

I suppose the error is about "/datadata/lost+found" directory right ? This is a system directory and when trying to remove it (with "rm -r /datadata/*") it fails and give this warning. It's "normal" behaviour.

I could "hide" this but if there is another error/warning during the "remove" part it won't appear ...

I hope to publish a new datafix today with some improvements (but still moving all stuff to /data/data first :mad: )
[Galaxy S I9000 Android Development] Vertron:
Does this script move the cache to /data/data aswell, or does it stay in /datadata?

I hope it does as it's annoying having to delete the cache all the time.
[Galaxy S I9000 Android Development] Wendigogo:
As some apps lag if their cache wasn't on /datadata you could choose (by editing a text file) which apps store their cache on /data. This could be reverted if app becomes laggy ...

EDIT : Here is my new datafix : http://xdaforums.com/showthread.php?t=1665742