• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root Help editing vold.fstab to switch sdcard and external_sd

Sepero

Linux Guru
I've been searching all over, but none of the vold.fstab solutions I've found work to switch the /mnt/sdcard and /mnt/sdcard/external_sd mount points. So now I'm asking for help. Here is my LG Motion 4G info

With all comments removed, my vold.fstab looks like this
Code:
dev_mount sdcard2 /mnt/sdcard/external_sd auto /devices/platform/msm_sdcc.3/mmc_host
The output of mount is this:
Code:
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,relatime,user_xattr,barrier=1,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 rw,nosuid,nodev,relatime,resuid=1000,errors=continue,user_xattr,barrier=1,data=ordered,noauto_da_alloc 0 0
/dev/block/platform/msm_sdcc.1/by-name/persist /persist ext4 rw,nosuid,nodev,relatime,user_xattr,barrier=1,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 rw,nosuid,nodev,relatime,user_xattr,barrier=1,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/sns /sns ext4 rw,nosuid,nodev,relatime,user_xattr,barrier=1,data=ordered,noauto_da_alloc 0 0
/dev/block/platform/msm_sdcc.1/by-name/drm /persist-lg ext4 rw,nosuid,nodev,relatime,user_xattr,barrier=1,data=ordered,noauto_da_alloc 0 0
/dev/block/platform/msm_sdcc.1/by-name/mpt /mpt ext4 rw,nosuid,nodev,relatime,user_xattr,barrier=1,data=ordered,noauto_da_alloc 0 0
/dev/block/platform/msm_sdcc.1/by-name/tombstones /tombstones ext4 rw,nosuid,nodev,relatime,user_xattr,barrier=1,data=ordered 0 0
/dev/block/mmcblk0p1 /firmware vfat ro,relatime,fmask=0002,dmask=0002,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=lower,errors=remount-ro 0 0
/dev/fuse /mnt/sdcard fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/block/vold/179:33 /mnt/sdcard/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
 
umm let me explain (sorry was up all night) upload the original vold.fstab i just wanna see it i do the switch with mi droid inc i am also thinking that the "internal memory(sdcard)" is used as the data portion so switching it might cause problems?
 
@zimlokks
You are seeing the whole file in the OP (see attachment also). Everything else left out is just comments. And yes, the factory internal /mnt/sdcard is shared space with /data.

In truth, I don't actually care to switch the mount points, but that seems to be the popular request on the forums (I assumed that if I got the answer, then I could take it in my own direction). I actually want to get rid of the internal mount entirely, because it is already used by /data. Also, if the phone is ever smashed (like my last phone), then all those internal files are f-cked. Sdcard is a safer storage location.

The current work around I'm using to accomplish this is with a script that is run by Script Manager at startup. It first rebinds the external card to /mnt/sdcard. Then for safety, it duplicates the bind to a folder I created on the card at /mnt/sdcard/external_sd. So /mnt/sdcard and /mnt/sdcard/external_sd are actually BOTH the same location (the external sdcard's lowest directory) and this works out Great!
Code:
mount -o bind /mnt/sdcard/external_sd /mnt/sdcard
mount -o bind /mnt/sdcard /mnt/sdcard/external_sd
My only problem is that this is a late hack, because it doesn't get run until a few seconds after the phone has started up. I have already tried putting this code in a startup script, but that hasn't worked out so far because the LG Motion 4G doesn't have a init.d directory. If editing vold.fstab isn't possible, then I may be stuck with sticking to Script Manager.
 

Attachments

@zimlokks
You are seeing the whole file in the OP (see attachment also). Everything else left out is just comments. And yes, the factory internal /mnt/sdcard is shared space with /data.

In truth, I don't actually care to switch the mount points, but that seems to be the popular request on the forums (I assumed that if I got the answer, then I could take it in my own direction). I actually want to get rid of the internal mount entirely, because it is already used by /data. Also, if the phone is ever smashed (like my last phone), then all those internal files are f-cked. Sdcard is a safer storage location.

The current work around I'm using to accomplish this is with a script that is run by Script Manager at startup. It first rebinds the external card to /mnt/sdcard. Then for safety, it duplicates the bind to a folder I created on the card at /mnt/sdcard/external_sd. So /mnt/sdcard and /mnt/sdcard/external_sd are actually BOTH the same location (the external sdcard's lowest directory) and this works out Great!
Code:
mount -o bind /mnt/sdcard/external_sd /mnt/sdcard
mount -o bind /mnt/sdcard /mnt/sdcard/external_sd
My only problem is that this is a late hack, because it doesn't get run until a few seconds after the phone has started up. I have already tried putting this code in a startup script, but that hasn't worked out so far because the LG Motion 4G doesn't have a init.d directory. If editing vold.fstab isn't possible, then I may be stuck with sticking to Script Manager.

we do have init.d support for our phone...

http://androidforums.com/motion-4g-all-things-root/636097-init-d-support-any-rooted-phone.html

will that help you?
 
@plasticarmyman
It looks like it may work. If it does, very soon I may be posting a guide on restoring the sdcard to it's rightful place. :five:

(that will make 3 guides I've written on lg motion this month :o. you gotta love the beauty of customizing linux)
 
The good news is that init.d works well on the LG Motion 4G.

The bad news is that it still looks like it won't work for this purpose. Unfortunately the startup script runs too early, and nothing at /mnt/sdcard is even mounted yet. :(

The sdcard needs to be mounted before manually changing things around, or things start to get screwy.

So for now I think I'm back to hoping on vold.fstab
 
it may be possible bt umm do this on emulator terminal without quotes "mount l grep sdcard" that should be a pipe do volume up+l and paste it here thanks :3 ill work on it wen i have tha chance i dont currently own a motion bt use it alot lol
 
Ah yeah, in my opinion, directory bind is a really crappy solution. No offense to the creator, I think it's a good app for what it does, but not for me.

I have contacted the creator of directory bind about allowing mounting of the sdcard to /mnt/sdcard. We will see if he gets back with me.
 
Ah yeah, in my opinion, directory bind is a really crappy solution. No offense to the creator, I think it's a good app for what it does, but not for me.

I have contacted the creator of directory bind about allowing mounting of the sdcard to /mnt/sdcard. We will see if he gets back with me.

well i think the problem lies on the data portion. it must be mounted nd wen it mounts the internal SD card auto mounts leaving the external SD card to mount during after/proper boot
 
Directory bind only seems to work on older models. Since we have two separate forms of storage, I don't think directory bind would read the extsd as an applicable storage vector.
 
Back
Top Bottom