Since we are so limited in memory 5gb left for apps and its data. Is there a way to swap these 2. I'm a gamer and love the size but I would like to be able download my game data apps to ext sd and have the games look in there when they open. I was thinking just renaming them would work but it's not allowable and maybe more to it than that. I've seen some modify the VOLD file in /system/etc to accomplish this on froyo or gingerbread. I'm thinking thats the solution or perhaps a kernel mod?
This is the script inside the vold file
## Vold 2.0 fstab
#######################
## Regular device mount
##
## Format: dev_mount <label> <mount_point> <part> <sysfs_path1...>
## label - Label for the volume
## mount_point - Where the volume will be mounted
## part - Partition # (1 based), or 'auto' for first usable partition.
## <sysfs_path> - List of sysfs paths to source devices
######################
dev_mount external_sdcard /mnt/external_sd auto /devices/platform/sdhci-tegra.2/mmc_host/mmc1
dev_mount external_usb_disk /mnt/usb_storage auto /devices/platform/tegra-ehci.2/usb1
Here is what I found for SGS
http://www.darkyrom.com/community/i...l-internal-sd-gingerbread-version.5457/page-2
There's an app called GLtoSD which will move the larger data files from games to the external SD card. Seems to work well and is simple to set up.
ED2O9 said:
There's an app called GLtoSD which will move the larger data files from games to the external SD card. Seems to work well and is simple to set up.
Click to expand...
Click to collapse
Thank you. Going to try it now.
EDIT: Thank you this works for me
You could use a adb to symlink the internal memory to the external if you wish.
For those who don't know, symlink means a "shortcut" to another location in Linux.
As an example, if you try to go to /mnt/sdcard/music, you could make a symlink to /external_sd/music, then whenever some app try to access the music folder in the internal memory, it would take them to the one in the external SD. The same could be done with the whole internal partition, leaving all of the internal memory for apps, and all the extra content would be sent to the external SD, saving you space. As I only have a single SD that I use with with my evo shift, I haven't tried this, but it should work in theory. I know we had to do some symlinking to root the shift awhile back, so it can't be too difficult. I can't remember how to make them at the moment, but if that sounds like something you would want to do, just reply to this.
linuxman008 said:
You could use a adb to symlink the internal memory to the external if you wish.
For those who don't know, symlink means a "shortcut" to another location in Linux.
As an example, if you try to go to /mnt/sdcard/music, you could make a symlink to /external_sd/music, then whenever some app try to access the music folder in the internal memory, it would take them to the one in the external SD. The same could be done with the whole internal partition, leaving all of the internal memory for apps, and all the extra content would be sent to the external SD, saving you space. As I only have a single SD that I use with with my evo shift, I haven't tried this, but it should work in theory. I know we had to do some symlinking to root the shift awhile back, so it can't be too difficult. I can't remember how to make them at the moment, but if that sounds like something you would want to do, just reply to this.
Click to expand...
Click to collapse
I'm game, where would you suggest I find the "symlink" method for any device, I can apply the difference in device myself.
ummmmm............ could you repeat that?
thanks ED2O9
i couldn't find the GLtoSD app in the market, is there a link for that please?
aboodyksa said:
thanks ED2O9
i couldn't find the GLtoSD app in the market, is there a link for that please?
Click to expand...
Click to collapse
Try searching for GL to SD. not GLtoSD
this just in.....
http://forum.xda-developers.com/showpost.php?p=20884096&postcount=26
linuxman008 said:
You could use a adb to symlink the internal memory to the external if you wish.
For those who don't know, symlink means a "shortcut" to another location in Linux.
As an example, if you try to go to /mnt/sdcard/music, you could make a symlink to /external_sd/music, then whenever some app try to access the music folder in the internal memory, it would take them to the one in the external SD. The same could be done with the whole internal partition, leaving all of the internal memory for apps, and all the extra content would be sent to the external SD, saving you space. As I only have a single SD that I use with with my evo shift, I haven't tried this, but it should work in theory. I know we had to do some symlinking to root the shift awhile back, so it can't be too difficult. I can't remember how to make them at the moment, but if that sounds like something you would want to do, just reply to this.
Click to expand...
Click to collapse
hi can u guide me how to create a symlink, for example i wanted to create one
to repoint /sdcard/Android to /sdcard/external_sd/Android
also one that repoints /sdcard/NaviSEA to /sdcard/external_sd/SD/NaviSEA
I've rooted my phone (samsung galaxy w gt i 8150)
however when i run terminal editor with "su" rights
doing the following command resulted in "Operation not permitted"
ln -s /sdcard/external_sd/NaviSEA /sdcard/NaviSEA
how should I do it instead?
You cant symlink folders, its not possible since your microsd card is formatted in fat32.
Related
I am using aosp roms, so there is no way to save my pictures and videos i take to emmc.
I searched some methods on google.
Now i realized i have to fix vold.fstab file in system/etc
but i have no idea on the codes like this.
Is it possible to mount emmc as sdcard, and mount sdcard as emmc or something else such as sdcard2 or something.
one of them i found was talking about how to bypass apps that require an sd card with no sdcard.
but i wanna use both of them, internal and sdcard together.
lentm said:
I am using aosp roms, so there is no way to save my pictures and videos i take to emmc.
I searched some methods on google.
Now i realized i have to fix vold.fstab file in system/etc
but i have no idea on the codes like this.
Is it possible to mount emmc as sdcard, and mount sdcard as emmc or something else such as sdcard2 or something.
one of them i found was talking about how to bypass apps that require an sd card with no sdcard.
but i wanna use both of them, internal and sdcard together.
Click to expand...
Click to collapse
IF emmc is supported, you can (maybe?) make it work by running the following in a terminal (on the phone). Worked for me in CM 6.0, never tried in Gingerbread. (# is prompt)
*Unmount SD card via menu 1st*
#cd /sdcard
#ls
*Nothing should show up*
If nothing shows up the SD has been unmounted properly
Remove it now if possible
#cd /mnt/emmc
#ls
IF emmc files show up, continue.
If not, your rom doesn’t support emmc, and there is really not much you can do
#mnt /mnt/emmc /mnt/sdcard
I think they want to use both the SD card and EMMC together, like in a Sense rom, not replace the SD with EMMC.
AFAIK, you can't *save* pictures and things to EMMC on AOSP roms, but I'm pretty sure they can still read any media from it. So you'd just have to put anything you wanted on the internal storage from your computer. I'm pretty sure that's how CM6 was set up, anyway.
I never really use my internal storage, though, so I could be way off.
godsmacked4653 said:
I think they want to use both the SD card and EMMC together, like in a Sense rom, not replace the SD with EMMC.
AFAIK, you can't *save* pictures and things to EMMC on AOSP roms, but I'm pretty sure they can still read any media from it. So you'd just have to put anything you wanted on the internal storage from your computer. I'm pretty sure that's how CM6 was set up, anyway.
I never really use my internal storage, though, so I could be way off.
Click to expand...
Click to collapse
Depends on the rom. Most AOSP ones now support eMMC scanning, but some still do not. Also, you might not be able to save pictures without using my solution, but you can use any other file manager / save window to navigate to /mnt/emmc and change/save things.
lentm said:
Now i realized i have to fix vold.fstab file in system/etc
Is it possible to mount emmc as sdcard, and mount sdcard as emmc or something else such as sdcard2 or something.
Click to expand...
Click to collapse
Absolutely. The "easy" way to do it is to modify /system/etc/vold.fstab. Below is the default vold.fstab file from CM7...
Code:
## Vold 2.0 fstab for HTC Incredible
#
## - Koushik Dutta
##
#######################
## Regular device mount
##
## Format: dev_mount <label> <mount_point> <part> <sysfs_path1...>
## label - Label for the volume
## mount_point - Where the volume will be mounted
## part - Partition # (1 based), or 'auto' for first usable partition.
## <sysfs_path> - List of sysfs paths to source devices
######################
# Mounts the first usable partition of the specified device
dev_mount sdcard /mnt/sdcard auto /devices/platform/goldfish_mmc.0 /devices/platform/msm_sdcc.2/mmc_host/mmc1
dev_mount emmc /mnt/emmc 3 /devices/platform/msm_sdcc.3/mmc_host/mmc2
What you want to do is modify the last two lines and swap the sysfs paths, so it looks like the following:
Code:
dev_mount sdcard /mnt/sdcard [b]3 /devices/platform/msm_sdcc.3/mmc_host/mmc2[/b]
dev_mount emmc /mnt/emmc [b]auto /devices/platform/goldfish_mmc.0 /devices/platform/msm_sdcc.2/mmc_host/mmc1[/b]
(Edit: I forgot to include the partition # in the bits of data that need moved. Doh!)
After putting the modified file in place and rebooting, the internal flash (normally known as emmc) will be mounted and labeled as /mnt/sdcard. Everything that uses the sdcard for storage will now be reading and writing to emmc. Likewise, the sdcard will be mounted to /mnt/emmc, so it's still available and readily visible.
The important thing here is to make sure that you have good backups of the content of both storage spaces, and that you remember which is which. It's crucial when you update your ROM, since it will overwrite the vold.fstab file back to default.
Also, before you do this, make sure that you migrate any apps you have stored on SD back to internal storage, or else you'll have to reinstall them afterwards.
ardax said:
Absolutely. The "easy" way to do it is to modify /system/etc/vold.fstab. Below is the default vold.fstab file from CM7...
Code:
## Vold 2.0 fstab for HTC Incredible
#
## - Koushik Dutta
##
#######################
## Regular device mount
##
## Format: dev_mount <label> <mount_point> <part> <sysfs_path1...>
## label - Label for the volume
## mount_point - Where the volume will be mounted
## part - Partition # (1 based), or 'auto' for first usable partition.
## <sysfs_path> - List of sysfs paths to source devices
######################
# Mounts the first usable partition of the specified device
dev_mount sdcard /mnt/sdcard auto /devices/platform/goldfish_mmc.0 /devices/platform/msm_sdcc.2/mmc_host/mmc1
dev_mount emmc /mnt/emmc 3 /devices/platform/msm_sdcc.3/mmc_host/mmc2
What you want to do is modify the last two lines and swap the sysfs paths, so it looks like the following:
Code:
dev_mount sdcard /mnt/sdcard [b]3 /devices/platform/msm_sdcc.3/mmc_host/mmc2[/b]
dev_mount emmc /mnt/emmc [b]auto /devices/platform/goldfish_mmc.0 /devices/platform/msm_sdcc.2/mmc_host/mmc1[/b]
(Edit: I forgot to include the partition # in the bits of data that need moved. Doh!)
After putting the modified file in place and rebooting, the internal flash (normally known as emmc) will be mounted and labeled as /mnt/sdcard. Everything that uses the sdcard for storage will now be reading and writing to emmc. Likewise, the sdcard will be mounted to /mnt/emmc, so it's still available and readily visible.
The important thing here is to make sure that you have good backups of the content of both storage spaces, and that you remember which is which. It's crucial when you update your ROM, since it will overwrite the vold.fstab file back to default.
Also, before you do this, make sure that you migrate any apps you have stored on SD back to internal storage, or else you'll have to reinstall them afterwards.
Click to expand...
Click to collapse
I was looking for this. will try now. Thank you!
edit: just tried this, it didn't work. had to replace to original one.
run the following in a terminal or via ADB: mount | grep emmc to figure out what block its named as then run switch to the root account using su then type umount /emmc to unmount the emmc partition. Figure out what sdcards device name is by doing mount | grep sdcard. Unmount it and mount sdcard's device name to /emmc and vice versa.
This wont persist after a reboot but its a good way to try and get it to work without screwing stuff up. Once you get it to work put the values in fstab.
Any suggestions?
Hello all,
Hopefully someone more apt than myself can provide some insight. I am running Synergy 3D version on my DINC. I am trying to either make the eMMc an addition SD card mount point, in order to store apps, etc or partition it to use as vram in some way.
I successfully changed the eMMc into SD card by modding the vold.fstab (per post here), the problem is, DINC will not recognize SD as eMMc.
Any suggestions will be greatly appreciated.
Also, would it even be conceivably possible to partition eMMc as vram?
Darn shame not to be able to use both the emmc and sdcard at the same time. You could do it by converting the sdcard to ext2/3/4 but then when you plug into a non linux box you'll need a ext2/3/4 driver.
Is there a filesystem that is widely readable for both linux and windows?
I guess it might not be a problem if the internal sdcard is ext3 because you could still have the emmc as fat.
Thoughts?
Oh crap... I just tried changing the emmc mount point in fstab to /mnt/sdcard/external_sd and no I've got no boot, presumable because android won't accept a mount point over something that is already mounted (linux can).... I need to find a way to recover...
Would somebody be so kind as to cat /system/etc/vold.fstab here for me? I backed it up... but to the internal sdcard!
Hang on... I can't paste that into vi... vi is bonkers for some reason, not recognising the a key...
I also have nowhere for a non su adb to push the file... or any other files... (permission denied)
and I can't get the CWM recovery mode for some reason....
"Also, would it even be conceivably possible to partition eMMc as vram?"
^ yes it's possible. I'm not that familiar with android yet but I'm sure it's possible
try Remount sd app =) it worked for me well =) dont forget thanks button =D
http://forum.xda-developers.com/show...1#post30146401
Do a nandroid just in case, and then flash this thru recovery. http://dinc.does-it.net/Mods/AOSP_Swap_EMMC_and_SD.zip
And here is a flashable to revert the swap. http://dinc.does-it.net/Mods/AOSP_Original_vold.fstab.zip
please help me (
it didnot work
Hi all,
I found that some of the SGW users are wondering whether they should swap internal/external sd card as their internal sd card is full with awesome GAMES data.
Here i will provide three ways to give ur SGW more space for gaming. Strictly for root users only.
Internal/External swapping
This mod will swap ur internal sd with external sd. Before swapping, backup the data on both sd cards to ur pc and manually "swap" the data from each other.
Then download and extract the vold.fstab from the attachment replace the one under /system/etc by using root explorer. Then reboot and enjoy.
Mounting script
If u want to store and run game data from external sd without swapping. Mounting script is a good solution to it.
This script will mount the game data path to your external sd. In other word, it tricked ur device for redirecting the games to load data from external sd instead of internal sd.
What u need are
Script Manager - download from market for free [https://play.google.com/store/apps/details?id=os.tools.scriptmanager&feature=search_result#?t=W251bGwsMSwxLDEsIm9zLnRvb2xzLnNjcmlwdG1hbmFnZXIiXQ..
mounting script
Create a new script file in Script manager and type the following:
(I used the Android folder as example)
Code:
mount -o bind sdcard/external_sd/Android sdcard/Android
This is for gameloft
Code:
mount -o bind sdcard/external_sd/gameloft sdcard/gameloft
After creating these, u need to cut the files in Android or gameloft from internal sdcard and paste them to the new location on external sd. Leave the original folders empty.
Remember to set them "boot" and "su" and SAVE in script manager. Reboot.
Alternatively, u can use the one I provided or create it by ur own. Extract the MOUNT external.zip and put it into ur sd card. Open it in script manager and select "boot" and "su" then save. Reboot.
If ur ROM is init.d autorun supported, just simply put the mounting script into the /system/etc/init.d folder.
Directory Bind tool
This is an apk created by one of our forum members, slig. This is based on the the same mounting script method. U can use it for simplicity. All credits go to the creator.
Link: http://forum.xda-developers.com/showpost.php?p=20668905&postcount=1
GL to SD
This apps created by tnslf2k is similar to the script I made and it is user-friendly. U can download it from https://play.google.com/store/apps/details?id=com.slf.ListglApp&feature=search_result#?t=W251bGwsMSwxLDEsImNvbS5zbGYuTGlzdGdsQXBwIl0.
For more details, see http://forum.xda-developers.com/showpost.php?p=18949753&postcount=1
That's all. Choose a way and play ur games~~!!
i made an second partition on my sd card with easeus (ext2) primary.
Now i use link2sd and everything i download is automaticly linked to my sd card.
So my internal space never get's full.
diederikmo said:
i made an second partition on my sd card with easeus (ext2) primary.
Now i use link2sd and everything i download is automaticly linked to my sd card.
So my internal space never get's full.
Click to expand...
Click to collapse
Yup, the option 2 (mounting script) gives the same effect.
regarding option 2, where should i place the script? thanks
vanir29 said:
regarding option 2, where should i place the script? thanks
Click to expand...
Click to collapse
U can put in under ur internal sd card.
yewsiong said:
U can put in under ur internal sd card.
Click to expand...
Click to collapse
thanks , i thought it should be placed in the folder where u cut the files , btw does this only work for files (saved files) what about apk? i mean in \data\app folder all the apk of the apps that i installed is there, can i use this script so that i can move my apk files? or this script only works with saved files? thanks again
vanir29 said:
thanks , i thought it should be placed in the folder where u cut the files , btw does this only work for files (saved files) what about apk? i mean in \data\app folder all the apk of the apps that i installed is there, can i use this script so that i can move my apk files? or this script only works with saved files? thanks again
Click to expand...
Click to collapse
Theoretically, it should work but I have never tried before. If u don't mind doing this experiment, please tell me the result. I am not very free to play with SGW now. Dealing with galaxy ACE at this moment.
i used the "Directory Bind" tools since 3 days ago, and it's works like a charm in my SGW untill now..
http://forum.xda-developers.com/showthread.php?t=1410262&highlight=directory+bind
yewsiong said:
Theoretically, it should work but I have never tried before. If u don't mind doing this experiment, please tell me the result. I am not very free to play with SGW now. Dealing with galaxy ACE at this moment.
Click to expand...
Click to collapse
ive tried it, but it didnt work, im using bionic2 so my internal/external is already swapped, but i want my system storage to have more free space that's why i want to move the apk's of my installed apps, here the script i made: "mount -o bind sdcard/data_app data/app" (without the quote), i moved all my apk files from data/app to sdcard/data_app after i moved it all, obviously my root explorer and script manager wont open that's why reinstalled them, ive set the script to root and boot, but before i reboot, ive ran the script and try to open some apps, it opened so i think it work, after i reboot all the apps that i moved are gone but when i go to data/app i can see all the apk files of my apps there (looks like the script works), but i dont know what the problem is, can u help me on this? or it isnt possible? and let me ask some question, in application menu, there is an option that says "move to sd card", after i press it, when i go to data/app folder, the apk of the app that i moved is not there (obviously) and it can be found in mnt/asec folder, but i cant find it in my sdcard (which is the 1.7gb because its swap), can u tell me where can i find it? many THANKS
bengonk said:
i used the "Directory Bind" tools since 3 days ago, and it's works like a charm in my SGW untill now..
http://forum.xda-developers.com/showthread.php?t=1410262&highlight=directory+bind
Click to expand...
Click to collapse
It is using the same working principle, i.e. bind command.
vanir29 said:
ive tried it, but it didnt work, im using bionic2 so my internal/external is already swapped, but i want my system storage to have more free space that's why i want to move the apk's of my installed apps, here the script i made: "mount -o bind sdcard/data_app data/app" (without the quote), i moved all my apk files from data/app to sdcard/data_app after i moved it all, obviously my root explorer and script manager wont open that's why reinstalled them, ive set the script to root and boot, but before i reboot, ive ran the script and try to open some apps, it opened so i think it work, after i reboot all the apps that i moved are gone but when i go to data/app i can see all the apk files of my apps there (looks like the script works), but i dont know what the problem is, can u help me on this? or it isnt possible? and let me ask some question, in application menu, there is an option that says "move to sd card", after i press it, when i go to data/app folder, the apk of the app that i moved is not there (obviously) and it can be found in mnt/asec folder, but i cant find it in my sdcard (which is the 1.7gb because its swap), can u tell me where can i find it? many THANKS
Click to expand...
Click to collapse
Code:
"mount -o bind sdcard/data_app data/app"
May I know the location of data/app? if it is on ur external sd, it should be
Code:
"mount -o bind sdcard/data_app sdcard/external_sd/data/app"
If u got swapped ur internal/external sd, this script is not needed since all the apps+data u installed into "phone memory" will be in ur external sd. If u try to move the apps to sd card again, it should go back to ur 1.7gb internal sd card.
FYI, system storage is where ur ROM stored and it is fixed (~550Mb) as it can't be swapped. So all system apps will be kept there.
For normal non-swapped ROM, APP to SD can serve the purpose of moving apps from system storage to internal sd (1.7Gb)
yewsiong said:
Code:
"mount -o bind sdcard/data_app data/app"
May I know the location of data/app? if it is on ur external sd, it should be
Code:
"mount -o bind sdcard/data_app sdcard/external_sd/data/app"
If u got swapped ur internal/external sd, this script is not needed since all the apps+data u installed into "phone memory" will be in ur external sd. If u try to move the apps to sd card again, it should go back to ur 1.7gb internal sd card.
FYI, system storage is where ur ROM stored and it is fixed (~550Mb) as it can't be swapped. So all system apps will be kept there.
For normal non-swapped ROM, APP to SD can serve the purpose of moving apps from system storage to internal sd (1.7Gb)
Click to expand...
Click to collapse
data/app folder is in the root of the phone, that's why i use this script "mount -o bind sdcard/data_app data/app" what im trying to do is to get more space for system storage, and i think it is 1.07GB, when u go to task manager under storage tab, thanks for ur patience
vanir29 said:
data/app folder is in the root of the phone, that's why i use this script "mount -o bind sdcard/data_app data/app" what im trying to do is to get more space for system storage, and i think it is 1.07GB, when u go to task manager under storage tab, thanks for ur patience
Click to expand...
Click to collapse
Ok~ I got it. data/app is under system storage. Maybe u can try APP2SD to move them into ur external_sd (which is ur sdcard in this case)
yewsiong said:
Ok~ I got it. data/app is under system storage. Maybe u can try APP2SD to move them into ur external_sd (which is ur sdcard in this case)
Click to expand...
Click to collapse
ok, thanks
is the 1st option safe for SGW with rio saputro blacknotes gen2 ?
chocolemon said:
is the 1st option safe for SGW with rio saputro blacknotes gen2 ?
Click to expand...
Click to collapse
Not try yet. It works with Cow V7 so it should be working with Hybrid 2nd gen too.
how about option 3? i think its the easiest way...
anyone tried GL to SD app?
Hi Me can ask a newbie question > , < what if my galaxy W internal storage is full.? the apk or something will install direct to SD card ,? and also > . < why my galaxy W having only 350mb+ RAM ( i seen on my task manager ) it must be 512mb right.? > , < thanks and srry for newbie question.
jomz878 said:
Hi Me can ask a newbie question > , < what if my galaxy W internal storage is full.? the apk or something will install direct to SD card ,?
Click to expand...
Click to collapse
no, in option 2&3, the apk and sd files are automatically saved first to usb storage or internal sd. Option 2&3 is for moving the games only saved at usb storage.
jomz878 said:
Hi Me can ask a newbie question > , < what if my galaxy W internal storage is full.? the apk or something will install direct to SD card ,? and also > . < why my galaxy W having only 350mb+ RAM ( i seen on my task manager ) it must be 512mb right.? > , < thanks and srry for newbie question.
Click to expand...
Click to collapse
First thing, ur sgw must be rooted to use these. To move apps from internal storage to external sd, u can use app2sd.
Secondly, 512mb is the total ram for our device. but part of it will be reserved for running the android system. 350mb is the available ram for u to use.
So I found a million threads asking about why they can't ln -s or mount the /mnt/extSdCard to /mnt/sdcard or various forms of that. The motivation here is to allow certain apps that can't get about /sdcard/ to be able to see the additional 64GB of SDHC.
What helped was this realization that the android mount command supports bind and one of a few dozen other threads, mostly this one:
http://forum.xda-developers.com/showthread.php?t=1825494
So it appears there are a half dozen ways to make mounts, from using /dev/block/vold/179:97 to using the vold.fstab which mentions a serial or parallel sdcard scheme, which they chose parallel, to all these init.rc monitoring scripts that have to unmount on USB mode, and crazy stuff and a million Directory Bind apps, and int2SD binder / linker apps. It appears this app might do what I am suggesting but I don't think /emmc/ works anymore and I haven't looked into the .apk.
Ok....
1) ODIN over a root injected stock ROM, or otherwise get root.
2) (A) Get yourself any Terminal program like Terminal Emulator and if you are smart you will also get Hacker's Keyboard.
or
2) (B) From any of the programs that will run scripts, you can just make a script.
3)
Code:
$ su -
# mkdir /mnt/sdcard/external
# mount -o bind /mnt/extSdCard /mnt/sdcard/external
Now you can name it whatever you want but since the home is /sdcard/ it has to be under that.
Or, instead of mounting the whole thing, just mount Movies and Music directory
Code:
# mkdir /mnt/sdcard/Music/extMusic
# mount -o bind /mnt/extSdCard/Music /mnt/sdcard/Music/extMusic
Etc.
Now for those wanting to make a script or app to sell for $1.99... There may be real problems depending on where a backup program chooses to backup and it could be recursive.
And just FYI, this ends up inheriting all the same properties from the extSdCard mount params,
ie. /dev/block/vold/179:97 /mnt/sdcard/Music/extMusic vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1023,fmask=0002,dmask=0002,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
Any mounted directory all look identical in mount and the vold must map them out.
Anyways you can write a simple script and hopefully you are mindful of any backups you do if you save backups to the external sdcard and you mount the entire thing. The safest way would be to mount one directory to transfer files or only mount the large media.
It also means you could copy everything from /sdcard/Music to the external and then mount /sdcard/Music to be a directory on the external card. You could remove the ext SDHC and copy files that way and have everything in one place and not worry about wiping it out.
However, I have benchmarked the internal SD appears to be faster on bandwidth benchmarks versus an external Class 10/UHS. On the stock rom the internal is also fuse versus fat32 for the external SDHC (or exFAT for a SDXC card). There is also something in the SD2.0 spec about the 2nd SD only one can have a higher clock bandwidth.
Types in step 3 exactly. But nothing happened
Sent from my SGH-T999 using xda app-developers app
fateownzyou3 said:
Types in step 3 exactly. But nothing happened
Click to expand...
Click to collapse
Did you get an error? There is no output of mount unless there is an error.. Did you look in a file browser to see if that folder is now mounted? This only works until reboot, until someone makes an app or script.
Hi,
@joederp thank you very much ! Your tip in so usefull to me with my galaxy note on CM10 ParanoidAndroid ROM.
The only thing I try now to get work is : automaticaly run the script at phone boot. I'm pretty sure I can get it with Tasker, but did not find the trick.
Just use the directory bind app... It works fine on my galaxy tab 2 7.0
Sent from my SGH-T999 using xda premium
Directory bind is a whole different thing that uses CPU and monitors the system and does who knows what.
You can just use any scripting program or I think edit init.rc and add the extra mount commands. copy init.rc to a .bak and edit it.
Thank to all of you !
I found something more appropriate to my needs in this thread : http://forum.xda-developers.com/showthread.php?t=1593615
Anyway thanks
Update: I've since made a flashable zip that automatically creates a modified sdcard1 binary and extracts an init.d script to handle it all. Will make a thread in a more general location as this could be used on many TouchWiz devices. Link.
Hello everyone,
The mailman brought me a new 64GB microSD card this morning, and I wanted to try formatting it in ext4 instead of exFAT. Both for the heck of it and in case I wanted to give AOSP ROMs a try down the road.
The usual caveats apply.
Required:
init.d support
a mounting script
a mounting updater-script for custom recoveries.
You can get init.d support with the stock kernel on many devices by having the run-parts command launch from a custom install-recovery.sh script. See the following thread for files and a how-to:
[MOD]Term-init & Zip-init: Enable Init.d for Any Phones w/o Need of Custom Kernels!!!
SD card removal:
Should you need to remove the card it can be unmounted and safely removed from the storage settings as usual. Mounting it again requires either a reboot or manually executing the mount command and then activating the card in the storage settings.
Mounting script:
Make sure you have proper line endings, file name (e.g. 95mountsdext4) and permissions set.
Code:
#!/system/bin/sh
# Mount SD Card Ext4 Script
mount -rw -t ext4 /dev/block/mmcblk1p1 /storage/extSdCard
Mounting in CWM/TWRP:
The other piece in this is the attached zip file, which simply runs the appropriate mount command for Clockworkmod Recovery. Unmount as usual. This way you can also store nandroid backups and other update zips on the external as well.
Technical considerations:
The mounting occurs early enough during the boot process that the media scanner and MTP services have no issues with this.
There may be are some permissions related glitches to look out for, but it hasn't been an issue for me so far. (One possible fix would be a recursive chmod/chown added to the mounting script.)
Update: The camera app saves the photos properly to the SD card, but leaves them with improper permissions which prevent subsequent viewing or editing again until you chmod the files. To be continued...
If your init.d support comes from the install-recovery.sh trick, CWM will prompt to delete the script before reboot. Don't.
If the mounting script doesn't run for some reason, or you try to activate the card before having mounted it manually, the phone will give an error and ask if you want to format the card. Don't.
Enjoy,
Darkshado
I have been looking for a way to do this for a long time for numerous reasons (symlinks, >4GB file size, linux-only environment, etc.). I'll be giving this a try very soon.
Thanks for sharing!
EDIT: Just wanted to add that I think it's ridiculous Android doesn't support this natively.
The permissions issues are frustrating. I can take photos and store them on the card, but the umask for JB has been set as 077, in other words, rwx------ permissions, and ownership by the application's user.
I tried different arguments for the mount command to try and force permissions and ownership one way or another with no luck so far. Ironically, an NTFS formatted card might work better in this respect.
A similar mod had been made on the Nexus S and one of the posters resorted to an apk that regularly ran chmod -R 0777 on new files, I tried using it but it just hung there and did nothing on the Note II.
Another possibility would be using FUSE, although I'm not sure how to go about doing this yet.
Also, I pondered the possibility of using UDF instead of ext4, it is a standardized format and just about every major OS out there supports it too...
Any updates? Is it working already or...?
Despite all the good of Android, Google/carriers, whoever, not including ext2/3/4 support natively is just a slap in the face. Good to see someone working to right a wrong that subjugating software has done.
You should NOT be doing this. The Android hardware requirements clearly state that all shared storage directories must be case insensitive and must not have permissions. FAT32 is the only supported filesystem which meets these requirements. Mounting an EXT filesystem directly will break applications.
The newer versions of Android come with an "sdcard" utility which uses a FUSE driver to wrap a native EXT filesystem and exposes a pseudo filesystem which is case insensitive and is without permissions. You should mount the EXT SD card at a different location (/dev/fuse) and use the "sdcard" utility to emulate it at /storage/whatever. You can see the command line syntax of the "sdcard" utility in the source code.
CM10.1 does this automatically. https://github.com/CyanogenMod/android_system_core/tree/cm-10.1/sdcard
KurianOfBorg said:
You should NOT be doing this. The Android hardware requirements clearly state that all shared storage directories must be case insensitive and must not have permissions. FAT32 is the only supported filesystem which meets these requirements. Mounting an EXT filesystem directly will break applications.
The newer versions of Android come with an "sdcard" utility which uses a FUSE driver to wrap a native EXT filesystem and exposes a pseudo filesystem which is case insensitive and is without permissions. You should mount the EXT SD card at a different location (/dev/fuse) and use the "sdcard" utility to emulate it at /storage/whatever. You can see the command line syntax of the "sdcard" utility in the source code.
CM10.1 does this automatically. https://github.com/CyanogenMod/android_system_core/tree/cm-10.1/sdcard
Click to expand...
Click to collapse
Again, Android not natively supporting ext4 is a slap in the face. Usability over technical merit disgusts me.
muqali said:
Again, Android not natively supporting ext4 is a slap in the face. Usability over technical merit disgusts me.
Click to expand...
Click to collapse
It does support EXT4! Officially. All Google ROMs and AOSP can mount EXT4 partitions as /storage/*. The correct way to mount it is to use the command "sdcard" not "mount". I'm pretty sure any AOSP ROM will automatically mount an EXT4 SD card using the "sdcard" command just like Cyanogenmod does.
Thanks for the info. I'll look into this soon-ish, once my exams are over.
Sent from my SGH-T889V using xda app-developers app
KurianOfBorg said:
It does support EXT4! Officially. All Google ROMs and AOSP can mount EXT4 partitions as /storage/*. The correct way to mount it is to use the command "sdcard" not "mount". I'm pretty sure any AOSP ROM will automatically mount an EXT4 SD card using the "sdcard" command just like Cyanogenmod does.
Click to expand...
Click to collapse
It's still a second class citizen to a xFATx filesystem.
muqali said:
It's still a second class citizen to a xFATx filesystem.
Click to expand...
Click to collapse
No it's fully supported by AOSP exactly the same as FAT on AOSP and exFAT/NTFS on Samsung ROMs. It's the manufacturer's fault for REMOVING support from their ROM. When you insert an EXT SD card on AOSP, it gets mounted at /storage/* just like any other SD card.
In my N7100 with CM 10.1, ext4 has stopped working for my 32gb SDCard on 05-01-2013 nightly, even after reformatting, going back to stock, then reinstalling CM 10.1. I also noticed that my ext4 formatted 8GB SdCard still works, however, so I am not sure if it's a storage size issue in my case (32gb vs 8gb). I am trying a hybrid of 8mb fat32 / 28.*gb ext4 to see if that will work.
KurianOfBorg said:
No it's fully supported by AOSP exactly the same as FAT on AOSP and exFAT/NTFS on Samsung ROMs. It's the manufacturer's fault for REMOVING support from their ROM. When you insert an EXT SD card on AOSP, it gets mounted at /storage/* just like any other SD card.
Click to expand...
Click to collapse
clearday said:
In my N7100 with CM 10.1, ext4 has stopped working for my 32gb SDCard on 05-01-2013 nightly, even after reformatting, going back to stock, then reinstalling CM 10.1. I also noticed that my ext4 formatted 8GB SdCard still works, however, so I am not sure if it's a storage size issue in my case (32gb vs 8gb). I am trying a hybrid of 8mb fat32 / 28.*gb ext4 to see if that will work.
Click to expand...
Click to collapse
Is it formatted properly as ext4? Using mke2fs or (tune2fs to convert to ext4). All ROMs only mount the first partition on the SD card regardless of the file system. Sometime after mounting USB Mass Storage an the SD card doesn't remount properly so you need to reboot the device. You'll most probably want to use MTP with ext4 anyway.
KurianOfBorg said:
Is it formatted properly as ext4? Using mke2fs or (tune2fs to convert to ext4). All ROMs only mount the first partition on the SD card regardless of the file system. Sometime after mounting USB Mass Storage an the SD card doesn't remount properly so you need to reboot the device. You'll most probably want to use MTP with ext4 anyway.
Click to expand...
Click to collapse
Finally fixed the problem by running this command in ROM Toolbox Lite:
"find /storage/sdcard1/ -print0 | xargs -0 chown root:media_rw"
http://forum.xda-developers.com/showthread.php?p=38182488#post38182488
clearday said:
Finally fixed the problem by running this command in ROM Toolbox Lite:
"find /storage/sdcard1/ -print0 | xargs -0 chown root:media_rw"
http://forum.xda-developers.com/showthread.php?p=38182488#post38182488
Click to expand...
Click to collapse
Then it's not mounted properly! Your ext4 SD card has directly been mounted at /storage/* instead of through the FUSE driver. You should NOT be able to see permissions when it's mounted at /storage/*. The physical partition should be mounted at /dev/fuse. Reboot the device and check again whether permissions are visible at /storage/*.
KurianOfBorg said:
Then it's not mounted properly! Your ext4 SD card has directly been mounted at /storage/* instead of through the FUSE driver. You should NOT be able to see permissions when it's mounted at /storage/*. The physical partition should be mounted at /dev/fuse. Reboot the device and check again whether permissions are visible at /storage/*.
Click to expand...
Click to collapse
It's still visible at storage
How do I fix it?
clearday said:
It's still visible at storage
How do I fix it?
Click to expand...
Click to collapse
It should show up at /storege/* but that should be the FUSE driver's mount point with permissions stripped away. The real ext4 partition will be at /dev/fuse.
Any further progress?
I want to use symlinks and ext4 on my note 2 also.
On aosp roms just use the sdcard binary with an initd script.
Gesendet von meinem GT-N7105 mit Tapatalk 2
DerTeufel1980 said:
On aosp roms just use the sdcard binary with an initd script.
Click to expand...
Click to collapse
I'm trying to do this on Tweaked. There is an sdcard binary, however, it appears to be modified by Samsung as it's hardcoded to mount to /storage/sdcard0 and overrides the internal sdcard mount when I use it. It doesn't take a destination parameter like the AOSP/CM version does.
If anyone has an AOSP/CM build environment, could I trouble you for a statically linked version of the sdcard binary? I downloaded CM10.2-nightly, but it's dynamically linked and, of course, doesn't work on the stock based ROMs.
EDIT
It might still be nice, but I figured out a way around it. I hex edited the sdcard binary from the Note2 to use /storage/sdcard1. Then in the mount script, bind mounted it over to /storage/extSdCard. I've rebooted a few times and it seems to be working fine. I am copying data to it over MTP right now. I've attached a zip of the files I'm using.
NOTE: THIS IS NOT A FLASHABLE ZIP.
I might make one later, but this kind of needs to be a manual process anyway.
put the sdcard1 file in /system/xbin
chmod 755 /system/xbin/sdcard1
put the script file in /etc/init.d
set permissions/ownership on it
Now, if you have an ext4 formatted SD, and it's not mounted, you should be able to run the script and have it mount it, run the sdcard1 binary on it, and bind mount it over to the normal extSdCard spot. It will happen at boot if you got it all right.
There are probably improvements that can be made, my shell scripting is a bit rusty. Hopefully this will get people interested in it again, now that the permissions issues are resolved.
So what I have gathered is that this phone even with root/cmod/titanium backup doesn't allow me to move apps to my _real_ sdcard. So is it really phone related or is there a way to do it with custom rom/kernel or some other way?
leripe said:
So what I have gathered is that this phone even with root/cmod/titanium backup doesn't allow me to move apps to my _real_ sdcard. So is it really phone related or is there a way to do it with custom rom/kernel or some other way?
Click to expand...
Click to collapse
on stock android 4.2 u could actually use app2sd to move some apps to external storage
using Cyanogenmode 4.3 based Carbon MOD i found that i no longer can do that, tried app2sd and link2sd
i read somewhere that external storage is defined in system PATH variables, dont know how relevant that is but seems connected
but i honestly dont know yet much about the android platform to fix this issue myself, so i might be wrong
we need some pro tip help
Would be very interesting to habe feature. Especially for phones with only 8 GB internal flash. Hope this will come for my s4 Mini. Samsung has this implemented in their stock Rom.
Gesendet von meinem GT-I9195 mit Tapatalk
tesme33 said:
Would be very interesting to habe feature. Especially for phones with only 8 GB internal flash. Hope this will come for my s4 Mini. Samsung has this implemented in their stock Rom.
Gesendet von meinem GT-I9195 mit Tapatalk
Click to expand...
Click to collapse
Yes this would be awesome, but seems that cmod has gone moneymaking company and tries to make cmod to google standards which means they have been starting to remove/hiding features. Their goal now is to make installing cmod without cwm and to remove root or have it as optional feature. Or all this is what I gathered over the net, but I still hope some other custom rom could have this feature.
Edit:
All of the above may not be like that nowadays, and this is somewhat speculation since there hasn't(?) been an official statement from cm about app2sd support. Though emulated sdcard may require something different.
(edited 19.2.2014)
Moving apps to external card.
leripe said:
Yes this would be awesome, but seems that cmod has gone moneymaking company and tries to make cmod to google standards which means they have been starting to remove/hiding features. Their goal now is to make installing cmod without cmw and to remove root or have it as optional feature. Or all this is what I gathered over the net, but I still hope some other custom rom could have this feature. This feature may only need one to repartition the sdcard, but I can't get it to mount as mass storage nor with sdcard reader(it shows "empty" card) in windows(maybe i should try it in linux).
Click to expand...
Click to collapse
About two months ago I upgraded my Xoom to JB 4.2.2, and because space was limited, I hadn't noticed whether I could move operating programs to the external card or not. This was a custom rom. Well, I was using a 32 Gig card that was nearly full of data.
This last week, I invested in a 64 Gig sdhc card and upgraded my rom to Kit-Kat 4.4.2. Thus its also a custom rom, but now I find that though, for the most part, I can designate the external card to store and access data from, I can't run programs from it. Hmm!
Here I am with all this memory. Sure wish I had better management options.
Kingsman1 said:
About two months ago I upgraded my Xoom to JB 4.2.2, and because space was limited, I hadn't noticed whether I could move operating programs to the external card or not. This was a custom rom. Well, I was using a 32 Gig card that was nearly full of data.
This last week, I invested in a 64 Gig sdhc card and upgraded my rom to Kit-Kat 4.4.2. Thus its also a custom rom, but now I find that though, for the most part, I can designate the external card to store and access data from, I can't run programs from it. Hmm!
Here I am with all this memory. Sure wish I had better management options.
Click to expand...
Click to collapse
Well check my thread on my signature and the requests section in the 1st post for more info on about app2sd.
Resolve the issue
Hi all,,,
This is my first time in XDA. Someone fixed this bug for me. You need to be rooted to fix this issue. Install from market Terminal Emulator and type the following commands
su
/system/bin/restorecon -R -v /data/media/
dlightx said:
Hi all,,,
This is my first time in XDA. Someone fixed this bug for me. You need to be rooted to fix this issue. Install from market Terminal Emulator and type the following commands
su
/system/bin/restorecon -R -v /data/media/
Click to expand...
Click to collapse
Can I check with you what bug this fixes?
Ability to use app2sd?
I use FolderMount and works real well. No need to partitioning sd card.
I've gotten to getting Link2SD working on the GT-I9195 with nightly 20140402 KitKat.
Based loosely on [Tutorial/HOWTO] Convert Your External SD Card from FAT/exFAT to EXT4! (3 ways!)
1. Clear everything out of your external SD card. We're gonna be formatting it so you'll have to backup your data.
2. Boot up into recovery and have a working ADB environment setup on your computer
3. adb shell (Do NOT mount your /storage/sdcard1)
5. Check that you have fdisk and mke2fs installed (Type fdisk --help and mke2fs --help ensure they don't throw up errors)
6. fdisk /dev/block/mmcblk1
7. Type o and Enter to destroy the partition table
8. Type n to create a new partition. Make sure its Primary (p). Select first partition and choose how many cylinders you want to allocate to it.
9. Type n to create your second partition. Again, make sure its Primary (p). Leave cylinder allocation blank to use remainder of space by default.
10. Verify partition layout by typing p to show partition layout.
11. Exit fdisk and save changes by typing w
12. mke2fs -t ext4 /dev/block/mmcblk1p1
13. mke2fs -t ext4 /dev/block/mmcblk1p2
14. reboot
15. Once CM has booted up, check if your external storage partition 1 has been mounted. It should be mounted at /mnt/media_rw/sdcard1
16. Try creating a folder in /mnt/media_rw/sdcard1 and /storage/sdcard1 to test if your read/write permissions are correct.
17. Install DiskInfo from playstore to check if your second partition is visible
18. Once done, install Link2SD and select ext4 when prompted to ask what kind of filesystem your 2nd partition is.
19. Reboot after Link2SD installs scripts.
20. Voila!
Let me know if there are any issues. I modified several files while doing this so not sure if any of them affected.
Should #16 not work, try:
1. Going to /system/etc/permissions/platform.xml and adding media_rw group to the element that only has sdcard_r group in it.
2. Typing mount in Terminal Emulator (su) or adb shell and see whether your partitions are mounted. If you're not sure, post the output out here.
Final mount output (filtered with mmcblk1 or sdcard stuff):
Code:
/dev/block/mmcblk1p2 /data/sdext2 ext4 rw,seclabel,relatime,data=ordered 0 0
/dev/fuse /mnt/shell/emulated fuse rw,nosuid,nodev,relatime,user_id=1023,group_i
d=1023,default_permissions,allow_other 0 0
/dev/block/vold/179:33 /mnt/media_rw/sdcard1 ext4 rw,dirsync,context=u:object_r:
sdcard_external:s0,nosuid,nodev,noexec,noatime,data=ordered 0 0
/dev/fuse /storage/sdcard1 fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1
023,default_permissions,allow_other 0 0
EDIT 2: *** IMPORTANT!! Do NOT select External in the App2SD option in Link2SD. Otherwise you will not be able to install any apps from the Play Store (Insufficient Storage error)
I use GL to SD on my Slimrom: https://play.google.com/store/apps/details?id=com.slf.ListglApp
It may not have fancy UI like FolderMount or Link2SD, and it slight complex to use. But it works on per app basis, without re-partition too.
Hi leripe !
I have got the same device and ROM like you and i would like to know if you have found a solution to move apps to the sdcard ?
Thank you in advance, regards.
Oijkn said:
Hi leripe !
I have got the same device and ROM like you and i would like to know if you have found a solution to move apps to the sdcard ?
Thank you in advance, regards.
Click to expand...
Click to collapse
If it non system apps, you can use GL to SD as I provide the link already above. It works.
TNCS said:
If it non system apps, you can use GL to SD as I provide the link already above. It works.
Click to expand...
Click to collapse
Hi, i tried your link but this tool don't show all my user app so i can't move them... Have you another tool that can do the job please?
Oijkn said:
Hi, i tried your link but this tool don't show all my user app so i can't move them... Have you another tool that can do the job please?
Click to expand...
Click to collapse
Nope, sorry. I tried this tool and it work so never bother to look for another one.
If GL to SD doesn't have the app you want to move, you can manually link the app and the relevant folder at GL to SD settings. After you linked them, at the main page of apps you can tell it to start to move.
This thread shows up on google for me when trying to figure out why minitool partition wizard doesn't detect my phone at all. The guide I'm following says USB-SDcard reader is required but is that really true?? Surely there is a way to mount the SDcard at a low enough level to partition it without addition hardware?? Even if I have to mount it using TWRP recovery or something I would think it's possible. Anyone know?