Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,737,870 Members 49,923 Now Online
XDA Developers Android and Mobile Development Forum

[Q&A] Mounts2SD - Storage & Memory Management

Tip us?
 
Dunc001
Old
#21  
Dunc001's Avatar
Recognized Developer
Thanks Meter 1334
Posts: 2,610
Join Date: Apr 2010
Location: Hiding out south of the border...
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?
HTC One
ViperOne 6.2.1+ Beta Sense 6.0 with Kangaroo Kernel

HTC One Mini
Completely stock and staying that way...

Google Nexus 7 Gen 2
MIUI 5-09

First HTC HD2
Tytung 4.4.2 DataOnExt

Second HTC HD2
MIUI JB DataOnExt
 
dk_zero-cool
Old
#22  
dk_zero-cool's Avatar
Recognized Contributor - OP
Thanks Meter 4385
Posts: 3,263
Join Date: Nov 2010
Location: Horsens
Quote:
Originally Posted by Dunc001 View Post
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).
Device: Samsung GT-I9300
----------------------------------

 
Dunc001
Old
#23  
Dunc001's Avatar
Recognized Developer
Thanks Meter 1334
Posts: 2,610
Join Date: Apr 2010
Location: Hiding out south of the border...
Quote:
Originally Posted by dk_zero-cool View Post
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?
HTC One
ViperOne 6.2.1+ Beta Sense 6.0 with Kangaroo Kernel

HTC One Mini
Completely stock and staying that way...

Google Nexus 7 Gen 2
MIUI 5-09

First HTC HD2
Tytung 4.4.2 DataOnExt

Second HTC HD2
MIUI JB DataOnExt
 
dk_zero-cool
Old
#24  
dk_zero-cool's Avatar
Recognized Contributor - OP
Thanks Meter 4385
Posts: 3,263
Join Date: Nov 2010
Location: Horsens
Quote:
Originally Posted by Dunc001 View Post
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.
Device: Samsung GT-I9300
----------------------------------

 
uzi2
Old
#25  
uzi2's Avatar
Senior Member
Thanks Meter 581
Posts: 2,359
Join Date: Jun 2008
Quote:
Originally Posted by dk_zero-cool View Post
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?
 
dk_zero-cool
Old
#26  
dk_zero-cool's Avatar
Recognized Contributor - OP
Thanks Meter 4385
Posts: 3,263
Join Date: Nov 2010
Location: Horsens
Quote:
Originally Posted by uzi2 View Post
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.
Device: Samsung GT-I9300
----------------------------------

The Following 2 Users Say Thank You to dk_zero-cool For This Useful Post: [ Click to Expand ]
 
Dunc001
Old
#27  
Dunc001's Avatar
Recognized Developer
Thanks Meter 1334
Posts: 2,610
Join Date: Apr 2010
Location: Hiding out south of the border...
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?
HTC One
ViperOne 6.2.1+ Beta Sense 6.0 with Kangaroo Kernel

HTC One Mini
Completely stock and staying that way...

Google Nexus 7 Gen 2
MIUI 5-09

First HTC HD2
Tytung 4.4.2 DataOnExt

Second HTC HD2
MIUI JB DataOnExt
 
dk_zero-cool
Old
#28  
dk_zero-cool's Avatar
Recognized Contributor - OP
Thanks Meter 4385
Posts: 3,263
Join Date: Nov 2010
Location: Horsens
Quote:
Originally Posted by Dunc001 View Post
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
Device: Samsung GT-I9300
----------------------------------

The Following User Says Thank You to dk_zero-cool For This Useful Post: [ Click to Expand ]
 
Dunc001
Old
#29  
Dunc001's Avatar
Recognized Developer
Thanks Meter 1334
Posts: 2,610
Join Date: Apr 2010
Location: Hiding out south of the border...
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'...
HTC One
ViperOne 6.2.1+ Beta Sense 6.0 with Kangaroo Kernel

HTC One Mini
Completely stock and staying that way...

Google Nexus 7 Gen 2
MIUI 5-09

First HTC HD2
Tytung 4.4.2 DataOnExt

Second HTC HD2
MIUI JB DataOnExt
 
dk_zero-cool
Old
#30  
dk_zero-cool's Avatar
Recognized Contributor - OP
Thanks Meter 4385
Posts: 3,263
Join Date: Nov 2010
Location: Horsens
Quote:
Originally Posted by Dunc001 View Post
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
Device: Samsung GT-I9300
----------------------------------


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes