[Q] How to modify sdcard mount script? - Eee Pad Transformer Q&A, Help & Troubleshooting

Hi.
As so many apps still don't support card locations other than /mnt/sdcard, I manually run as root the following to mount /Removable/MicroSD off /mnt/sdcard
mount -o bind /Removable/MicroSD /mnt/sdcard/MicroSD
This works great. Non /Removable aware apps then pick up files on the Transformers sdcard slot.
However, I'd like to automate this. Anyone know how I would do this? I guess a tweak to the android equivalent fstab file?
Thanks!

I have been looking for a solution for this, and found an older thread here on XDA with several methods.
I used root explorer to modify the mount point in /etc/vold.fstab
Just change the mount point from /Removable/MicroSD to /mnt/sdcard/MicroSD and reboot.
This seems to work great so far, but I have only been using this for a couple of hours. Don't forsee any problems though.
Sent from my Transformer TF101 using Tapatalk

kbrabble said:
I have been looking for a solution for this, and found an older thread here on XDA with several methods.
I used root explorer to modify the mount point in /etc/vold.fstab
Just change the mount point from /Removable/MicroSD to /mnt/sdcard/MicroSD and reboot.
This seems to work great so far, but I have only been using this for a couple of hours. Don't forsee any problems though.
Sent from my Transformer TF101 using Tapatalk
Click to expand...
Click to collapse
Thanks for that. I'll give it a go!

Hmm, this seems to cause a force close when you eject the card. It then also fails to mount the first 2-3 times when you plug the card back in.
I guess some Asus service is relying on the card being at /Removable
There must be a way to autorun a mount -bind somehow?

Have you also tried hooking up to your computer, as I know on some devices changing the mount points to nested like that would screw up the process for mounting to the computer properly.

I haven't experienced any force closes, or any problems mounting the card when reinstalled. As far as mounting on the computer, I have not tried. I agree that a -bind would be the best way, but haven't found a way to do this at boot yet.
Sent from my Transformer TF101 using Tapatalk

Related

Change mount point for SDCARD

I have seen this mentioned but no solution. (It's been causing mild headaches for lots of things from storing camera pics to flashing ROMs)
Is there a way to get the Transformer to use the SDCARD as the actual default storage point?
It's a severe pain that everything defaults to the internal storage that it thinks is external then I have to move everything to the external SDCARD after that.
It would be a moot point but I have a 32GB SDCARD that sits empty while my internal storage fills up. I store a lot of music and movie files for editorial, etc and the Transformer is great for that. . .except for the dumb mount points of the sdcard.
You could make a soft link in /sdcard/ that points to /Removable/MicroSD/ but your sdcard has to be formatted NTFS to support it. I would assume the mount points for removable media are located in /etc/fstab
This drives me a tad crazy as well. That and the naming convention. Should be under /media/ or /mnt/ but "/Removable/MicroSD/" is a ginormous pain when you're using to unix/linux media mounting conventions or navigating under the shells
Oh well.
Sent from my Transformer TF101 using XDA Premium App
This was done for other devices such as the Notion Ink Adam so I know it's possible.
sent from a device using an app
uncorq said:
This drives me a tad crazy as well. That and the naming convention. Should be under /media/ or /mnt/ but "/Removable/MicroSD/" is a ginormous pain when you're using to unix/linux media mounting conventions or navigating under the shells
Oh well.
Sent from my Transformer TF101 using XDA Premium App
Click to expand...
Click to collapse
I'll agree with that, but its something I can over look. I'm assuming you would has to change this line in /etc/vold.fstab
Code:
dev_mount microsd /Removable/MicroSD auto /devices/platform/sdhci-tegra.2/mmc_host/mmc1
just have to get the docks sdcard to mount into the devices internal memory "sdcard" in the same manner the microsd does, should be fairly easy to do, just have to poke around a bit to see how microsd is being mounted
I try link 2 sd and data root 2 sd on the market, but the apps would not recognize the microsd. So there no way of linking to the sd by apps.
Sent from my Transformer TF101 using Tapatalk
I try link 2 sd and data root 2 sd on the market, but the apps would not recognize the microsd. So there no way of linking to the sd by apps.
Click to expand...
Click to collapse
Exactly. I would consider this a fairly obvious flaw to Asus that they change the accepted behavior being used everywhere else. Overall happy with the device but this is causing a headache since it's the only android device I have that operates this way it's not something I can just "get used to" as the odd man out. Why include external storage (a major reason for this over the Galaxy Tab 10.1 for me) and then make it a pain to use?
I'm assuming you would has to change this line in /etc/vold.fstab
Click to expand...
Click to collapse
Will see if that helps but wondering if this would cause a conflict elsewhere.
I'm making this too complicated in my head.
Simply: The internal and external mount points should be swapped.
Anything I want on the internal storage I can move, but that's fewer and further between than the sdcard. Maybe some music or whatnot.
This would solve other problems like ROM managements, etc.
one more thing... if it's just photos you are wanting to move, you could
"ln -s /sdcard/DCIM /Removable/SD/DCIM"
all new photos taken will end up on SD I might have that backwards? type ln in terminal with no arguments, and it will tell you what you need
do this for any folders you want on SD, then androids core stuff that apps need, and you don't need elsewhere still stays internal
I get "operation not permitted" for some reason. I have root permissions. Sudo, etc.
bitter1 said:
I get "operation not permitted" for some reason. I have root permissions. Sudo, etc.
Click to expand...
Click to collapse
FAT32 doesn't support symlinks.
Try this instead.
Regards,
Dave
Oh yeah, duh. Will give the other a shot.
I have to stick to FAT32 because I occasionally have to use OSX to shuffle things around.
dan-htc-touch said:
one more thing... if it's just photos you are wanting to move, you could "ln -s /sdcard/DCIM /Removable/SD/DCIM"
Click to expand...
Click to collapse
You also need to be root or prefix that with sudo
foxmeister said:
FAT32 doesn't support symlinks.
Try this instead.
Regards,
Dave
Click to expand...
Click to collapse
cd /mnt/sdcard
mkdir fssd
mount -o bind /Removable/SD /mnt/sdcard/fssd
yeap that works.. Thanks..
If your running Prime (Or something that supports init.d scripts), you could add that command to one of the files in /system/etc/init.d/ to make it automatically run at boot
Tortel1210 said:
If your running Prime (Or something that supports init.d scripts), you could add that command to one of the files in /system/etc/init.d/ to make it automatically run at boot
Click to expand...
Click to collapse
I just did that to 07 and no joy
After reboot no effect. I'll play some more later.
which command did you add? you only need to add the last one.
brando56894 said:
which command did you add? you only need to add the last one.
Click to expand...
Click to collapse
sure. only that one.
maybe the MicroSD (yeah changed it) is not mounted yet when the script runs?! or does the script run at all?!
off to bed now. tomorrow is another hot day.
I think you need to prefix it with /system/xbin. Heres the command I used in my init scripts:
Code:
/system/xbin/mount -o bind /Removable/MicroSD/DCIM/ /sdcard/DCIM/
That code will make pictures save on the micro sd card instead of internal memory.
Also, make sure the folder in the internal memory where you want it to bind to the external storage is empty.

Titanium backup

Does it work for anyone else with the external SD problems?
Tiamat rom 2.0/oc 'ed kernal
Sent from my Xoom using Tapatalk
Motive101 said:
Does it work for anyone else with the external SD problems?
Tiamat rom 2.0/oc 'ed kernal
Sent from my Xoom using Tapatalk
Click to expand...
Click to collapse
Are you asking if TB is working for any of us, or are you referring to SD card issues?
Could you clarify your question?
If you mean that under stock 3.2 external1 is not writeable by default then yes you may have issues with TB.
Mine was backing up only data to external1 no apps.
There is a thread which shows some adb commands to get external writeable but you have to do it on every boot.
So I'll find that link and post it here. My advise is do that, TB backup and then flash the new 2.0 rom
Edit: right I found something else, now I have not tried this as I don't need to any more but someone has written an app
http://forum.xda-developers.com/showthread.php?t=1173195
Other than that, you can do long hand, what I did
adb shell or any other terminal emulator to get to a shell on the xoom
su to get to the # prompt
umount /mnt/external1 mount -t vfat -o fmask=0000,dmask=0000,rw /dev/block/platform/sdhci- tegra.2/mmcblk0p1 /mnt/external1
Sent from my Xoom using Tapatalk

SDCard and SDCard-ext wrong location

I just installed a new ROM and the SDCARD and SDCard-ext are in the wrong location. They are listed under the root director ( / ) and /storage instead of under /mnt/sdcard
Does it work? You could create a symlink. If that fixed it, put it in a script on bootup.
post-mortem said:
Does it work? You could create a symlink. If that fixed it, put it in a script on bootup.
Click to expand...
Click to collapse
Does it work is a relative question. (wasn't meant to sound wise-a$$). I can access them, but apps do not see them at all. They are looking for the cards in /mnt therefor not finding them.
I changed them in /system/etc/vold.fstab but now it won't boot. The not booting is not an issue, I can fix that, but I don't know how to fix these incorrect paths/
No one else who's using this ROM is having these problems? I say either reflash, create symlinks, or choose another ROM.
post-mortem said:
No one else who's using this ROM is having these problems? I say either reflash, create symlinks, or choose another ROM.
Click to expand...
Click to collapse
Not sure if anyone else is running it. Haven't been able to find a thread on here for it. How do you do symlinks?
mikemikemikexxx said:
Not sure if anyone else is running it. Haven't been able to find a thread on here for it. How do you do symlinks?
Click to expand...
Click to collapse
ln -s target shortcut
See a bit more here.
Make a script in your /system/etc/init.d directory, so these links will be created on every boot.
post-mortem said:
ln -s target shortcut
See a bit more here.
Make a script in your /system/etc/init.d directory, so these links will be created on every boot.
Click to expand...
Click to collapse
From what I have read you cannot use them on FAT.
Why does editing this file not work? I fail to see how Android could do anything other than read the file, provided permissions are the same.
mikemikemikexxx said:
From what I have read you cannot use them on FAT.
Why does editing this file not work? I fail to see how Android could do anything other than read the file, provided permissions are the same.
Click to expand...
Click to collapse
The internal memory is not FAT; typically, only the 1st partition on the SD card is FAT, everything else should be EXT. So, executing ln -s /storage /sd-ext should work (or wherever it's currently being mounted).
post-mortem said:
The internal memory is not FAT; typically, only the 1st partition on the SD card is FAT, everything else should be EXT. So, executing ln -s /storage /sd-ext should work (or wherever it's currently being mounted).
Click to expand...
Click to collapse
I meant the card but ln is not working.
One more thing I am going to try is an ADB pull and push. If that doesn't work I really need some community support.
bump to the front.
Are my questions that complex or that dumb that I get so few replays? /bump
Sent from my XT875 using xda app-developers app
Is there a good reason that you don't want to use another ROM?
Mainly speed and compatibility. I need the offline commands only available in JB. Stock ROM is dead slow and is only ICS. Other custom ROMs were also on the slow side and/or battery hogs.
Sent from my XT875 using xda app-developers app
So, is this right?
FAT partition is currently being mounted as /storage
EXT partition is currently being mounted as /mnt/sdcard
post-mortem said:
So, is this right?
FAT partition is currently being mounted as /storage
EXT partition is currently being mounted as /mnt/sdcard
Click to expand...
Click to collapse
Well the way my phone is laid out is
System (I assume too large so they split it in two which resulted in the below SD-Card)
SD-Card
SD-Card EXT (The actual SD Card) - FAT32
I assume the System and SD-Card are standard Android partition format.
Do you use a file manager on the phone, such as ES File Explorer? Are you familiar with using adb?
Edit: Basically, I'm trying to figure out the exact path of the mounted partitions, and where they're supposed to be mounted.
post-mortem said:
Do you use a file manager on the phone, such as ES File Explorer? Are you familiar with using adb?
Edit: Basically, I'm trying to figure out the exact path of the mounted partitions, and where they're supposed to be mounted.
Click to expand...
Click to collapse
They are 100% supposed to be mounted under: /mnt/sdcard and /mnt/sdcard-ext
Right now they are mounting to: /storage/sdcard and /storage/sdcard-ext
There is also an entry in under root ( /sdcard and /sdcard-ext --- For these two I am booting into stock ROM to see if they are suppose to be directly in root as well, will post up when I know)
Check the scripts in your init.d to see if one of them is mounting the sd partitions under /storage.
I suppose you could also try booting without the sd card in place, and see if those /storage directories still exist. Not sure how much that will tell you, though.
post-mortem said:
Check the scripts in your init.d to see if one of them is mounting the sd partitions under /storage.
I suppose you could also try booting without the sd card in place, and see if those /storage directories still exist. Not sure how much that will tell you, though.
Click to expand...
Click to collapse
The init.d for sure says to load sdcards to /storage . (on this particular ROM only)
I will try without the sdcard as you suggested and let you know. Battery died on me, phone won't boot even when plugged in until at least 10%.
Which script is mounting the sd card to /storage? Is it part of the ROM, or is it something which the dev included in this ROM? I ask in case the ROM expects the sd card to be mounted there.
Regardless, try changing the script to link to /sdcard.

[Q] Has anyone found an App to SD solution?

I've looked through the big development thread and haven't found a clear answer but has anyone found an app to sd solution that works?
This stupid SdCard / ExtSdCard arrangement is making me pull my hair out. I just realized my titanium backups weren't really backups since they were being stored on my internal memory.
I managed to change my backup folder and free up some space by moving all my backups to the SD card, but for some reason I cannot move apps to SD through Titanium or any other app I've tried.
Does anyone know how to do this? Is there a setting in titanium I need to change or is this just something we have to deal with forever short of flashing a custom rom?
SDCARD binary
Galahad_Knight said:
I've looked through the big development thread and haven't found a clear answer but has anyone found an app to sd solution that works?
This stupid SdCard / ExtSdCard arrangement is making me pull my hair out. I just realized my titanium backups weren't really backups since they were being stored on my internal memory.
I managed to change my backup folder and free up some space by moving all my backups to the SD card, but for some reason I cannot move apps to SD through Titanium or any other app I've tried.
Does anyone know how to do this? Is there a setting in titanium I need to change or is this just something we have to deal with forever short of flashing a custom rom?
Click to expand...
Click to collapse
I've found the real problem, but not the solution.
My Relay runs ICS. It is rooted, and you have to root to even touch any of this. The phone has a binary, /system/bin/sdcard that controls the internal memory and your SDcard. now, I have found that if you are rooted, you can chmod this binary (or use rooted ES File explorer to remove all executable properties) so that it can no longer run, then reboot. then you can run, as superuser "mount -o rw,bind /mnt/extSdCard /mnt/sdcard"
Seems great... Except vfat doesn't like to be bound in such a fashion, and you quickly lose write access and it starts mangling your files.
vfat just doesn't seem to work for us in this case. I've changed mine back, and reformatted my SDcard to be NTFS and mounted with paragon NTFS/HFS, which has completely stabilized my filesystem. only problem is, I can't get this to mount -o bind worth a damn.
I'm toying with the idea of reformatting my SDCard part vfat and either part NTFS or EXT4. maybe I get get the phone to natively recognize ext4 for the sdcard (even if I have to create a script myself)
keypoints I've found in this process:
1. the sdcard binary only allows access to 1023 files at once on either the SDcard, or the memory block it is using as the SDcard. too many pictures in your gallery? so sorry... can't load them all.
2. the physical device for your sdcard is /dev/block/mmcblk1. the partitions are mmcblk1p* (starting with 1)
3. the phone will not allow the sdcard binary to be killed manually. removing the executable permission and then rebooting the phone seems to be the only way to get it to stop.
4. vfat is prone to errors, and android seems to love screwing with the card. getting off vfat seems to be crucial to this process.
As you've gotten no other replies, and this is a gigantic concern for me as well, I'm going to keep working on this myself, in the hopes that I can get the phone to actually use the SDcard the way we hope it can be used.

[APP][4.4]FIXED: Rsync failed to set time on file on KitKat with SD Card Fix in place

There have been lots of posts and articles and questions about the dreaded SD Card access changes in KitKat, and how the SD card can no longer be freely written.
And there is an excellent thread here http://forum.xda-developers.com/showthread.php?t=2684188 about a great app that can fix it.
However, whether you fix your permissions manually, or using this app, there is still a very subtle difference.
I've been using rsync for Android for several years. I have a central Linux server at my house, on which I keep all my files, and I periodically rsync FROM my server, TO my Android Device (in this case, a Galaxy Note 3 SM-900 4G running 4.4.2) to a structure on the external SD card. That way I can keep a local copy of my files with me at all times. I pretty much fill a 64GB SD card this way.
Under 4.3 and earlier, I used /storage/extSdCard (or /mnt/extSdCard ) as my mount point to access my external SD card, and everything worked fine.
However, under KitKat, rsync was having a very strange issue. Attempts to rsync a file would result in:
rsync - failed to set time on file
for any file that it tried to transfer. It seemed like it was transferring the file, but was unable to change the timestamp on the file.
The solution turns out to be visible if you run Android Terminal Emulator and look at the output of the mount command. Tracing through that, I discovered that there is also a less-obvious alternate mount point, which is:
/mnt/media_rw/extSdCard
And, indeed, using that as an rsync target solves the timestamp problem.
Felt this should be posted somewhere, hope this is the right place.
Thanks.
Glen
Nice find bro!!
Sent from my SM-G900W8 using XDA Premium 4 mobile app
Amazing. Thank you.
I'm having the same problem on Lollipop and I don't have that mount point. I tried both /mnt/extSdCard and /storage/sdcard1 and both still get the error. Any ideas?

Categories

Resources