using the latest root explorer I cant change the external sd card permissions to r/w i tried formatting through the storage menu in settings the format option is grayed out also on pc it is write protected so cant format from there either I even tried the cwm fix permissions oh and btw i am using Deodexed XILA2 strange thing is all files are working and also tried stock rom
You can try two things:
Check fstab file to see how is the SD card mounted and change it if its on read only
SSH to local and try a remount -o rw to the sdcard
using ssh i found that owner and group all have r/w/x others have only r/x is it possible it doesnt recognize me as the owner?also how do I remount with ssh as rw?
this is how the fstab file looks
# internal sdcard
{
ums_path = /sys/devices/platform/usb_mass_storage/lun0/file
asec = disable
discard = enable
format_option = -r 2236
}
dev_mount sdcard /mnt/sdcard 11 /devices/platform/s3c-mshci.0/mmc_host/mmc0/mmc0
# external sdcard
{
ums_path = /sys/devices/platform/usb_mass_storage/lun1/file
asec = enable
}
dev_mount sdcard1 /mnt/sdcard/external_sd auto /devices/platform/s3c-sdhci.2/mmc_host/mmc1
# otg sdcard
{
ums_path = /dev/zero
asec = disable
}
usb_mount sdcard2 /mnt/sdcard/usbStorage auto /devices/platform/s3c_otghcd/usb
#end line ## keep this line
fstab seems right... could you check if you run mount on ssh it displays /sdcard as rw?
/mnt/sdcard type vfat (rw,...)
The remount is done via ssh also with mount command:
mount -o remount,rw /mnt/sdcard
I used mount -o remount,rw /mnt/sdcard with the terminal nothing changed :/
BLSbeerzerker said:
I used mount -o remount,rw /mnt/sdcard with the terminal nothing changed :/
Click to expand...
Click to collapse
And what did 'mount' display in the terminal? If you use it without any arguments it displays the current mounted properties. Check if /mnt/sdcard has rw or not.
tmpfs on /mnt/sdcard/external_sd/.android_secure type tmpfs (ro,relatime,size=0k,mode=000)
I think this is it? I'm new to this kind of stuff sto bear with me xd
.android_secure on external_sd has zero rights and the owner is root instead of system everything else looks fine tried to change it, it is write protected
Hey man thanks a lot! just checked my microSD on the pc I was able to format than son of a !! the only problem now is i cant mount the /sdcard on the current CWM and on a old CWM one i tried to flash i can mount sdcard and not /eemc. When using the old CWM and mounting /sdcard I still cant see it
I tried to roll to a previous backup today got an error from cwm
system.img not found skipping restore of /system
data.img not found. skipping restore of /data.android_secure.
skipping restore of /sdcard/.android_secure.
cache.img not found. skipping restore of /cache
I think something is wrong with android_secure..
even repartitioned.... UUUHHH it's driving me craaaaazy!
Related
I have Nookie Froyo on a 16GB SDcard and it's fairly stable. I do like to use the NC from the stock or rooted OS on the EMMC on occasion. When I'm running internal and insert the NF card, it only sees the boot partition just like under windows.
So, here is my thought. With Linux, it should be somewhat straightforward to have a script to unmount boot from sdcard and remount the SDcard partition on the SDcard as sdcard. The only similar thread I found was this one.
Can a bright person give me a hand on this one?
UPDATE: The answer lies here.
Homer
Homer_S_xda said:
I have Nookie Froyo on a 16GB SDcard and it's fairly stable. I do like to use the NC from the stock or rooted OS on the EMMC on occasion. When I'm running internal and insert the NF card, it only sees the boot partition just like under windows.
So, here is my thought. With Linux, it should be somewhat straightforward to have a script to unmount boot from sdcard and remount the SDcard partition on the SDcard as sdcard. The only similar thread I found was this one.
Can a bright person give me a hand on this one?
Homer
Click to expand...
Click to collapse
I lost the page but on the forums theres one talking about mount points. What you're going to want to do(or at least this is my guess) is run something like
Code:
adb shell umount /dev/block/mmcblk1 (This is the boot partition normally)
mkdir sdcard
mount /dev/block/"Whatever the sd card mount point is" sdcard
Try This
If you mean mouting the Nookie Froyo/Honey's sdcard partition, you can do it from a Terminal App. You just need to figure out what the Nookie card's mount device is and mount the 4th partition.
Try this:
Code:
(use cd command to non System Folder)
mkdir /nookie
su
mount '/dev/block/mmcblk1p4' '/(location of nookie folder)/nookie/'
This should Mount the Partition to the "nookie" folder. You shouldn't need to unmount the First partition. You just need to mount the 4th to a different location. Then use a File Browser like Astro or Root Explorer to Browse and Transfer files.
Then use this to unmount after done file transfers and stuff:
Code:
unmount '/(location of nookie folder)/nookie/'
Thanks for the replies. I think the goal here would be to make it transparent to applications that are writing to the sdcard partition. That way, I would browse to the files the same way regardless of the OS I happen to have booted. Also, the 117MB or so free on boot is going to fill up with junk and runs the risk of getting overwritten, wrecking the Froyo/Honeycomb installation.
Homer
More Suggestions
Homer_S_xda said:
Thanks for the replies. I think the goal here would be to make it transparent to applications that are writing to the sdcard partition. That way, I would browse to the files the same way regardless of the OS I happen to have booted. Also, the 117MB or so free on boot is going to fill up with junk and runs the risk of getting overwritten, wrecking the Froyo/Honeycomb installation.
Homer
Click to expand...
Click to collapse
Good point. How about this instead.
Code:
su
unmount '/sdcard'
mount '/dev/block/mmcblk1p4' '/sdcard'
This would unmount the boot partition and then mount the sdcard partition in it's place. This is assuming that Rooted Stock mounts the SDcard at folder '/sdcard' by default, I haven't rooted my NC's Stock.
Now Mounting the Media partition(Where your books and other Media are stored) from Nookie Froyo isn't as clear cut. I found the Mount Table for Rooted Stock and Media is listed different then the others. As shown in Bold:
Code:
rootfs / rootfs ro 0 0
tmpfs /dev tmpfs rw,mode=755 0 0
devpts /dev/pts devpts rw,mode=600 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
tmpfs /sqlite_stmt_journals tmpfs rw,size=4096k 0 0
/dev/block/mmcblk0p2 /rom vfat rw,sync,noatime,nodiratime,uid=1000,gid=1000,fmask=0117,dmask=0007,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,errors=remount-ro 0 0
/dev/block/mmcblk0p5 /system ext2 ro,errors=continue 0 0
/dev/block/mmcblk0p6 /data ext3 rw,nosuid,nodev,noatime,nodiratime,errors=continue,data=ordered 0 0
/dev/block/mmcblk0p7 /cache ext3 rw,nosuid,nodev,noatime,nodiratime,errors=continue,data=ordered 0 0
[b]/dev/block//vold/179:8 /media vfat rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1015,fmask=0002,dmask=0002,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0[/b]
As I said I don't have my NC Rooted so I can't investigate this. On the other hand, Accessing Stock System(p5) or Data(p6) partitions should be straight forward.
Code:
cd /sdcard
mkdir /stock-system
mount '/dev/block/mmcblk0p5' '/stock-system'
A few nights ago I set up my NC to dual boot following ...
http://forum.xda-developers.com/showthread.php?t=920347
Which in addition to stealing about 20% of the internal /media partition for the NF system, it also replaced the uboot to selectively choose which distro you wanted to boot from as well as editing the /system/etc/vold.fstab to change how the sdcard was mounted. Perhaps this last step may help(?)
BTW - I'm pleased with the dual booting off of the emmc. I'm a Linux person, so shrinking down the last partition and adding partitions 9 and 10 for FC seems like a nice, transparent solution. It doesn't seem to affect the operation of CWM's nandroid backup and restore (I've done both since dual booting) and I don't have to worry about popping out the SD card to boot the emmc based distro.
working on vold.fstab is the way to go..
Sent from my LogicPD Zoom2 using Tapatalk
samuelhalff said:
working on vold.fstab is the way to go..
Sent from my LogicPD Zoom2 using Tapatalk
Click to expand...
Click to collapse
This is exactly how its done on the honeycomb build floating around here.
Here is what the vold.fstab looks like in there:
Code:
$ adb shell cat /etc/vold.fstab
## 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/msm_sdcc.2/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
dev_mount sdcard /sdcard 4 /devices/platform/mmci-omap-hs.0/mmc_host/mmc1
#dev_mount media /media 8 /devices/platform/mmci-omap-hs.1/mmc_host/mmc0
So this effectively mounts the partition 4 of the sdcard as /sdcard and everything works normally.
Mount NC Internal from Nookie Froyo
Ok I successfully mounted the Nook's Media Partition from within Nookie Froyo:
Code:
su
mount -o rw,remount -t rootfs /
mkdir /mnt/media
mount /dev/block/mmcblk0p8 /mnt/media
mount -o ro,remount -t rootfs /
NC Internal Media Partition is now mounted to '/mnt/media' as RW.
j4mm3r said:
This is exactly how its done on the honeycomb build floating around here.
Here is what the vold.fstab looks like in there:
Code:
$ adb shell cat /etc/vold.fstab
## 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/msm_sdcc.2/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
dev_mount sdcard /sdcard 4 /devices/platform/mmci-omap-hs.0/mmc_host/mmc1
#dev_mount media /media 8 /devices/platform/mmci-omap-hs.1/mmc_host/mmc0
So this effectively mounts the partition 4 of the sdcard as /sdcard and everything works normally.
Click to expand...
Click to collapse
So I need to modify the vold.fstab on my emmc to mount the 4th sdcard partition as /sdcard. Let me get it up and running again and I'll give that a whirl.
Homer
Did some poking. This file does not exist in the default config. Should I create it with just this line:
dev_mount sdcard /sdcard 4 /devices/platform/mmci-omap-hs.0/mmc_host/mmc1
UPDATE: Nope... either need permissions set right or have to tell the system to look at the file.
Homer
Homer_S_xda said:
Did some poking. This file does not exist in the default config. Should I create it with just this line:
dev_mount sdcard /sdcard 4 /devices/platform/mmci-omap-hs.0/mmc_host/mmc1
UPDATE: Nope... either need permissions set right or have to tell the system to look at the file.
Homer
Click to expand...
Click to collapse
Hold on a sec... are you doing this when booting into the Nook rom? 'Cause if you are then just keep in mind that the Nook is based on Eclair and vold.fstab was introduced in Froyo...
The Idea that I was trying to convey was that in case you happen to be booting from a Froyo image on the SD card, then having such a seupt in the vold.fstab would allow you to mount the remainder of the SD card as /sdcard.
If however, you want to share the SD card partition when you boot into Nook, I'm afraid that this wont work. I think the Eclair vold is kind of dumb and always tries to mount the first usable partition off of the card, which'll be the small boot partition in case you have burned nookiefroyo.
On Eclair, change vold.conf..
Thanks again everyone! The answer is here.
Homer
seems on 1.2 editing vold.fstab works instead of vold.conf Just replaced the first 'auto' with 4 and poof, part. 4 is now the SD card!! Previously before 1.2 update vold.conf was the route. That didn't seem to work this time so once I edited fstab it was perfect.
Okay, this is what I want to do. Under Linux, it would be done via /etc/fstab, but Android has changed some things up.
Certain apps store files and other things on the internal SD card of the RAZR. For example, the Amazon MP3 Cloud player stores all downloaded music files to /sdcard/amazonmp3. There is no way to change this. However, I store all my music on my external SD card. So, what I want to do is create a mount point on the internal sdcard for the /sdcard/amazonmp3 directory that points to a directory on my external sd card (/sdcard-ext/amazonmp3).
That way, when I download music, it will still attempt to save it to /sdcard/amazonmp3 which really is a mount point that points to /sdcard-ext/amazonmp3.
Now, there is an app called FoldersPlug which does this. However, it's not doing it across reboots and it's a little buggy in how it works. I'd rather just fix the /etc/vold.fstab file (if that's possible) to mount my directories for me, but I don't completely understand all the needs to be set up in it.
If I have the following directories set up:
/sdcard/amazonmp3 (this will be empty)
/sdcard-ext/amazonmp3 (this will contain all the files and folder structures that would normally be in /sdcard/amazonmp3)
I want it so that the /sdcard-ext/amazonmp3 directory is mounted to the /sdcard/amazonmp3 directory.
Here is what I see when I run the "mount" command to look at the current mount points that are mounted:
Code:
/dev/block/vold/179:97 /mnt/sdcard/amazonmp3 vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/179:97 /mnt/sdcard/DCIM vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/179:97 /mnt/sdcard/Pictures vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/179:97 /mnt/sdcard/Android/data/com.iconology.comics.app vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
These are the mount points that FoldersPlug set up and what I want to do instead is define them in the /etc/vold.fstab file but I don't know how they should be entered into the /etc/vold.fstab file.
Any help would be greatly appreciated!
Thanks!
I may be wrong, but I don't believe Android Vold can mount loopback (bind). You'll have to create a partition on the SD card instead, feeding it to Vold. Then try something similar to;
dev_mount /dev/block/mmcblk0p2 /mnt/sdcard/amazonmp3 /devices/platform/msm_sdcc.2/mmc_host/mmc1
Or if you forget about Vold, and use an ordinary mount;
# mount -o bind /sdcard-ext/amazonmp3 /sdcard/amazonmp3
In this case (bind loopback mount), you don't need it to be a partition.
Maybe the easies way is you just forget about the internal sdcard, replacing /mnt/cdcard with The real McCoy instead.
Cool. Thanks for the help. I see that this would have to be done using busybox, which is cool since I have that installed.
I tested what you stated and yup, that mounts them. So, I guess I'll fool around a little more with the scripts in /etc/init.d and see if I can't get it to work. I might have to do a sleep or something in the script to give the system time to mount the sdcards, but hopefully, this will work.
Thanks again for the tip!
UPDATE:
Well, here's my script but it doesn't seem to work. I have it first check to see if the number of lines returned from doing directory listing on the /sdcard and /sdcard-ext directories are 0. If so, it sleeps for 10 seconds and then tries it again, waiting for the sdcards to be mounted.
Once they are mounted, then I go and mount my directories. However, it doesn't seem to work. I have the script in the /etc/init.d directory and the permissions are set for execution (0777) like the other two scripts in there (98tweaks and S99SuperCharger).
If I go and run the script myself, it works and mounts the directories.
Here is the script. Any other ideas?
Code:
#!/system/xbin/sh
# Check if the SDCARDs are mounted yet.
result="`ls /sdcard/ | wc -l`"
while [ "$result" -eq 0 ]
do
sleep 10
result="`ls /sdcard/ | wc -l`"
done
result="`ls /sdcard-ext/ | wc -l`"
while [ "$result" -eq 0 ]
do
sleep 10
result="`ls /sdcard-ext/ | wc -l`"
done
# The cards are mounted. Now mount the directories
busybox mount --bind /sdcard-ext/DCIM /sdcard/DCIM
busybox mount --bind /sdcard-ext/amazonmp3 /sdcard/amazonmp3
busybox mount --bind /sdcard-ext/Pictures /sdcard/Pictures
busybox mount --bind /sdcard-ext/Android/data/com.iconology.comics.app /sdcard/Android/data/com.iconology.comics.app
Okay. Got it to work finally. I just decided to set it up using ScriptManager instead to run on boot.
Not sure why it wasn't working with the init.d process.
you rock!
iBolski said:
Cool. Thanks for the help. I see that this would have to be done using busybox, which is cool since I have that installed.
I tested what you stated and yup, that mounts them. So, I guess I'll fool around a little more with the scripts in /etc/init.d and see if I can't get it to work. I might have to do a sleep or something in the script to give the system time to mount the sdcards, but hopefully, this will work.
Thanks again for the tip!
UPDATE:
Well, here's my script but it doesn't seem to work. I have it first check to see if the number of lines returned from doing directory listing on the /sdcard and /sdcard-ext directories are 0. If so, it sleeps for 10 seconds and then tries it again, waiting for the sdcards to be mounted.
Once they are mounted, then I go and mount my directories. However, it doesn't seem to work. I have the script in the /etc/init.d directory and the permissions are set for execution (0777) like the other two scripts in there (98tweaks and S99SuperCharger).
If I go and run the script myself, it works and mounts the directories.
Here is the script. Any other ideas?
Code:
#!/system/xbin/sh
# Check if the SDCARDs are mounted yet.
result="`ls /sdcard/ | wc -l`"
while [ "$result" -eq 0 ]
do
sleep 10
result="`ls /sdcard/ | wc -l`"
done
result="`ls /sdcard-ext/ | wc -l`"
while [ "$result" -eq 0 ]
do
sleep 10
result="`ls /sdcard-ext/ | wc -l`"
done
# The cards are mounted. Now mount the directories
busybox mount --bind /sdcard-ext/DCIM /sdcard/DCIM
busybox mount --bind /sdcard-ext/amazonmp3 /sdcard/amazonmp3
busybox mount --bind /sdcard-ext/Pictures /sdcard/Pictures
busybox mount --bind /sdcard-ext/Android/data/com.iconology.comics.app /sdcard/Android/data/com.iconology.comics.app
Click to expand...
Click to collapse
Dude...a little renaming of dirs and i was running. thanx:good:
iBolski said:
Okay. Got it to work finally. I just decided to set it up using ScriptManager instead to run on boot.
Not sure why it wasn't working with the init.d process.
Click to expand...
Click to collapse
Works perfectly
Thanks for your work.
I have a question. Is it possible to create a folder in /mnt/sdcard (for example /mnt/sdcard/myfolder) with a script or automaticly after boot?
What i want is to mount the external SD to this folder (/mnt/sdcard/myfolder) but first you have to create the folder "mysdcard".
But i hope it works with a script only like:
Code:
#!/system/xbin/sh
# The cards are mounted. Now mount the directories
mkdir /mysdcard
busybox mount --bind /sdcard-ext /sdcard/mysdcard
sorry for my english
xoxys said:
Thanks for your work.
I have a question. Is it possible to create a folder in /mnt/sdcard (for example /mnt/sdcard/myfolder) with a script or automaticly after boot?
What i want is to mount the external SD to this folder (/mnt/sdcard/myfolder) but first you have to create the folder "mysdcard".
But i hope it works with a script only like:
Code:
#!/system/xbin/sh
# The cards are mounted. Now mount the directories
mkdir /mysdcard
busybox mount --bind /sdcard-ext /sdcard/mysdcard
sorry for my english
Click to expand...
Click to collapse
sorry my english bad...
if i don't have /etc/init.d directory... can i execute this command in another way?
thanks...
nb:
* modified with debuggerd is not work, my jelly-bean not execute debuggerd on boot
* add script install-recovery.sh on /system/etc is not work too....
I formatted SDCard in ext2. But the phone gives the message "No SDCard or not formatted."
In Android Terminal Emulator I run commands:
su
umount /mnt/sdcard
mount -t ext2 /dev/block/mmcblk1p1 /mnt/sdcard
but nothing happens.
When I created in /mnt folder a new folder sdcard1 and run mount -t ext2 /dev/block/mmcblk1p1 /mnt/sdcard1, my card is successfully mounted to /mnt/sdcard1
1) Why it is not mounted to /mnt/sdcard? How to do it? How I can mount ext2 instead of FAT32?
2) How to make mount SDCard to /mnt/sdcard at boot?
Hi,
My today goal is to swap internal memory with SD card on HTC Desire 310, and I almost accomplished that, because at this moment I need to send command trough adb to get this working:
So ADB and
Code:
su
busybox mount -t vfat -o umask=0000 /dev/block/vold/179:97 /mnt/sdcard
so now I need to create init.d script to swap internal memory with SD card at boot, I've tried something like that:
Code:
#!/system/bin/sh
mount -t vfat -o umask=0000 /dev/block/vold/179:97
script location /system/etc/init.d/04swapsd, and this script does nothing even I tried to add 'busybox' before 'mount' - zero changes.
SManager app gives me 'Device or resource busy' error
Can anyone help me with my problem?
Thanks!
meciu99 said:
Hi,
My today goal is to swap internal memory with SD card on HTC Desire 310, and I almost accomplished that, because at this moment I need to send command trough adb to get this working:
So ADB and
Code:
su
busybox mount -t vfat -o umask=0000 /dev/block/vold/179:97 /mnt/sdcard
so now I need to create init.d script to swap internal memory with SD card at boot, I've tried something like that:
Code:
#!/system/bin/sh
mount -t vfat -o umask=0000 /dev/block/vold/179:97
script location /system/etc/init.d/04swapsd, and this script does nothing even I tried to add 'busybox' before 'mount' - zero changes.
SManager app gives me 'Device or resource busy' error
Can anyone help me with my problem?
Thanks!
Click to expand...
Click to collapse
Try this: https://www.youtube.com/watch?v=nWN0tOSPFv4
It should work fine!
in this tutorial I can expand RAM memory, but this is I dont want to do.
I have about 800MB left in internal storage - and I cant install big games like Asphalt 8, and because of that I want to create script to automatically swap internal with external memory.
I've tried already apps like Internal 2 External SD, Link2SD, DirectoryBind, FolderMount.
I'm on jelly bean 4.1.2 (NeatRom 6.4) which uses /storage/extSdCard. I'd like to either create another mount point for the external sd card in /storage/sdcard1 or a symlink /storage/sdcard1 that points to /storage/extSdCard and I want that to survive after reboot. Currently it does not. I've read around but am still stuck.
The symlink trick works, but is erased after reboot. I created it as:
Code:
su
mount -o rw/remount /
ln -s /storage/extSdCard /storage/sdcard1
I tried to add a mount point by editing /etc/vold.fstab but the mount point is not created after reboot. The line I added in /etc/vold.fstab is the 2nd line here:
Code:
dev_mount sdcard1 /storage/extSdCard auto /devices/platform/s3c-sdhci.2/mmc_host/mmc1
dev_mount sdcard1 /storage/sdcard1 auto /devices/platform/s3c-sdhci.2/mmc_host/mmc1
Any clues?
Well, after some more digging around, this are some options -- but note that these also depend on which rom you're using. On NeatRom 6.4 (jelly bean 4.1.2 based on Samsung XXMS4):
There is a file /system/bin/customboot.sh where you can add commands.
Inspecting /etc/init.d/97neatrom I notice it executes "postbootinit" so you should be able to edit or create /system/bin/postbootinit and place commands in there as well.
You can also add a file in /etc/init.d, say /etc/init.d/99sdcard1 that executes commands.
NOTE 1: the root dir / is mounted as readonly at boot so if you want to add a symlink or mount point in /storage then you need to mount it as read-write first.
NOTE 2: the external sdcard dev block volume is not immediately available after boot, I had to add a 2 second delay. This is not a problem for symlink.
Symlink solution (easier, no delay waiting for block device), place the following in /etc/init.d/99sdcard1
Code:
#!/system/bin/sh
ln -s /storage/extSdCard /storage/sdcard1
ln -s /storage/extSdCard /mnt/sdcard1
ln -s /storage/sdcard0 /mnt/sdcard0
I also added standard symlinks in /mnt.
Mount solution, place the following in /etc/init.d/99sdcard1 (run "mount" first in a terminal to find out which block device in /dev/block/vold is mounted in /storage/extSdCard):
Code:
#!/system/bin/sh
sleep 2
mount -o rw,remount /
mkdir /storage/sdcard1
# /dev/block/vold/179:9 is the one mounted in /storage/extSdCard
mount -t vfat -o umask=000 /dev/block/vold/179:9 /storage/sdcard1
ln -s /storage/extSdCard /mnt/sdcard1
ln -s /storage/sdcard0 /mnt/sdcard0
The reason I needed this is that I used Cyanogenmod 11 (KitKat 4.4) for a long while and got fed up with it being very slow on my SGS2 so I came back to Jelly Bean, but I had many apps that were using /storage/sdcard1