CM7.1RC Switch SD Mountpoints - LG Optimus 2x

In order to fix this, Activate USB Debugging Under application Settings.
Windows Fix:
Open a CMD Command Shell Window (Start + Run, or Windows Key + R)
If using the adb included with super one click, replace adb below with adb-windows (and navigate to the folder where it is contained first)
PRESS ENTER AFTER EACH LINE
Code:
adb shell
then
Code:
mount -o remount,rw -t ext3 /dev/block/mmcblk0p25 /system (press enter)
This makes the system Writable
Now exit the shell with:
Code:
exit
Next - lets create a backup of our vold.fstab, incase we wish to switch to the CyanogenMod Method.
Code:
adb pull /system/etc/vold.fstab
After the file has been downloaded, copy it to another location, for safe keeping.
Now lets open the downloaded file in notepad++ and replace the contents with what are below:
Code:
#######################
## Regular device mount
##
## Format: dev_mount
## label - Label for the volume
## mount_point - Where the volume will be mounted
## part - Partition # (1 based), or 'auto' for first usable partition.
## - List of sysfs paths to source devices
######################
## dev_mount sdcard /mnt/sdcard auto /devices/platform/tegra-sdhci.2/mmc_host/mmc1
## dev_mount emmc /mnt/emmc 9 /devices/platform/tegra-sdhci.3/mmc_host/mmc2
# int sd as sdcard
dev_mount sdcard /mnt/sdcard 9 /devices/platform/tegra-sdhci.3/mmc_host/mmc2
# ext sd as emmc
dev_mount emmc /mnt/emmc auto /devices/platform/tegra-sdhci.2/mmc_host/mmc1
# usbdisk as usbdisk
dev_mount usbdisk /mnt/usbdisk auto /devices/platform/tegra-ehci
After editting, save the file, and close it. We will now send this back to the device.
Return to our command shell window, and run the following to remove the current file:
Code:
adb shell
cd /system/etc/
rm vold.fstab
exit
Followed by the command to push our editted file back to the device:
Code:
adb push vold.fstab /system/etc/vold.fstab
After these steps, reboot your phone.
As if by magic, you should now have the mount points switched round, and will be able to use the Camera and Galleries again without having to have an SD card in the phone
This is a persistent change to the file system. Although it has not caused problems on my handset, I cannot be held responsible for anything that may occur on your handset. These changes survive a reboot, and do not require you to run any script on boot. We created the backup above in case you wish to switch them back again (more storage space for videos, faster card etc)

And then add /etc/vold.fstab to custom_backup_list.txt so the change sticks when you update CM.

I have experienced problems when pushing system files with system running. Don't know for what reason. I would recommend pushing in clockworkmod
If you do this in clockworkmod you don't need the first 3 steps. Just mount /system and it's already rw.

I followed every step above and now I can't mount my SD card...
how can I fix this?

Try again. You probably did something wrong.

Related

[Q] remount external_sd to another path

heya guys.
is it possible to unload/unmount the external sd (mounted in /mnt/sdcard/external_sd) via command like unmounting it via settings?
i knew that the card is mounted as mmcblk1(p1).
how about to mount it to another place via command?
is it even possible?
trying via terminal emulator says always that the device is still busy and cannot unmounted. even with -f
cheers ~
current state is as following:
/etc/init.d/S01init
Code:
#!/system/bin/sh
# remount
busybox mount -o rw,remount /
#create paths
mkdir /sd
mkdir /mnt/sdcard_ext
chmod 0775 /mnt/sdcard_ext
#duplicate, delete and linking original files
cp /init.rc /init.rc_original
cp /etc/voId.fstab /etc/voId.fstab_original
rm /init.rc
rm /etc/voId.fstab
ln -s /etc/init.d/scripts/init.rc /init.rc
ln -s /etc/init.d/scripts/voId.fstab /etc/voId.fstab
#set init.rc vars
#export EXTERNAL_STORAGE2 /mnt/sdcard_ext
#symlink /mnt/sdcard /sd/sdcard
#symlink /mnt/sdcard_ext /sd/sdcard_ext
#linking new mounting paths
ln -s /mnt/sdcard /sd/sdcard
ln -s /mnt/sdcard_ext /sd/sdcard_ext
busybox mount -o ro,remount /
### end
custom init.rc
Code:
on early-init
start ueventd
on init
sysclktz 0
loglevel 3
# setup the global environment
export PATH /sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin
export LD_LIBRARY_PATH /vendor/lib:/system/lib
export ANDROID_BOOTLOGO 1
export ANDROID_ROOT /system
export ANDROID_ASSETS /system/app
export ANDROID_DATA /data
export EXTERNAL_STORAGE /mnt/sdcard
export EXTERNAL_STORAGE2 /mnt/sdcard_ext
export USBHOST_STORAGE /mnt/sdcard/usbStorage
export ASEC_MOUNTPOINT /mnt/asec
export LOOP_MOUNTPOINT /mnt/obb
export BOOTCLASSPATH /system/framework/core.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/core-junit.jar
# Backward compatibility
symlink /system/etc /etc
symlink /sys/kernel/debug /d
# Right now vendor lives on the same filesystem as system,
# but someday that may change.
symlink /system/vendor /vendor
# create mountpoints
mkdir /mnt 0775 root system
mkdir /mnt/sdcard 0000 system system
mkdir /mnt/sdcard_ext 0000 system system
# Create cgroup mount point for cpu accounting
mkdir /acct
mount cgroup none /acct cpuacct
mkdir /acct/uid
#add booting sound property
setprop audioflinger.bootsnd 1
# Backwards Compat - XXX: Going away in G*
symlink /mnt/sdcard /sd/sdcard
mkdir /system
mkdir /dbdata 0771 system system
mkdir /data 0771 system system
mkdir /cache 0770 system cache
mkdir /config 0500 root root
mkdir /efs 0771 system system
chown system system /efs
chmod 0771 /efs
.
.
.
custom voId.fstab
Code:
## Vold 2.0 Generic fstab
## - San Mehat ([email protected])
##
#######################
## Regular device mount
##
## Format: dev_mount <label> <mount_point> <part> <sysfs_path1...>
## label - Label for the volume
## mount_point - Where the volume will be mounted
## part - Partition # (1 based), or 'auto' for first usable partition.
## <sysfs_path> - List of sysfs paths to source devices
######################
# sdcard mount for the P1
# internal sdcard
{
ums_path = /sys/devices/platform/usb_mass_storage/lun0/file
discard = disable
asec = disable
}
dev_mount sdcard /mnt/sdcard 1 /devices/platform/s3c-sdhci.0/mmc_host/mmc0
# externel sdcard
{
ums_path = /sys/devices/platform/usb_mass_storage/lun1/file
asec = enable
}
dev_mount sdcard1 /mnt/sdcard_ext auto /devices/platform/s3c-sdhci.2/mmc_host/mmc2
#end line ## keep this line
after rebooting:
- the custom voId.fstab is completely ignored...
- init.rc is changed to custom init.rc
- folders and linkings are correct
but it also links to /sdcard and /sdcard/external_sd
i dont want my external sd-card on /sdcard/external_sd and the internal on /sdcard
is there no way to fix that?
Look at this thread. May be it will be helpful for you.
swapping won't help.
problem is to fix the /proc/mounts - paths for the external card.
it wont let me modify it
1. I think you have to put name vold.fstab (little L, not big I)
2. At my phone /sdcard is just symlink to /mnt/sdcard . May be you just should remove this symlink?
I can be wrong because I don't know about changes in the Darky's Extreme Edition v10.1 ROM. but my words are true for stock rom for i9003
falex007 said:
1. I think you have to put name vold.fstab (little L, not big I)
Click to expand...
Click to collapse
that would explain whats going wrong by replacing the old with the new file.
falex007 said:
2. At my phone /sdcard is just symlink to /mnt/sdcard . May be you just should remove this symlink?
Click to expand...
Click to collapse
/sdcard isnt the problem.
its the external sd-card, which i want to mount on an other path (e.g. /mnt/sdcard_ext) and symlink it to /sd/sdcard_ext
symlinking isnt the problem. seperating both cards is all i want.
my desired goal is as following:
internal sd: /mnt/sdcard & symlink to /sd/sdcard
external sd: /mnt/sdcard_ext & symlink /sd/sdcard_ext
I understood what you want by reading /etc/init.d/S01init And I think that if you replace old vold.fstab with new one, the problem with mounting external card will be solved too
if i replace the vold.fstab manually and reboot the phone, external sd wont be recognized. it won't load any or mount it on the right place. both folders, original and desired, stay still empty. if I try to mount it manually, it says that the desired path is not recognized by /proc/mounts. changing the mounts file wont change the mount-paths
UPDATE:
ok, i'm now on this:
Code:
#!/system/bin/sh
FSTAB=/system/etc/vold.fstab
FSTAB_O=/system/etc/vold.fstab_original
# remount rw
busybox mount -o rw,remount /
busybox mount -o rw,remount /system
#create paths
mkdir /sd
mkdir /mnt/sdcard_ext
#duplicate, delete and replace original files
if [ ! -e $FSTAB_O ]; then
cp $FSTAB $FSTAB_O
reboot
fi
rm /init.rc
rm $FSTAB
cp /etc/init.d/scripts/init.rc /init.rc
cp /etc/init.d/scripts/vold.fstab $FSTAB
#set init.rc vars
#export EXTERNAL_STORAGE2 /mnt/sdcard_ext
#symlink /mnt/sdcard /sd/sdcard
#symlink /mnt/sdcard_ext /sd/sdcard_ext
#linking new mounting paths
ln -s /mnt/sdcard /sd/sdcard
ln -s /mnt/sdcard_ext /sd/sdcard_ext
# remount ro
busybox mount -o ro,remount /
busybox mount -o ro,remount /system
### end
this script ended in fully ignoring the new vold.fstab after reboot.
now the external sd is mounted at the old mount-point /sdcard/external_sd...
any suggestions?
btw: does anyone knows where the real /proc/mounts is?
it links to self/mounts... what does that mean?
UPDATE:
after replacing vold.fstab i cant install apps at all.
installing ends in forced hotboot.

[Q] Vold.fstab file problem

Hi, I'm new here, new as registered but I've been reading this forum a long time, but well, here is my problem.
I was following a tutorial to exchange my external sd card for my internal sd card, so I could install there anything I wish, but I screwed it!
One step of that tutorial was erase the information of the vold.fstab file located at /etc and later rewrite with another, exactly this:
Original vold.fstab file
## Vold 2.0 NVIDIA Whistler fstab
#######################
## Regular device mount
##
## Format: dev_mount <label> <mount_point> <part> <sysfs_path1...>
## label - Label for the volume
## mount_point - Where the volume will be mounted
## part - Partition # (1 based), or 'auto' for first usable partition.
## <sysfs_path> - List of sysfs paths to source devices
######################
## 20100725, [email protected], Add 2nd external memory
dev_mount extsdcard /mnt/sdcard/_ExternalSD auto /devices/platform/tegra-sdhci.2/mmc_host/mmc1 /devices/platform/tegra-sdhci.2/mmc_host/mmc0
dev_mount sdcard /mnt/sdcard auto /devices/platform/tegra-sdhci.3/mmc_host/mmc2
Moded vold.fstab file
#######################
## Regular device mount
##
## Format: dev_mount <label> <mount_point> <part> <sysfs_path1...>
## label - Label for the volume
## mount_point - Where the volume will be mounted
## part - Partition # (1 based), or 'auto' for first usable partition.
## <sysfs_path> - List of sysfs paths to source devices
######################
dev_mount sdcard /mnt/sdcard auto /devices/platform/tegra-sdhci.2/mmc_host/mmc1
dev_mount extsdcard /mnt/sdcard/_ExternalSD 9 /devices/platform/tegra-sdhci.3/mmc_host/mmc2
I did it from my device, and after reboot, I couldn't open camera, gallery, and the most important thing, now my device doesn't read internal or external SD card, so I can't do anything, my question is How can I manage to get the original vold.fstab file, I tried editing it and paste the original vold.fstab information, but that doesn't work, and I haven't done a backup either...
PS: Sorry for my bad english
PS2: I'm a dumb
PS3: Thanks for reading!
I had similar issue with my other phone. I had two choices - reinstall ROM in CWR or place vold.fstab in /system/etc throught ADB. I don't know if it will help you.
PykaTux said:
I had similar issue with my other phone. I had two choices - reinstall ROM in CWR or place vold.fstab in /system/etc throught ADB. I don't know if it will help you.
Click to expand...
Click to collapse
I thought that if I could get another vold.fstab file and paste in the /etc I would fix the issue, but I can't connect the mobile to the pc and I can't download files from my device either, so what is ADB and how can I put a vold.fstab file again using just the device? Thanks ^^
My phone is trash now I guess...
Just flash stock ROM with nvflash or smartflash
i lost my original vold.fstab. how can i solve it ? anyone ?
Same situation here ;( I replace the moded vold.fstab but it didn't work. Also, I haven't done a backup.
So, how can I replace the original vold.fstab?
Android MIUI Rom
knowing which rom + OS you're on might help.
I tried ADB before and I replaced the original vold.fstab but the sd card is still not available.(USB debug mode)
Here's my steps:
cd c:\SDK\tools,
adb devices,
adb remount,
adb push ./"vold.fstab" /system/etc
Any wrong step? Or any more solution? PLEASE HELP ME!!!
Android MIUI Rom
Sounds like ur on Windows. That's basically what i wanted to know.
Do
Code:
adb push vold.fstab /system/etc
sry for doublepost, i failed.
It doesn't work as usual, anyway thanks.
I reflash a rom, and thats work.

[Q] Tweaking fstab for /mnt/sdcard/external_sd backwards compatibility

Here's the original
/system/etc/vold.fstab
file:
Code:
## Vold 2.0 Generic fstab
## - San Mehat ([email protected])
##
#######################
## Regular device mount
##
## Format: dev_mount <label> <mount_point> <part> <sysfs_path1...>
## label - Label for the volume
## mount_point - Where the volume will be mounted
## part - Partition # (1 based), or 'auto' for first usable partition.
## <sysfs_path> - List of sysfs paths to source devices
######################
# internal sdcard
dev_mount sdcard /mnt/sdcard 1 /devices/platform/s3c-sdhci.0/mmc_host/mmc0
# external sdcard
dev_mount emmc /mnt/emmc auto /devices/platform/s3c-sdhci.2/mmc_host/mmc2
I believe there's no reason not to mount emmc to /mnt/sdcard/external_sd in addition to the ICS default of /mnt/emmc
As a result I am thinking of appending (not replacing) the following line:
Code:
# external sdcard
dev_mount emmc /mnt/sdcard/external_sd auto /devices/platform/s3c-sdhci.2/mmc_host/mmc2
But such a change can really mess up a phone so first I want to check a few things.
1) If we have a error with fstab will we have adb access at that point to reverse the change we've made or it it giong to have to be a case of nandroid restore only?
2) Linux can mount something to an area that is already mounted, I am assuming Android can do this too.
This person had a slightly different approach:
http://forum.xda-developers.com/showthread.php?t=1141750
Personally I prefer to keep the external_sd in vfat format because then you're more able to transfer things to&from Windows computers and even other phones. Bit of a shame as there are probably many advantages to ext4.
oops!! Ignore.
I would like to know too.
I would like to know too.
jago25_98 said:
Here's the original
/system/etc/vold.fstab
file:
Code:
## Vold 2.0 Generic fstab
## - San Mehat ([email protected])
##
#######################
## Regular device mount
##
## Format: dev_mount <label> <mount_point> <part> <sysfs_path1...>
## label - Label for the volume
## mount_point - Where the volume will be mounted
## part - Partition # (1 based), or 'auto' for first usable partition.
## <sysfs_path> - List of sysfs paths to source devices
######################
# internal sdcard
dev_mount sdcard /mnt/sdcard 1 /devices/platform/s3c-sdhci.0/mmc_host/mmc0
# external sdcard
dev_mount emmc /mnt/emmc auto /devices/platform/s3c-sdhci.2/mmc_host/mmc2
I believe there's no reason not to mount emmc to /mnt/sdcard/external_sd in addition to the ICS default of /mnt/emmc
As a result I am thinking of appending (not replacing) the following line:
Code:
# external sdcard
dev_mount emmc /mnt/sdcard/external_sd auto /devices/platform/s3c-sdhci.2/mmc_host/mmc2
But such a change can really mess up a phone so first I want to check a few things.
1) If we have a error with fstab will we have adb access at that point to reverse the change we've made or it it giong to have to be a case of nandroid restore only?
2) Linux can mount something to an area that is already mounted, I am assuming Android can do this too.
This person had a slightly different approach:
http://forum.xda-developers.com/showthread.php?t=1141750
Personally I prefer to keep the external_sd in vfat format because then you're more able to transfer things to&from Windows computers and even other phones. Bit of a shame as there are probably many advantages to ext4.
Click to expand...
Click to collapse
My tablet shows it like this:
## Vold 2.0 Generic fstab
## - San Mehat ([email protected])
##
#######################
## Regular device mount
##
## Format: dev_mount <label> <mount_point> <part> <sysfs_path1...>
## label - Label for the volume
## mount_point - Where the volume will be mounted
## part - Partition # (1 based), or 'auto' for first usable partition.
## <sysfs_path> - List of sysfs paths to source devices
######################
## Example of a standard sdcard mount for the emulator / Dream
# Mounts the first usable partition of the specified device
dev_mount sdcard /mnt/sdcard auto /devices/platform/goldfish_mmc.0 /devices/platform/mt6573-sd.0/mmc_host/mmc0
## Example of a dual card setup
# dev_mount left_sdcard /mnt/sdcard1 auto /devices/platform/goldfish_mmc.0 /devices/platform/mt6516-sd.0/mmc_host/mmc0
# dev_mount right_sdcard /mnt/sdcard2 auto /devices/platform/goldfish_mmc.1 /devices/platform/mt6516-sd.2/mmc_host/mmc2
## Example of specifying a specific partition for mounts
# dev_mount sdcard /mnt/sdcard 2 /devices/platform/goldfish_mmc.0 /devices/platform/msm_sdcc.2/mmc_host/mmc1
But when I introduced the code as above, my tablet stopped recognizing the sdcard, so I had to recover to an image before in order to recognize it again.
Any suggestions that it will not happen again???
You probably need to adjust my
Code:
/devices/platform/s3c-sdhci.2/mmc_host/mmc2
to the device matching your setup, something like
Code:
dev_mount emmc /mnt/emmc auto /devices/platform/mt6516-sd.2/mmc_host/mmc2
because I'm on a i9000 samsung phone and your on some kind of tablet
Could you explain it to me a bit further????
What does any of the commands in the line mean?
Yhanks
vechthra said:
Could you explain it to me a bit further????
What does any of the commands in the line mean?
Yhanks
Click to expand...
Click to collapse
It seems I found a solution here http://forum.xda-developers.com/showthread.php?t=1511619
In brief
install a app like SSHDroid
on your desktop connect with putty to your phone so hook up your phone with the usb cable
login is or was "root" and password is "admin"
ls /dev/block/vold will give you some figures 179.0 179.2 179.2 179.8 179.9
ls /dev/block/platform will give some folders s3c-sdchi.0 s3c-sdchi.2 s5pc110-onenand
One can chose between several ways how the folders appear on a windows explorer folder
like a USB stick or a mediaplayer
setprop persist.sys.usb.config mtp,adb results in the little walkman icon on your explorer
setprop persist.sys.usb.config mass_storage,adb results in the appearing of a usb stick
mount is also a commando when given alone which will show you everything that is mounted
In the putty window i did a feel free to experiment
setprop persist.sys.usb.config mass_storage,adb
echo /dev/block/vold/179:9 > /sys/devices/platform/s3c-usbgadget/gadget/lun1/file"
This would result in the appearing of a USB stick with name sdcard on your file explorer in windows.
To make this flash persistent
Look if your rom has support for userinit.d or bootcompletehook.sh somewhere in /data
cm 10.1 has support for userinit.d
in /system/etc/init.d I found 2 files 00banner and 90userinit
vi /system/etc/init.d/90userinit is this
#!/system/bin/sh
# call userinit.sh and/or userinit.d/* scripts if present in /data/local
if [ -e /data/local/userinit.sh ];
then
log -p i -t userinit "Executing /data/local/userinit.sh";
logwrapper /system/bin/sh /data/local/userinit.sh;
setprop cm.userinit.active 1;
fi;
if [ -d /data/local/userinit.d ];
then
logwrapper busybox run-parts /data/local/userinit.d;
setprop cm.userinit.active 1;
fi;
now the folder wasn't there so
mkdir /data/local/userinit.d
in this folder make a file.The name isn't important
cd /data/local/userinit.d
vi mountsdcard
setprop persist.sys.usb.config mass_storage,adb
echo /dev/block/vold/179:9 > /sys/devices/platform/s3c-usbgadget/gadget/lun1/file
make sure you give rights to this file and the folder one can do that with es file explorer or probable
chmod 751 mountsdcard
I think that's it
This will mount your second sdcard (if you have one ) on your windows like a usb stick. It will do this even if your phone isn't completely started up.
You will not have to do a "mount usb" on your phone. If you do this anyway your first card is also mounted.
This is a neat trick to make your CAR find your music on your phone. If your car has a usb port and the functionality to play music from usb sticks.
Kind Regards
Guy
want to change
dev_mount sdcard /mnt/sdcard auto /devices/platform/goldfish_mmc.0 /devices/platform/mt6573-sd.0/mmc_host/mmc0
## Example of a dual card setup
# dev_mount left_sdcard /mnt/sdcard1 auto /devices/platform/goldfish_mmc.0 /devices/platform/mt6516-sd.0/mmc_host/mmc0
# dev_mount right_sdcard /mnt/sdcard2 auto /devices/platform/goldfish_mmc.1 /devices/platform/mt6516-sd.2/mmc_host/mmc2
## Example of specifying a specific partition for mounts
# dev_mount sdcard /mnt/sdcard 2 /devices/platform/goldfish_mmc.0 /devices/platform/msm_sdcc.2/mmc_host/mmc1
u
need help
can someone please help me with this. not sure where to edit
## Vold 2.0 Generic fstab
## - San Mehat ([email protected])
##
#######################
## Regular device mount
##
## Format: dev_mount <label> <mount_point> <part> <sysfs_path1...>
## label - Label for the volume
## mount_point - Where the volume will be mounted
## part - Partition # (1 based), or 'auto' for first usable partition.
## <sysfs_path> - List of sysfs paths to source devices
######################
## Example of a standard sdcard mount for the emulator / Dream
# Mounts the first usable partition of the specified device
dev_mount sdcard /mnt/sdcard [email protected] /devices/platform/goldfish_mmc.0 /devices/platform/mtk-msdc.0/mmc_host
dev_mount sdcard2 /mnt/sdcard/sdcard2 auto /devices/platform/goldfish_mmc.1 /devices/platform/mtk-msdc.1/mmc_host
## Example of a dual card setup
# dev_mount left_sdcard /mnt/sdcard1 auto /devices/platform/goldfish_mmc.0 /devices/platform/mtk-sd.0/mmc_host/mmc0
# dev_mount right_sdcard /mnt/sdcard2 auto /devices/platform/goldfish_mmc.1 /devices/platform/mtk-sd.2/mmc_host/mmc2
## Example of specifying a specific partition for mounts
# dev_mount sdcard /mnt/sdcard 2 /devices/platform/goldfish_mmc.0 /devices/platform/msm_sdcc.2/mmc_host/mmc1
I WANT TO THE ARCHIVE stock VOLD.FSTAB for blu tank 4.5
android 4.1.1 JellyBean please! original vold want..

mount second sd card as a directory so car detects music over USB

Hi,
I use my telephone with a second sd card in the car through usb.
Appearently the car only finds and indexes the first sd card.
Is there a way to mount the sceond card as a directory on the first card?
Kind Regards
Guy F
I found a file vold.fstab in my /etc/system but there's no info regarding the second sd card?
Can I safely edit and how?
# Vold 2.0 Generic fstab
## - San Mehat ([email protected])
##
#######################
## Regular device mount
##
## Format: dev_mount <label> <mount_point> <part> <sysfs_path1...>
## label - Label for the volume
## mount_point - Where the volume will be mounted
## part - Partition # (1 based), or 'auto' for first usable partition.
## <sysfs_path> - List of sysfs paths to source devices
######################
#FIXME: Swap again?
# internal sdcard
dev_mount emmc /storage/sdcard1 auto /devices/platform/s3c-sdhci.2/mmc_host/mmc2
# external sdcard
dev_mount sdcard /storage/sdcard0 1 /devices/platform/s3c-sdhci.0/mmc_host/mmc0
I have looked here
http://forum.xda-developers.com/showthread.php?t=1922272
http://forum.xda-developers.com/showthread.php?t=1724287
http://forum.xda-developers.com/showthread.php?t=1785245
but I can't seem to get it to work
Anybody?
Forssound said:
I have looked here
http://forum.xda-developers.com/showthread.php?t=1922272
http://forum.xda-developers.com/showthread.php?t=1724287
http://forum.xda-developers.com/showthread.php?t=1785245
but I can't seem to get it to work
Anybody?
Click to expand...
Click to collapse
It seems I found a solution here http://forum.xda-developers.com/showthread.php?t=1511619
In brief
install a app like SSHDroid
on your desktop connect with putty to your phone so hook up your phone with the usb cable
login is or was "root" and password is "admin"
ls /dev/block/vold will give you some figures 179.0 179.2 179.2 179.8 179.9
ls /dev/block/platform will give some folders s3c-sdchi.0 s3c-sdchi.2 s5pc110-onenand
One can chose between several ways how the folders appear on a windows explorer folder
like a USB stick or a mediaplayer
setprop persist.sys.usb.config mtp,adb results in the little walkman icon on your explorer
setprop persist.sys.usb.config mass_storage,adb results in the appearing of a usb stick
mount is also a commando when given alone which will show you everything that is mounted
In the putty window i did a feel free to experiment
setprop persist.sys.usb.config mass_storage,adb
echo /dev/block/vold/179:9 > /sys/devices/platform/s3c-usbgadget/gadget/lun1/file"
This would result in the appearing of a USB stick with name sdcard on your file explorer in windows.
To make this flash persistent
Look if your rom has support for userinit.d or bootcompletehook.sh somewhere in /data
cm 10.1 has support for userinit.d
in /system/etc/init.d I found 2 files 00banner and 90userinit
vi /system/etc/init.d/90userinit is this
#!/system/bin/sh
# call userinit.sh and/or userinit.d/* scripts if present in /data/local
if [ -e /data/local/userinit.sh ];
then
log -p i -t userinit "Executing /data/local/userinit.sh";
logwrapper /system/bin/sh /data/local/userinit.sh;
setprop cm.userinit.active 1;
fi;
if [ -d /data/local/userinit.d ];
then
logwrapper busybox run-parts /data/local/userinit.d;
setprop cm.userinit.active 1;
fi;
now the folder wasn't there so
mkdir /data/local/userinit.d
in this folder make a file.The name isn't important
cd /data/local/userinit.d
vi mountsdcard
setprop persist.sys.usb.config mass_storage,adb
echo /dev/block/vold/179:9 > /sys/devices/platform/s3c-usbgadget/gadget/lun1/file
make sure you give rights to this file and the folder one can do that with es file explorer or probable
chmod 751 mountsdcard
I think that's it
This will mount your second sdcard (if you have one ) on your windows like a usb stick. It will do this even if your phone isn't completely started up.
You will not have to do a "mount usb" on your phone. If you do this anyway your first card is also mounted.
This is a neat trick to make your CAR find your music on your phone. If your car has a usb port and the functionality to play music from usb sticks.
Kind Regards
Guy
I tried doing the same by bind-mounting the external_sd on a folder on the internal_sd:
Code:
mount -o bind /storage/sdcard1 /storage/sdcard0/external_sd/
In the terminal it worked like a charm, but i couldn't get it to work at boot. Have you any other ideas?
Wouldn't it be easier to just mount the ext SD to a folder on the internal SD? This seems like 100 times the work really needed.
I can't recall atm how mounting of SD cards works, but if I had this problem I'd probably just put the songs in a .img file and mount that with
mount -o loop -t auto /storage/sdcard1/music.img /storage/sdcard2/music/
Sent from my GT-I9000 using xda premium
Yeah thats kinda what i thought of. But my init script is not getting executed or at least there is no effect of it.
I assume you've tested it with terminal output, what doesn't work about it? :/
Sent from my GT-I9000 using xda premium
I don't know what you mean, to be honest. I know that init.d should write the logs somewhere but couldn't find out where they are written to.
Edit: when i try to execute the command above it works, but it doesn't work with init.d
wget21 said:
I tried doing the same by bind-mounting the external_sd on a folder on the internal_sd:
Code:
mount -o bind /storage/sdcard1 /storage/sdcard0/external_sd/
In the terminal it worked like a charm, but i couldn't get it to work at boot. Have you any other ideas?
Click to expand...
Click to collapse
Read my large post..... It works on reboot and flash... I have tested it in my car and on my PC..
wget21 said:
I don't know what you mean, to be honest. I know that init.d should write the logs somewhere but couldn't find out where they are written to.
Edit: when i try to execute the command above it works, but it doesn't work with init.d
Click to expand...
Click to collapse
Well, for what it's worth you can use CM File Manager to add a shortcut on your home screen if you're on a ROM with Trebuchet Launcher, do that with the executable file and you can at least launch it easily when needed...
With pretty much any other launcher custom shortcuts are supported as is, Trebuchet for some reason lacks it.
(I loathe init.d)
Sent from my GT-I9000 using xda premium
I have now made a script in rom toolbox which does the job, but i'm not very happy with this. I'd prefer doing this simple bind-mount with init.d
@Forssound: Your solution seems to me a bit complicated, just for this simple task.

[Q] SD card problem after JB update

Hi, I'm new here. I looked around for a similar problem to mine but haven't seen it. Please be kind if I have missed it.
I finally updated from GB last night to ICS and then to JB. I've got root again finally. Now the problem is that I don't have access to my SD card.
My system version is: 98.72.18.XT894.Verizon.en.US
Android version is 4.1.2
Before the update I had swapped the SD card with the internal storage through void.fstab. To avoid problems with the update I restored the original fstab file to swap them back. Now these are the symptoms I see:
When I go to Settings > Storage, it force closes and I get the error "Unfortunatly, Settings has stopped."
When I browse to /sdcard in Root Explorer it says "The SD card is not currently mounted"
When I browse to /sdcard-ext in Root Explorer it just shows an empty folder
When I stuck the SD card in my computer, I could see everything I had on there before the update
Currently I'm using the original void.fstab file, but even when I try to switch, nothing changes. This is the original void.fstab I am using right now:
Code:
## Vold 2.0 Generic fstab
## - San Mehat ([email protected])
##
#######################
## Regular device mount
##
## Format: dev_mount <label> <mount_point[:[asec_point]:[lun_point]]> <part> <sysfs_path1...>
## label - Label for the volume
## mount_point - Where the volume will be mounted
## asec_point - Whether asec mount is needed for this value, if not, use "none"
## Else, supply a folder name under /mnt/secure/
## If not supplied, "asec" will used by default
## If supplied, /mnt/secure/asec_point will be used
## This is for further extension, not needed now
## lun_point - The target lun device for this volume. If not supplied, will use
## /sys/devices/platform/usb_mass_storage/lun0/file
## else, will use /sys/devices/platform/usb_mass_storage/lun_point/file
## part - Partition # (1 based), or 'auto' for first usable partition.
## For a disk with only 1 partition, use '1' is different to 'auto'
## Using 1, will not re-write its partition table when formatting
## <sysfs_path> - List of sysfs paths to source devices
######################
# external sd card
dev_mount sdcard-ext /storage/sdcard1:none:lun1 auto /devices/platform/omap/omap_hsmmc.0/mmc_host/mmc0
# internal eMMC
dev_mount sdcard /storage/sdcard0:: 25 /devices/platform/omap/omap_hsmmc.1/mmc_host/mmc1
## Example of a dual card setup
# dev_mount left_sdcard /sdcard1 auto /devices/platform/goldfish_mmc.0 /devices/platform/msm_sdcc.2/mmc_host/mmc1
# dev_mount right_sdcard /sdcard2 auto /devices/platform/goldfish_mmc.1 /devices/platform/msm_sdcc.3/mmc_host/mmc1
## Example of specifying a specific partition for mounts
# dev_mount sdcard /sdcard 2 /devices/platform/goldfish_mmc.0 /devices/platform/msm_sdcc.2/mmc_host/mmc1
# flash drive connection through hub connected to USB3
dev_mount usbdisk_1.1.1 /storage/usbdisk_1.1.1 auto /devices/platform/omap/musb-omap2430/musb-hdrc/usb3/3-1/3-1.1.1
dev_mount usbdisk_1.1 /storage/usbdisk_1.1 auto /devices/platform/omap/musb-omap2430/musb-hdrc/usb3/3-1/3-1.1
dev_mount usbdisk_1.2 /storage/usbdisk_1.2 auto /devices/platform/omap/musb-omap2430/musb-hdrc/usb3/3-1/3-1.2
dev_mount usbdisk_1.3 /storage/usbdisk_1.3 auto /devices/platform/omap/musb-omap2430/musb-hdrc/usb3/3-1/3-1.3
dev_mount usbdisk_1.4 /storage/usbdisk_1.4 auto /devices/platform/omap/musb-omap2430/musb-hdrc/usb3/3-1/3-1.4
dev_mount usbdisk_1.5 /storage/usbdisk_1.5 auto /devices/platform/omap/musb-omap2430/musb-hdrc/usb3/3-1/3-1.5
dev_mount usbdisk_1.6 /storage/usbdisk_1.6 auto /devices/platform/omap/musb-omap2430/musb-hdrc/usb3/3-1/3-1.6
dev_mount usbdisk_1.7 /storage/usbdisk_1.7 auto /devices/platform/omap/musb-omap2430/musb-hdrc/usb3/3-1/3-1.7
Has anybody else had this problem? Does anybody have any suggestions on what to do here? Thank you for any help you can provide!
Yea!!
Actually I'm surprised that I'm not the only one, but it seems like this is a small problem. I can't mount internal or sd storage, and when I go into settings to mount, settings cashes. The phone WAS rooted when I updated from ICS.
jthree2001 said:
Actually I'm surprised that I'm not the only one, but it seems like this is a small problem. I can't mount internal or sd storage, and when I go into settings to mount, settings cashes. The phone WAS rooted when I updated from ICS.
Click to expand...
Click to collapse
So I got it to work, I re-flashed JB using the Matt's jb flash thingy without the SDcard, and it corrected itself. I should also note that I had an extra partition on my sdcard so I think it had something to do with it.
jthree2001 said:
So I got it to work, I re-flashed JB using the Matt's jb flash thingy without the SDcard, and it corrected itself. I should also note that I had an extra partition on my sdcard so I think it had something to do with it.
Click to expand...
Click to collapse
Ok, I just reset to factory default, but it still crashed when I tried to open up Storage in Settings right after the reset. What is this "Matt's jb flash thingy" and where can I get it?
*EDIT*: Are you possibly talking about the post on droidforums titled "DROID RAZR Utility XT912 Jellybean" by mattlgroff (can't link to it yet)? I think that's what I used originally. I'm going to try it again, but I've formatted my SD card and am no longer root after the factory reset. Hopefully it works this time.

Categories

Resources