I have looked all over for this, and I am not sure what files need to be modified. Right now I have Tasker doing a mount but I would like to do it on boot.
I read that it has something to do with init.d and some other jazz, but what? its simple of what I want to do,. i have a "mount -o bind /storage/sdcard1 /storage/sdcard0/external_sd" I am running CM10 right now, and for some reason it mounts everything to /storage/sdcard0 and sdcard1 a
i also want to rig it so my Rdio , and Spotify are mounted also with another line.
any help would be appericated.
thank you
My situation: Galaxy S3 with latest (26 Oct. 2012) update to 4.1.1 via Kies. Then rooted. Works smoothly. External Sd-card visible, no problem.
Then:
repartitioned SD-card with gparted in Fedora machine: mmcblk1p1 with old contents, mmcblk1p2 for new contents, both vfat. Filled mmcblk1p2 with contents from linux machine.
In the phone the first partition (the one with the old data) is recognised as before. The second partition is not seen.
By using the terminal emulator as super user I can mount the second partition by the command:
mount -rw -t vfat /dev/block/mmcblk1p2 <mountpoint>
<mountpoint> is a directory VISIBLE to File Explorer.
After mounting, however, the directory contents are NOT visible in File explorer (even after stopping and restarting File explorer) but can be listed perfectly in the terminal emulator. Giving the cp-command for copying of an individual (MP3) file from the <mountpoint> to the folder Music shows the copied file in that folder and the music can be played in the usual way through the GUI.
Question:
Does anybody have an idea how to make the mounted 2nd partition visible to the apps so that the files can be accessed though the GUI?
Thanks for thinking about this problem.
Bananiel-1944
Found the solution by some more thinking after all:
mount -rw -t vfat -o umask=0000 /dev/block/mmcblk1p2 <mountpoint>
The -o umask=0000 is essential, otherwise the permissions are rwx------; with the umask option they are rwxrwxrwx and thus can be reached.
For safety sake, mount when needed and umount promptly afterwards.
Bananiel-1944
Bananiel-1944 said:
My situation: Galaxy S3 with latest (26 Oct. 2012) update to 4.1.1 via Kies. Then rooted. Works smoothly. External Sd-card visible, no problem.
Then:
repartitioned SD-card with gparted in Fedora machine: mmcblk1p1 with old contents, mmcblk1p2 for new contents, both vfat. Filled mmcblk1p2 with contents from linux machine.
In the phone the first partition (the one with the old data) is recognised as before. The second partition is not seen.
By using the terminal emulator as super user I can mount the second partition by the command:
mount -rw -t vfat /dev/block/mmcblk1p2 <mountpoint>
<mountpoint> is a directory VISIBLE to File Explorer.
After mounting, however, the directory contents are NOT visible in File explorer (even after stopping and restarting File explorer) but can be listed perfectly in the terminal emulator. Giving the cp-command for copying of an individual (MP3) file from the <mountpoint> to the folder Music shows the copied file in that folder and the music can be played in the usual way through the GUI.
Question:
Does anybody have an idea how to make the mounted 2nd partition visible to the apps so that the files can be accessed though the GUI?
Thanks for thinking about this problem.
Bananiel-1944
Click to expand...
Click to collapse
Dear Bananiel,
your post was closest to the solution of my problem, maybe you could suggest something that will finally help me.
I've partitioned external SDcard with CWM to be used for Link2SD. Link2SD's script works fine and the EXT2 partition mounts well. The problem is with the FAT32 partition which can't be mounted by android (I get "SD card empty of file system damaged" in the notification area). When I go in CWM recovery mode I can mount that partition by choosing "mount USB storage" option and then I can see it on my PC. Partition is healthy and PC has no problems with it.
I've tried issuing commands you've suggested in your post through ADB SHELL, after that when I go to folder that I've designated as mount point I can see files from non-working partitio, but the message in notification area still persist. Also the change is not permanent, after reboot I have to do that again.
Thanks in advance for any help given.
Bananiel-1944 said:
Found the solution by some more thinking after all:
mount -rw -t vfat -o umask=0000 /dev/block/mmcblk1p2 <mountpoint>
The -o umask=0000 is essential, otherwise the permissions are rwx------; with the umask option they are rwxrwxrwx and thus can be reached.
For safety sake, mount when needed and umount promptly afterwards.
Bananiel-1944
Click to expand...
Click to collapse
dxage said:
Dear Bananiel,
your post was closest to the solution of my problem, maybe you could suggest something that will finally help me.
I've partitioned external SDcard with CWM to be used for Link2SD. Link2SD's script works fine and the EXT2 partition mounts well. The problem is with the FAT32 partition which can't be mounted by android (I get "SD card empty of file system damaged" in the notification area). When I go in CWM recovery mode I can mount that partition by choosing "mount USB storage" option and then I can see it on my PC. Partition is healthy and PC has no problems with it.
I've tried issuing commands you've suggested in your post through ADB SHELL, after that when I go to folder that I've designated as mount point I can see files from non-working partitio, but the message in notification area still persist. Also the change is not permanent, after reboot I have to do that again.
Thanks in advance for any help given.
Click to expand...
Click to collapse
In my situation (SD-card with two partitions, both vfat) the first partition automatically was mounted at start-up, the second needed to be mounted manually whenever I wanted to access it. This was also my intention as that second partition contains sensitive information.
Android has a file fstab.<system-id> in the root directory, in which some mounts are mentioned (but not all).
You could try to edit this file with the permanent mounts you are looking for. I'm not sure if that works, however, as I do not want a permanent mount.
Can you publish your results, please?
Bananiel
Finally!
I managed to get my external partitions visible with the help of this post.
Device: Samsung Galaxy Tab2 10.1
ROM: Candy5_p5110 Android 5.1.1
SDExternal: 2 Partitions; 1st VFAT, 2nd Ext3
Using Mount2Sd from Google Playstore.
I had the same mounting issues. SD external would only mount Partition 1 automatically and manually mounting Partition 2 would only be visible via Terminal.
The solution that finally fixed the invisible 2nd Partition was to reformat the 2nd Partition with Ext3 and allowing Mount2Sd to find it and mount to /sd-ext. Formatting to vfat or ext4 did not work. Only Ext3 did the trick.
I hope this helps others and big thanks to the OP for bringing this issue up.
Hi, this is a tutorial that explain how to change the internal sd with the external.
It is an idea of danitab78, i decided to create this to shy away from talking in other threads.
I think it solves the main problem of our device that has only 2,3 gb as internal sd.
It works on this script:
ICS:
mount -o remount,rw /
mount -t vfat -o umask=0000 /dev/block/vold/179:61 /mnt/sdcard
mount -o bind /data/media /mnt/sdcard/external_sd
chmod 777 /mnt/sdcard/external_sd
The only thing to do is create a "external_sd" folder in external_sd
At first, you must have a file managar that works on rooted phones like "Root Explorer" and also "Script Manager - SManager" so you can bring the attached file into your phone, i suggest you to paste it in system/etc. Now rename your .txt in .sh.
Open Script Manager with root permissions and find the .sh, tap on it, and if is asked how to open it, choos script/executable. In the next windows tap on "su", "boot","save" and finally "run".
If it doesnt give you any error it has worked!
Congratulations
All rights reserved to Danitab78
JELLYBEAN:
I copied kumas post, so thanks to him here and here
ROOT IS REQUIRED and Jelly Bean
I made/copied (lol) this script by combining Artas182x and Mateo1111 scripts
this is how you would save it as script (.sh file)
Code:
#!/system/bin/sh
SU
busybox mount -o remount,rw /
busybox mount -t vfat -o umask=0000 /dev/block/vold/179:61 /mnt/sdcard
if busybox mount | busybox grep vold/179:61; then
busybox mount -o bind /data/media /storage/external_SD
busybox rm /storage/external_SD/external_sd
busybox chmod -R 777 /storage/external_SD
fi
Or just download the attachment and unzip to your sdcard and run with smanger or similar app (and set to boot at startup if you want)
Note:
1.When using the camera and video recorder, change settings storage to internal memory (if you don't, you will have to reboot the phone to see your pic/vid you just took)
2.This script will allow you to install large size games (ex. Asphalt 7) but you will still need link2sd (to move apps to your external_SD)
Now if you use the link2sd app, select the "create symbolic link"
lol one more thing, you will need to partition your sdcard to use link2sd.
3.If y'all have busybox installed properly this script should work fine. In addition, this script is all set for init.d (but i have problems using this method). You will get an error for SU, because it's set for init.d. However, the script still works fine through a terminal.
Warning, using Android Tuner app can mess up your L9 and I'm not responsible if you do!
Or if you don't want to use link2sd and partition your Sdcard, you can use Android Tuner However, this app is really advance and you should make a CWM backup (thanks to Artas182x) before messing with this app. It has a lot of options and you could mess the phone up.
I did it for a better english, i hope
Will it take the apps into it!?
Sent from my LG-P765 using xda premium
hkfree said:
Will it take the apps into it!?
Sent from my LG-P765 using xda premium
Click to expand...
Click to collapse
I did it and i installed NFS Most Wanted and Asphalt 7, so definetly yes
it works, my internal now states 16gb
but i still don`t understand " The only thing to do is create a "external_sd" folder in external_sd"
does it means i have make folder external_sd after all the process?
in process so should be like this
1. install script manager
2. load script
3. check internal sd now should be as big as our mmc
4. create a "external_sd" folder in external_sd
does it right?
Normally, in /mnt/sdcard there is a folder named "external_sd" that is your microsd card, you have to create a folder named "external_sd" in it.
It doesnt matter if you create it before or after the script, i did it after and it worked but i think it would have worked in any case
Perfect it worked!!!
Sent from my LG-P760 using xda app-developers app
it really is move data of the application..
but if you take a look on "/data/app/" the installed apps is still there and the "/sdcard/app" is empty
it seems move everything including data of application (OBB files), and default location of application like whatsapp media now is in the "/sdcard/whatsapp"
is that normal or there would be any possible way to move "/data/app" to such as "/sdcard/app" ??
Roker1 said:
Hi, this is a tutorial that explain how to change the internal sd with the external.
It is an idea of danitba87, i decided to create this to shy away from talking in other threads.
I think it solves the main problem of our device that has only 2,3 gb as internal sd.
It works on this script:
mount -o remount,rw /
mount -t vfat -o umask=0000 /dev/block/vold/179:61 /mnt/sdcard
mount -o bind /data/media /mnt/sdcard/external_sd
chmod 777 /mnt/sdcard/external_sd
The only thing to do is create a "external_sd" folder in external_sd
At first, you must have a file managar that works on rooted phones like "Root Explorer" and also "Script Manager - SManager" so you can bring the attached file into your phone, i suggest you to paste it in sys/etc. Now rename your .txt in .sh.
Open Script Manager with root permissions and find the .sh, tap on it, and if is asked how to open it, choos script/executable. In the next windows tap on "su", "boot","save" and finally "run".
If it doesnt give you any error it has worked!
Congratulations
All rights reserved to Danitba87
I did it for a better english, i hope
Click to expand...
Click to collapse
Does this work without rooting your phone?
Sorry for being a noob here...just switched to android and got this phone... :silly:
sunnydsouza said:
Does this work without rooting your phone?
Sorry for being a noob here...just switched to android and got this phone... :silly:
Click to expand...
Click to collapse
nope, you must have access to /system by rooting ur phone
itoit said:
it really is move data of the application..
but if you take a look on "/data/app/" the installed apps is still there and the "/sdcard/app" is empty
it seems move everything including data of application (OBB files), and default location of application like whatsapp media now is in the "/sdcard/whatsapp"
is that normal or there would be any possible way to move "/data/app" to such as "/sdcard/app" ??
Click to expand...
Click to collapse
the script work only for swith internal sd card whit external.
No need move apk in sdcard
Roker1 said:
At first, you must have a file managar that works on rooted phones like "Root Explorer" and also "Script Manager - SManager" so you can bring the attached file into your phone, i suggest you to paste it in sys/etc. Now rename your .txt in .sh.
Open Script Manager with root permissions and find the .sh, tap on it, and if is asked how to open it, choos script/executable. In the next windows tap on "su", "boot","save" and finally "run".
If it doesnt give you any error it has worked!
Congratulations
All rights reserved to Danitab78
I did it for a better english, i hope
Click to expand...
Click to collapse
insted of script manager u could simplify this to make a script in rom toolbox lite via scripter
just put inside the script
Code:
mount -o remount,rw /
mount -t vfat -o umask=0000 /dev/block/vold/179:61 /mnt/sdcard
mount -o bind /data/media /mnt/sdcard/external_sd
chmod 777 /mnt/sdcard/external_sd
\
name it as u wish, example "int2sd" and make it run on boot
sorry for asking this..
if i do this switching the memory, so the external sd will be the internal and the internal will be the external sd.. is it right?
bramprasetyo said:
sorry for asking this..
if i do this switching the memory, so the external sd will be the internal and the internal will be the external sd.. is it right?
Click to expand...
Click to collapse
Yes!
thanks for the script, it's working perfect
Roker1 said:
Yes!
Click to expand...
Click to collapse
thank you for quick reply...
and how to undo this script? just delete and reboot?
bramprasetyo said:
thank you for quick reply...
and how to undo this script? just delete and reboot?
Click to expand...
Click to collapse
yes
danitab78 said:
yes
Click to expand...
Click to collapse
thanks
let me try it now...
I ran the script and then went back into folder with root explorer and it looks like all the files from sd have been copied to sd_external
Sent from my LG-P769 using xda app-developers app
R: How to exchange memories
After following this guide should i See more space here? Cause i've done IT without errors but the space avaible is the Same.
Sent from my LG-P760 using xda app-developers app
it works. thanks
Hi all,
i'm trying to mount in /data and in /cache 2 partition from my sd.
That is the easy thing.
What happens is that anything I install when I have the 2 partition mounted, after the reboot is gone.
It seems that closing the mobile does not sync and even if I sync from terminal does not work.
Another strange thing is that if I check /data/data directory ( from my sd partition) ls command returns all the files, while
if I use a simple app like es file manager the folder /data/data ( as many others in /data/...) seems to be empty.
Anyone has an idea why this happining and if I could try something to fix this status ?
Thanks for any infos/help...
Hello,
I have this old, but working, LG L65 d280n phone. It's already rooted and it runs LineageOS 14 (Android 7.1.2). It's nearly perfect for my needs, it only has little internal storage.
I'd like to bind mount (# mount -o bind ...) at boot the WhatsApp directory on another dedicated directory on the SD-card, so that I save a good share of internal storage.
I've already tried FolderMount app but it didn't work for me. I've also already tried Link2SD, but it does not support LineageOS rooting model. I don't know other apps that can solve this problem.
So I think I could just add that simple mount command to some script running at boot, I know GNU/Linux pretty well, but I don't know almost anything about Android/Linux.
Is there a place/hook/script I can use to add this command at boot?
mount -o bind /storage/self/primary/WhatsApp /sdcard/whateveritsname/WhatsApp