UPDATE:
I now recommend using FolderMount instead of the scripts below.
Forum Link: http://forum.xda-developers.com/showthread.php?t=2192122
Market Link: https://play.google.com/store/apps/...251bGwsMSwxLDEsImNvbS5kZXZhc3F1ZS5mbW91bnQiXQ..
Click to expand...
Click to collapse
PART 1: obb "Game Data" to external_sd
Simple script that binds the internal obb folder to an external Gamedata folder on your sd to save space on Internal SD Card.
Use at your own risk.
1. Create a folder on the external_sd called "Gamedata"
2. Move all folders located in sdcard/android/obb to the newly created folder "Gamedata" (This takes a long time using Root Explorer, be patient. I recommend using Solid Explorer so that you can see the progress.)
3. Download the txt file and rename the extension to .sh OR Create a new script using:
Stock ICS:
Code:
mount -o bind /mnt/sdcard/external_sd/Gamedata /mnt/sdcard/Android/obb/
SnowJB (may or may not work on other JB ROMS) - Credit:
Code:
mount -o bind /storage/external_SD/Gamedata /storage/sdcard0/Android/obb/
4. Download Smanager from the playstore.
5. Find the script you created and set it to run with SU, make sure to save.
6. You can run it now to see if it worked. (If it did, make sure to edit the script to run at boot)
Notes:
I reclaimed about 6GB+ and was able to download several new games after doing this.
Occasional a folder called /Android/data/ gets created in Gamedata but it stays empty and doesn't effect anything. Just ignore it.
Newly downloaded game data will automatically be downloaded to the Gamedata folder. (As long as the addition data is downloaded through Google Play)
Works with Link2SD
This should work on every device that has an external sd card, however you might have to edit the paths to make sure they match up with how your device has the external sd card implemented (emmc, sdcard1, extSdCard). You may also have to edit the internal sd path for 4.2 and above to because of multi-user support.
Thanks to DeathmonkeyGTX! His music cache script gave me the idea to do the same for obb game data. They could probably be combined into one script, should you want to.
PART 2: Link2SD Info - for even more space saving
You can also use Link2Sd (found on the market) to store apps on the external sd card.
I formatted my external sd into two partitions. One 55 GB partition (For user data) and another 4 GB partition (for Link2SD).
Notes:
The highest app that I linked only saved about 50 MBs. Not really saving that much space, but after I linked several 50 MBs and under apps, I recovered about 1.2 GBs of space on the Internal.
The second partition can only be used for Link2SD.
To Set Up:
Backup your SD, format it to Fat32, use MiniTool to resize the first partition, then create a second partition (FAT 32 and make sure it is Primary) using the remaining space. You should now have two partitions. Now just launch the Link2SD app and create the start-up mount scripts. Reboot, launch the app once more, and finally start linking apps to your external sd card.
More info here: http://www.link2sd.info/home
I recommend reading the description and FAQ.
Both "PARTS" can be used together or separately just fine on ICS. However, I was not able to get Link2Sd working on SnowJB.
Seems to be working great! We now have so much more room for activities!
This is what I call a WIN: http://imgur.com/a/WBtHP
as far as I know I did everything I was supposed to but I went and deleted the files on my internal sd card and it deleted the ones on external sd card. I downloaded the app again and it saved the files in both locations and I deleted the internal one and it deleted both again. What could be causing this?
mws1986 said:
as far as I know I did everything I was supposed to but I went and deleted the files on my internal sd card and it deleted the ones on external sd card. I downloaded the app again and it saved the files in both locations and I deleted the internal one and it deleted both again. What could be causing this?
Click to expand...
Click to collapse
You have to delete the files before you set the script to run at boot. Otherwise you will be deleting the files on the external sd since the script tricks the system into thinking they are on the internal. I'm also think that your misunderstanding when you say they are on both. If you look at the total space when tapping the obb folder on your internal you will notice it goes from 11GB to whatever size you external sd card is. The two folders are binded so it would appear that they are on both but they are only on your external.
Joecascio2000 said:
You have to delete the files before you set the script to run at boot. Otherwise you will be deleting the files on the external sd since the script tricks the system into thinking they are on the internal. I'm also think that your misunderstanding when you say they are on both. If you look at the total space when tapping the obb folder on your internal you will notice it goes from 11GB to whatever size you external sd card is. The two folders are binded so it would appear that they are on both but they are only on your external.
Click to expand...
Click to collapse
I just noticed this today, I ran this correctly (thank you for adapting it btw) and saw that I had "duplicates" on my internal. Then I saw that the total space was listed as 32 gigs... and it clicked, lol.
For a little clarification, you will see the folder in both places, the one on the internal card is just a link, it shouldn't actually take up any room on the internal card.
I was also able to get this to work for another folder created by a game that didn't put the files in obb folder.
(Just make a copy of the script and edit the pathways in it and run as root at boot.)
bleached45 said:
I just noticed this today, I ran this correctly (thank you for adapting it btw) and saw that I had "duplicates" on my internal. Then I saw that the total space was listed as 32 gigs... and it clicked, lol.
For a little clarification, you will see the folder in both places, the one on the internal card is just a link, it shouldn't actually take up any room on the internal card.
I was also able to get this to work for another folder created by a game that didn't put the files in obb folder.
(Just make a copy of the script and edit the pathways in it and run as root at boot.)
Click to expand...
Click to collapse
Yeah it bugs me big time that some apps download files to different places. I noticed some apps that download additional files through the play store, download the data to the /android/data/ folder instead of /android/obb/. Google really needs to make that uniform, where all additional game data get downloaded to one place. I did, however, adapt my script to link the whole /android/ folder to the external sdcard.
I won't release that one because there is way more things that can go wrong. The /android/data folder is used for so much more than just games and if it's not set up just right you could get force closes and blank widgets on boot. But just FYI, it is possible and is working well for me.
Worked! Thanks a lot for the script man helped save a lot of data!
Sent from my LG-E970 using xda app-developers app
Well, I can't get this post deleted, but I was able to figure out my problem!
Thanks for posting this solution! So happy to have it!
Re: obb "Game Data" to external_sd and Link2Sd Info
I used both methods here, obb and links2sd and it helped me out tremendously. Nice work and thanks for posting this.
Sent from my LG-E970 using xda premium
Hey Joecascio2000,
Do you know how one would modify this script to work on the Stock 4.1.2 Jelly Bean LG-E973/1/5/0 CANADA / ATT / INTERNATIONAL rom?
I've read in that thread that the sdcard locations are different for Jellybean.
I've tried the following path to no avail.
mount -o bind /mnt/storage/external_SD/Gamedata /mnt/storage/sdcard0/Android/obb/
Using that path will have smanager error out stating the following:
card0:/AndroidObbSwap.sh'
mount: No such file or directory
Any input would be greatly appreciated.
Yoreo said:
Hey Joecascio2000,
Do you know how one would modify this script to work on the Stock 4.1.2 Jelly Bean LG-E973/1/5/0 CANADA / ATT / INTERNATIONAL rom?
I've read in that thread that the sdcard locations are different for Jellybean.
I've tried the following path to no avail.
mount -o bind /mnt/storage/external_SD/Gamedata /mnt/storage/sdcard0/Android/obb/
Using that path will have smanager error out stating the following:
card0:/AndroidObbSwap.sh'
mount: No such file or directory
Any input would be greatly appreciated.
Click to expand...
Click to collapse
I don't have JB installed yet so I don't know exactly how the sd card and external sd card are mount. I'm assuming your paths are correct. But I suggest making sure that the script is running from the internal SD card. Also, I would add a "sleep" line just to make sure the external sd is mounted properly before running the bind.
Try:
#start
sleep 30
mount -o bind /mnt/storage/external_SD/Gamedata /mnt/storage/sdcard0/Android/obb/
#end
Joecascio2000 said:
I don't have JB installed yet so I don't know exactly how the sd card and external sd card are mount. I'm assuming your paths are correct. But I suggest making sure that the script is running from the internal SD card. Also, I would add a "sleep" line just to make sure the external sd is mounted properly before running the bind.
Try:
#start
sleep 30
mount -o bind /mnt/storage/external_SD/Gamedata /mnt/storage/sdcard0/Android/obb/
#end
Click to expand...
Click to collapse
I gave that a shot, and it's still kicking out the same error. I think I'm going to post in that thread and see if anyone there can tell me if my path names are incorrect.
Well Joecascio2000, I figured it out after getting a good nights sleep. My paths weren't correct.
Anyhow, the correct path/command is as follows:
Code:
mount -o bind /storage/external_SD/Gamedata /storage/sdcard0/Android/obb/
Feel free to update your OP to notify anyone who may be using that rom to use the above script for things to work properly.
What would be the code to get this working with the new cm 10.1 conversion?
I tried
mount -o bind /storage/sdcard1/Gamedata /storage/emulated/0/Android/obb/
and a few others
Yoreo said:
Well Joecascio2000, I figured it out after getting a good nights sleep. My paths weren't correct.
Anyhow, the correct path/command is as follows:
Code:
mount -o bind /storage/external_SD/Gamedata /storage/sdcard0/Android/obb/
Feel free to update your OP to notify anyone who may be using that rom to use the above script for things to work properly.
Click to expand...
Click to collapse
Thanks. I updated to OP to include your code and put a link to your post.
whoamanwtf said:
What would be the code to get this working with the new cm 10.1 conversion?
I tried
mount -o bind /storage/sdcard1/Gamedata /storage/emulated/0/Android/obb/
and a few others
Click to expand...
Click to collapse
Again, not really sure how CM10.1 handles the external sd. Did you try the code directly above your post? It works for the JB port so it may work for the CM10.1 ROM.
EDIT:
Try:
mount -o bind /storage/sdcard1/Gamedata /storage/sdcard0/Android/obb/
That is what I have on my Captivate running CM10.1.
Re: obb "Game Data" to external_sd and Link2Sd Info
I'm not 100% for sure on this but doesn't cm10 handle the external sd as emmc?
Sent from my LG-E970 using xda premium
Re: obb "Game Data" to external_sd and Link2Sd Info
tmease1 said:
I'm not 100% for sure on this but doesn't cm10 handle the external sd as emmc?
Sent from my LG-E970 using xda premium
Click to expand...
Click to collapse
I know they used too on my Captivate but with the multiple users in 10.1 I think they might have changed it. And again it could be different for every device. I recommend using solid explorer to just search around. If you tap the little android icon in the top left it gives you the exact path of the folder you are in.
Sent from my LG-E970 using xda premium
Joecascio2000 said:
I know they used too on my Captivate but with the multiple users in 10.1 I think they might have changed it. And again it could be different for every device. I recommend using solid explorer to just search around. If you tap the little android icon in the top left it gives you the exact path of the folder you are in.
Sent from my LG-E970 using xda premium
Click to expand...
Click to collapse
Yeah it is weird I found the exact paths and changed the script but it still doesnt work, even got it to where it looked like it worked, went green and no mount error but no data
whoamanwtf said:
Yeah it is weird I found the exact paths and changed the script but it still doesnt work, even got it to where it looked like it worked, went green and no mount error but no data
Click to expand...
Click to collapse
Did you add the sleep line? Some ROMS take longer to mount the sd card than others. If the sd card isn't mounted before the script runs nothing will happen.
Code:
#start
sleep 30
mount -o bind /storage/external_SD/Gamedata /storage/sdcard0/Android/obb/
#end
This will wait 30 seconds before running the script. If the paths are correct, I don't see why it wouldn't work. Under smanager, click menu>more> advanced>configuration, and turn on "Show On Boot Script Log". That should give you an idea as to what is happening.
Related
I recently installed an external sd card (Samsung 8GB class 10). I wanted to use it for photos, videos, music and app backups. Also to move some memory heavy apps to sd card. I realise with our sgs2's we're blessed with an abundance of internal memory storage, but wanted to cover myself for factory data resets and so on.
Anyhoo I can't seem to get my head round the folder/file name setup e.g.
Folder sdcard/ which contains sdcard/external_sd and also contains sdcard/usbstorage.
To confuse matters further I seem to have duplicate folders called:
mnt/sdcard/ which contains mnt/sdcard/external_sd it also contains mnt/sdcard/usbstorage.
I would have thought an external sdcard would have a separate root folder? My question is how to get "app to sdcard" to go to external_sd? Also what's the best folder/filename setup to sort out this mess? Thanks, any help would be much appreciated.
Sent from my GT-I9100 using xda premium
OK so in the linux filesystem /mnt is the area devices are generally mounted to
So the links in the area are to the same sets of locations
/mnt/sdcard is the mount point for the internal SD on a non rooted phone this is the default file system
thus in /mnt/sdcard/external_sd in a non rooted filesystem would simply show up in the file system as /external_sd (and the same with the USB storage) they are in fact one in the same copying file via either path will have exactly the same result.
gazman69 said:
I recently installed an external sd card (Samsung 8GB class 10). I wanted to use it for photos, videos, music and app backups. Also to move some memory heavy apps to sd card. I realise with our sgs2's we're blessed with an abundance of internal memory storage, but wanted to cover myself for factory data resets and so on.
Anyhoo I can't seem to get my head round the folder/file name setup e.g.
Folder sdcard/ which contains sdcard/external_sd and also contains sdcard/usbstorage.
To confuse matters further I seem to have duplicate folders called:
mnt/sdcard/ which contains mnt/sdcard/external_sd it also contains mnt/sdcard/usbstorage.
I would have thought an external sdcard would have a separate root folder? My question is how to get "app to sdcard" to go to external_sd? Also what's the best folder/filename setup to sort out this mess? Thanks, any help would be much appreciated.
Sent from my GT-I9100 using xda premium
Click to expand...
Click to collapse
If you're having trouble with the phone directory layout and you have root, you can change it by making a symbolic link to point in another direction or directly change the mount partition table, but I think that would afect the ROM behaviour...
For the first thing, if the phone usually has this directories:
/system
/data
/sdcard
You can create a new one (/external_sd or whatever you want) and make it point to your external_sd directory, so in your root folder will have:
/system
/data
/sdcard
/external_sd -> /sdcard/external_sd
The command to do that is: ln -s /sdcard/external_sd /external_sd
Cheers guys. Thanks for your advice and knowledge on this one. I'm unrooted on stock voda rom 2.3.5. If I understand correctly (and I'm not entirely sure that I do;-). The two copies of the folder/file tree is fairly standard and does not cause any conflicts?
When I move an app to sd, it defaults to internal sd. I can then move them via file manager to external sd. But is there a way to make external sd the default card for this or at least a way to make a choice between them? Apologies if you've already covered this and I didn't get it.
Sent from my GT-I9100 using xda premium
I have been searching for answers on this and so far found nothing. Sorry if its already been covered somewhere I didn't find.
The SD card is working fine in the pone.
When I put it in a usb adapter to plug into my pc it mounts fine and I can copy files to it without any errors but when I put it back in the phone I cant see the files?
Same thing happens when I plug the phone into a pc with USB and copy the files.
The files are still there because when I plug back into the pc I can see them.
Anyone know why I have this issue please?
Many thanks
Ben
Try unmounting an remounting the sdcard in the Settings menu.
Have you tried other filemanagers than the stock one?
I can't confirm your issue but it sounds like a caching issue.
Have you tried turning it off and on again? =)
I have a similar issue , I have files that I have copied over to the phone sd card and wanted to use a file manager to move them around into different files however none of the file managers seem to see the files
Sent from my GT-I9300 using xda premium
d4fseeker said:
Try unmounting an remounting the sdcard in the Settings menu.
Have you tried other filemanagers than the stock one?
I can't confirm your issue but it sounds like a caching issue.
Have you tried turning it off and on again? =)
Click to expand...
Click to collapse
I am using ES File Explorer
I have tried rebooting the phone and also (after you said) mounting and unmounting the SD card. The Issue remains the same.
Does anyone else have this issue or any ideas?
If you're connected to PC as MTP mode, try to switch to camera transfer mode..
Maybe this will help?
External and internal sdcard mount points
After some more investigating I have discovered that what is displayed as /sdcard/ is in fact the phones internal flash memory and the actual SD card is mounted as something else.
There you have 2 folders in /mnt
/mnt/sdcard >> taht is the internal flash storage
/mnt/sdextcard >> that is the inserted sd card
http://mono-for-android.1047100.n5.nabble.com/detect-SD-Card-path-td5710218.html
This explains why I could see the files i copied to my sd card on my phone as my phone wont enable me to see the actual external SD card.
Was surprised I couldn't find an actual thread about this on the forum.
I can see that creating a mount point for called SDCARD within the internal memory will allow apps that default large content files to use this space without complaining but this means that although Samsung allow SD cards to be inserted they cannot be used with a standard set up?
So is there any way for me to get to this other mount point without root access?
I thought, for a change, I might hold off rooting my phone but this might spur me on...
Afaik Android does not have a concept of "internal" SD card. (Which is the or at least a reason why most phones have a separate data partition)
However when phone manufacturer's started offering internal storage capacity for normal files, they just used the sdcard.
The name of the external sdcard varies from phone to phone and manufacturer.
I can remember that the name of the external sd card on my S1 was /sdcard/external_sd/ (no /mnt as with the S3 !)
On current Cyanogenmod for the S1 it's /mnt/emmc/ which seems to be introduced as some sort of "standard".
This variety in naming shemes and the possibility of a phone not having internal SD-card storage, only having internal SD-card storage or having both _SHOULD_ make app developers give you the option where to store it.
If it doesn't it's a restriction in the app, not the sdcard.
Solution[/b[
If you are rooted you can easily bypass these restrictions with a simple trick. Make sure the app is terminated before attempting this!
Go to the terminal emulator and type:
Code:
su
mkdir /mnt/sdcardext/APPFOLDER
cp -rvf /mnt/sdcard/APPFOLDER /mnt/sdcardext/APPFOLDER
mount -o bind /mnt/sdcard/APPFOLDER /mnt/sdcardext/APPFOLDER
You've now told Android to re-route all filesystem access'es transparently to the external SDcard while the app still believes it's on the internal one.
Note that you'll have to run the following after every boot (or have it run as auto-start) since mount's are not persistant.
Code:
su
mount -o bind /mnt/sdcard/APPFOLDER /mnt/sdcardext/APPFOLDER
Thank you for the explanation on this d4fseeker. Really all I wanted to do at this time was be able to access the external SD or point to it as a content location. But I will bookmark the solution for forcing apps to use it.
No I know what I know I have rooted my phone, curtesy of Chainfires guide here and can now see the extSDCard directory
houseofcutler said:
I am using ES File Explorer
I have tried rebooting the phone and also (after you said) mounting and unmounting the SD card. The Issue remains the same.
Does anyone else have this issue or any ideas?
Click to expand...
Click to collapse
In ES file explorer, you can go to your external SDcard by open Menu (left capacitive button), then select Manager and then SD card Analyst.
it will show /sdcard,,, it means internal SDcard. You have to touch "Disks" icon (the second from the left), then select /mnt/extSdCard. Eventually you can browse your external SD.
I don't know if there is the easier way. Or you can use the stock explorer app "My files", it is easier to browse the external card but with less function than 3rd party app.
That does work thanks - Turns out I purchased Root Explorer a while back so I have installed that and set the home directory to be the external SD mount point. Still need ES though for when I am copying across my network
jackie_jerk said:
In ES file explorer, you can go to your external SDcard by open Menu (left capacitive button), then select Manager and then SD card Analyst.
it will show /sdcard,,, it means internal SDcard. You have to touch "Disks" icon (the second from the left), then select /mnt/extSdCard. Eventually you can browse your external SD.
I don't know if there is the easier way. Or you can use the stock explorer app "My files", it is easier to browse the external card but with less function than 3rd party app.
Click to expand...
Click to collapse
I have quite the same problem but another way around. I can see all the (music)files in the phone but when I connect the phone via USB to my PC I can only see a few (about 30) of the files in the folder. I have booted the PC and the phone, took the SDcard also out and in. Also when I insert the SDCard to the PC's cardreader I can see all the files, so I quess the problem is in the phone. Any ideas how to solve this?
Not sure what your issue is but my advise is to confirm you a definitely looking at what you think you are - that was my problem before.
For example when the Phone is connected to your PC:
Create a text file called phone.txt in the 'Phone' Directory
Create one called card.txt in the 'Card' directory
Then use the built in 'my files' browser or whatever app you use to see if the files are where you think they are.
Might help...
d4fseeker said:
Afaik Android does not have a concept of "internal" SD card. (Which is the or at least a reason why most phones have a separate data partition)
However when phone manufacturer's started offering internal storage capacity for normal files, they just used the sdcard.
The name of the external sdcard varies from phone to phone and manufacturer.
I can remember that the name of the external sd card on my S1 was /sdcard/external_sd/ (no /mnt as with the S3 !)
On current Cyanogenmod for the S1 it's /mnt/emmc/ which seems to be introduced as some sort of "standard".
This variety in naming shemes and the possibility of a phone not having internal SD-card storage, only having internal SD-card storage or having both _SHOULD_ make app developers give you the option where to store it.
If it doesn't it's a restriction in the app, not the sdcard.
Solution[/b[
If you are rooted you can easily bypass these restrictions with a simple trick. Make sure the app is terminated before attempting this!
Go to the terminal emulator and type:
Code:
su
mkdir /mnt/sdcardext/APPFOLDER
cp -rvf /mnt/sdcard/APPFOLDER /mnt/sdcardext/APPFOLDER
mount -o bind /mnt/sdcard/APPFOLDER /mnt/sdcardext/APPFOLDER
You've now told Android to re-route all filesystem access'es transparently to the external SDcard while the app still believes it's on the internal one.
Note that you'll have to run the following after every boot (or have it run as auto-start) since mount's are not persistant.
Code:
su
mount -o bind /mnt/sdcard/APPFOLDER /mnt/sdcardext/APPFOLDER
Click to expand...
Click to collapse
But doesn't this simply relocate 100% of APPFOLDER to the microSD card and still leave no option to have Apps in both flash locations? Or will programs like App 2 SD somehow now be able to relocate apps back to the internal flash partition (aka "internal sdcard")?
Ah, nevermind. "APPFOLDER" is a single application's appfolder, not a directory with all the apps. So this should be something an app could do on any rooted S3 with a nice gui and persistence through some service mod in init.d or whatever Android uses in its place, yes?
Ok, was just digging around in /mnt/sdcard and while a few apps have obvious directories there, most do not. What's more, being an android noob, I'm not sure where their directories would be located (app manager doesn't say either).
Anyone care to point me in the right direction? Also, is there a way to install some other standard linux shell commands like more and grep?
Thanks.
Sent from my GT-I9300 using XDA
How do I link the external micro SD as a folder on the internal SD as before with the S2?
MyPhoneExplorer is unable to see the external SD. Previously it navigates via a folder/link within the internal SD.
I see that there will be other problem with other apps soon as I start to use eit more.
I'd be interested in this as well. I tried symlinks but - according to Root Explorer - the internal memory does not support symlinks.
If you're rooted, try out CifsManager.
https://play.google.com/store/apps/details?id=ws.plattner.cifsmanager
You can pretty much mount any folder (local or network).
Haven't rooted yet, so I don't know if it works on the S3.
Sent from my GT-I9300 using Tapatalk 2
i tried to change the vold.fstab file in /system/etc
amending
dev_mount sdcard /mnt/extSdCard auto /devices/platform/s3c-sdhci.2/mmc_host/mmc1/
to
dev_mount sdcard /mnt/sdcard/externalSD auto /devices/platform/s3c-sdhci.2/mmc_host/mmc1/
i had some force closes after a reboot so i changed it back. maybe someone wants to give it a try?
I'm using this init.d script to do that. (needs rooted kernel with init.d support)
First you have to make a folder (called "external_SdCard" in this script) on the internal sdcard where the external card gets bound to. ("/sdcard/external_SdCard") Then flash this zip (copies the script to /etc/init.d/99bind-sdcard) or make a init.d script with the following code:
Code:
#!/system/bin/sh
sleep 20
mount -o bind /mnt/extSdCard /sdcard/external_SdCard
NOTICE: It needs a few seconds till the internal sdcard is mounted and only after this the external can be bound to the folder on it.
If it doesn't work:
folder name doesn't match script
no init.d support
sleep value too little (try 30 or 40)
PS: Taken/inspired from this site since mine hasn't worked. (I haven't thought of the "sleep" command till the internal...)
EDIT: Problem are the duplicated entries in music player, gallery,...
Directory Bind actually did the trick for me.
Sent from my GT-I9300
member68 said:
Directory Bind actually did the trick for me.
Sent from my GT-I9300
Click to expand...
Click to collapse
That worked for me aswell, but after a reboot I got the same problem as with my solution. (duplicated stuff in gallery etc.)
I simply excluded the external sd card folder in Quickpic. No duplicates since (at least not in QuickPic
Sent from my GT-I9300
I use "DirectoryBind" app for that. It works perfectly.
Now I can to bind any folders between internal and external sdcards.
To work in SGS3 you should check the options:
- Alternate dbase mgmt
- Persistent service
- Bypass path verification
arnik1928 said:
I use "DirectoryBind" app for that. It works perfectly.
Now I can to bind any folders between internal and external sdcards.
To work in SGS3 you should check the options:
- Alternate dbase mgmt
- Persistent service
- Bypass path verification
Click to expand...
Click to collapse
I have a huge collection of music and pics on my external sd and they all are shown twice in gallery and music player - no matter what I try and also with your mentioned options in DirectoryBind - and you don't have this problem?
Burst shot broken after mounting extSdCard DCIM folder in sdcard
I'm accomplishing the same thing as DirectoryBind by using SManager with a little script I put together that looks like this:
Code:
#!/system/bin/sh
mount -o bind /mnt/extSdCard/Android /mnt/sdcard/Android
mount -o bind /mnt/extSdCard/DCIM /mnt/sdcard/DCIM
mount -o bind /mnt/extSdCard/Download /mnt/sdcard/Download
mount -o bind /mnt/extSdCard/Movies /mnt/sdcard/Movies
mount -o bind /mnt/extSdCard/Music /mnt/sdcard/Music
Anyway, after doing this I had the same problem with the duplicate gallery entries so I created a .nomedia file in /mnt/extSdCard then cleared the app data for Gallery and MediaStorage, rebooted and no more duplicate entries.
Now, the only problem I have left is that Burst Mode doesn't work on the camera. I setup the camera to save to the external SD card and the camera app shows an SD icon on the top-right corner in all shooting modes except Burst, there it changes to an internal memory icon. I can't find any way around this, and trying to shoot in burst mode doesn't work - it sounds like it's shooting pics but the counter doesn't go up and no pics are saved. I assume Burst mode has some special way of accessing the internal DCIM folder that isn't working with the DCIM mount I setup. All other shooting modes work, though, so it's not a deal breaker. I'm just OCD about little nagging problems :cyclops:
Has anybody else run into this or found a workaround?
The camera is probably storing the data in the real internal storage (/data/media) folder instead the virtual storage location /mnt/sdcard
You could fix it by bind-mounting /data/media/DCIM to /mnt/extSdcard/DCIM
However there is a reason for burst-mode not working with the SD-card: they usually are far too slow for sustained writing at that speed.
Some high-class cards may have sufficient write-speed capacity but Samsung prefers blocking to guessing.
d4fseeker said:
The camera is probably storing the data in the real internal storage (/data/media) folder instead the virtual storage location /mnt/sdcard
You could fix it by bind-mounting /data/media/DCIM to /mnt/extSdcard/DCIM
However there is a reason for burst-mode not working with the SD-card: they usually are far too slow for sustained writing at that speed.
Some high-class cards may have sufficient write-speed capacity but Samsung prefers blocking to guessing.
Click to expand...
Click to collapse
Thanks for clarifying, I knew it had to be accessing it another way! Good call on the SD card performance. I wouldn't even attempt it on my old microsd card but I just got a new sandisk microsdxc class 10 UHS-1 card and I've been really impressed with the performance so far, so I may give it a try :fingers-crossed:
floyd0815 said:
I have a huge collection of music and pics on my external sd and they all are shown twice in gallery and music player - no matter what I try and also with your mentioned options in DirectoryBind - and you don't have this problem?
Click to expand...
Click to collapse
try a .nomedia file in the internal SD. but you will not be able to see other media stuff stored on internal SD, only those on external SD, which is where my pictures music etc is stored.
Hello all. I am new to the forums and to Android, so bear with me.
I have been searching around for the past few days for a way to solve the issue that I am having and have not been able to find anything that works for me. So here it is:
I have an LG Optimus L5 II (LG-E450B) running stock Android 4.1.2 (non-rooted) Kernel Version 3.4.0. My carrier is Virgin Mobile (Canada). I recently realized that the stock 2GB of internal memory is not nearly enough for me, so I went out and bought a 16GB Sandisk microSD card. I put music on it, set photos to autosave on it, etc. which all worked great. However, I have been unable to get some apps to move over correctly.
I realize that some apps can't really get moved (at least without rooting, etc). The app I am specifically trying to work with is iBird pro. It's App Info appears as such:
Total: 641 MB
App: 12.68 MB
USB storage app: 628 MB
Data: 4.00 KB
SD Card: 0.00B
The "Move to SD Card" option is available, but when I do it all that it does is drop the App to 3.51MB and up the USB storage app to 637MB. All of which stays on the internal memory. Obviously it is only moving 9MB or so of App to the virtual SD internal memory (which I believe is what shows up in my files manager as /storage/sdcard0, so it doesn't actually move it to the SD card (though a few other apps have sucessfully been moved).
I have tried using App2SD, but it says that the program is not supported by my device (and the iBird Pro shows up as "Phone Only" anyway).
I have tried the ADB hack trick set-install-location 2 and reinstalled the app and still nothing, it just saved on the internal memory.
Finally, when I open the app, it also downloads another ~600MB of database data (bird songs, pictures, etc), which also saves on the internal memory. Or at least tries to but the memory gets full and it stops the download.
Anyone have any ideas for me? I know a lot of people ask this question, but none of the other solutions I came across seemed to help me. I would really appreciate it! I would prefer not to root my phone, by the way. Unless of course someone can make me an incredibly convincing argument.
Cheers!
This is how android's built-in app2sd works.
I don't think you can do anything w/o root.
I suggest rooting, make a second partition to your SD card (2-4 GB) and use link2sd.
Sent from my GT-I5500 [CM7.2]
There are oh so many reasons to root your phone and few not but that choice is yours
Sounds like only some of the data/libraries are able to me to SD on this app of yours so if you don't want to root it than you'll have to leave it on internal.
And FYI, many apps don't play well or are slowed considerably on SD, so be careful what you move and if you don't Yardley use an app its best to just not even download it, but again choice is yours
Sent from my Nexus 4 using Tapatalk 2
if you can't do root so sit back and relax.
Ok, so I decided to root. Which was actually freakishly easy. So how do I move stuff now? I have tried a number of apps, all of which only bring up "App Options" and we have determined that the "Move to SD" option there doesn't work correctly. I just want to figure out how to get the app and all of the data that it will download later to install on the SD, I never thought it would be quite this complicated.
Benjiboy180 said:
Ok, so I decided to root. Which was actually freakishly easy. So how do I move stuff now? I have tried a number of apps, all of which only bring up "App Options" and we have determined that the "Move to SD" option there doesn't work correctly. I just want to figure out how to get the app and all of the data that it will download later to install on the SD, I never thought it would be quite this complicated.
Click to expand...
Click to collapse
Use Link2SD.
Make a second partition (2-4 GB) and move (link) that app to the second partition.
Sent from my GT-I5500 [CM7.2]
Tried Link2Sd? I would rather use that.
Sent from my A89 using xda app-developers app
Ok, so I partitioned my 16GB card into two FAT32 partitions (10 GB and 4 GB) and a Swap Partition of ~850MB (roughly following this guide: http://forum.xda-developers.com/showthread.php?t=2126363). However, when I opened Link2SD and tried to select FAT32/FAT16 as the file system of the SD card's second partition it came up with the Mount Script Error "Mount script cannot be created. mount: I/O error". I had tried formatting with Ext4 and Ext2 file systems as well earlier, but when I selected either it said ext2 or ext4 (whichever I was trying to use) was not supported by my device (which I am assuming means my kernel does not support either).
Edit: Ok, so I changed it. I deleted the Swap partition (couldn't get the swap stuff to work anyway, it's not required right?). There is now 1 10GB partition and 1 5GB partition. Link2SD created the mount link just fine this time. Testing it out. "Install Location" gives a Warning "App2SD is not supported by your device. Because your device has a primary external storage which is emulated from the internal storage. You can link the app in order to move its files to your SD card." Does this mean that I can't automatically link files to the SD card?
Benjiboy180 said:
Ok, so I partitioned my 16GB card into two FAT32 partitions (10 GB and 4 GB) and a Swap Partition of ~850MB (roughly following this guide: http://forum.xda-developers.com/showthread.php?t=2126363). However, when I opened Link2SD and tried to select FAT32/FAT16 as the file system of the SD card's second partition it came up with the Mount Script Error "Mount script cannot be created. mount: I/O error". I had tried formatting with Ext4 and Ext2 file systems as well earlier, but when I selected either it said ext2 or ext4 (whichever I was trying to use) was not supported by my device (which I am assuming means my kernel does not support either).
Edit: Ok, so I changed it. I deleted the Swap partition (couldn't get the swap stuff to work anyway, it's not required right?). There is now 1 10GB partition and 1 5GB partition. Link2SD created the mount link just fine this time. Testing it out. "Install Location" gives a Warning "App2SD is not supported by your device. Because your device has a primary external storage which is emulated from the internal storage. You can link the app in order to move its files to your SD card." Does this mean that I can't automatically link files to the SD card?
Click to expand...
Click to collapse
Swap IS NOT needed.
Second partition should be ext 2/3/4.
Test to see if auto-link works.
Sent from my GT-I5500 [CM7.2]
Vagelis1608 said:
Swap IS NOT needed.
Second partition should be ext 2/3/4.
Test to see if auto-link works.
Sent from my GT-I5500 [CM7.2]
Click to expand...
Click to collapse
Good to know swap isn't needed. However, Link2SD did keep saying that Ext2 or Ext4 wasn't supported. I can try it again though.
Benjiboy180 said:
Good to know swap isn't needed. However, Link2SD did keep saying that Ext2 or Ext4 wasn't supported. I can try it again though.
Click to expand...
Click to collapse
Use Ext3. If it doesn't work use FAT. It can get buggy (not very often).
Also I think that if you can link apps 1 by 1, then you can (probably) use auto-link as well.
Sent from my GT-I5500 [CM7.2]
Vagelis1608 said:
Use Ext3. If it doesn't work use FAT. It can get buggy (not very often).
Also I think that if you can link apps 1 by 1, then you can (probably) use auto-link as well.
Sent from my GT-I5500 [CM7.2]
Click to expand...
Click to collapse
Ok, so Ext3 didn't work. So I stuck with the second partition being FAT32 as well. The mount worked fine.
When I try to create the link I get the following error: "Failure. create_link.com.whatbird.pro[1]: can't create /data/sdext2/data/com. whatbird.pro/lib/libfileutils.so: I/O error"
I was able to move the bulk of the apps Obb files to the SD using FolderMount. However, I am unsure how to move the 650MB Misc. data files to the SD.
Benjiboy180 said:
Ok, so Ext3 didn't work. So I stuck with the second partition being FAT32 as well. The mount worked fine.
When I try to create the link I get the following error: "Failure. create_link.com.whatbird.pro[1]: can't create /data/sdext2/data/com. whatbird.pro/lib/libfileutils.so: I/O error"
I was able to move the bulk of the apps Obb files to the SD using FolderMount. However, I am unsure how to move the 650MB Misc. data files to the SD.
Click to expand...
Click to collapse
Flash CWM recovery, in 'mounts and storage' press 'format SD-Ext'. This fixes the I/O error (I think).
If the misc files are libs then ALL of them can be moved/linked.
Sent from my GT-I5500 [CM7.2]
Vagelis1608 said:
Flash CWM recovery, in 'mounts and storage' press 'format SD-Ext'. This fixes the I/O error (I think).
If the misc files are libs then ALL of them can be moved/linked.
Sent from my GT-I5500 [CM7.2]
Click to expand...
Click to collapse
ROM Manager does not list the LG- E450B as a device supported by CWM Recovery so it won't to an install of CWM Recovery,
Benjiboy180 said:
ROM Manager does not list the LG- E450B as a device supported by CWM Recovery so it won't to an install of CWM Recovery,
Click to expand...
Click to collapse
Look for a custom build here on XDA.
Sent from my GT-I5500 [CM7.2]
I have a LG Optimus L3 II, and since it has less than 2 GB of total ROM, I have bought an external SD card. I have some experience with Linux desktop systems, but not really with Android. On a Linux desktop, if I lack disk space, I can mount /home to the device I want using /etc/fstab, so all my personal files are transparently saved to the specified device.
I have noticed that my user files on the LG Optimus are all saved to /storage/sdcard0. Also, that there is a symlink from /sdcard to /storage/sdcard0.
What I would like to accomplish is to transparently have all my personal files on /storage/external_SD, but I'm not sure if I can just change /sdcard to point to the new location, or if I would need to change mount points somewhere, etc. I have searched on Google about this, but found nothing clear, and it seems this may vary from device to device. Also, I haven't tried anything yet, because I don't really think I would be able to recover if anything goes bad.
Thanks for your attention!
teresaejunior said:
I have a LG Optimus L3 II, and since it has less than 2 GB of total ROM, I have bought an external SD card. I have some experience with Linux desktop systems, but not really with Android. On a Linux desktop, if I lack disk space, I can mount /home to the device I want using /etc/fstab, so all my personal files are transparently saved to the specified device.
I have noticed that my user files on the LG Optimus are all saved to /storage/sdcard0. Also, that there is a symlink from /sdcard to /storage/sdcard0.
What I would like to accomplish is to transparently have all my personal files on /storage/external_SD, but I'm not sure if I can just change /sdcard to point to the new location, or if I would need to change mount points somewhere, etc. I have searched on Google about this, but found nothing clear, and it seems this may vary from device to device. Also, I haven't tried anything yet, because I don't really think I would be able to recover if anything goes bad.
Thanks for your attention!
Click to expand...
Click to collapse
You can't just replace /sdcard to point to a new location, as Android is always expected to run from the internal storage, and this can cause mayhem. Now, the first question you should answer to yourself is what you mean when you say "personal files": if you just need to store songs, pictures, movies etc., you can store them on the external SD without any issues.
However, the main problem with Android in this aspect is the applications (apps and their data). The best thing would be if you could natively install them on the SD. But this is not always possible, since SD cards are usually formatted with non native Linux file systems (such as FAT) ,in order for them to be mounted on Windows, meaning that they lack the infrastructure to run apps from within (like file permissions or symlinks).
Solution here is the following: Format your SD card to be either all or partially of an ext3/4 file system type (so it can at least hold all apps and their data), then install the Link2SD app, which moves the application to this SD partition and creates all links from the internal drive to this partition. The paid version of this app (Link2SD+, which costs $1) allows you to link also the application data to the SD card (not only the app itself). I have used this solution on many low end devices I had in the past (like yours basically), and it solved this issue perfectly.
Digdis said:
You can't just replace /sdcard to point to a new location, as Android is always expected to run from the internal storage, and this can cause mayhem. Now, the first question you should answer to yourself is what you mean when you say "personal files": if you just need to store songs, pictures, movies etc., you can store them on the external SD without any issues.
However, the main problem with Android in this aspect is the applications (apps and their data). The best thing would be if you could natively install them on the SD. But this is not always possible, since SD cards are usually formatted with non native Linux file systems (such as FAT) ,in order for them to be mounted on Windows, meaning that they lack the infrastructure to run apps from within (like file permissions or symlinks).
Solution here is the following: Format your SD card to be either all or partially of an ext3/4 file system type (so it can at least hold all apps and their data), then install the Link2SD app, which moves the application to this SD partition and creates all links from the internal drive to this partition. The paid version of this app (Link2SD+, which costs $1) allows you to link also the application data to the SD card (not only the app itself). I have used this solution on many low end devices I had in the past (like yours basically), and it solved this issue perfectly.
Click to expand...
Click to collapse
Thanks for your answer, Digdis! What I'm really looking for is not to have applications installed on the external SD card, since 2GB is more than enough for applications for me. What I really want is to have stuff that generally goes to /storage/sdcard0 in /storage/external_SD, because this is where my personal files and settings goes to. For example, if I download something, no matter what size, or record videos, I would expect them all to go directly to the SD card. I know a few applications, not all, can be directly configured to use the external card, but it would be a rather unintelligent way, unless Google has decided to throw basic Linux design out of the window.
Also, what you are telling me is that applications will fail to run if Android/data/ is on an external SD card? Because if I just install applications on SD card, it won't really solve my problem, because I have few applications installed, but data on /storage/sdcard0 tends to grow a lot.
teresaejunior said:
Thanks for your answer, Digdis! What I'm really looking for is not to have applications installed on the external SD card, since 2GB is more than enough for applications for me. What I really want is to have stuff that generally goes to /storage/sdcard0 in /storage/external_SD, because this is where my personal files and settings goes to. For example, if I download something, no matter what size, or record videos, I would expect them all to go directly to the SD card. I know a few applications, not all, can be directly configured to use the external card, but it would be a rather unintelligent way, unless Google has decided to throw basic Linux design out of the window.
Also, what you are telling me is that applications will fail to run if Android/data/ is on an external SD card? Because if I just install applications on SD card, it won't really solve my problem, because I have few applications installed, but data on /storage/sdcard0 tends to grow a lot.
Click to expand...
Click to collapse
OK understood. First of all 2GB seems a bit low for both ROM and apps, but if you say it works for you...
Now, regarding automatic download of pics etc. to SD. You can try Xposed module Downloads2SD . Didn't try it, but you can give it a try.
You can actually do that by telling the system to mount them differently but LG handles that by initiation not fstab. I can try and help you.
Didn't explain it very well. Mount the External SD as sdcard0 and sdcard0 as External_sd so the phone will safe on sdcard0 which we just made the external_SD. There can be problems with pictures recognition or music stuff like that but it should work.
Thanks a lot, @Digdis, I'll keep everything you said for reference.
@christi9503 OK, please, let's try it!
teresaejunior said:
Thanks a lot, @Digdis, I'll keep everything you said for reference.
@christi9503 OK, please, let's try it!
Click to expand...
Click to collapse
Are you rooted with a custom recovery? We need root for this and also you need to give me some files.
christi9503 said:
Are you rooted with a custom recovery? We need root for this and also you need to give me some files.
Click to expand...
Click to collapse
Yes, it is rooted, but what do you mean with "a custom recovery"?
teresaejunior said:
Yes, it is rooted, but what do you mean with "a custom recovery"?
Click to expand...
Click to collapse
CloworkMod(CWM) or TWRP recovery. So you can flash flashable zip.
christi9503 said:
CloworkMod(CWM) or TWRP recovery. So you can flash flashable zip.
Click to expand...
Click to collapse
Are both supported on this device?
teresaejunior said:
Are both supported on this device?
Click to expand...
Click to collapse
Search around the forum a guy around ported all from what I know. Anyway install one of the recoveries to get ready.
What I want you to do now is this:
Check in storage path (with a root explorer) what folder you have like sdcard0, external_sd etc. Tell me all and what is the address (where it links)
EX: sdcard0 -> internal storage.
Also go in system/etc/ and copy me with a root explorer to sd card and then upload it on forums this file : init.qcom.post_boot.sh
christi9503 said:
Search around the forum a guy around ported all from what I know. Anyway install one of the recoveries to get ready.
What I want you to do now is this:
Check in storage path (with a root explorer) what folder you have like sdcard0, external_sd etc. Tell me all and what is the address (where it links)
EX: sdcard0 -> internal storage.
Also go in system/etc/ and copy me with a root explorer to sd card and then upload it on forums this file : init.qcom.post_boot.sh
Click to expand...
Click to collapse
Installing will probably take me some time, because Android is refusing to install anything now saying I don't have enough free space (although I have 199MB, but maybe it thinks is too little). The information you have requested I have already:
There is /sdcard/, which is just a symlink to /storage/sdcard0/.
/storage/sdcard0, which is the internal memory, is mounted like:
Code:
/dev/fuse /storage/sdcard0 fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
And there is also /storage/external_SD/, which is mounted like:
Code:
/dev/block/vold/179:33 /storage/external_SD vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0002,dmask=0002,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
init.qcom.post_boot.sh is attached.
teresaejunior said:
Installing will probably take me some time, because Android is refusing to install anything now saying I don't have enough free space (although I have 199MB, but maybe it thinks is too little). The information you have requested I have already:
Click to expand...
Click to collapse
This is why I urged you to start moving apps to the SD card. Android will refuse to install anything on your internal memory unless you have at least 10% free space.
teresaejunior said:
Installing will probably take me some time, because Android is refusing to install anything now saying I don't have enough free space (although I have 199MB, but maybe it thinks is too little). The information you have requested I have already:
There is /sdcard/, which is just a symlink to /storage/sdcard0/.
/storage/sdcard0, which is the internal memory, is mounted like:
Code:
/dev/fuse /storage/sdcard0 fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
And there is also /storage/external_SD/, which is mounted like:
Code:
/dev/block/vold/179:33 /storage/external_SD vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0002,dmask=0002,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
init.qcom.post_boot.sh is attached.
Click to expand...
Click to collapse
Well install recovery by adb with dd (in shell).
---------- Post added at 06:43 PM ---------- Previous post was at 06:31 PM ----------
@teresaejunior
Under /mnt (on the root I think) you will have some folder like sdcard, external_SD etc inside that folder. Tell me what folders are there and the one that gets you in internal and the one that gets you in external pls.
CWM is installed!
In /mnt there are:
Code:
asec
obb
sdcard -> /storage/sdcard0
secure
teresaejunior said:
CWM is installed!
In /mnt there are:
Code:
asec
obb
sdcard -> /storage/sdcard0
secure
Click to expand...
Click to collapse
Ok gonna give you a flashable zip in a second that will replace your post boot script. If it goes into bootloop we got a backup don't worry.
teresaejunior said:
CWM is installed!
In /mnt there are:
Code:
asec
obb
sdcard -> /storage/sdcard0
secure
Click to expand...
Click to collapse
Flash this and tell me if they are swapped. Through CWM.
View attachment SwapL32.zip
christi9503 said:
Flash this and tell me if they are swapped. Through CWM.
View attachment 3082829
Click to expand...
Click to collapse
I think it swapped, but now many applications are crashing or failing to open files. I copied all files from sdcard0 to external_SD and rebooted, but it still doesn't seem to help. Maybe I should have formatted the external SD to ext*?
teresaejunior said:
I think it swapped, but now many applications are crashing or failing to open files. I copied all files from sdcard0 to external_SD and rebooted, but it still doesn't seem to help. Maybe I should have formatted the external SD to ext*?
Click to expand...
Click to collapse
Nope you do not need to format it in order to work. Just make a clean install and use this swap. Maybe you copied them wrong. If the swap worked all is fine my friend.
christi9503 said:
Nope you do not need to format it in order to work. Just make a clean install and use this swap. Maybe you copied them wrong. If the swap worked all is fine my friend.
Click to expand...
Click to collapse
OK, thank you so much, now _this is_ going to take a good time!