Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[Q&A] Mounts2SD - Storage & Memory Management

OP dk_zero-cool

3rd January 2012, 01:16 PM   |  #21  
Dunc001's Avatar
Recognized Developer
Flag Hiding out south of the border...
Thanks Meter: 1,446
 
2,659 posts
Join Date:Joined: Apr 2010
More
Cool, thanks for this superb piece of work. Would you mind if we use it in our ROM in place of our current a2sd script? BTW, what are the benefits of having an sd-cache partition - I haven't come across this before, so how is it best set up and is anything additional required to make use of it?
3rd January 2012, 01:24 PM   |  #22  
dk_zero-cool's Avatar
OP Recognized Contributor
Flag Horsens
Thanks Meter: 4,429
 
3,277 posts
Join Date:Joined: Nov 2010
More
Quote:
Originally Posted by Dunc001

Cool, thanks for this superb piece of work. Would you mind if we use it in our ROM in place of our current a2sd script? BTW, what are the benefits of having an sd-cache partition - I haven't come across this before, so how is it best set up and is anything additional required to make use of it?

Use it as you like

I don't think there are any benefits to a seperate cacge partition on the sdcard. But the internal nand has a seperate partition for this, so I just added the option if people would like the same on the sdcard.

It works by adding a third partition to the cache. So to use it, make a cache partition after fat32 and sdext on the sdcard. Otherwise it uses /sd-ext/cache if no third partition exists or /data/cache if no sdext partition exists either (If you boot without sdcard for an example).
3rd January 2012, 01:28 PM   |  #23  
Dunc001's Avatar
Recognized Developer
Flag Hiding out south of the border...
Thanks Meter: 1,446
 
2,659 posts
Join Date:Joined: Apr 2010
More
Quote:
Originally Posted by dk_zero-cool

Use it as you like

I don't think there are any benefits to a seperate cacge partition on the sdcard. But the internal nand has a seperate partition for this, so I just added the option if people would like the same on the sdcard.

It works by adding a third partition to the cache. So to use it, make a cache partition after fat32 and sdext on the sdcard. Otherwise it uses /sd-ext/cache if no third partition exists or /data/cache if no sdext partition exists either (If you boot without sdcard for an example).

Thanks, and thanks for the reply. So I guess we'll just stick with a single sd-ext ext4 partition and a Swap partition. Can I PM you or chat anywhere re whether your script will require our existing ROM updater-script modifying in terms of how it is currently set up with symlinks etc?
3rd January 2012, 01:33 PM   |  #24  
dk_zero-cool's Avatar
OP Recognized Contributor
Flag Horsens
Thanks Meter: 4,429
 
3,277 posts
Join Date:Joined: Nov 2010
More
Quote:
Originally Posted by Dunc001

Thanks, and thanks for the reply. So I guess we'll just stick with a single sd-ext ext4 partition and a Swap partition. Can I PM you or chat anywhere re whether your script will require our existing ROM updater-script modifying in terms of how it is currently set up with symlinks etc?

PM away
Also believe my email should be public for everyone.
3rd January 2012, 02:07 PM   |  #25  
uzi2's Avatar
Senior Member
Thanks Meter: 590
 
2,374 posts
Join Date:Joined: Jun 2008
More
Quote:
Originally Posted by dk_zero-cool

The config files is deprecated and replaced with the "m2sd" command, as said above. Settings is saved to /data/.m2sd which means that it keeps your settings when you flash new ROM's as long as you don't wipe data.

I have an EU HD2 with very limited internal memory. At present I use an amended version of Amarullz' script to move apps, data and dalvik-cache to my ext4 partition. This works well and I can just drop the script into init.d when updating or testing new Roms.

I was looking to test your solution in a similar way, but it would appear that there is no way of setting it the way I want it at first run or will it recognise my current layout?
3rd January 2012, 02:19 PM   |  #26  
dk_zero-cool's Avatar
OP Recognized Contributor
Flag Horsens
Thanks Meter: 4,429
 
3,277 posts
Join Date:Joined: Nov 2010
More
Quote:
Originally Posted by uzi2

I have an EU HD2 with very limited internal memory. At present I use an amended version of Amarullz' script to move apps, data and dalvik-cache to my ext4 partition. This works well and I can just drop the script into init.d when updating or testing new Roms.

I was looking to test your solution in a similar way, but it would appear that there is no way of setting it the way I want it at first run or will it recognise my current layout?

By default this script will move /data/app and /data/app-private to /sd-ext (Second partition on sdcard).

If you don't have a second ext partition, it will then by default move /cache to /sd-ext/cache

Then when booted, you can change the config using "m2sd <option> <value>". These settings is saved in separate files for each setting in /data/.m2sd/
So on each new ROM flash, it will remember your settings.

However, if you would like to add settings before first boot, just create a folder "/data/.m2sd/". Then add the files you need, for an example to move dalvik-cache to /sd-ext you add the do "echo 'enable' > /data/.m2sd/.dalvik" or if you want to change sdcard-readahead for sdcard before first boot you do "echo '1024' > /data/.m2sd/.readahead" and so on.
The Following 2 Users Say Thank You to dk_zero-cool For This Useful Post: [ View ]
3rd January 2012, 04:52 PM   |  #27  
Dunc001's Avatar
Recognized Developer
Flag Hiding out south of the border...
Thanks Meter: 1,446
 
2,659 posts
Join Date:Joined: Apr 2010
More
OK, so if we are going to include your script in our ROM as discussed and we want to enable moving dalvik, apps, apps-private to sd-ext but not cache how do we do that in the ROM zip? Just add a folder in /data in the ROM zip and name it .m2sd, and then add script files called .dalvik .cache etc with no extension containing just the one word disable or enable in it? Or is there another way?
3rd January 2012, 04:58 PM   |  #28  
dk_zero-cool's Avatar
OP Recognized Contributor
Flag Horsens
Thanks Meter: 4,429
 
3,277 posts
Join Date:Joined: Nov 2010
More
Quote:
Originally Posted by Dunc001

OK, so if we are going to include your script in our ROM as discussed and we want to enable moving dalvik, apps, apps-private to sd-ext but not cache how do we do that in the ROM zip? Just add a folder in /data in the ROM zip and name it .m2sd, and then add script files called .dalvik .cache etc with no extension containing just the one word disable or enable in it? Or is there another way?

That is correct
The Following User Says Thank You to dk_zero-cool For This Useful Post: [ View ]
3rd January 2012, 05:06 PM   |  #29  
Dunc001's Avatar
Recognized Developer
Flag Hiding out south of the border...
Thanks Meter: 1,446
 
2,659 posts
Join Date:Joined: Apr 2010
More
How do you create a folder with the name .m2sd LOL Every time I try to rename it I get an error saying 'You must type a filename'...
3rd January 2012, 05:10 PM   |  #30  
dk_zero-cool's Avatar
OP Recognized Contributor
Flag Horsens
Thanks Meter: 4,429
 
3,277 posts
Join Date:Joined: Nov 2010
More
Quote:
Originally Posted by Dunc001

How do you create a folder with the name .m2sd LOL Every time I try to rename it I get an error saying 'You must type a filename'...

In Linux, files and folder starting with . are hidden. Windows however wants name and extensions on files.

Web Developers working on Windows has this problems with Apaches .htaccess file to, do what they do http://www.hotscripts.com/forums/per...s-windows.html

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes