Memhack - Motorola Milestone Android Development

There are various mentions of a "memhack" to apply to the Milestone which apparently frees up some RAM. It also apparently can cause problems when flashing a different SBF.
Could someone help me out here by clarifying exactly what the memhack does and what are the circumstances under which it can cause problems?

Looks like this never got an answer, but now I'm seeing that some of the custom nandroid backups here make reference to using memhack. Could someone help me clarify this? I find a lot of Google hits but no explanations except in German... and it doesn't translate very well.

memhack does not free RAM but storage space. It simply moves the cache partition so you get more space for installing apps. As long as you wipe everything when restoring different nandroid backups, I don't think you can really have any issues. Also I don't really think it can affect your ability to flash SBF's. Maybe OTA updates could only be affected as cache gets moved where OTA upgrades are supposed to be downloaded and unpacked.

cmstlist said:
Looks like this never got an answer, but now I'm seeing that some of the custom nandroid backups here make reference to using memhack. Could someone help me clarify this? I find a lot of Google hits but no explanations except in German... and it doesn't translate very well.
Click to expand...
Click to collapse
If you open the script, if I recall correctly, it tries to move the dalvik-cache from the system partition to the cache partition, thus saving you space on the system partition.

i believe the latest version of apps2sd does this automatically ? i've got apps, apps-private and dalvik-cache on my sd card now...

somethingdope said:
i believe the latest version of apps2sd does this automatically ? i've got apps, apps-private and dalvik-cache on my sd card now...
Click to expand...
Click to collapse
Yeah, if you have apps2sd you don't need to apply memhack. In fact, it might mess up your device since the symbolic links for dalvik-cache should be pointing to the SD card, not the cache partition.

Thanks for clarifying. I'm starting to run low on app space on my Milestone but I'm not keen to use the apps2sd hack as I've heard it can cause all sorts of trouble. Not impressed that official Froyo is so far away.

cmstlist said:
Thanks for clarifying. I'm starting to run low on app space on my Milestone but I'm not keen to use the apps2sd hack as I've heard it can cause all sorts of trouble. Not impressed that official Froyo is so far away.
Click to expand...
Click to collapse
It's really not that hard once you understand how all of these things work. "Memhack" is too 'scary' a name for a simple thing.

dsixda said:
Yeah, if you have apps2sd you don't need to apply memhack. In fact, it might mess up your device since the symbolic links for dalvik-cache should be pointing to the SD card, not the cache partition.
Click to expand...
Click to collapse
this is not correct.. its actually a worst case scenario, and /dalvik-cache should only be on sdcard, when you're a apps hungry person that cannot work with 100MB free for the purpose..
current disadvantages on milestone for using dalvik on sdcard;
- unstable and slow ext2 kernel module..
- lacks direct io support
- slows phone if sdcard is class2 only.
- no support for wipe of /dalvik-cache folders with any current recovery.
- not a solution if no sdcard is present or paritioned correctly.
(suddenly /data is full?)
Advantage over sdcard pointers for dalvik are;
- faster seek times
- faster loading
- easier cleanup if required when switching roms
- still works even without sdcard inserted.
but if people dont care or know the consequences of their changes, they just accept.

Dexter_nlb said:
this is not correct.. its actually a worst case scenario, and /dalvik-cache should only be on sdcard, when you're a apps hungry person that cannot work with 100MB free for the purpose..
current disadvantages on milestone for using dalvik on sdcard;
- unstable and slow ext2 kernel module..
- lacks direct io support
- slows phone if sdcard is class2 only.
- no support for wipe of /dalvik-cache folders with any current recovery.
- not a solution if no sdcard is present or paritioned correctly.
(suddenly /data is full?)
Advantage over sdcard pointers for dalvik are;
- faster seek times
- faster loading
- easier cleanup if required when switching roms
- still works even without sdcard inserted.
but if people dont care or know the consequences of their changes, they just accept.
Click to expand...
Click to collapse
I actually didn't experience any performance gain or loss when moving my dalvik cache to my Class 6 card. I also have no need to remove my SD card. Of course most people should be aware that moving anything to SD requires at least a Class 6 (usually) if you want any kind of performance.

dsixda said:
I actually didn't experience any performance gain or loss when moving my dalvik cache to my Class 6 card. I also have no need to remove my SD card. Of course most people should be aware that moving anything to SD requires at least a Class 6 (usually) if you want any kind of performance.
Click to expand...
Click to collapse
Classes don't mean much for SD cards. They do to an extent, but in the end you really need to rely on benchmarks.
Class simply means minimum speed. A Class 6 card could run as slow as 6 MB/sec or go as fast as 20 MB/sec. Not sure.
I have a Sandisk Class 4 8gb microSDHC card. I saw the 16gb benched at 15MB/sec or so. I can hit 18-19MB/sec on mine.
This is considerably faster than the 16gb Class 2 that my Milestone shipped with. It's also considerably faster than the 16gb Class 6 Transcend I wanted to get. But remember my Class 4 promises 4 MB/sec transfers. These speed tests I've done are pretty darn fast.
Another example is my Class 6 Transcend 16gb SDHC (not micro) for my Canon Rebel camera. I benched it around 8.9 MB/sec. That's within Class 6 limits, but presumably my Class 4 8gb microSDHC Sandisk mounted on an adapter should do even better fine if I was able to bench it at 18 MB/sec on my computer....
So it's hard to say. If a Class 2 is really Class 2 at its minimum 2mb/sec, that's a pretty darn slow card.

Ok well I was getting close to that 20 MB "low memory" threshold so I memhacked using GOT OpenRecovery 1.04a. Nandroid backup first of course. Available space has skyrocketed to 91 MB! Sweet.

Related

getting swapfile working on /data partition

Im trying out a theory. I running JAC Hero 2.3 and wanna try running the swapfile on the /data partition. I moved app_s over to /system/sd and used swapper app to create the swapfile but android doesnt seem to use it. when i run free It says Total/used/free are all 0 but the swap file is 34 meg. I tried putting it in a sub folder and chown root.root on the folder before setting up and still no luck. Anyone have any ideas why it wont work on /data or how to get it to work on /data?
Once you run swapper go into the setting and change the location of your swap file from /sdcard/swapfile.swp to /system/sd/swap.swp ( see sxfx post[url]
you don't want to do that. Swapping involves a lot of writing and erasing, it'll wear out your internal chip and you'll start experiencing reduced capacity, write cycles for nand are even less than for flash memory!
jubeh said:
you don't want to do that. Swapping involves a lot of writing and erasing, it'll wear out your internal chip and you'll start experiencing reduced capacity, write cycles for nand are even less than for flash memory!
Click to expand...
Click to collapse
not to mention, swapon as implemented (on every build i've tried) doesn't work on a swapfile stored on a yaffs2 partition
jubeh said:
you don't want to do that. Swapping involves a lot of writing and erasing, it'll wear out your internal chip and you'll start experiencing reduced capacity, write cycles for nand are even less than for flash memory!
Click to expand...
Click to collapse
Actually /sdcard/ is your fat32 portion of your sd card, /system/sd/ is the ext2/3 of your sd card.
Also I have done a bunch of research on this write/read fiasco just because of android.
And even if you set a swap file to your SD sure it will shorten your life of the card but it will still last you at least 2 years.
I have been using USB devices on linux as swap locations forever now and I still have thumb drives that have been used and abused for months and months as a swap place and they are still pulling strong.
As for the internal chip, Im not sure what you mean by that?
Even if you could put swap on the internal flash, its not going to be faster.
Putting swap on the internal flash will make things slower as the internal flash is about 3 to 5 times slower than a class 6 sdcard.
you're comparing using a flash drive for swap in a full blown computer that probably has around 1-4gb of ram, the swap file is hardly ever touched, unless you're running a lot of applications at a time. Dream has only 90 mb available to dalvik, and rosie is a big fat... lady... plus linux/dalvik manage memory in a different way, so files are often dropped to swap and they dont stay there for long (maybe in a 256 swap, but not in a 32 mb one).
the OP also is talking about moving his swap to his internal storage (chip, nand, whatever), as he thinks it's having no effect working from the sd card. Personally, i think that both a2sd and swapper are flawed. They're overcompensating for an os that was not meant to run on that device, and the real work should be in porting (as in developing, not just file-swapping as most "devs" do here) a launcher app that we can feel comfortable with running on a stock android system with stock (or slightly improved) libraries and that we can call comparable to rosie. Just look at ahome or dxtop or openhome, they're good, solid, great looking home replacements that work as well or better than rosie, but they run out of the stock libraries. I wonder why nobody has made a free, open source home replacement app yet
jubeh said:
you're comparing using a flash drive for swap in a full blown computer that probably has around 1-4gb of ram, the swap file is hardly ever touched, unless you're running a lot of applications at a time. Dream has only 90 mb available to dalvik, and rosie is a big fat... lady... plus linux/dalvik manage memory in a different way, so files are often dropped to swap and they dont stay there for long (maybe in a 256 swap, but not in a 32 mb one).
the OP also is talking about moving his swap to his internal storage (chip, nand, whatever), as he thinks it's having no effect working from the sd card. Personally, i think that both a2sd and swapper are flawed. They're overcompensating for an os that was not meant to run on that device, and the real work should be in porting (as in developing, not just file-swapping as most "devs" do here) a launcher app that we can feel comfortable with running on a stock android system with stock (or slightly improved) libraries and that we can call comparable to rosie. Just look at ahome or dxtop or openhome, they're good, solid, great looking home replacements that work as well or better than rosie, but they run out of the stock libraries. I wonder why nobody has made a free, open source home replacement app yet
Click to expand...
Click to collapse
You make a very good point about computer having 1-4gigs of ram and not needing a swap file.
Honestly I almost never run a swap file on a computer that has more then 1gig of ram.
Plus90% of the time when I do run a swap file is when Im running a live distro of linux of a cd, but also 90% of the time I run the distro from the flash drive instead of cd cause its much faster.
So now imagine how many reads/writes I abuse that flash drive with by running a full OS on it.
Also I don't understand how a2sd or swapper is flawed? Just because they do their job? I mean it's not really our fault that they made the G1 with a little less memory spaces then we would like it to have.
But that's exactly why we have tools like swapper and a2sd. Plus no one is really forced to run these roms on the G1 phone and those of us that do realize that we have to take extra steps in creating tools to help it.
And that's not only true for the G1 but anywhere in the computer world these days.
dwang said:
Even if you could put swap on the internal flash, its not going to be faster.
Putting swap on the internal flash will make things slower as the internal flash is about 3 to 5 times slower than a class 6 sdcard.
Click to expand...
Click to collapse
I'd like to spread swap over the sd and internal storage if possible -- should make paging a lot less evident if priorities are set up properly.
dwang said:
Even if you could put swap on the internal flash, its not going to be faster.
Putting swap on the internal flash will make things slower as the internal flash is about 3 to 5 times slower than a class 6 sdcard.
Click to expand...
Click to collapse
internal memory is faster. class 6 guarantees 6mbs read/write times but doesnt mean the bus can support those times. if you run a test copying something to /system/sd and to /data you will see /data is faster. as for those saying it will degrade the internal memory, that is not the case being the flash memory inside is designed to have much much much more read/write cycles. Think about it in a stock G1, this is where dalvik-cache is writen to as well as email, sms, user settings, cache for browser and uTube. Do not confuse internal flash memory to sd card flash memory
Are you sure about that? This guy has some test results and it indicates that a class 6 sdcard is much faster than the internal flash.
http://forum.xda-developers.com/showpost.php?p=4059520&postcount=15
MonkySlap said:
internal memory is faster. class 6 guarantees 6mbs read/write times but doesnt mean the bus can support those times. if you run a test copying something to /system/sd and to /data you will see /data is faster. as for those saying it will degrade the internal memory, that is not the case being the flash memory inside is designed to have much much much more read/write cycles. Think about it in a stock G1, this is where dalvik-cache is writen to as well as email, sms, user settings, cache for browser and uTube. Do not confuse internal flash memory to sd card flash memory
Click to expand...
Click to collapse
dwang said:
Are you sure about that? This guy has some test results and it indicates that a class 6 sdcard is much faster than the internal flash.
http://forum.xda-developers.com/showpost.php?p=4059520&postcount=15
Click to expand...
Click to collapse
That's interesting. Going to have to try that test out. I just noticed when xfering stuff to /data it was faster then to /system/sd. If it is then touche my friend.....touche

RyanZa's one click lag fix

Hi,
I was browsing the dev forum for the lag fix and I was wondering if anyone had any first hand experience using it on the Epic? I searched and didn't find anything substantial in this forum.
Thanks,
Tonythetigger said:
Hi,
I was browsing the dev forum for the lag fix and I was wondering if anyone had any first hand experience using it on the Epic? I searched and didn't find anything substantial in this forum.
Thanks,
Click to expand...
Click to collapse
It's not needed. Have you seen your Epic lag? If so, return it.
Well, it lags a little when I try to open barcode reader or the camera? I thought there was discussion on how the Epic would still receive a benefit from the lagfix..
Actually you can pretty easily make it lag. Take two pictures at full res and then go through gallery and attah them to gmail. Send. If you are not on wifi the phone litterally is paralyzed until its finished.
Those chose pooly on the formating
So has anyone used the lagfix?
I believe or partitions are different. That would most likely brick your device if used. I'm fqairly certain we could do the same for our devices but that's going to take time. Working recovery > that atm.
Aridon said:
Actually you can pretty easily make it lag. Take two pictures at full res and then go through gallery and attah them to gmail. Send. If you are not on wifi the phone litterally is paralyzed until its finished.
Those chose pooly on the formating
Click to expand...
Click to collapse
Well thats not fix with a LagFix. Thats a bug. It happens attaching it to anything. MMS, Gmail, Email, Facebook. Its a known bug.
Well my quadrant benchmark is 1k, shouldn't it be capable of going up to 2k?
I believe the lagfix will actually work, and may even help. I don't have an epic, so I can't test it at all.
Anyway, the I9000 has 8gb or 16gb internal memory. 2gb of that is dedicated to /data (data is where all your apps and their data go).
The epic has 2gb? 1gb? -- some amount of fast internal memory dedicated to /data.
Both the I9000 and your epic use the RFS filesystem, which appears to be very poor.
What the OCLF apk does is make a loopback EXT2 partition in your RFS filesystem, and then uses symlinks to make android put the apps/data inside the EXT2 partition. This should work fine on your epic, especially if you have 2gb of program memory! If you have less than 1gb it may be a problem though.
Feel free to try it out if you have rooted your device! (The I9000 root won't work on the Epic)
RyanZA said:
I believe the lagfix will actually work, and may even help. I don't have an epic, so I can't test it at all.
Anyway, the I9000 has 8gb or 16gb internal memory. 2gb of that is dedicated to /data (data is where all your apps and their data go).
The epic has 2gb? 1gb? -- some amount of fast internal memory dedicated to /data.
Both the I9000 and your epic use the RFS filesystem, which appears to be very poor.
What the OCLF apk does is make a loopback EXT2 partition in your RFS filesystem, and then uses symlinks to make android put the apps/data inside the EXT2 partition. This should work fine on your epic, especially if you have 2gb of program memory! If you have less than 1gb it may be a problem though.
Feel free to try it out if you have rooted your device! (The I9000 root won't work on the Epic)
Click to expand...
Click to collapse
Its 1Gb. But its not completely empty.
Also, I'm willing to test it. Do you have a link for the download?
Well the Epic has 512 ram and 512 rom, Froyo is supposed to allow the phone to use the SD card as install room for apps.
Would the lagfix run there?
Here is the link to the app: http://forum.xda-developers.com/showthread.php?t=760571
Fixter said:
Its 1Gb. But its not completely empty.
Also, I'm willing to test it. Do you have a link for the download?
Click to expand...
Click to collapse
It's on the market.
http://www.appbrain.com/app/com.rc.QuickFixLagFix
1GB... and yeah its obviously not empty, it has all your stuff in it!
Anyway with 1GB is might be a bit tight, as that would leave only 500mb or so for apps.
Make a backup before you test it though, since I think you're the first person to test it on the Epic. It should refuse to run if there is anything wrong though.
So if the phone can use the SD card for /data would the fix have more space there? Or would we just get more space to install and run apps
RyanZA said:
It's on the market.
http://www.appbrain.com/app/com.rc.QuickFixLagFix
1GB... and yeah its obviously not empty, it has all your stuff in it!
Anyway with 1GB is might be a bit tight, as that would leave only 500mb or so for apps.
Make a backup before you test it though, since I think you're the first person to test it on the Epic. It should refuse to run if there is anything wrong though.
Click to expand...
Click to collapse
It says Unavailable.
Tonythetigger said:
Well the Epic has 512 ram and 512 rom, Froyo is supposed to allow the phone to use the SD card as install room for apps.
Would the lagfix run there?
Here is the link to the app: http://forum.xda-developers.com/showthread.php?t=760571
Click to expand...
Click to collapse
512MB is going to be too little.
You can actually get around this with a fast SD card though! If you know how to use gparted, you can make a 2GB or so EXT2/3 partition on your SD card, and then copy your data across to that, and use symlinks to point Android there. With the Epics fast NAND though, this shouldn't be necessary for speed - but it might be really nice for you guys if you want to install a lot of apps!
EDIT: You can follow mimocan's tutorial here: http://forum.xda-developers.com/showthread.php?t=724251
Just don't use EXT4 since your kernel won't support it. There is a way to dynamically load the EXT4 kernel module though, if anybody is interested.
RyanZA said:
512MB is going to be too little.
You can actually get around this with a fast SD card though! If you know how to use gparted, you can make a 2GB or so EXT2/3 partition on your SD card, and then copy your data across to that, and use symlinks to point Android there. With the Epics fast NAND though, this shouldn't be necessary for speed - but it might be really nice for you guys if you want to install a lot of apps!
Click to expand...
Click to collapse
Thats weird.. On the Samsung Specsheet is says 1Gb. I saw it not 30 minutes ago.
EDIT: User Memory 1GB (not all is usable for customer use/downloads)
DAMN IT! I'm sure Touchwiz is using the other 500Mb.
Here's a link to the dev page, you can download the app directly from there: http://forum.xda-developers.com/showthread.php?t=760571
lag fix?
SDcard-using lag fix is obviously unnecessary for Epic 4G.
The reason why Epic has a small NAND chip is that it uses a different type of NAND, called "OneNAND." OneNAND is much much faster than normal NAND or moviNAND (which other Galaxy S's use).
This is why Epic users don't experience "lag" which exists in Vibrant or Captivate.
But we can still make Epic faster, by getting rid of Samsung's rfs file system (which obviously makes Vibrant/Captivate slower) and mounting ext3/4 or other faster file system.
Then we need:
1) patching kernel or adding module to support ext3/4/nilfs2/yaffs2/ubifs/btrfs/etc/whatever we want.
(ext2 is supported by the stock kernel I think. However, unlike SD card and moviNAND which have own hardware wear-leveling algorithms in their controllers, OneNAND does not has it, so I'm not sure if ext2 (which does not support journaling/log) is okay to use.)
2) backing up the partitions which we want to change the file system from rfs
(such as: /data/data, /data/app, /data/dalvik-cache, etc, whatever)
and finally formatting it to what we want, and mount it.
3) kernel or script that automatically mounts as the file system we want.
4) a genius who can do this. (It is obviously not me.)
This is done for Captivate in XDA forum, and also for Galaxy S M110S in a Korean forum.
chocoberry said:
SDcard-using lag fix is obviously unnecessary for Epic 4G.
The reason why Epic has a small NAND chip is that it uses a different type of NAND, called "OneNAND." OneNAND is much much faster than normal NAND or moviNAND (which other Galaxy S's use).
This is why Epic users don't experience "lag" which exists in Vibrant or Captivate.
But we can still make Epic faster, by getting rid of Samsung's rfs file system (which obviously makes Vibrant/Captivate slower) and mounting ext3/4 or other faster file system.
Then we need:
1) patching kernel or adding module to support ext3/4/nilfs2/yaffs2/ubifs/btrfs/etc/whatever we want.
(ext2 is supported by the stock kernel I think. However, unlike SD card and moviNAND which have own hardware wear-leveling algorithms in their controllers, OneNAND does not has it, so I'm not sure if ext2 (which does not support journaling/log) is okay to use.)
2) backing up the partitions which we want to change the file system from rfs
(such as: /data/data, /data/app, /data/dalvik-cache, etc, whatever)
and finally formatting it to what we want, and mount it.
3) kernel or script that automatically mounts as the file system we want.
4) a genius who can do this. (It is obviously not me.)
This is done for Captivate in XDA forum, and also for Galaxy S M110S in a Korean forum.
Click to expand...
Click to collapse
Thank you for the explanation. Now lets wait for the genius.

[Q] SD Card Speed/Class Matters!!??

Hello Guyz. This is my first post on any kind of forum and let me go to my problem straight away.
I am using HTC Pico (Explorer) for the last one and half month or so. Obviously the problem is low internal memory. Have tried as many roms as possible to overcome this issue. Found JaggyRom 3.2.1 most suitable when using a2sdgui script and tried installing as many apps as possible. But there is also limit to it. I also tried other CM9/ICS/JB roms out there with int2ext/d2ext+ scripts to actually increase internal memory to 1GB. Even today, I tried Sense 4.0A Build#2 Ver 3 Final, but ultimately they're installed work fine from dev's point of view but my phone is dead slow n I recieve FC msgs alot.
Now my point is that I need to have a look of either ICS or Sense 4.0 but with greater internal memory. Dev guyz are doing great job facilitating nerds like me, but both of the above roms tend to make my phone dead SLOW and I get FC messages a lot many times, since all the data is moved to SD-EXT. Developers have claims of running these roms smooth, but plz put me wise here in this issue. I just wanted to ask a simple question:
1. Does my SD card's speed/class really matters? (btw I've 2GB microSD with 1GB SD-EXT partition, and I don't know its speed/class )
2. My HTC Explorer is rooted, super user capable (as I've learned alot during this one n a half month to do this )
3. Please suggest me what to do here (actually I'm tired of flashing ROMS now )
Regards.
1. The higher class is, the faster sd card is.
2-3. I'm on cm9 build #8(too lazy to update it ) with sdcard a-data class 10 with 1GB external partition using mounts2sd. Working fine .
Sent from my HTC Explorer A310e using xda app-developers app
Well, the answer to your question is kinda hard to understand, please read it carefully, as I spent time typing it here .
1/ Yes, card speed really matter, but it's not the class that matter. Class rating is for sequential write speed. For Android, what matters is random small-burst write speed. Read the first post of this thread http://forum.xda-developers.com/showthread.php?t=1005633. To successfully utilize your card, you must understand what you want to put on it.
An Android app normally have 3 parts: app (main apk), dalvik-cache, and data (your app's data like account, save game). app and dalvik will make use of sequential write/read speed, but data will benefit from random small-burst read/write speed.
Your internal memory is optimized for both type of read/write (that's why they're expensive like hell), while normally, SD cards are optimized for sequential read/write. Read again about the scripts you use, you will find that scripts that seem suitable for you have: app & dalvik on SD, data on internal. With data on internal, you will have a limit, because some apps use a lot of space for data.
Those scripts that make your internal memory become 1GB simply mount the SD-ext partition as internal memory, so everything is on SD cards, and the slow random write speed cripples your system.
Your best bet now is to try some configurable script like m2sd (I personally highly recommend it), have some patient setting it up, with app and dalvik on SD, leave data on internal, and you're good to go.
Use this link http://forum.xda-developers.com/showthread.php?t=1342387 to learn about m2sd if you're interested.
You should consider buying a fast card like Sandisk Ultra, they're not expensive. Remember to go with Sandisk (class 6 and up) when you're with Android. Some people also report that Samsung cards have great random write speed, and they're on sale more often than Sandisk (just avoid the Plus series). When you buy cards, always look for some benchmark about it's random 4k write speed.
And even with a fast card, I think you should still leave data on internal, data on SD put a heavy burden on your card, which can decrease it's lifespan soon.
I hope you read to this line, the post cost me more than 30 minutes . I just want to help :highfive:.
I attached the m2sd zip that I am using. And if you trust me, try MiniCM9 http://forum.xda-developers.com/showthread.php?t=1958152, it's great. Use it with Nova launcher, and you will be amazed at the smoothness that our weak phone can deliver :highfive:.
I think you should use Nextgen rom because it had mount2sd script preconfigered and you wont have any problem
Sent from my HTC Explorer powered by Nextgen v1.5
Awesome Reply!!
redguardsoldier said:
Well, the answer to your question is kinda hard to understand, please read it carefully, as I spent time typing it here .
1/ Yes, card speed really matter, but it's not the class that matter. Class rating is for sequential write speed. For Android, what matters is random small-burst write speed. Read the first post of this thread http://forum.xda-developers.com/showthread.php?t=1005633. To successfully utilize your card, you must understand what you want to put on it.
An Android app normally have 3 parts: app (main apk), dalvik-cache, and data (your app's data like account, save game). app and dalvik will make use of sequential write/read speed, but data will benefit from random small-burst read/write speed.
Your internal memory is optimized for both type of read/write (that's why they're expensive like hell), while normally, SD cards are optimized for sequential read/write. Read again about the scripts you use, you will find that scripts that seem suitable for you have: app & dalvik on SD, data on internal. With data on internal, you will have a limit, because some apps use a lot of space for data.
Those scripts that make your internal memory become 1GB simply mount the SD-ext partition as internal memory, so everything is on SD cards, and the slow random write speed cripples your system.
Your best bet now is to try some configurable script like m2sd (I personally highly recommend it), have some patient setting it up, with app and dalvik on SD, leave data on internal, and you're good to go.
Use this link http://forum.xda-developers.com/showthread.php?t=1342387 to learn about m2sd if you're interested.
You should consider buying a fast card like Sandisk Ultra, they're not expensive. Remember to go with Sandisk (class 6 and up) when you're with Android. Some people also report that Samsung cards have great random write speed, and they're on sale more often than Sandisk (just avoid the Plus series). When you buy cards, always look for some benchmark about it's random 4k write speed.
And even with a fast card, I think you should still leave data on internal, data on SD put a heavy burden on your card, which can decrease it's lifespan soon.
I hope you read to this line, the post cost me more than 30 minutes . I just want to help :highfive:.
I attached the m2sd zip that I am using. And if you trust me, try MiniCM9 http://forum.xda-developers.com/showthread.php?t=1958152, it's great. Use it with Nova launcher, and you will be amazed at the smoothness that our weak phone can deliver :highfive:.
Click to expand...
Click to collapse
That is a great and dedicated reply ..... thanks redguardsoldier . Moreover I didn't understand the part where u say 4k write speed!! Don't these microSD cards write at speeds of 2 to 10 MB/s??? Or you are talking about random short read/write bursts!!!!
And as per your guidelines this what I have to do:
1. Buy a fast cast like Sandisk Ultra class 6 or up (I hope its microSD and not microSDHC kinda thing!!) or Samsung (except Plus series)
2. Use the m2sd script.
3. Use the following settings:
a. "data" on INTERNAL
b. "app" & "dalvik" on SD (and by SD you mean SD-EXT!!!)
4. And use miniCM9 though
I again appreciate your concern and grateful for taking out some of your precious time. Hope to listen from you again :good:
Regards
vikingmax said:
That is a great and dedicated reply ..... thanks redguardsoldier . Moreover I didn't understand the part where u say 4k write speed!! Don't these microSD cards write at speeds of 2 to 10 MB/s??? Or you are talking about random short read/write bursts!!!!
And as per your guidelines this what I have to do:
1. Buy a fast cast like Sandisk Ultra class 6 or up (I hope its microSD and not microSDHC kinda thing!!) or Samsung (except Plus series)
2. Use the m2sd script.
3. Use the following settings:
a. "data" on INTERNAL
b. "app" & "dalvik" on SD (and by SD you mean SD-EXT!!!)
4. And use miniCM9 though
I again appreciate your concern and grateful for taking out some of your precious time. Hope to listen from you again :good:
Regards
Click to expand...
Click to collapse
4k random write speed mean the speed that the card is capable of writing small blocks of 4kB each at random location . I talked about "random short read/write bursts" :good:.
About the microSD/SDHC/SDXC, that's just the type of size . It makes me confused at first :highfive:. Well, a long time ago, when cards are just 256MB, or 1GB each, they are microSD. microSD have the maximum size of 2GB. When the 4GB cards come out, they are called SDHC . And now, those hugh 32GB and 64GB cards are called SDXC.
redguardsoldier said:
4k random write speed mean the speed that the card is capable of writing small blocks of 4kB each at random location . I talked about "random short read/write bursts" :good:.
About the microSD/SDHC/SDXC, that's just the type of size . It makes me confused at first :highfive:. Well, a long time ago, when cards are just 256MB, or 1GB each, they are microSD. microSD have the maximum size of 2GB. When the 4GB cards come out, they are called SDHC . And now, those hugh 32GB and 64GB cards are called SDXC.
Click to expand...
Click to collapse
Thanks for your reply.. Helped me a lot too. What are your views on int2ext + or ungaze scripts?
Sent from my HTC Explorer A310e using xda premium

Data2SD Questions

I'm getting ready to install the data2sd modification on my tablet and had a couple of questions before I went ahead:
1. I have a 64gb Class 10 SD Card. Do I need to allocate all of the 64gb towards the mod, or does it make sense to set some aside for actual storage. Happy to set it all aside if it results in performance improvements, but if the effects are negligible after a certain allocation, I'd rather have a little extra storage room.
2. Is it absolutely necessary that I never remove the sdcard while the tablet is on? Will it result in data corruption or damage to my device if it is accidentally removed while in operation?
3. Does the ASUS Stock FIle Browser become less useful after the modification? Will it be able to still access files in my internal storage and extrernal storage, or should I not install this, and instead use a 3rd party file manager that allows full access. I don't use many ASUS stock apps, but I really like the File Manager they've provided. However if it won't allow me access to all my files, I'm happy to use something else.
Thanks so much.
1. no, yes. The size of the second partition determines the size of apps you can install and data these apps can store.
2. yes, removing the card while the tablet is on may lead to data corruption.
3. I don't remember. At least what it displays as "internal storage" is of course the second partition of your card. Note to self: Maybe it would be a good idea to mount the real internal storage in /Removable, then the Asus file manager should be able to see it.
just to confirm that _that is also correct on item #3.
buhohitr said:
just to confirm that _that is also correct on item #3.
Click to expand...
Click to collapse
Thank you both for your help. I've gone ahead and installed the mod. I think things are smoother, but is there a way to check that the mod is actually working? I'm sure this is a dumb question, but is there something I can run to confirm the data2sd mod is in effect?
nsharma2 said:
Thank you both for your help. I've gone ahead and installed the mod. I think things are smoother, but is there a way to check that the mod is actually working? I'm sure this is a dumb question, but is there something I can run to confirm the data2sd mod is in effect?
Click to expand...
Click to collapse
sure, you can check in for the folder "sdcardi" located in /, the data2sd data folder should now be /sdcard and the /sdcardi is your internal storage or download androbench from the market and run a "micro" check, the result should be 0.3mb/s or more for RANDOM WRITE speed.
buhohitr said:
sure, you can check in for the folder "sdcardi" located in /, the data2sd data folder should now be /sdcard and the /sdcardi is your internal storage or download androbench from the market and run a "micro" check, the result should be 0.3mb/s or more for RANDOM WRITE speed.
Click to expand...
Click to collapse
First part seems to check out. But RANDOM WRITE is coming out to 219.83 MB/s. Worried that something may not have gone right in my installation.
For reference, my sdcard is a SanDisk Ultra 64GB MicroSDXC Class 10 UHS-1 Memory Card. I did a bit of quick research before buying this, and it is supposed to function just fine for the data2sd mod.
Any thoughts?
nsharma2 said:
First part seems to check out. But RANDOM WRITE is coming out to 219.83 MB/s. Worried that something may not have gone right in my installation.
For reference, my sdcard is a SanDisk Ultra 64GB MicroSDXC Class 10 UHS-1 Memory Card. I did a bit of quick research before buying this, and it is supposed to function just fine for the data2sd mod.
Any thoughts?
Click to expand...
Click to collapse
It could be getting that speed because its actually cacheing on ram an so isnt realy accurate at all. Happens to me on my s3 but only if i test internal sd not external
EDIT: for point 2. I dont think it can corrupt anything on the device. Just the contents of the external sd
Sent from my portable powerhouse
nsharma2 said:
First part seems to check out. But RANDOM WRITE is coming out to 219.83 MB/s. Worried that something may not have gone right in my installation.
For reference, my sdcard is a SanDisk Ultra 64GB MicroSDXC Class 10 UHS-1 Memory Card. I did a bit of quick research before buying this, and it is supposed to function just fine for the data2sd mod.
Any thoughts?
Click to expand...
Click to collapse
The reason you see that crazy number because you have fsync disabled, download the trickster mod app from the market and you can use this app to enable fsync (no need to reboot). Once fsync is enabled now you can read the real speed of your card. Also if you don't use autodetect data2sd kernel (_that kernel), then you also do this, power down your device, remove the microsdcard, then power it back on, you should receive an "encryption error" message.or just look for the /sdcardi directory, if it existed, you're using data2sd.
buhohitr said:
The reason you see that crazy number because you have fsync disabled, download the trickster mod app from the market and you can use this app to enable fsync (no need to reboot). Once fsync is enabled now you can read the real speed of your card. Also if you don't use autodetect data2sd kernel (_that kernel), then you also do this, power down your device, remove the microsdcard, then power it back on, you should receive an "encryption error" message.or just look for the /sdcardi directory, if it existed, you're using data2sd.
Click to expand...
Click to collapse
I do indeed have fsync disabled. I have the /sdcardi folder and when I remove the sdcard, I get the encryption error message. Looks like it's working!
Thanks to all!

Rooted phone: requesting info re: ext partition size, type of ext, and others

Hi:
I am a newbie, but I've learned a lot about things using this site and others. Thank you!
I have a rooted LG Volt, which of course has the odious KitKat restrictions on putting apps on SD cards. I've read about mini-tools and have Link2SD (premium, so I can link everything to the SD), but haven't tried it out yet because I wanted to ask some questions first. For reference, I have a 16g (class?) 10 SD card, which I've verified is legit using an app (forgot name).
1) Is there a maximum size for the second (ext) partition? I've read 2g, but other sites have said that there are now no restrictions. 2g is quite small for me since the Volt has very little internal memory, and I download a ton of apps; I don't use as much data. Ideally, I'd like to go half and half (approx. 8/8g data/app partition).
2) If it is limited to 2g, is there any workaround that doesn't require a ton of knowledge? I read something about changing system apps to user apps, but would this work--and is there a noob-friendly walk through?
3) Is there a preferred ext partition type? Again, I've read varied opinions; most say that ext2 is optimal, but others say ext4 might work better with Link2SD.
4) Is there any advantage to using a swap file? Again, varied opinions, but it seems mostly beneficial in terms of speed, and not to a degree that it matters.
I have other questions regarding partition alignment (found a calculator, so I think I can figure out how to optimize the partitions) and will probably have more in the future, but I would really love answers (or else links to answers) about these issues.
Thanks in advance!
anoukaimee said:
Hi:
I am a newbie, but I've learned a lot about things using this site and others. Thank you!
I have a rooted LG Volt, which of course has the odious KitKat restrictions on putting apps on SD cards. I've read about mini-tools and have Link2SD (premium, so I can link everything to the SD), but haven't tried it out yet because I wanted to ask some questions first. For reference, I have a 16g (class?) 10 SD card, which I've verified is legit using an app (forgot name).
1) Is there a maximum size for the second (ext) partition? I've read 2g, but other sites have said that there are now no restrictions. 2g is quite small for me since the Volt has very little internal memory, and I download a ton of apps; I don't use as much data. Ideally, I'd like to go half and half (approx. 8/8g data/app partition).
2) If it is limited to 2g, is there any workaround that doesn't require a ton of knowledge? I read something about changing system apps to user apps, but would this work--and is there a noob-friendly walk through?
3) Is there a preferred ext partition type? Again, I've read varied opinions; most say that ext2 is optimal, but others say ext4 might work better with Link2SD.
4) Is there any advantage to using a swap file? Again, varied opinions, but it seems mostly beneficial in terms of speed, and not to a degree that it matters.
I have other questions regarding partition alignment (found a calculator, so I think I can figure out how to optimize the partitions) and will probably have more in the future, but I would really love answers (or else links to answers) about these issues.
Thanks in advance!
Click to expand...
Click to collapse
First of all, you haven't told us what are you trying to do. If you are just trying to get a few questions anwsered just say so.
From what I see you are trying to use Link2SD because of the kitkat sd card restriction?
Note: Apps can't detect if an SD card is fake. It will just test how fast it is and guess if it's fast engough for it's class
You can remove the KitKat SD restriction with this app: SDFix
1) Yes, there is a restriction but it depends on how it's formated: on ext2 and 3 the limit is 35184 GB on a single partition and ext4 has a max limit of 1152921500 GB.
2) It's not limited to 2GB. Changing system apps to user and user to system is useless and should not be done if you don't know what exactly and why you are doing it. Don't let root fool you. Deleting system apps will NOT give you more free space for all the games.
3) Depends on support. If your phone supports ext4 (and it does) use that if not use lower such as ext3 then 2 and so on.
4) Look at this as a glass and some water. Water is memory to be put in ram and the glass is the ram your phone has.
The more water you put in it, the less space there is. And when it's full it will overflow, and your phone will freeze or reboot.
What swap does is when the water overflows in the glass (the ram gets full), the water (memory) that overflows goes to a swap file instead of it just getting lost and the phone getting frozen.
But remember, any SD card is MUCH SLOWER that RAM and using swap will not give any preformacne improvments.
The swap sould be factory set anyways and it also uses a lot of storage.
You REALLY shouldn't mess with the partitions.
You could break your phone forever.
What I recommend using is FolderMount and GL2SD. FolderMount is exactly like Link2SD, but you don't need to do any fancy partitioning. And GL2SD works great too, the only downside is that you have to run the apps (you moved to SD) from within the app.
Thank you!
Wonderful, clear answers! Yes, just trying to figure out "what to do" so I can add more apps to the Volt in the easiest manner possible. Apologize for not being clearer about that.
Just some follow-up questions:
1) will the app cited above (nextapp) allow me to move apps to the sd, or just data? Never having had an android other than this one with the dread KitKat, I don't know how it typically works after a KitKat fix. So should I format the entire sd card as FAT32 or ext4 (is the latter even possible)? And where will the data that I do have be saved if I don't partition the card? All on the one partition?
2. RE: FolderMount and GL2SD: that sounds great. The one concern that I have is that Link2SD's support (I THINK that's where I found this) said that the problem with putting an app on an sd card versus linking it is that if you take the sd card out, all of the apps will be gone. Is that just incorrect?
Thanks again! Very helpful.

Categories

Resources