[Q] What are the benefits of formating the sd to ext/swap etc? - Android Software/Hacking General [Developers Only]

I'm a Linux user so I know what swap, ext2, ext3 etc technically means. What I don't understand is what are the *actual* benefits of formating my SD Card to these formats. I've run into a lot of guides and how-tos but no one cares to explain why to do it.
So to sum up:
Does the Android System actually cares if I create these formats?
If it does, will I notice actual increase in performance?
What about apps2SD?
What kind of format do you recomend?
I have an HTC Desire and I'm using CyanogenMod, Oxygen and MIUI in rotation (means I replace one with another every couple months).
Thanks in advance!

aventinus said:
I'm a Linux user so I know what swap, ext2, ext3 etc technically means. What I don't understand is what are the *actual* benefits of formating my SD Card to these formats. I've run into a lot of guides and how-tos but no one cares to explain why to do it.
So to sum up:
Does the Android System actually cares if I create these formats?
If it does, will I notice actual increase in performance?
What about apps2SD?
What kind of format do you recomend?
I have an HTC Desire and I'm using CyanogenMod, Oxygen and MIUI in rotation (means I replace one with another every couple months).
Thanks in advance!
Click to expand...
Click to collapse
Faster SD Card speeds for app2sd, thats mainly it. If you don't use A2SD there isnt much point to it, but if you do it can be very useful. What some people do though are format their System and Data partitions to EXT2 or EXT4 so then the whole system is faster all around and is a large improvement over stock rfs.

fowenati said:
Faster SD Card speeds for app2sd, thats mainly it. If you don't use A2SD there isnt much point to it, but if you do it can be very useful. What some people do though are format their System and Data partitions to EXT2 or EXT4 so then the whole system is faster all around and is a large improvement over stock rfs.
Click to expand...
Click to collapse
Ok so if make an ext partition, the apps that are stored in this partition will run faster. That sounds fair. Should I have both ext and FAT partions? And if I do, how does Android know where to put the apps? Also how about swap?

aventinus said:
Ok so if make an ext partition, the apps that are stored in this partition will run faster. That sounds fair. Should I have both ext and FAT partions? And if I do, how does Android know where to put the apps? Also how about swap?
Click to expand...
Click to collapse
No need for swap, and yes EXT is automatically recognized by android for a2sd, but make sure your ROM supports it. You would have an EXT partition between 256mb-2gb max, and then the rest would be FAT.

fowenati said:
No need for swap, and yes EXT is automatically recognized by android for a2sd, but make sure your ROM supports it. You would have an EXT partition between 256mb-2gb max, and then the rest would be FAT.
Click to expand...
Click to collapse
Ok! That was really eye-opening! Thank you so much!

no problem!

Related

[DEV] /cache converted to swap

So as we all know /cache is used for OTA updates which, when you have your phone rooted is useless.
What I'm wondering is why we can't use /dev/block/mtdblock4 (aka /cache) as a permanent onboard swap partition. Granted it will only give us an additional 30MB but the speed of this swap will be higher than that of our sdcard.
In order to test this we'll have to:
convert this partition to a linux-swap partition.
mkswap /dev/block/mtdblock4
update init.rc to no longer mount this as yaffs2
add this new swap space to the swap script
The issue is of course being able to run a partition utility on the phone. Second, if this doesn't work we don't have a way to format /cache back to yaffs2 (that I know of).
If you have experience with any of the issues I listed above please comment/post. If you don't have a clue please don't post so we can keep this thread clean. I would appreciate only experienced devs responding.
If this is possible it would benefit Hero/MotoBlur ROMS which are memory intensive.
For your second concern, why would we need to change it back to /cache? Just make it a disclaimer when people attempt this operation.
More importantly, I think the primary issue is that this is rom space is it not? Doesn't this portion of the memory have a limited amount of times that it could be written to?
Hmm why not trying "parted /dev/block/mtdblock4" in recovery? ;-)
rest would be easy.
Couldn't we use mkyaffs2img (in recovery /sbin) to turn it back into yaffs?
persiansown said:
For your second concern, why would we need to change it back to /cache? Just make it a disclaimer when people attempt this operation.
More importantly, I think the primary issue is that this is rom space is it not? Doesn't this portion of the memory have a limited amount of times that it could be written to?
Click to expand...
Click to collapse
Well my concern was if there was some adverse effect of removing /cache from the system we'd need a way to revert back.
I am not aware of any MAX amount of times that /cache can be written to.
*Edited*
Due to unintelligent comments and moronism prevalent in this thread, I removed a line from this post to keep us on track of what this thread was meant to discuss.
There's another thing:
Recovery can't be used without /cache !
So we need to convert back each shutdown and convert to linux-swap each startup..
dumfuq said:
Couldn't we use mkyaffs2img (in recovery /sbin) to turn it back into yaffs?
Click to expand...
Click to collapse
I hadn't checked in the recovery img for any yaffs2 utilities. But if that indeed does exist then this will be possible.
So then the issue would be, is this safe to attempt long term with the amount of writes being done to internal flash?
maxisma said:
There's another thing:
Recovery can't be used without /cache !
So we need to convert back each shutdown and convert to linux-swap each startup..
Click to expand...
Click to collapse
So I see recovery is using it but the only thing in it is the recovery logfile. Could we modify the recovery to read/write the logfile to system/sd/recovery or something, or is the cache used for other stuff as well?
Another idea:
Instead of using it as swap, what if we could find a way to use it as compcache space? That way we don't sacrifice any of the internal ram for compcache and still have compcache running
maxisma said:
There's another thing:
Recovery can't be used without /cache !
So we need to convert back each shutdown and convert to linux-swap each startup..
Click to expand...
Click to collapse
What part of recovery needs /cache ? Does the recovery img mount the /cache partition? I'm wondering if the recovery img could be modified to write to the ext2 partition such as /system/sd/cache .
persiansown said:
Another idea:
Instead of using it as swap, what if we could find a way to use it as compcache space? That way we don't sacrifice any of the internal ram for compcache and still have compcache running
Click to expand...
Click to collapse
This is actually a good idea and it'd be interesting to see which way would benefit us more.
shafty023 said:
What part of recovery needs /cache ? Does the recovery img mount the /cache partition? I'm wondering if the recovery img could be modified to write to the ext2 partition such as /system/sd/cache .
Click to expand...
Click to collapse
When you activate an option in recovery, for example install update.zip, it writes the command into /cache/recovery and does a "quick reboot", which reads out the command and does this.
ok first dont even try it would one
reduce life on nand
cause issues with flashing
slow down any thing accessing the nand.
to the person thinking the ram is using flash. you must have never been to high school cause even typing class explains what ram is. plus g1 has memory write speeds of about 120mb/sec thats sdram. swap will never replace ram 120mb/sec versus 6 is huge
if you want real improvements you must change the code to something more efficient.
less bloat
more native code
fewer clock cycles
improved app states(cache on sd that would save the state by dumping part of ram to load later reducing clock cycles and reducing ram)
and my favorite rewrite system libs and apps to include more native code and reducing ram usage.
btw native code is about 10-100x faster than android java. that means 10%-100% more speed(or less load)
you could make a swap file and put it on there and just mount the file...........
yeah what he said!
zenulator said:
you could make a swap file and put it on there and just mount the file...........
Click to expand...
Click to collapse
This sounds like a good idea, altho we would have to get compcache working with backing swap file.
do we know if the /cache speed is compaired to Class 6 microSD?
good luck hardheads
jokersax11 said:
ok first dont even try it would one
reduce life on nand
cause issues with flashing
slow down any thing accessing the nand.
to the person thinking the ram is using flash. you must have never been to high school cause even typing class explains what ram is. plus g1 has memory write speeds of about 120mb/sec thats sdram. swap will never replace ram 120mb/sec versus 6 is huge
Click to expand...
Click to collapse
Dude honestly get a life. I have a Bachelor's degree in Computer Science. And I could code in Intel Assembly accessing each and every register in memory while you're left googling what Intel Assembly code means. Maybe you should keep up with the latest technology. If you did you'd know there are all-in-one memory chips that support NOR, NAND flash, and RAM.
http://www.eetasia.com/ART_8800466798_499486_NT_ab9e537f.HTM
jokersax11 said:
if you want real improvements you must change the code to something more efficient.
less bloat
more native code
fewer clock cycles
improved app states(cache on sd that would save the state by dumping part of ram to load later reducing clock cycles and reducing ram)
and my favorite rewrite system libs and apps to include more native code and reducing ram usage.
btw native code is about 10-100x faster than android java. that means 10%-100% more speed(or less load)
Click to expand...
Click to collapse
Exactly what type of "native code" are you referring to? And do you have any idea what type of memory the G1 uses for RAM? Go back to your typing class.
Shafty did you see Zenulator's idea? That seems like it could work.. Does the phone ever format the cache partition?

G2x sd configuration thread

Yes, I have searched; don't give me the whole guilt crap
I would like to know a couple of things...
1. Internal phone storage & phone memory, what is the difference and is there any mods people are doing with them as far as combining or something?
2. SD partitioning... are people still doing this and if so what are you recommending?
3. Swap... probably a thing of the past, but just would like to know.
Class 4 32gb
Running Weapon G2X
Faux stock kernels
Clockwork EXT4
alright lets make this world a better place, i'll tell you what i know
internal storage, is basically yours to use, add your music pics or whatever, just like how u use an sd card, phone memory aka application memory is reserved for apps only, no way of combining them, dont need to anyways, sd partitioning i never tried but i think its says it all, dividing your sd card into two or more partitions..make seem like you have two or more, u can reserve one just for music or pics or roms
and what do u mean by swap??
ooh yah if i helped a little hit the thxs button, imma collect now too lol
I came from from the G1 where it was standard practice to partition into fat32/ext/swap. Since moving to the G2x I have not needed it. Phone is super fast without swap and more than enough space for apps.
As for combining internal and external SD cards, I don't think I've seen that yet...
Sent from my LG-P999 using Tapatalk
I've never seen them combined but don't know if you can because if you remove the microsd, it would get all screwy.
I don't even use internal unless the rom does. I have a collection of apks/walls/music and my titanium files on my SD... everything else is expendable.
Sent from my LG-P999 using xda premium
player911 said:
I've never seen them combined but don't know if you can because if you remove the microsd, it would get all screwy.
I don't even use internal unless the rom does. I have a collection of apks/walls/music and my titanium files on my SD... everything else is expendable.
Sent from my LG-P999 using xda premium
Click to expand...
Click to collapse
and with those on the SD are you using them just anywhere on the SD or do you have an EXT 4 partition?
dylyxcore said:
Yes, I have searched; don't give me the whole guilt crap
I would like to know a couple of things...
1. Internal phone storage & phone memory, what is the difference and is there any mods people are doing with them as far as combining or something?
2. SD partitioning... are people still doing this and if so what are you recommending?
3. Swap... probably a thing of the past, but just would like to know.
Class 4 32gb
Running Weapon G2X
Faux stock kernels
Clockwork EXT4
Click to expand...
Click to collapse
Internal phone storage is where your system files are stored. It is also where apps from the market are installed. Phone memory is utilized by the stock roms as the default "sdcard". By default this is where your photos, music, documents, etc are stored. There is also an external slot for a physical sdcard. This is actually mounted to /sdcard/_ExternalSD with a stock rom.
There is no need to partition the external sdcard. There is enough space on the phone by default and it probably wouldn't be worth the hassle to make it work.
I don't think you need swap with this phone.
phburks said:
Internal phone storage is where your system files are stored. It is also where apps from the market are installed. Phone memory is utilized by the stock roms as the default "sdcard". By default this is where your photos, music, documents, etc are stored. There is also an external slot for a physical sdcard. This is actually mounted to /sdcard/_ExternalSD with a stock rom.
There is no need to partition the external sdcard. There is enough space on the phone by default and it probably wouldn't be worth the hassle to make it work.
I don't think you need swap with this phone.
Click to expand...
Click to collapse
Thank you for clearing this up, so in clockwork recovery why does it support EXT 4? Is that just the format it saves a back-up in?
dylyxcore said:
Thank you for clearing this up, so in clockwork recovery why does it support EXT 4? Is that just the format it saves a back-up in?
Click to expand...
Click to collapse
No. Ext4 is a type of filesystem used commonly in Linux, just like FAT and NTFS are used with Windows setups. There are some roms that will mount your system as, or even fully format your system into a ext4 filesystem. Clockwork supports that filesystem, meaning it can be used to install ext4 roms.
phburks said:
No. Ext4 is a type of filesystem used commonly in Linux, just like FAT and NTFS are used with Windows setups. There are some roms that will mount your system as, or even fully format your system into a ext4 filesystem. Clockwork supports that filesystem, meaning it can be used to install ext4 roms.
Click to expand...
Click to collapse
Thank you for your help, one last thing... to run these do you need an EXT 4 partition, or is that completely different? What makes the ROM to be EXT 4?
dylyxcore said:
Thank you for your help, one last thing... to run these do you need an EXT 4 partition, or is that completely different? What makes the ROM to be EXT 4?
Click to expand...
Click to collapse
No you simply flash like you would any other rom. If the rom actually formats your drives to ext4 i beleive you will have convert back to ext3 in order to flash an ext3 rom. There is a conversion utility somewhere on here if you search around. Someone else wanna chime in to verify about the need to convert back to ext3?
phburks said:
No you simply flash like you would any other rom. If the rom actually formats your drives to ext4 i beleive you will have convert back to ext3 in order to flash an ext3 rom. There is a conversion utility somewhere on here if you search around. Someone else wanna chime in to verify about the need to convert back to ext3?
Click to expand...
Click to collapse
Yeah I read about the EXT 3 to EXT 4 dilemma on here via CM7 when it was upgraded from an overnight build or something... I think it had to do with restoring apps or data? Really appreciate your information, this finally clears up the confusion
p.s. thanks'ed all your replies

New to CM7

Hi all,
So last night I decided to give Cyanogenmod7 a try. I came from MIUI.us 2.1.20 - I just love MIUI, but it's a bit too demanding for the Milestone. So I have CM7 up and running, and it is a lot more snappy. But now, I'm having trouble installing some apps.
I tried installing my bank's banking app, but it didn't install - checked the market and it doesn't appear. Same thing with WhatsApp!! If it were working, I might just become a CM7 user..but it's not working.
Am I missing something? I installed after doing a full wipe, after which I installed DT A2SD scripts and then gapps-20111216 (although didn't see gmail or market etc after gapps, so installed those via apk).
What's the deal here?
Thanks.
Sent from my Milestone using Tapatalk
Ok, just wiped again, and reinstalled all. CM7 then gapps then dt a2sd. So far it's working.
Sent from my Milestone using Tapatalk
googleservicesframework.apk and vending.apk are all you need for using market. Try to reinstall them. May you success.
Ok, so now my problem is A2SD. It's not working! A2SDGUI refuses to go in, and when I do a check, I get a segmentation fault...I've never had this issue before. I've tried reinstalling DT A2SD from withing recovery and still, nothing. Please assist, I just need to get set up properly now.
Regards
Sent from my Milestone using Tapatalk
DT scripts dont work ...use an external partition (app2ext)
d.casper.b: CM7 for Milestone already comes with its own ap2ext scripts that are automatically used if there is ext partition present on your sdcard.
You should not install any 3rd party app2ext scripts as they are very likely to be conflicting with the scripts that are already there.
Thanks kabaldan.
I'll check it out.
I was even going so far as trying to use Link2SD from the market..
How'd I know if it's working? By monitoring the available internal storage?
Sent from my Milestone using Tapatalk
d.casper.b said:
Thanks kabaldan.
I'll check it out.
I was even going so far as trying to use Link2SD from the market..
How'd I know if it's working? By monitoring the available internal storage?
Sent from my Milestone using Tapatalk
Click to expand...
Click to collapse
when you will enable app2ext you will see the total space in your storage rise to 197 mb
I am not winning. I did a factory reset and flashed cm7 and gapps (not dt a2sd).
I did a test, internal storage was at 191mb, then I installed opera mobile and it went down to 182mb. Then uninstalled it again. Went into cyanogenmod settings and set install location to external. Installed opera again, but it was no different. Moving it to sd under 'manage applications' increased the internal memory again, but that's just moving the app to the FAT32 partition of the sd card.
So it's not seeming to work for me for some reason.
Sent from my Milestone using Tapatalk
EDIT: I really don't want to be a nuisance, but now, looking at the available storage using "Quick System Info", I noticed after uninstalling "Opera Mobile", 9mb was freed on internal storage & 13mb on the ext partition.
So, perhaps it is working, and since the dalvik cache is (I assume) on internal storage, the storage is still decreasing. Am I correct? If so, is there a way to also move dalvik cache to the ext partition - I had it like this on MIUI & never looked at available memory ever again.
First of all, have you really partitioned your SD card? Make sure you followed the 3rd step on this guide: http://www.mrmuh.com/2012/01/update-a-motorola-milestone-from-motorola-firmware-to-cyanogenmod-7/ . You should have your SD Card partitioned with two partitions, the first should be FAT32 that's used normally on Android, and the second EXT3 or EXT4. Obviously, make sure you have a backup of your FAT32 partition before partitioning.
Second, you should understand how the apps2ext scripts on CM7 work. Application installs that would be stored on internal memory are rerouted to the EXT3/4 partition on the SDCard. This happens at the underlying system (linux) level, Android (that runs on top of linux) is not aware of this rerouting, so, as far as Android "knows", apps that are rerouted to the EXT partition are on the phone's internal memory. That means that you should make sure that apps you need installed on the EXT partition of the SD card are shown in "Applications > Manage applications" list to be installed on the internal memory. Yep, it's confusing, but once you understand how it works and why it works that way, it makes sense.
Third, the fact that apps are rerouted to the EXT partition doesn't mean that everything about the app will live on the ext partition: it means only the main application package will live on the ext partition, application data is still stored on the internal memory. For most apps, the amount of data used for application data are much smaller than the application package, but in some apps the amount of application data from the app may often surpass the size of the app itself - for example, in my phone, Tweekdeck stores about 9Mb of data, which is about 10 times the size of the application itself (820kb) - presumably this amount of data is cached tweets, pictures, etc. But that case is usually the exception, not the rule, I've just mentioned it so you understand that using apps2ext doesn't mean your internal memory will always stay unused, it just means it will be used (way) less.
Finally, regarding the CyanogenMod Settings location setting, if you understood what I said above, you should now understand that it should actually be set to always install to "Internal", rather than external. However, there's a bug in this that you should be advised, that not all apps will respect this setting: some apps will install to external regardless of how you've configured that setting (meaning the app will use Froyo/Gingerbread native Apps2SD, hence being installed to the FAT partition of the SDCard). So, when you install a new app, check on app management if it didn't get installed to the SDCard, and move it to the internal memory if that's the case. For these kind of apps, you'll have to do it every time you update the app too.
Thanks, I edited my previos post..
I actually have 3 partitions, a FAT32, an ext2 (maybe it's ext3, but doubt it - partitioned some months ago, so my memory's hazy), and a SWAP - which I should get rid of, but am too lazy.
I understand entirely what you've said, I know that internal is really ext if working, and sd is FAT32 partition.
You see, I'm just new to this rom and have to trial and error until I understand, with miui you just flashed the rom and the a2sd scripts and didn't bother again (maybe only to move an app that installed to FAT partition). But it seems CM7 is simply just to flash the rom and you're good to go. But as I was pondering in my previous post...is there any way to move dalvik cache to ext?
Thanks for putting up with me..I'm almost there.
Sent from my Milestone using Tapatalk
d.casper.b said:
Thanks, I edited my previos post..
I actually have 3 partitions, a FAT32, an ext2 (maybe it's ext3, but doubt it - partitioned some months ago, so my memory's hazy), and a SWAP - which I should get rid of, but am too lazy.
I understand entirely what you've said, I know that internal is really ext if working, and sd is FAT32 partition.
You see, I'm just new to this rom and have to trial and error until I understand, with miui you just flashed the rom and the a2sd scripts and didn't bother again (maybe only to move an app that installed to FAT partition). But it seems CM7 is simply just to flash the rom and you're good to go. But as I was pondering in my previous post...is there any way to move dalvik cache to ext?
Thanks for putting up with me..I'm almost there.
Sent from my Milestone using Tapatalk
Click to expand...
Click to collapse
in the market you will find an app called s2e which moves app data, davlik cache to sd
also link2sd also free's up more space and makes cm7 snappier
please don't install such things to CM7 for Milestone unless you know what you are doing and you are able to resolve conflicts with the existing scripts
dalvik-cache is already moved automatically
if you want to free more space in /data, enable lib2ext to move native libraries to ext - it's mentioned in the changelog for 7.1.2 release
app data itself should not be moved as it can cause instability
d.casper.b said:
Thanks, I edited my previos post..
I actually have 3 partitions, a FAT32, an ext2 (maybe it's ext3, but doubt it - partitioned some months ago, so my memory's hazy), and a SWAP - which I should get rid of, but am too lazy.
Click to expand...
Click to collapse
Yeah, get rid of swap, there won't be any use for it (for now anyway) and it's best for you at this point to have a known working structure (two partitions, 1st FAT, 2nd ext3/4) for your SD as you're troubleshooting your problems/questions, it'll make it easier for us too as this will eliminate potential points of failure or inconsistencies. And you should really consider upgrading to a journaled filesystem, either ext3 or ext4. Using ext2 is unreliable because Android doesn't umount the ext partition cleanly on reboot or shutdown, so you may have problems with apps disappearing or misbehaving every other reboot. Using ext3/4 with journal elimitates this problem since the journal is just replayed for the uncleanly umounted partition and the filesystems behaves more consistently.
d.casper.b said:
You see, I'm just new to this rom and have to trial and error until I understand, with miui you just flashed the rom and the a2sd scripts and didn't bother again (maybe only to move an app that installed to FAT partition). But it seems CM7 is simply just to flash the rom and you're good to go. But as I was pondering in my previous post...is there any way to move dalvik cache to ext?
Click to expand...
Click to collapse
The apps2ext script built on CM7 should do this by default - you probably already have your dalvik-cache on the ext partition. To check this, go into OR, enter the console and type: "ls /sddata/dalvik-cache" . If it returns a list of files, you've already got the dalvik-cache on your ext partition. Another option is setting the option dalvik.vm.dexopt-cache-only to 1 in the file /system/build.prop . This will put all dalvik-caches (both from user apps and system apps) on the phone's internal cache partition, thus still freeing space on the internal memory but without using the ext partition, but that's not recommended if you install too many apps because the cache partition may run out space and that will spawn all kinds of weird behavior on Android. The safer route is just using the default configuration anyway (user apps dalvik-cache on sd-ext).
Another option to further reduce internal memory use is using lib2ext, that will move user apps native libraries to the ext partition, but the memory gain in this case is dependent on which apps you use and how big their native libraries (if they even have one) are. To activate it, just go into the Terminal app (with Android booted) and type:
$ su
# lib2ext
And reboot. The libraries will be moved to the ext partition during boot. Make sure you have a big enough ext partition to hold everything (apps, dalvik-cache and apps libs) - the size to recommend is very dependent on how many apps you use and how big they are, but I'd say 512Mb would be the bare minimum.
in the market you will find an app called s2e which moves app data, davlik cache to sd
also link2sd also free's up more space and makes cm7 snappier
Click to expand...
Click to collapse
DON'T! JUST DON'T! These third-party apps will cause all kinds of problems with CM7 builtin apps2ext.
EDIT: Oh well, Kabaldan already put all my rambling much more succintly than I could... I'm way too talky
well i was jus trying to help.. .anyway guys thanks i guess i won't be needing those apps anymore ...sorry for my noobness
Thank you so much guys!
It seems like it's working. I will check out lib2ext & the other suggestions tonight or over the weekend (on my way to work now).
I must say, I thought the move to CM7 would be a temporary one, but the speed gain is just what I needed, & the tweaks I thought I'd miss I am finding hidden in the settings .
Just wondering on the battery now - but I've been fiddling non-stop.
So let me play a bit more the weekend & I'll merge my ext2 and SWAP partition into one ext3 partition.
Thanks all, and kabaldan for your hard work on this rom.
Sent from my Milestone using Tapatalk
Just as I was on my way...
Everything's running fine, A2SD works. But now, I partitioned my SD card with a 2nd partition (ext3, it was ext2), but now widgets are not loading. Checked the apps install location, and it's 'internal', ie. ext3. I never had this before. I think maybe it's due to the filesystem now?
EDIT: Ok, ext2 is doing the same. I can't keep starting from scratch the whole time guys.
EDIT2: It's now suddenly working! Just have a Fat32 and an Ext3 partition. But I don't understand because it's been setup like this twice before with no success. I'll hold thumbs!
PS, CyanogenMod is quite up my alley now, speed is awesome and I'm happy.
Sent from my Milestone using Tapatalk

[Q] SD-EXT on SGS4G with CM9?

I'm currently running bhundven's herring CM9 with no kernel modifications and CWM 6. I find that the internal storage for this phone is very low and only holds a small amount of applications, especially since many apps seem to not want to install at all (about 3/4 of the time I try to install things, I get either "Package invalid" or "Insufficient space available", which is extremely annoying and might be a separate problem).
Is there any way that I can get sd-ext to work on this phone with this setup? I'd rather not switch kernels (I'd love to get TWRP recovery but the flashable doesn't work for me and I don't want to switch kernels).
cpkelley94 said:
I'm currently running bhundven's herring CM9 with no kernel modifications and CWM 6. I find that the internal storage for this phone is very low and only holds a small amount of applications, especially since many apps seem to not want to install at all (about 3/4 of the time I try to install things, I get either "Package invalid" or "Insufficient space available", which is extremely annoying and might be a separate problem).
Is there any way that I can get sd-ext to work on this phone with this setup? I'd rather not switch kernels (I'd love to get TWRP recovery but the flashable doesn't work for me and I don't want to switch kernels).
Click to expand...
Click to collapse
I haven't used it but this app should do the trick.
https://play.google.com/store/apps/details?id=eu.codlab.int2ext
Let me know if it works.
I prefer Mounts2SD, which lets you completely configure things. I was running PACman with cache and dalvik offloaded which worked quite well. And free is a good price.
https://play.google.com/store/apps/details?id=com.spazedog.mounts2sd
That seems like it just switches the internal and external storage, not making an ext partition on the SD card. But can things like this really be done through an app? I thought these things had to be done through init.d or build.prop scripts.
Sent from my SGH-T959V using xda app-developers app
The app creates an init file. Or so it appears. Like I said I don't use it. It seems that raze does and I'd defer to him here. Either his app or the one I linked should work fine.
Thanks (given) to both of you. And any ideas on what else might be causing the invalid packages when downloading from the play store? It happens even though I have much more free app space than I would need (eg. I had 119 MB of free space and a 30 MB app download failed).
EDIT: Just tried using Mounts2SD, but it couldn't find the sd-ext partition. Do I need to create that manually, and how?
Sent from my SGH-T959V using xda app-developers app
Titanium backup had a feature to integrate app updates into the Rom.
Sent from my SAMSUNG-SGH-I547 using xda app-developers app
Another way is to create ext4 partition (about 1G is usually enough) on you SD card with free MiniTool Partition Wizard and then use Link2SD to link apps/dalvik to this partition. I've been using it like this for a long time and it works fine. There are plenty of guides on the Web how to do that.
I used CWM or TWRP to create the sd-ext partition. You need to create that first somehow... if MiniTool Partition Wizard will do it without wiping the sdcard, that's better than recovery though.
My method was boot to recovery, mount sdcard, copy everything to computer HD, unmount sdcard, partition sdcard with 2 GB sd-ext (because I wanted lots of space, but I'd probably cut it down to 1 GB next time), mount sdcard, copy everything back from computer HD, unmount sdcard, reboot to system. Then launch Mounts2SD, pick what format you want the sd-ext in (FAT or ext2 are the fastest, but you can take ext3 or ext4 if you're not going to just disable the safety features) and what stuff you want moved over.
Edit: Just found this link, which I haven't used but which explains how to do the sd-ext with MiniTool... apparently MiniTool DOES still wipe the partitions though, so you may as well just use CWM/TWRP and make your life easier.
http://forum.xda-developers.com/wik...#using_MiniTool_Partition_Wizard_Home_Edition
Theraze said:
I used CWM or TWRP to create the sd-ext partition. You need to create that first somehow... if MiniTool Partition Wizard will do it without wiping the sdcard, that's better than recovery though.
Click to expand...
Click to collapse
MiniTool will wipe the sd card to create the new partition as well. I wish there was a way to do it without wiping the card but there is not. So back that stuff up first.
Madein Cyberspace said:
MiniTool will wipe the sd card to create the new partition as well. I wish there was a way to do it without wiping the card but there is not. So back that stuff up first.
Click to expand...
Click to collapse
I used GParted to partition my SD card. NO WIPING. Move, resize, add partitions.
nevkuril said:
Another way is to create ext4 partition (about 1G is usually enough) on you SD card with free MiniTool Partition Wizard and then use Link2SD to link apps/dalvik to this partition. I've been using it like this for a long time and it works fine. There are plenty of guides on the Web how to do that.
Click to expand...
Click to collapse
Yes, but our herring kernel does not support EXT4 partition, I tried it myself
and it didn't work. I had to create EXT3 which is supported by almost all kernels.
Eh, my results varied. Worked fine for me with ext4. And worked fine for my wife as well.
Rebel_X said:
Yes, but our herring kernel does not support EXT4 partition, I tried it myself
and it didn't work. I had to create EXT3 which is supported by almost all kernels.
Click to expand...
Click to collapse
The OP says he's running CM9. That's what I'm running but I use Proton kernel as CM9 kernel has a video bug, and ext4 partition works just fine for me. Strange if Bryan really removed ext4 support, it's just a line in the config file.
Successfully made the partitions last night but my phone won't mount the SD card anymore. Was trying ext3, I'll try ext2 and ext4.
EDIT: Fixed the problem, changed my partition to ext2 and set both partitions to "Primary" (not sure which one did the trick).
cpkelley94 said:
Successfully made the partitions last night but my phone won't mount the SD card anymore. Was trying ext3, I'll try ext2 and ext4.
Click to expand...
Click to collapse
Make sure that you make the first partition Primary/FAT32. This will be your normal SD card. Just take about 1GB of space from it at the end. Then make second partition Primary/ext4 with size to the end of the card. You can try ext2/3 but I don't think it is really necessary.
MiniTool will NOT wipe your partition if you do it right.
dsexton had a guide posted on how to do it.
Is it worth making a swap partition? If I remember correctly it significantly degrades the life of the SD card (and microSD's are delicate as it is), and I don't know if it would significantly increase performance.
cpkelley94 said:
Is it worth making a swap partition? If I remember correctly it significantly degrades the life of the SD card (and microSD's are delicate as it is), and I don't know if it would significantly increase performance.
Click to expand...
Click to collapse
I also created 128MB swap partition, not supported too and not mounted.
I tried to used swapper2 app from the market, but it says not supported by
kernel. Now I lost that space till I feel motivated to format or repartition the SD
card again.
I am using hefe kernel btw on AOKP milestone 6-5.
No swap.
Sent from my SGH-T959V using xda app-developers app

[Q&A] 2 GB External Data -- Hefe Hook Kernel and others

The Hefe Hook kernel allows you to mount a partition of your microSD as /data, getting 2 GB (or more) for your apps and their data.
Please ask your questions here about installation, use, or general approach.
This is great @jeffsf and can u show me how to re-partition the "real internal" storage? I mean expanding the /system since u put the /data out of it. Thanks man
Sent from my GT-N7000 using Tapatalk 2
daothanhduy1996 said:
This is great @jeffsf can u show me how to re-partition the "real internal" storage? I mean expanding the /system since u put the /data out of it.
Click to expand...
Click to collapse
Yes, you've hit on another of the reasons I've been exploring using the microSD for "live" storage. It's one thing to use potentially slow storage for photos that you basically write once or "app to SD" where you read the APK at boot time, make sure your ODEX in the Davlik cache is good, then generally read from the internal-flash cache. It is another when that memory is being read and written "constantly" when your phone is running.
The good thing is that once /data is not part of the internal flash filesystem, you don't have to worry about one ROM (kernel) thinking it begins at one place and another saying it starts at another. Previously, if one ROM had one /system size and another and a different one, the next partition, /data, would look to be corrupt when you swapped ROMs.
As a warning, not all users have fast microSD cards. Some that say "Class 10" on them really are dogs, especially for small reads/writes. The "Class" ratings are for sustained writes, as you would have with a camera recording video. If your ROM is "external /data" only, or even defaults to that, be prepared for a slew of "Your ROMs sucks. It is so slow." complaints.
You'll also need a way to automate formatting the card. It can be done on the phone, as long as you aren't trying to preserve any data.
As I recall, the layout of the MTD partitions is done in drivers/mtd/onenand/samsung_galaxys4g.h I would be careful not to move the partition boundary for efs, as you'd have to move the data it contains in your updater script. Repeating the warning about not moving the boot and recovery partitions is probably a good idea as well!
Your build tree may need some of these values, or at least think it needs some of these values. For example, device/samsung/aries-common from the CyanogenMod/cm-11.0 (KitKat) branch calls out NAND page sizes, partition sizes, and flash block sizes. I haven't looked in detail at your build tree so I can't comment on how it might handle things differently than the CyanogenMod one.
itzik2sh said:
Hi
I hope I don't ask anything silly, but please let me know if any of my assumptions is wrong :
1. I take FBi's251's AOKP milestone 6 (ICS 4.0.4)
2. 8GB SDCard was formatted to FAT32 (4GB) and EXT3 (4GB) using TWRP kernel
(Beastmode's proton kernel to be exact).
3. I would flash this kernel and it would move apps and their data to the sd-ext
without any special additions.
Thanks. I read the thread, but unfortunately 8GB SD is what i have and I think it should be enough.
Thanks again.
P.S - it's for 2 guys I already sold them my SGS4Gs. I want them to be happy...
Click to expand...
Click to collapse
AOKP should be fine. I haven't tried it recently, but it was the tree in which I did the early Hefe Kernel development.
As I understand it, you have a microSD with
partition 1: 4 GB FAT32
partition 2: 4 GB ext3
So that can work, but will need some tweaking of the init-on-fs.sh script. I intentionally didn't use the second partition as so many scripts gobble that up as sd-ext and do who knows what to it.
My first preference would be to reformat the cards, perhaps:
6 GB FAT32
1 MB ext2/3/4 (Yes, 1 MB, a sliver, choice of ext2, ext3, ext4 up to you)
2 GB ext4
since then the script will work without modification and if they install a third-party script that uses the second partition, it won't corrupt their data.
If you were to keep the formatting the way that it is now, you'd need to edit the mount commands in the script to look something like:
Code:
/system/xbin/busybox umount /data
/system/xbin/busybox mount -t ext3 -o noatime /dev/block/mmcblk0p2 /data
(removing the sd-ext mount)
I'm not sure what your expectations are, but all that the kernel and that script will do is mount a different disk partition on /data -- you need to manually move the data over (or restore from something like Titanium Backup). There may be some trickery in renaming that could be used with TWRP backups to restore from data.yaffs2.win to the new /data partition, but I haven't tried that at all.
Hi Jeff
Thanks for your quick reply, and sorry again for not seeing the Q&A thread.
I think making it :
partition 1: 4 GB FAT32 (sdcard)
partition 2: 2 GB ext3 (sd-ext)
partition 3: 2 GB ext3 (data)
partition 4: 1 MB (spare)
would be better and handle data as well. don't you think ?
Would it be worth doing with a "Team" micro-SD card (class 6 I believe) ?
Thanks.
I haven't tried a Class 6 card, but my gut feeling is that it will be dicey. I didn't "commit" to using /data on microSD until I had tried it for several days using Titanium Backup's ability to move both apps and app data to the external card. I would try that first, especially as the phones in question aren't going to be in your hands (I consider you an expert user, able to manage things outside the UI with ease).
I've attached some testing I did a while ago with Transcend and SanDisk cards. When you look at them, realize that the speed scale changes between them. I have a feeling that the real "performance" on a device is going to be related to relatively small reads and writes, not the ability to stream video to the card. I also don't know much about the Team brand, but I found that even some well-known brands didn't have the performance of the Transcend or SanDisk in the same category.
However you configure your cards, I would definitely recommend a journaling filesystem of some sort. I've had my microSD come loose inside the phone. The journal will at least help to reduce any filesystem corruption should that happen.
You don't need the fourth partition -- I have it there to be able to keep rsync backups for fast ROM swapping.
.
Regarding the apps data, have you tried exploring the Mount2SD script ?
sent from me
I've tried a couple of the scripts out there in the past. Since backing up my data is very important to me, I trust the scripts in Titanium Backup to work well with its backup/restore strategies.
Mounts2SD looks like it has gotten a lot more sophisticated than it was when I tried it in the past. It sounds like something worth trying in its current state. At a quick glance (and not looking at the code), I'd personally make some different choices about features; enabling journaling, and being concerned about why lost+found was filling up (things should only appear there if the file system is found to be corrupt).

Categories

Resources