IDEA: Hacking internal/external sdcard mount paths - Huawei Ideos X5 U8800

Hello.
I'm using the latest aurora and I'd like to discuss an idea I had.
Since the U8800 has plenty internal memory and it's quite fast comparing to an average sd card, it'd be great if we could use the internal memory for the tasks that need "speed" instead of "space".
Running apps from the sd card is the perfect example!
So the idea would be, while keeping the external sdcard mounted on /mnt/sdcard, having /mnt/sdcard/Android/data, for instance, point to the «internal sdcard path»/Android/data.
What do you think would be the best solution:
- hacking the mount points?
- using links?
- other solution?
Any developer or filesystem savvy user can point the advantages or dangers of using this solution?
- e.g.: the system or some apps may check if the external sd-card is mounted before trying to read/write to /mnt/sdcard/Android/data... that would mean the system/those apss may think that path isn't reachable with the ext-sdcard unmounted, altough they can be read.
Suggestions? Rants? Ideas?
Regards!

I have wondered if the /data/app or maybe the whole /data partition could be mounted in the internal storage partition. That would give 2gb space for apps and associated files instead of 3-400 ish and would mean no need to move apps to sd card which would mean faster loads at startup due to internal memory being faster.

VuDuCuRSe said:
Hello.
I'm using the latest aurora and I'd like to discuss an idea I had.
Since the U8800 has plenty internal memory and it's quite fast comparing to an average sd card, it'd be great if we could use the internal memory for the tasks that need "speed" instead of "space".
Running apps from the sd card is the perfect example!
So the idea would be, while keeping the external sdcard mounted on /mnt/sdcard, having /mnt/sdcard/Android/data, for instance, point to the «internal sdcard path»/Android/data.
What do you think would be the best solution:
- hacking the mount points?
- using links?
- other solution?
Any developer or filesystem savvy user can point the advantages or dangers of using this solution?
- e.g.: the system or some apps may check if the external sd-card is mounted before trying to read/write to /mnt/sdcard/Android/data... that would mean the system/those apss may think that path isn't reachable with the ext-sdcard unmounted, altough they can be read.
Suggestions? Rants? Ideas?
Regards!
Click to expand...
Click to collapse
Well this is known for a while now . Quoted from my thread here:
vold.fstab - CHANGE THE DEFAULT SDCARD: -thanks to julle131
There is this file named vold.fstab at your /system/etc/ folder, which controls which of your sdcards (Internal/External) will be mounted when you connect your phone to the PC. The last 2 lines are the only that matter. These are the two possibilities:
EXTERNAL SDCARD MOUNTED (DEFAULT):
dev_mount sdcard /mnt/sdcard auto /devices/platform/msm_sdcc.4/mmc_host
dev_mount emmc /mnt/sdcard1 14 /devices/platform/msm_sdcc.2/mmc_host
INTERNAL SDCARD MOUNTED:
dev_mount sdcard /mnt/sdcard 14 /devices/platform/msm_sdcc.2/mmc_host
dev_mount emmc /mnt/sdcard1 auto /devices/platform/msm_sdcc.4/mmc_host
change them as you wish with a root explorer or before flashing.
Click to expand...
Click to collapse
Make this change and every app will use the internal sdcard. Gallery works ok with images to external sdcard, it just might take a while for the first refresh. But I don't know if you'll notice any difference in terms of speed....
Cheers

spirosbond said:
Well this is known for a while now . Quoted from my thread here:
Make this change and every app will use the internal sdcard. Gallery works ok with images to external sdcard, it just might take a while for the first refresh. But I don't know if you'll notice any difference in terms of speed....
Cheers
Click to expand...
Click to collapse
That's not what he talked, I think. He said that the apparel would be installed on the external sd card, but the data would be moved to the internal one. And we have speed, but the main card would be the external one.
I think its a great idea if I understood it right!
Sent from my U8800 using xda premium

mrasquinho said:
That's not what he talked, I think. He said that the apparel would be installed on the external sd card, but the data would be moved to the internal one. And we have speed, but the main card would be the external one.
I think its a great idea if I understood it right!
Sent from my U8800 using xda premium
Click to expand...
Click to collapse
Oh I see! Sorry about that. As far as I know apps are not choosing were to put their data. They just say to the OS "I want these things to be at the sdcard" and the OS puts them at the correct place. So you can't "hack" the app to "see" at somewhere else. On the other hand the OS initialises on boot which card is the primary and which is the secondary. So my knowledge stops there and I can't imagine a way to make this separation between app data and the rest...
I hope for someone else's help!

PaulMilbank said:
I have wondered if the /data/app or maybe the whole /data partition could be mounted in the internal storage partition. That would give 2gb space for apps and associated files instead of 3-400 ish and would mean no need to move apps to sd card which would mean faster loads at startup due to internal memory being faster.
Click to expand...
Click to collapse
Maybe this cannot be done, because I think that the mapping of the partitions and mounts comes from the bootloader, but there is already the solution of resizing the data partition using the space of internal storage.

PaulMilbank said:
I have wondered if the /data/app or maybe the whole /data partition could be mounted in the internal storage partition. That would give 2gb space for apps and associated files instead of 3-400 ish and would mean no need to move apps to sd card which would mean faster loads at startup due to internal memory being faster.
Click to expand...
Click to collapse
That's a great idea!
I almost don't use the so called "internal sd card", therefor I have 2GB of fast empty space being wasted.
Why not simply mounting the internal sd-card partition in the data folder and the data partition on the internal sd card folder?
I only use the internal sd card to hold ringtones and other small stuff that I need to be in accessible 100% of the time, so a few hundred MB are enough!
Me gusta!
Every ROM flashes it's own fstab, right?
So all we'd need to do would be, editing the fstab before flashing it.
-----------------
Regarding the my first idea... I don't think one can simply mount a path on another path. We'd need a "virtual" device pointing to /mnt/sdcard-internal/data/ then mount that virtual device on /mnt/sdcard-external/data/.
My knowledge of unix mount/filesystems is not much more than what's explained here: https://help.ubuntu.com/community/Mount
OK, just found this:
http://askubuntu.com/questions/11079/mount-a-directory-to-look-like-a-drive
there is a FUSE filesystem named bindfs that probably does exactly what you want. For example the following:
bindfs -n /media/USB-HDD-01/ISO/ /home/johnc/ISO-images
Click to expand...
Click to collapse
would result in ISO-images to show up as a mounted filesystem in the Places sidepanel in Nautilus. The -n is required because otherwise bindfs tries to use the allow_other FUSE option, which by default is not allowed for regular users (if you use bindfs in /etc/fstab this is not a problem).
The first directory you give is the existing one, the second directory you give is an empty directory under which the contents of the existing one will appear.
Click to expand...
Click to collapse
So, bindfs depends on FUSE... and there's a port of fuse to android: https://github.com/seth-hg/fuse-android but looking at the README I get the feeling that it's not really working. The last step would be having a kernel with FUSE support... and regarding that, I have no idea, how easy it is to get a kernel like that for our U8800 :\

Finding such a solution to expand the DATA partition indirectly would be great!
I used to apply genokolar's custom partition method as "1.2G DATA + 1.46G INTERNAL SD" before, but i found out that it has some issues with Official 2.3 Roms. One of them -the most important IMHO- is the BOOTLOOP problem occurring in some specific situations!!!
See the details in my post here:
http://forum.xda-developers.com/showpost.php?p=25853141&postcount=134
(Seems that I don't encounter the bootloops on Custom Roms, but i'm not %100 sure and never will be )
So i unfortunately gave up using it, and revert to the stock partition .
I will be grateful to the one who will find a better and reliable solution. Hope to see it soon...

I still have to gather more information on the official update "modus operandi".
My goal is to simply reformat both partitions and then swap their mount points.
If the official update formats the partitions before applying the flashing official ROM files, then partitioning changes shouldn't cause any failure on the official update.
But like I said, I'm still yet to confirm that info.
Gen's idea was great (I learned a lot just by looking at his scripts) but resizing partitions has its dangers.
Since "no one" really uses the internal memory, why not simply exchange its room with /data, right?

This would be awesome! I would love to have 2gb for apps, instead of cluttering my phone.. plus the 2gb of internal storage are just a waste for me.. I never use them.. so this would be great!

Related

APPS2SD Confusion.

From the recovery image to get APPS2SD by simply running the format the SD using Ext2+Swap+fat32 right?
I have a class 6 card. How do I know if this actually works? I formatted and my internals space did not change?
Are there major benefits of doing APPS2SD?
Yes, first format the SD card.
To see if its working,
Check your Settings -> SD card & phone storage -> Internal phone storage. Make note of what it is at. Install some apps, maybe even try reinstalling some of the apps on your phone. Then, check the internal storage again and see if you have some more space.
As for the benefits, it just frees up your internal memory on your phone. I don't think it makes your phone faster or anything.
The question I have about APPS2SD is this. How come when I use it my internal memory drops after I install apps. I have not used it since I had to go back to the original Sprint ROM to do the update and installing the same apps I had before, my internal memory was about the same as it was when I used APPS2SD. I used the recovery screen to format to Fat32-Ext2-Swap and files were on the sd card when I checked, but my internal memory still drops everytime I install something. What is the real benifit of this if the internal memory drops anyway. I am real confused about this and have not decided if it is worth using since I have read it can damage your memory card. Can someone with knowledge of how this works please explain it.
Thx for all the great Info found here.
AppsToSD only puts the apps themselves on the SD. The internal memory is still used by the boot-cache, dalvik-cache, and actual app data like settings, saved games, cache, etc.
Must it be ext3?
What if i have ext2?
rvenes said:
Must it be ext3?
What if i have ext2?
Click to expand...
Click to collapse
If youre using one of the newer recovery images there should be an option to upgrade ext2 to ext3
as for the difference...im not to sure exactly
Tipharet said:
How do I know if this actually works? I formatted and my internals space did not change
Click to expand...
Click to collapse
Answer: . . . . .
nelson8403 said:
Just because the apps are installed to the SD card doesn't mean they don't store things on the phone.. cache is stored on the phones, theres a /data/data folder on the phone that the apps populate as well, it just doesn't take AS MUCH space on your phone as a non appstosd
also to make sure your apps are working go into your adb shell, type in
Code:
cd /data/app
pwd
cd /data/app-private
pwd
What this will do is go to your /data/app folder and because with appstosd that is a symbolic link to /system/sd/app the PWD (present working directory) will display /system/sd/app, if PWD shows /data/app you are not running appstosd
Click to expand...
Click to collapse
rvenes said:
Must it be ext3?
What if i have ext2?
Click to expand...
Click to collapse
As far as I know it works just fine on ext2.
As far as the difference, the nutshell version is that ext3 is pretty much just ext2 with journaling hacked in. If you don't know that that means, do a google search on "journaling file system".
There should be no downside whatsoever to switching to ext3. It can still be read from and written to by anything that can use ext2, and it adds more robust error recovery.
Caveats: I'm not sure how well, or if, that error recovery works on flash memory devices. My expertise is working with large servers that use hard disks. I also don't know if there are tools in our android builds that take advantage of the benefits that ext3 provides.
Having said that, I'm still confident that choosing to upgrade to ext3 offers NO downside, and while there might also be no upside, there is also the potential for a huge upside.
My advice: Do it.

[Q] Galaxy 3 Apps2SD. Data still being saved on the internal memory..

Hey everyone.
I installed a leaked version of Froyo on my Galaxy 3 I5800. I'm using the hack to always install the apps on the memory card. However, only the main apks of the apps are being stored on the memory card. Any application data is still being stored on the internal memory. For example, installing Angry Birds takes 10 MB on the memory card, but also takes about 2 MB on the internal phone memory..
Apps2SD is a huge improvement, but still, if the data's being stored on the internal memory, I'm gonna run out of space some time or the other.
Is there a hack or something to make the phone keep even the data on the memory card? I've heard about Apps2Ext but not sure if that can be installed on my phone and whether it stores the app data on the EXT partition too.
Any ideas?
Android documentation says that even when app. is installed on SD card,
"The .apk file is saved on the external storage, but all private user data, databases, optimized .dex files, and extracted native code are saved on the internal device memory."
TekkenLaw said:
Android documentation says that even when app. is installed on SD card,
"The .apk file is saved on the external storage, but all private user data, databases, optimized .dex files, and extracted native code are saved on the internal device memory."
Click to expand...
Click to collapse
May be that's better because program can run faster.. anyway you can solve it by creating of ext2 partition on your SD card and virtualy enlarge internal storage.
But I haven't found any manual how to do it on i5800.
Are there ext2 capabilities in the i5800's Froyo? I'm asking because 2.1 lacks them, much to my dismay. A Linuxish device with a closed file system (rfs) with no tools available (and FAT), erm...
addicted2088 said:
Hey everyone.
I installed a leaked version of Froyo on my Galaxy 3 I5800. I'm using the hack to always install the apps on the memory card. However, only the main apks of the apps are being stored on the memory card. Any application data is still being stored on the internal memory. For example, installing Angry Birds takes 10 MB on the memory card, but also takes about 2 MB on the internal phone memory..
Apps2SD is a huge improvement, but still, if the data's being stored on the internal memory, I'm gonna run out of space some time or the other.
Is there a hack or something to make the phone keep even the data on the memory card? I've heard about Apps2Ext but not sure if that can be installed on my phone and whether it stores the app data on the EXT partition too.
Any ideas?
Click to expand...
Click to collapse
install move to SD first then choose the option Exteral SD.Anything you install from now on will be installed to the SDCARD but aware the widgets and programs that require root doesn't work well in the SDCARD together with home replacement program.Unless of course the app itself support installing to SD.
banahaw said:
install move to SD first then choose the option Exteral SD.Anything you install from now on will be installed to the SDCARD but aware the widgets and programs that require root doesn't work well in the SDCARD together with home replacement program.Unless of course the app itself support installing to SD.
Click to expand...
Click to collapse
this is what he did. But not everything will be saved to SD. This is the what he says.
nastyba said:
this is what he did. But not everything will be saved to SD. This is the what he says.
Click to expand...
Click to collapse
Yeah, the APK file, that is the main package, is installed on the SD card. However, all the data that the application actually saves are usually on the internal device memory.
I have enabled Move to SD and set the install path to external, but it will still save application data on the phone memory. That is how Android is designed to work
banahaw said:
install move to SD first then choose the option Exteral SD.Anything you install from now on will be installed to the SDCARD but aware the widgets and programs that require root doesn't work well in the SDCARD together with home replacement program.Unless of course the app itself support installing to SD.
Click to expand...
Click to collapse
Oh yes, I'm aware of all this. But still wanted to mention the point that the internal memory will always get used..
addicted2088 said:
Oh yes, I'm aware of all this. But still wanted to mention the point that the internal memory will always get used..
Click to expand...
Click to collapse
you can extend your internal storage with your SD card, but you need to create ext2 partition on your SD card first and then <i>and this is the problem</i> explain to your i5800 to use this partion on SD card.
I've red many articles about it on HTC / SE phones where this method work. They say that the ROM must be customized, which haven't been done yet with our phone. The problem is, that the good programmers have Desire / or SGS and they do not care about the i5800
nastyba said:
you can extend your internal storage with your SD card, but you need to create ext2 partition on your SD card first
Click to expand...
Click to collapse
And this is where the problem starts: The i5800 cannot handle ext2, at least not with its stock roms. You're stuck with an exotic proprietary file system (rfs) for which no tools are available.
mizch said:
And this is where the problem starts: The i5800 cannot handle ext2, at least not with its stock roms. You're stuck with an exotic proprietary file system (rfs) for which no tools are available.
Click to expand...
Click to collapse
may be one day there will be a custom rom which will allows it
nastyba said:
may be one day there will be a custom rom which will allows it
Click to expand...
Click to collapse
mizch said:
And this is where the problem starts: The i5800 cannot handle ext2, at least not with its stock roms. You're stuck with an exotic proprietary file system (rfs) for which no tools are available.
Click to expand...
Click to collapse
Is this problem allready solved?
Because my bro has problems with the little internal space.
(•.•) said:
Is this problem allready solved?
Because my bro has problems with the little internal space.
Click to expand...
Click to collapse
Yes. For that you need to first flash a fugumod kernel. Then you can use Kyrillos' apptosd script from here. You need to use apptosd script v3 if you want your /data/data to be transferred to your SD. But script v3 works good only with class 6 SD card or higher.
Oh yes. You need to convert your data partition to ext4 and create an ext4 partition in SD card also.
ok formating...
seems that i have here a class 4 sd card 8gb... damn it!
I am currently on Kyrillos 6.1. If i create an EXT4 partition in my SD card, via CWM recovery, how can i move the apps which are already installed in my phone memory to that partition? Like if i use Titanium backup, then would moving the apps would go to FAT partition or the newly created EXT4 partition?
mrn123 said:
I am currently on Kyrillos 6.1. If i create an EXT4 partition in my SD card, via CWM recovery, how can i move the apps which are already installed in my phone memory to that partition? Like if i use Titanium backup, then would moving the apps would go to FAT partition or the newly created EXT4 partition?
Click to expand...
Click to collapse
First backup your apps using titanuim backup. It will get backed up in SD card. Then copy the backed up apps and the rest of the stuff in your SD card to your PC. Then goto recovery, advanced, partition SD card. Create the required partitions. All data in SD card will be erased. Then in recovery only, wipe data. Then reboot. After that all the apps which you install will goto the ext partition that you created.
Thanks Dhiren!!! I was just wondering whether there was any way to directly move the apps to the EXT4 partition which are already installed on phone memory..I shall try out as you said...

How to install apps2ext on paul 2.2

Hello. I am struggling with this for three days now. I can't seem to make it work. So I think I need a detailed how-to because obviously I am doing something wrong.
I am using this clockwork recovery image: http://android.modaco.com/content/z...27215/oled-tft-2-5-1-8-clockworkmod-recovery/
Then I go to clockwork recovery mode and create 1GB ext partition. Wipe everything from everywhere.
After that I install paul's alpha3 prebake.
What happens is I have 1GB less storage on my class4 8GB SD, but don't see the ext3 partition (where should I look for it exactly)
In normal use the only way you'll know if its working or not is if you run out of space or not.
To find your ext partition look in '/sd-ext' or '/system/sd', you might need a file explorer that can use root privileges, I use estrongs. If the directories 'app' and 'app-private' are there then its working.
If your still sure its not working double check that the prebaked version comes with apps2sd...not all do.
Thank you. I think the prebaked alpha3 version doesn't have the apps2sd scripts. I tried to install Darktremor Apps2SD 2.7.5.2 but it killed my OS and had to flash it again. So is there any specific a2SD that I can use with this rom?
OK. I installed the Japanese jellyfish ROM yesterday and everything works like a charm so I guess prebaked alpha3 didn't have the apps2sd scripts.
Thank you again for your help, mate!
what is apps2ext?
It basically gets some storage space from the SD card and lies the system that it's part of the apps section of the internal memory
cynepmeh said:
It basically gets some storage space from the SD card and lies the system that it's part of the apps section of the internal memory
Click to expand...
Click to collapse
so it is basically like a different storage architecture for the SD card? Like we can have fat32, ntfs etc?
I am no expert here. From what I know - scripts create some symlinks so the app storage is actually placed on the sd, but the system doesn't know that and thinks it is still the old place. The path is the same, but it actually is something like a shortcut. The ext is probably because it needs to be linix partition or something...
This is what I think and it may not be true however

SDCARD Mounting Paradigm - Cyanogenmod7

There are two sdcard mounting paradigms. Currently Cyanogenmod for the tablet is set to use the one that matches phones.
1) Internal SDCARD mounted to /SDCARD, External to /SDCARD2(or equivalent)
Pros
-Internal sdcard is easily accessible
Cons
-External sdcard isn't mounted to computer over usb
2) Internal SDCARD mounted to /EMMC, External to /SDCARD
Pros
-External SDCARD is default and mounted to computer over usb
-Works well for phones with small internal storage sizes
Cons
-Your internal storage is hard to access, not mounted over usb
I took this GIT commit and rolled the changes back for CM7. I then recompiled CM7 to use the option 1 mounting paradigm.
Let me know which you prefer. I personally like option 1 because it doesn't rely on having an external sdcard. Additionally the internal sdcard is not easily removable like the external, so being able to access it over usb is important. If there are reasons for options 2, let me know.
Download:
CM7RC0 with Option 1 Mounting Paradigm(Mounting over USB works): http://www.multiupload.com/NJFGUW04A2
Gapps: http://android.d3xt3r01.tk/cyanogen/gapps/gapps-gb-20110120-signed.zip
Very cool, I was planning to do that myself this weekend. I played with CM7 yesterday for a few minutes but with no SDCard in the "external" slot there were some limits to have useful the OS was....
I'll probably still pull the source down this weekend, but I can flash your ROM tonight and start having a more detailed look at CM7.
Hey Rothnic, nice call, I agree that the CM7 default mounting scheme is both somewhat confusing and somewhat less useful with the G Tablet.
Quick question - you packaged up those performance packs with updated drivers for TNT etc. I know this may be a dumb question, but are these the same drivers currently being used in CM7? Or are they Froyo specific and incompatible with a Gingerbread ROM build because of library dependencies or structural changes?
I'm just trying to figure out if there's some way to speed up 2d graphics stuff in CM7 without waiting for more drivers from NVidia.
rcgabriel said:
Hey Rothnic, nice call, I agree that the CM7 default mounting scheme is both somewhat confusing and somewhat less useful with the G Tablet.
Quick question - you packaged up those performance packs with updated drivers for TNT etc. I know this may be a dumb question, but are these the same drivers currently being used in CM7? Or are they Froyo specific and incompatible with a Gingerbread ROM build because of library dependencies or structural changes?
I'm just trying to figure out if there's some way to speed up 2d graphics stuff in CM7 without waiting for more drivers from NVidia.
Click to expand...
Click to collapse
CM7 uses the Nvidia libraries from TnT 3588. I haven't gotten to merging in the newer "performance pack" ones that TnT doesn't include.
The libraries are Froyo specific, and were for many devices. I believe the CM team has built wrappers so that it can use the froyo specific libraries. I'm not sure on the acceleration issue.
Ok I got 2 questions:
Do we have any clue how does Incredible (for example) works? It has 8gb internal plus External, they both mount on usb.
Doesnt the fact that we can mount the internal storage on the computer, etc etc, can be a reason for the corruption of partitions? (maybe unplugged before unmounting by mistake or stuff like that..). That may have happen to almost everyone, everything starts crashing, FC, etc, all because of the repartitioning. Maybe paradigm 2 its better and correct.
Another quick thing, is it possible to mount internal on /scard and external on /sdcard/sdcard2? That would make both accesible on usb mount no?
Thanks
great work rothnic
I tried to play with cm7 last night but was getting frustrated by this issue. Thanks for doing this!!
+1 for /SDCARD here...
thanks, rothnic
Thanks for the efforts. Oh, option 1until I can get my hands on a 32GB micro SD, but probably still favor /sdcard and /sdcard2 anyhow.
Also, can't wait for hardware acceleration with this Rom, best one so far.
I like option 1 over option 2 for the gTab. What would really be cool is an option 3.
Internal + External = virtual SDCard.
+1 for Option 1.
If it is going to be a 'true' Cyanogen port, it should probably use the default Cyanogen behavior, which is Option 2.
This is meant as a discussion for the merits of each. For my use case option 1 makes sense.
Id like to hear why option 2 makes sense to others. How do you access your 14gb of internal storage?
slaughts said:
If it is going to be a 'true' Cyanogen port, it should probably use the default Cyanogen behavior, which is Option 2.
Click to expand...
Click to collapse
This is handled in the device specific config files so in no way makes it different. Each device has its own specific mounting scheme.
I prefer option 1, because it does not depend on having the external inserted.
Sent from my VEGAn-TAB-v1.0.0B5.1 using Tapatalk
danielsjam said:
I prefer option 1, because it does not depend on having the external inserted.
Sent from my VEGAn-TAB-v1.0.0B5.1 using Tapatalk
Click to expand...
Click to collapse
This has to be the most compelling reason on why it should be mounted as sdcard and sdcard2.
thebadfrog said:
This has to be the most compelling reason on why it should be mounted as sdcard and sdcard2.
Click to expand...
Click to collapse
I agree. I prefer internal being SDCARD.
A vote for Option 1. As a temporary solution, I go into the Terminal Emulator and type
Code:
su
mount /emmc/ /sdcard/
and it works
gksmith said:
I like option 1 over option 2 for the gTab. What would really be cool is an option 3.
Internal + External = virtual SDCard.
Click to expand...
Click to collapse
You mean.............just like Windows Phone 7?
It depends on the read/write speed of the sdcard. But since the internal sdcard is shared with other system partitions it makes sense for the external sdcard to be mounted at /sdcard, especially if you have media on it. Processes that read/write to /sdcard (like Gallery) can't mean anything good for performance. What we should have is both the sd and emmc to have /data, /system, and /sdcard mdraid partitions created and mounted/initialized for a nice perf increase. I wonder if its possible with android. It certainly is supported in the kernel with the right config. I should check to see if there are arm binaries for mdadm. Then i could create a test partition to measure performance.
Oh and CIFS is what i use to xfer files. There are plenty of ways to access partitions without mounting them as a drive. I think that usually leads to trouble. There is even file expert which lets you create smb shares... there prob solved, map network drive.
Blades said:
It depends on the read/write speed of the sdcard. But since the internal sdcard is shared with other system partitions it makes sense for the external sdcard to be mounted at /sdcard, especially if you have media on it. Processes that read/write to /sdcard (like Gallery) can't mean anything good for performance. What we should have is both the sd and emmc to have /data, /system, and /sdcard mdraid partitions created and mounted/initialized for a nice perf increase. I wonder if its possible with android. It certainly is supported in the kernel with the right config. I should check to see if there are arm binaries for mdadm. Then i could create a test partition to measure performance.
Click to expand...
Click to collapse
How would you handle people who do not have an external sdcard?
One more for option 1.

[How To] Swap the mounting points on ICS (CM9) for emmc and sdcard.

This is a quick tutorial I want to write up based on a recent experience I've had recently with my micro sd-card. (More info on that below)
This how to shows how to switch between the internal sd card and the external sd cards mounting points (so the external is accessed via /sdcard, and the internal is accessed through /eemc)
The nuts and bolts how to:
0. Perform backups on System, i am not responsible for any damages or boot loops.
1. Download root explorer (or any other file explorer with root privileges)
2. Go to /system/etc, and mount R/W
3. Long press on vold.fstab and select Open With... , select Text Editor
4. You will find a line with sdcard in it a few times, change this section:
dev_mount sdcard /mnt/sdcard
Click to expand...
Click to collapse
To:
dev_mount emmc /mnt/emmc
Click to expand...
Click to collapse
5. Do the same thing with the emmc section:
dev_mount emmc /mnt/emmc
Click to expand...
Click to collapse
To:
dev_mount sdcard /mnt/sdcard
Click to expand...
Click to collapse
6. But you just flipped the first section around? Yes I did, this changes the mounting points. But not the original location of where it is being mounted......
7. Please don't change anything else in this file....
8. Reboot, enjoy!
I had to do this hax because the current nightly of CM9 doesn't support there being no external sd card, and mine got corrupt (eep!), it then continued to mount the internal sd card location to emmc instead (wtf?). So i did this quick hax so i could take pictures with the stock camera and use several applications which just default to the internal sdcard (and doesn't allow changing that).
Hope that helps some random Googlers......
Note: This has only been tested on CM9 Nightly apr-9th on SGSII, but i see no reason for this not work across all ROMs and devices( with ICS, the emmc thing wasn't on GB and below i don't think) as long as you don't do anything as foolish as change more than the lines specified above.
An example of a swapped file is (DO NOT COPY AND PASTE THIS, YOU PROBABLY WONT BE ABLE TO BOOT):
# internal sdcard
dev_mount emmc /mnt/emmc 11 /devices/platform/dw_mmc/mmc_host/mmc0/mmc0 encryptable_
# external sdcard
dev_mount sdcard /mnt/sdcard auto /devices/platform/s3c-sdhci.2/mmc_host/mmc1
Click to expand...
Click to collapse
Please note that the latest CM9 nightlies lets you do this from the system menu! This was written pre that advancement. This is for the curious and other ROMs/phones.
Is it possible to use something in the lines of:
dev_mount emmc /mnt/external_sd ? To just bind the external sd to the stock location?
If I understood your question right, that's the default behavior in CM7/9 so you don't need to change anything.
(internal gets mounted as /sdcard and external as /emmc. At least that's how it always behaved on my device -takes a bit of getting used to but it's manageable once you know the trick)
edit : aw sawry, mistook /mnt/external_sd for /mnt/sdcard. But it changes nothing besides the name of the mountpoint, easily adjustable.. Although why you would want to have it named like that is beyond me, it makes for more keys to hit when typing it... xD
Zewsan said:
Is it possible to use something in the lines of:
dev_mount emmc /mnt/external_sd ? To just bind the external sd to the stock location?
Click to expand...
Click to collapse
same doubt raised here ...is it possible to mount external sdcard to /mnt/external_sd instead of mnt/emmc...???
please need solution
Zewsan said:
Is it possible to use something in the lines of:
dev_mount emmc /mnt/external_sd ? To just bind the external sd to the stock location?
Click to expand...
Click to collapse
Its the same technique....
So remember this:
Format: dev_mount <label> <mount_point> <part> <sysfs_path1...>
Click to expand...
Click to collapse
So <label> doesn't really matter, but we may as well keep it sane (and have it the same name as the mount point)! And <mount_point> is where its mounted. Make sure the folder exists first though! leave <part> and <sysfs_path*> alone and it will work correctly.
So if you were to create a folder /mnt/hammertime , then make a line look something like this (taken from my example in first post)
dev_mount hammertime /mnt/hammertime auto /devices/platform/s3c-sdhci.2/mmc_host/mmc1
Click to expand...
Click to collapse
That will work correctly.
Hope that helps!
mattisdada said:
Its the same technique....
So remember this:
So <label> doesn't really matter, but we may as well keep it sane (and have it the same name as the mount point)! And <mount_point> is where its mounted. Make sure the folder exists first though! leave <part> and <sysfs_path*> alone and it will work correctly.
So if you were to create a folder /mnt/hammertime , then make a line look something like this (taken from my example in first post)
That will work correctly.
Hope that helps!
Click to expand...
Click to collapse
is there no any requirement of changing build.prop file after doing this....?????
Ok I'll bite, late night tonight I'm going to flash back to AOKP....and give it a shot. It can't be that simple.....
Most certainly appreciate your effort...been looking for this for some time now.l!
HAvoktek said:
Ok I'll bite, late night tonight I'm going to flash back to AOKP....and give it a shot. It can't be that simple.....
Most certainly appreciate your effort...been looking for this for some time now.l!
Click to expand...
Click to collapse
I didn't think so either, but i had the problem, hoped it was like its Linux cousin and searched for fstab, i found it. Swapped the mounting destinations around. And voila, done.....
Swapped but CWM Recovery still the same
Hi, first of all nice guide you did here.
Here's the thing: somehow somewhere by flashing nightlies i ended up
with /sdcard being treated as my external SD while /emmc was for internal.
So I wanted to fix that and using your guide although the other way around
I was able to make it as such: /sdcard = internal storage; /emmc = external storage.
ALL IS GOOD however when i booted to CWM recovery:
CWM still mounts my internal storage as /emmc.
SO in recovery internal storage = /emmc while when in CM9 internal storage = /sdcard
Is there anyway i can change CWM so that internal storage = /sdcard? to be more uniform and not confusing
jeromepaez said:
Hi, first of all nice guide you did here.
Here's the thing: somehow somewhere by flashing nightlies i ended up
with /sdcard being treated as my external SD while /emmc was for internal.
So I wanted to fix that and using your guide although the other way around
I was able to make it as such: /sdcard = internal storage; /emmc = external storage.
ALL IS GOOD however when i booted to CWM recovery:
CWM still mounts my internal storage as /emmc.
SO in recovery internal storage = /emmc while when in CM9 internal storage = /sdcard
Is there anyway i can change CWM so that internal storage = /sdcard? to be more uniform and not confusing
Click to expand...
Click to collapse
Yeah CWM doesn't read the /system stuff, it has its own partition....
I've got no idea sorry, but its just a little inconvenient in CWM thats all.... But im sure you can check it out... Just search for fstab when you figure out how to explore the recovery partition (I've got no idea , short of modifying a flashable zip first and rekeying it.)
Forgot to post back with my results, Got HFS & AOKP to see the changes, however something broke when I did a PC mount. After playing with the lines "Experimentation" if you will, I ended up needing to rebuild my partitions! No fault of yours, I just wanted to see if I can have that functionality through the whole phones usage and features eg. mounting to the PC.
Thanks for the guide though, I'm seeing now that some devs are including the option to use the internal memory via a menu select, I wonder how there implementing that.
Probably something very similar but programmatically instead of the haxy file editing method I'm noting to use .
PC mounting is working as per normal for me here though...... (I don't have an external card right now so that may be a variable)
mattisdada said:
Probably something very similar but programmatically instead of the haxy file editing method I'm noting to use .
PC mounting is working as per normal for me here though...... (I don't have an external card right now so that may be a variable)
Click to expand...
Click to collapse
That it is, cause I can see my internal, but it doesn't mount the external.
Purpose
What is the purpose of this? Does it mount the EMMC so that the system thinks EMMC is actually an external sd card?
I am trying to figure out if there is a way to make the above mentioned happen. Or is there a way to re-partition it so that EMMC is used as system memory... or maybe even both? It seems that since ICS better integrates with on board memory, there would be a way to better integrate the internal memory of older devices with the system.
hfj00788 said:
What is the purpose of this? Does it mount the EMMC so that the system thinks EMMC is actually an external sd card?
I am trying to figure out if there is a way to make the above mentioned happen. Or is there a way to re-partition it so that EMMC is used as system memory... or maybe even both? It seems that since ICS better integrates with on board memory, there would be a way to better integrate the internal memory of older devices with the system.
Click to expand...
Click to collapse
This guide shows you how to "flip" the points. Several ROMs have it differently preconfigured. But if this is your current situation:
Code:
Emmc: External SD Card
SDcard: Internal SD Card
It will make it:
Code:
Emmc: Internal SD Card
SDcard: External SD Card
And vice versa obviously (its a flip).
This guide will do what your wishing it to do.
The folders sdcard and emmc (or there /mnt varient more closely) are just soft links, meaning they don't really exist, but just point to another location. We can modify which folder they are linked to in the fstab.void file.
so to make emmc to external_sd i change "dev_mount emmc /mnt/external_sd"?
Worked great on a Captivate running AOKP-36 right after a wipe data/factory.
lol you need no guide on cm9
you can switch them in storage settings by a simple checkbox
its mentioned in team hacksung's FAQ
Im on CM9. Can someone post the code so i can just do a simple copy and paste? I wanna switch emmc to external_sd
(there is no storage settings simple checkbox for me)
Sent from my SGH-I997 using xda premium
bradman117 said:
Im on CM9. Can someone post the code so i can just do a simple copy and paste? I wanna switch emmc to external_sd
(there is no storage settings simple checkbox for me)
Sent from my SGH-I997 using xda premium
Click to expand...
Click to collapse
Never use a copy and paste for the file in this operation. You only need to modify partially two lines (which you can copy and paste from the OP).
Your just swapping two words around really. Its fairly easy, just follow the steps and it will work, it looks daunting at first if your not used to doing this sort of thing, but its fairly easy.

Categories

Resources