[ROOT] Move obb folder to external SD (mount -o bind folder) - Galaxy Ace II General

Using on CM11, should work for any android build above 4.#.#
If you are having trouble mounting folders like I did like SuperMount, FolderMount didn't work for me
Even if they work, they require payment for most important features
Get BusyBox (Most custom ROMs already have it, like CM)
I used busybox mount because regular mount didn't work
Get the SManager app
Move the contents of obb folder to somewhere in external SD, (Or you can move the entire obb folder and create an empty obb folder in sdcard/Android)
Create new script from SManager (or any other text editor and save it with .sh extension) and type the mount command in it
Lets say I moved the folders inside obb to storage/sdcard1/obbfolders, then command is:
busybox mount -o bind /storage/sdcard1/obbfolders/ storage/sdcard0/Android/obb
Save the file (in SManager you press back after typing and it asks if you want to save)
Click on the file you created and check the Su and Boot boxes and Save
Script should be good to go, click Run
I use FX File Explorer to verify it (obbfolders should be shown on the main page)
Reason I created this thread, I searched this for a quite good amount of time and couldn't find anything
All "mount folder android", "mount bind android" searches either come up dead or show me an app that doesn't work for me

needo2 said:
Using on CM11, should work for any android build above 4.#.#
If you are having trouble mounting folders like I did like SuperMount, FolderMount didn't work for me
Even if they work, they require payment for most important features
Get BusyBox (Most custom ROMs already have it, like CM)
I used busybox mount because regular mount didn't work
Get the SManager app
Move the contents of obb folder to somewhere in external SD, (Or you can move the entire obb folder and create an empty obb folder in sdcard/Android)
Create new script from SManager (or any other text editor and save it with .sh extension) and type the mount command in it
Lets say I moved the folders inside obb to storage/sdcard1/obbfolders, then command is:
busybox mount -o bind /storage/sdcard1/obbfolders/ storage/sdcard0/Android/obb
Save the file (in SManager you press back after typing and it asks if you want to save)
Click on the file you created and check the Su and Boot boxes and Save
Script should be good to go, click Run
I use FX File Explorer to verify it (obbfolders should be shown on the main page)
Reason I created this thread, I searched this for a quite good amount of time and couldn't find anything
All "mount folder android", "mount bind android" searches either come up dead or show me an app that doesn't work for me
Click to expand...
Click to collapse
Trying to follow your guide....can't get it to work ?
1: Moved the entire OBB folder to my SD
2: Installed busybox, started it, software says it is installed, there's a button to install again....don't know what else it does ? If I click install, well, it installs again
3: Created the new script, saved it, ran it. It seems OK
4: When I open FX File explorer, I don't know what I'm looking for, I don't see anything going on, no operations running ?
...I didn't want to delete the original OBB directory since I don't have confirmation of this working ?
Thanks for your help

almost there...
Hi there
Had the same problem and found your thread after quite some surfing. Following your instructions, all seemed to work fine, just had to inject an "su" before the busybox mount command, then the whole external_sd (/storage/sdcard1/) was mounted to an existing (empty) folder on the internal sd (/storage/emulated/legacy/External_SD)... at least that's how it looks in SManager. When checking the target folder via file explorer, it still looks empty.
My setup:
- Samsung S4 mini on Cyanogenmod 10.2
- phone is not fully rooted, but root is granted to SManager and Busybox
- external sd card has permissions "d---rwxr-x" and is owned by "system" whereas the internal storage has permissions "drwxrwxr-x" and is owned by "root"
do I face a permission issue?
If yes, how to solve that (tried to change permissions of the External_SD folder recursively using chmod -R under root... but didn't suceed)
If not, any ideas...???
Thanks for any hint!
cheers

I'm using Lucky Patcher to bind oob folder, you should try.

@needo2: Is it required to mount the folder? This could cause problems on rejecting sd card. Maybe it does work replaceing the source directory with a simple link ("ln -s") to sd?

Related

How to install apps DIRECTLY to SD card without putting them in phone memory

I know that there are several threads explaing how to move you apps from phone memory to SD card but this is not what I need.
I want to know if there is a way of installing an application directly to my SD card. I want to install an application that is bigger than my hole phone memory so I can't put it first on phone and move it afterwards.
I have a HTC Hero with 2.1 on it, with root and superuser.
Until now I user Link2SD ( something similar with apps to SD) but it can't be user now.
//sry if there is another thread explaining how to do this but I couldn't find it.
If you know the directory on the sdcard to install the app into its easy with ADB.
example for mine with sd-ext partition for extra programs
adb remount
adb push stuff.apk /sd-ext/app
replace "stuff.apk" with the actual file obviously.
and it should auto install
In the Link2SD forum http://forum.xda-developers.com/showthread.php?t=919326
It seems to use /data/sdext2 instead of /sd-ext/app
hope that helps
But I think it still uses a place in the memory (same as installing in the memory then moving it to the SD card)!!
Just an idea...
I have not tried this, but how about,
1) Create a large folder on the sd card big enough to hold all existing apps and your new app.
2) Copy all app files from installation folder in phone memory to sd folder.
3) Rename phone folder (just so it is not found)
4) Create symlink for this folder to sd folder.
5) Install your app.
6) Move new app to SD.
7) Copy any residual files from the installation into the original folder (I don't believe that any apps install 100% on SD).
8) Delete symlink,
9) Rename phone folder back to original name.
Obviously, renaming and symlinking will have to be done using ADB in recovery mode, and may need an ext partition.
Messy, maybe dangerous, and may not even work.
How badly do you want to install this big app?
Just came across this thread while looking for the same solution, and thought I'd share what I came up with what I did:
Code:
adb shell pm setInstallLocation 3
adb install -e Package.apk
adb shell pm setInstallLocation 0
The "pm" commands change the default installation target to SD-Ext. I'm not sure they're needed.
The -e switch to "adb install" isn't in the adb docs, but when I ran "pm" on my device directly, that's the switch to use with pm install to install to SD-Ext. I assume adb is just passing the switches to "adb install" through to "pm install".
This was done on a HTC Dream running "Froyo by Laszlo", a CyanogenMod Froyo build with Native App2EXT [Magpie], so your mileage may vary.

Google Music Offline storage location

Can anyone tell me where the music is stored on my device whenever I select a file to be available offline in Google Music?
Sent from my SAMSUNG-SGH-I997 using XDA App
Good question. I searched my internal and external SD, but didn't see it...
In for answer
/sdcard/external_sd/Android/data/com.google.android.music/cache/music/
So I'm assuming that sd_card/external_sd/ is my 2gb external card. Is that correct? If so I wonder why it saves to the external sd. I haven't bought a bigger card yet. I can't find a way to change where the files are saved.
Sent from my SAMSUNG-SGH-I997 using XDA App
Kmo78 said:
So I'm assuming that sd_card/external_sd/ is my 2gb external card. Is that correct? If so I wonder why it saves to the external sd. I haven't bought a bigger card yet. I can't find a way to change where the files are saved.
Sent from my SAMSUNG-SGH-I997 using XDA App
Click to expand...
Click to collapse
Doesn't look like there is a way to change the cache location. Time to get a bigger SD card!
I decided to do a little experimenting with this. I removed my sd card and when I turned my phone on google music began downloading the 15 songs I had selected to be available offline. I went to the /sdcard/external_sd/ directory and the files were there without an external card installed. So is this path just a shortcut to the external card? It's kinda weird. I'd prefer to have the songs saved to the phone. Hopefully google will give us an option in an updated version of the application.
Sent from my SAMSUNG-SGH-I997 using XDA App
I was kind of surprised by this thread as I have the opposite problem, my music is synced to sdcard/data, instead of external_SD where I want it.
Guessing since you posted this you don't know how you got it synced to external?
Mixy said:
I was kind of surprised by this thread as I have the opposite problem, my music is synced to sdcard/data, instead of external_SD where I want it.
Guessing since you posted this you don't know how you got it synced to external?
Click to expand...
Click to collapse
Same thing here!
I'm having the same problem here on my transformer. Maybe someone wants to look at what I've been trying so far and join in solving this: http://forum.xda-developers.com/showthread.php?t=1476972
Fix (no sdcard formatting needed)
This is a fix i figured out piecing together other peoples attempts.
Use this as a script
mount -o bind sdcard2/android/data/com.​google.android.music sdcard/android/data/com.​google.android.music
Alternately you can change the first location to the location of your choosing as long as it resides on the external as card.
Ex.
Mount - o bind sdcard2/music sdcard/Android/data/com.​google.Android.music
will bind:
sdcard/Android/data/com.​google.Android.music (google's forced save location)
to
sdcard2/music
Go to google music (play music now) settings and clear any music that is currently saved to your device.
this only applies to music made available offline. If you do not clear it before running the script the music will exist on your internal sdcard but not be accessible.
open script manager and find the script you made
Select it and make sure to click set on boot and superuser
Run Your script.
That is it now your default save location for google music is bound to the location on the external sdcard. the device will see the location as its default but really be saving to the external sdcard.
You can check this by going to google music. Selecting "make available offline" and look at the free space. It should shoe the space available on your external sdcard.
TLR Version (noob version)
I was getting a lot of questions about the preliminary steps here (i.e. rooting, writing script, etc) so i decided to attach the noob version in case anyone needs verification on how to accomplish these steps.
HOW DO I ROOT?
So, Rooting gives you full access and control over your phone. instructions for how to root are device specific. so i would start by searching XDA for "YOUR DEVICE one click root"
ex. samsung galaxy s2 one one click root
some devices are easier to root than others. i cannot provide steps for your particular device, but through XDA, and google you CAN find everything you need.
some devices have one click root tools, some do not, so the rooting process is more in depth for those devices.
rooting instructions are so device specific i could not find a generic set of instructions, and don't want to mislead anyone by linking them to a set of instructions not ​compatible with their device.
There is a risk of bricking your device (making it inoperable) while rooting, although the risk is minimal... almost non existent if you carefully follow instructions. I have rooted 5 seperate devices without bricking any, and, in most cases even if bricked the device can still be restored.
there are additional benefits to rooting, such as overclocking
for example my Galaxy S2 normally runs at 1.5 GHZ, i have increased the speed to 1.8GHZ
(NOTE** Without XDA DEVELOPERS i would have rooted 0 devices, and probably bricked at least one, so thank you to all of you out there who have helped me, I hope this method will help some of you in return.)
NOW THAT YOU ARE ROOTED...
INSTALL SCRIPT MANAGER..
First, to install script manager just go to google market (Play Store) and search for script manager
INSTALL ES FILE EXPLORER..
To make a script go to google market (Play Store) and find ES File Explorer
WRITE SCRIPT..
Open es file explorer when install completes.
in es file explorer click the menu button, and select "new"
when prompted select "File"
name your file something you'll remember
Ex.MusicScript
Click your new file
when prompted select "Text"
type this EXACTLY how you see it
Mount - o bind sdcard2/music sdcard/Android/data/com.​​google.Android.music
press back and when prompted to save click yes
MAKE DESTINATION FOLDER..
now on es file explorer click "Favorites" (the star)
a new menu will pop up, at the top you willsee a picture of a phone with "/" underneath it click the phone
this will take you to the root directory
click the folder Sdcard2
click the menu button, and select "new"
when prompted select "Folder"
Name the folder music
Your script and destination music location are created
EXECUTE SCRIPT..
now open script manager
find your script which should be located in the directory /mnt/sdcard and the file name you chose earlier
select the script
open as script/executable
make sure script is selected not executable
click the buttons for "Su" and "Boot"
click save
Go to google music (play music now) settings and clear any music that is currently saved to your device.
this only applies to music made available offline. If you do not clear it before running the script the music will exist on your internal Sdcard but not be accessible.
now reboot the script will run at boot a prompt will appear asking for superuser rights, click yes and remember this selection (it may say something different than remember this selection whichever option resembles remember needs to be selected.)
YOU'RE DONE!!!
your music should now save to sdcard2/music but the device will still think it is saving to the default sdcard/Android/data/​com.​google.Android.music
You can check this by going to google music. Selecting "make available offline" and look at the free space. It should shoe the space available on your external sdcard.
So try your hardest to figure out how to root using google, and if your not confident enough to attempt it this fix may not be for you.
if you have tried everything you can and are still stuck message me back, including what device you have, and i will see if i can find a link to the rooting instructions for your particular device.
I assume no responsibility if you damage your device... These steps do work, and if followed will fix your music issues as well as introducing you to a world of additional benefits of being a rooted user.
FuzzyMeep Two said:
This is a fix i figured out piecing together other peoples attempts.
Use this as a script
mount -o bind sdcard2/android/data/com.​google.android.music sdcard/android/data/com.​google.android.music
Alternately you can change the first location to the location of your choosing as long as it resides on the external as card.
Ex.
Mount - o bind sdcard2/music sdcard/Android/data/com.​google.Android.music
will bind:
sdcard/Android/data/com.​google.Android.music (google's forced save location)
to
sdcard2/music
Go to google music (play music now) settings and clear any music that is currently saved to your device.
this only applies to music made available offline. If you do not clear it before running the script the music will exist on your internal sdcard but not be accessible.
open script manager and find the script you made
Select it and make sure to click set on boot and superuser
Run Your script.
That is it now your default save location for google music is bound to the location on the external sdcard. the device will see the location as its default but really be saving to the external sdcard.
You can check this by going to google music. Selecting "make available offline" and look at the free space. It should shoe the space available on your external sdcard.
YOU'RE DONE!!!
your music should now save to sdcard2/music but the device will still think it is saving to the default sdcard/Android/data/​com.​google.Android.music
You can check this by going to google music. Selecting "make available offline" and look at the free space. It should shoe the space available on your external sdcard.
So try your hardest to figure out how to root using google, and if your not confident enough to attempt it this fix may not be for you.
if you have tried everything you can and are still stuck message me back, including what device you have, and i will see if i can find a link to the rooting instructions for your particular device.
I assume no responsibility if you damage your device... These steps do work, and if followed will fix your music issues as well as introducing you to a world of additional benefits of being a rooted user.
Click to expand...
Click to collapse
This method doesn't work on my Evo 4G LTE. Still shows the internal SD available space on "Make available offline" Does it matter if I'm using a 64GB card?
@GMtom1 are you sure that you got whatever your sd card is labed as right? I haven't tried this method yet, but that seems to be the biggest point of failure for us evo lte users that are bringing our cards from other devices
******
gmtom1 said:
This method doesn't work on my Evo 4G LTE. Still shows the internal SD available space on "Make available offline" Does it matter if I'm using a 64GB card?
Click to expand...
Click to collapse
I have been having problems too... After i re-flashed my device, it has not been just working the way it did before, the script wouldn't work, so i believe that me installing Busybox or BASH, or something like that well before i made the script, was allowing the script to work properly. But, in the mean time, find "Directory Bind" it works perfectly...
p.s make sure you clear any music of of your internal sdcard, or it will still exist, but be inaccessible.
gmtom1 said:
This method doesn't work on my Evo 4G LTE. Still shows the internal SD available space on "Make available offline" Does it matter if I'm using a 64GB card?
Click to expand...
Click to collapse
Same..I tried it, made sure busybox was installed and still didn't work on my Evo 4G LTE
Anyone gotten to work on (Verizon) Galaxy S3?
I just tried to do this via your method and using the DirectoryBind utility, and both versions don't seem to like the path of my external SD Card (extSdCard).
Screenshots attached.
My script was:
Code:
mount -o bind extSdCard/music sdcard/Android/data/com.data.google.android.music
also tried with
Code:
mount -o bind /mnt/extSdCard/music sdcard/Android/data/com.data.google.android.music
FWIW the directory extSdCard exists
sti3 said:
I just tried to do this via your method and using the DirectoryBind utility, and both versions don't seem to like the path of my external SD Card (extSdCard).
Screenshots attached.
My script was:
Code:
mount -o bind extSdCard/music sdcard/Android/data/com.data.google.android.music
also tried with
Code:
mount -o bind /mnt/extSdCard/music sdcard/Android/data/com.data.google.android.music
FWIW the directory extSdCard exists
Click to expand...
Click to collapse
was getting the same errors as you are until I added the mnt/ in both paths.
mount -o bind mnt/sdcard/external_sd/gmusic mnt/sdcard/Android/data/com.google.Android.muisic
and I am good to go, 30GB of storage just waiting to be filled with music.
esox23 said:
was getting the same errors as you are until I added the mnt/ in both paths.
mount -o bind mnt/sdcard/external_sd/gmusic mnt/sdcard/Android/data/com.google.Android.muisic
and I am good to go, 30GB of storage just waiting to be filled with music.
Click to expand...
Click to collapse
I apologize for the gravedig, but I've been struggling significantly getting this to work on my Galaxy S3.
As a previous poster above said, because my external SD card is mounted at /mnt/extSdCard there are problems.
My command is:
Code:
mount -o bind /mnt/extSdCard/MusicCache /mnt/sdcard/Android/data/com.google.android.music
and it doesn't work at all...
Any idea why?

[Q] Super Mount app Question - how to?

Hello there, sorry for this noob question, but I am really eager to let my external SD card to work. I have checked out some of the methods like directory bind etc., although some of them do not work and even complicated for a noob like me; I saw this app called Super Mount in google play and also it was previously suggested as what i have read in the forum here in XDA regarding how to run your apps or games in your ext SD so you can save your phones' (in case my mine its tablet) internal memory, did some research, and so I have tried what I could but I cannot seem to make it work... here is the path that I have been using in the Super Mount....(the one listed below that is the example path in google play)
source path : /storage/extSdCard/Android/obb/jp.co.sega.vtc (my tablet)
mount path : /storage/emulated/0/Android/obb/jp.co.sega.vtc
vs.
source path : /storage/extSdCard/DioDict3B (the example on the supermounts screen shot in google play)
mount path : /storage/sdcard0/DioDict3B
So I was kind of trying to copy how the directory should be...and by the directory that I did, whenever I launch my game its not working....its virtua tennis by the way.....and it says i need to download the extrafile over the wifi connection, though it works fine if I install it in my internal SD and put the SD data in the OBB folder. So, I am assuming it has something to do with the mounting. I have successfuly installed Lidroid File Manager and its plug-in the Super Mount, I can mount and unmount successfuly via the plug-in, only that I cannot seem to make it work.
By the way, I have Folder Mount installed and I'm using it for some big games in the tablet. Would that affect the directory or something if I have it installed? I just noticed there's an "emulated" in the directory, would that do anything to make the lidroid not to work? I did not uninstalled it since I have games which I have already mounted via the Folder Mount and it might mess things up more, so just want to consult few experts here in the forum first. Thanks and more power
Galaxy Note 8 N5100 user.
h4ckneyed said:
Hello there, sorry for this noob question, but I am really eager to let my external SD card to work. I have checked out some of the methods like directory bind etc., although some of them do not work and even complicated for a noob like me; I saw this app called Super Mount in google play and also it was previously suggested as what i have read in the forum here in XDA regarding how to run your apps or games in your ext SD so you can save your phones' (in case my mine its tablet) internal memory, did some research, and so I have tried what I could but I cannot seem to make it work... here is the path that I have been using in the Super Mount....(the one listed below that is the example path in google play)
source path : /storage/extSdCard/Android/obb/jp.co.sega.vtc (my tablet)
mount path : /storage/emulated/0/Android/obb/jp.co.sega.vtc
vs.
source path : /storage/extSdCard/DioDict3B (the example on the supermounts screen shot in google play)
mount path : /storage/sdcard0/DioDict3B
So I was kind of trying to copy how the directory should be...and by the directory that I did, whenever I launch my game its not working....its virtua tennis by the way.....and it says i need to download the extrafile over the wifi connection, though it works fine if I install it in my internal SD and put the SD data in the OBB folder. So, I am assuming it has something to do with the mounting. I have successfuly installed Lidroid File Manager and its plug-in the Super Mount, I can mount and unmount successfuly via the plug-in, only that I cannot seem to make it work.
By the way, I have Folder Mount installed and I'm using it for some big games in the tablet. Would that affect the directory or something if I have it installed? I just noticed there's an "emulated" in the directory, would that do anything to make the lidroid not to work? I did not uninstalled it since I have games which I have already mounted via the Folder Mount and it might mess things up more, so just want to consult few experts here in the forum first. Thanks and more power
Galaxy Note 8 N5100 user.
Click to expand...
Click to collapse
I cant find this app anymore.

Android file heirarcy questions?

I have attempted to search this but always come up a little short. I trying to understand the filing system Android uses. I have a Moto G (2015) running Marshmallow with an 16 gig external memory card set to portable.
I use ES Explorer to view the filing structure. Using the tree I select the "/ device" option. I see several folders and files. One is "sdcard". I understand this is not the memory card, but seems exactly like the "storage emulated 0" folder listed in the tree's "0" option. It does not however appear to be the same folder as listed in the "/device/storage/emulated" folder. What' up with that?
I also think the external memory card is located in "Device/storage" Is that true?
I am really having a time wrapping my head around this. Thanks for any help.
To get the actual locations of the mount points just run the command "mount" in a terminal or ADB shell. In many places there are just symlinks to the actual mount points, which looks like the SD card does exist in different places. E.g. /sdcard is typcially only a link to the mount point of the SD card.
If you run the command "ls -l" in a directory you can see where such a symlink is actually pointing to.
I don't have access to my Moto G3 right now. Writing this on another device running CM.
Here the sdcard is natively mounted at /mnt/media_rw/sdcard1 and then again virtually with a fuse layer at /storage/sdcard1. Everything else are just symlinks. I would assume that on a Moto G3 running CM it's the same. On stock rom probably a bit different.
Anyway with the commands mentioned above you can easily check this.
Maybe this will help.
http://android.stackexchange.com/qu...d-by-the-many-locations-of-the-virtual-sdcard
u42671 said:
To get the actual locations of the mount points just run the command "mount" in a terminal or ADB shell. In many places there are just symlinks to the actual mount points, which looks like the SD card does exist in different places. E.g. /sdcard is typcially only a link to the mount point of the SD card.
If you run the command "ls -l" in a directory you can see where such a symlink is actually pointing to.
I don't have access to my Moto G3 right now. Writing this on another device running CM.
Here the sdcard is natively mounted at /mnt/media_rw/sdcard1 and then again virtually with a fuse layer at /storage/sdcard1. Everything else are just symlinks. I would assume that on a Moto G3 running CM it's the same. On stock rom probably a bit different.
Anyway with the commands mentioned above you can easily check this.
Click to expand...
Click to collapse
Thanks but your answer is a little above my paygrade. I was mainly wanting to check if an app had stored data on an internal storage and minor stuff like that.
riggerman0421 said:
Maybe this will help.
http://android.stackexchange.com/qu...d-by-the-many-locations-of-the-virtual-sdcard
Click to expand...
Click to collapse
Thanks.
That does help a little bit.
With ES explorer:
When I open "Device /", I see a lot of folders and such.
When I open "Device / storage", I see three folders, One seems to the external memory card, emulated, and self.
When I open "device / storage / emulated", it is empty.
From the ES explorer tree if I select the 0 option, it appears to open "Device/ storage / emulated / 0", that includes what appears to be a bunch of folders.
In the first scenerio, the emulated folder is empty.
In the second scenario, the emulated folder has at least folder folder (0).
Why is that?
Also when I select the 0 from the ES explore option, then, back up one level to "emulated" the folder appears to empty.
Why is that?
Thanks again.

Writing to File on External SDCard

I'm trying to write to a file on the external SDcard with an app, but it remains with permissions of 771. (execute only for Others) In Termianl I su and chmod 777 file, but it remains at 771.
This seems to mean the OS is preventing this file from being world writeable. Each app is run by a different user so I can't know which user will try to write at a given time. As root I can 'touch' new files all day, but I can't set them world-writeable.
What is preventing me from doing this?
Quantumstate said:
I'm trying to write to a file on the external SDcard with an app, but it remains with permissions of 771. (execute only for Others) In Termianl I su and chmod 777 file, but it remains at 771.
This seems to mean the OS is preventing this file from being world writeable. Each app is run by a different user so I can't know which user will try to write at a given time. As root I can 'touch' new files all day, but I can't set them world-writeable.
What is preventing me from doing this?
Click to expand...
Click to collapse
Umm... your external SD card is FAT32, it doesn't support Linux file attributes and permissions.
That's well and good, but look at it with the file manager.
And why can't I write into files on the external when I can on the internal?
Quantumstate said:
That's well and good, but look at it with the file manager.
And why can't I write into files on the external when I can on the internal?
Click to expand...
Click to collapse
Your app needs to have permission to use the ext storage... I have no problems with ES File Explorer, just has to select the SD card and the first time it prompts you to select the root and go. Then it's good, apps need to be built to be compatible with Marshmallow, how it addresses the SD card is different than previous Android versions.

Categories

Resources