[Q] Automatically Mount Rhapsody to External SD - Android Q&A, Help & Troubleshooting

So I just got a 'new' Samsung Exhibit II 4g which has a very small amount of internal memory, and since Rhapsody doesn't have a way to distinguish between internal /sdcard and external /sdcard I decided to try to figure out how to mount my rhapsody folder to the external.
Code:
mount -o bind /sdcard/external_sd/rhapsody /sdcard/rhapsody
Now that works fine. Rhapsody downloads to the /sdcard/rhapsody folder and is none the wiser on it being on the external memory card, however, I am stumped on how to get this behavior to happen automatically.
I have tried adding new scripts to /etc/init.d or appending that line to other scripts with no success. I also tried adding the line to /etc/vold.fstab with no luck.
Is it not possible, or am I missing something obvious? The phone is actually for my dad and I don't want to have to teach him how to open terminal emulator and run the shell script...
I've tried it on my Motorola Atrix and couldn't get it to mount automatically either. It's a little different, since it mounts the external as /sdcard-ext, but the theory was the same.
I originally tried to use symbolic links, but the partitions are formatted to fat32 and don't support linking. I'm not sure if I could switch it to ext3 or ext4 without losing any functionality.
Thanks

Related

[Q] Messing with /etc/vold.fstab & Software RAID-0

Since day 1 of owning the Atrix, it bothered me that that there were two mount points:
/mnt/sdcard (16GB internal memory)
/mnt/sdcard-ext (32GB micro SD card that I shoved in there)
Why it bothers me:
1) It is the year 2011 -- technology's progressed too far to be doing stupid s$&# like this
2) Most devs have no idea that /mnt/sdcard-ext even exists.
3) When I plug my phone in to my BMW w/ iDrive the internal memory gets presented to the iDrive system, NOT the SD card. Problem is that all of my music is on the SD card, NOT the internal memory.
4) Why can't I have 48GB of contiguous space instead of two separate 16GB and 32GB mount points??!?!
...so, I got fed up and edited /etc/vold.fstab, commented out /mnt/sdcard and renamed /mnt/sdcard-ext to /mnt/sdcard. Oh, and rebooted...
All is fine and dandy now, there's one 32GB /mnt/sdcard and NO 16GB /mnt/anything. The device is still there, just not mounted. So that means that I lost 16GB of usable space. Yes, but that leads me to my work-in-progress project. Somehow I need to port mdadm to the Atrix and setup a RAID-0 with the following devices:
The internal eMMC:
/devices/platform/tegra-sdhci.3/mmc_host/mmc0/mmc0:0001/block/mmcblk0/mmcblk0p18
The SD card:
/devices/platform/tegra-sdhci.2/mmc_host/mmc2 /devices/platform/tegra-sdhci.2/mmc_host/mmc1
Once the Software RAID-0 is established, it should be as simple as mounting it back to /mnt/sdcard. It's not rocket science, just Linux .
So my question: In the interest of time, has anyone even attempted to do that yet? By the way, Rule #1 if it works: DON'T REMOVE THE SD CARD!
I never thought of that being an issue there but yeah i see your point now. Some car stereo systems do see the external sdcard though; my el-cheapo generic joint from best buy could even use usb hubs, thereby letting me plug in my treo and my usb stick. It would index music from both.
RAID on Android might not be a good thing here though; what happens when the internal sd card and the external card can't be read or written to at the same speed?
Or if somehow the sd card inadvertently comes loose inside the phone? (This happens to me from time to time on my current phone)
Then again, I'm only familiar with the PC / Data center implementation of RAID
Sent from my SBM005SH using XDA App
Does changing default storage in the settings have any effect? I'd laugh if it did
Sent from my Xoom using XDA App
starrwulfe,
yeah, I guess a firmware update to the iDrive *could* in theory fix that issue but I guess they're expecting people to plug in a single USB flash drive to it. Good thing the el-cheapo one is smarter than that
as far as the RAID-0 being different speeds, it shouldn't matter because it's a RAID--0 (spanning). So you might get different speeds depending on which memory device it's being read from/written to but it shouldn't cause any problems. As far as it coming loose inside the phone, what are you doing with your phone that makes that happen? lol Mine's never come out
ChongoDroid,
that would be TOO easy lol...but naw, that's just for windows media sync so you have a choice of which storage location is presented to windows media player..
varandian said:
Since day 1 of owning the Atrix, it bothered me that that there were two mount points:
/mnt/sdcard (16GB internal memory)
/mnt/sdcard-ext (32GB micro SD card that I shoved in there)
Why it bothers me:
1) It is the year 2011 -- technology's progressed too far to be doing stupid s$&# like this
2) Most devs have no idea that /mnt/sdcard-ext even exists.
3) When I plug my phone in to my BMW w/ iDrive the internal memory gets presented to the iDrive system, NOT the SD card. Problem is that all of my music is on the SD card, NOT the internal memory.
4) Why can't I have 48GB of contiguous space instead of two separate 16GB and 32GB mount points??!?!
...so, I got fed up and edited /etc/vold.fstab, commented out /mnt/sdcard and renamed /mnt/sdcard-ext to /mnt/sdcard. Oh, and rebooted...
All is fine and dandy now, there's one 32GB /mnt/sdcard and NO 16GB /mnt/anything. The device is still there, just not mounted. So that means that I lost 16GB of usable space. Yes, but that leads me to my work-in-progress project. Somehow I need to port mdadm to the Atrix and setup a RAID-0 with the following devices:
The internal eMMC:
/devices/platform/tegra-sdhci.3/mmc_host/mmc0/mmc0:0001/block/mmcblk0/mmcblk0p18
The SD card:
/devices/platform/tegra-sdhci.2/mmc_host/mmc2 /devices/platform/tegra-sdhci.2/mmc_host/mmc1
Once the Software RAID-0 is established, it should be as simple as mounting it back to /mnt/sdcard. It's not rocket science, just Linux .
So my question: In the interest of time, has anyone even attempted to do that yet? By the way, Rule #1 if it works: DON'T REMOVE THE SD CARD!
Click to expand...
Click to collapse
Give me the exact year and model of your Bimmer as well as the exact issue (I assume it's that the i-Drive won't see the external SD in your Atrix), and I will look into it at work. I assume you are connecting it through the USB Aux input. It may be a software issue or it may just be that the i-Drive doesn't do it. I will see if I can find out for sure.
I have the exact same setup on my Atrix (all music on external SD) so I can play with it at work.
I'm not back to work until Friday, but i'll see what I can dig up then.
GibMcFragger,
2008 535i w/ the navigation option. Thanks for offering to look into it but I don't want both of them to show up in the iDrive, I want to have one device show up as 48GB instead of one as 16GB and the other as 32GB.
varandian said:
GibMcFragger,
2008 535i w/ the navigation option. Thanks for offering to look into it but I don't want both of them to show up in the iDrive, I want to have one device show up as 48GB instead of one as 16GB and the other as 32GB.
Click to expand...
Click to collapse
Oh. Do they both show up at the moment in the i-Drive as separate drives, or the external doesn't shop up at all? If they both show up, but as separate drives.........that is normal I think because of the way the phone mounts them as you said earlier.
So basically:
External drive doesn't show AT ALL in the i-Drive = Possible issue
External drive shows but as separate drive than internal in i-Drive = Normal
As for changing them to show as one in RAID, I would think that would cause more issues that it's worth as both the internal and external drives have to be the same speed of card (highly unlikely as we don't know what flash memory Moto used in the phone), as well as the fact that SD cards tend to corrupt data easily.
3) When I plug my phone in to my BMW w/ iDrive the internal memory gets presented to the iDrive system, NOT the SD card. Problem is that all of my music is on the SD card, NOT the internal memory.
Click to expand...
Click to collapse
Not sure what the goal is here, but you could just put a mount of the external sdcard in the internal memory folder, say ln -s /mnt/sdcard-ext /sdcard/Music. Or you could edit vold.conf maybe to change /mnt/sdcard-ext to /mnt/sdcard/Music.
Cheers!
Saw this thread while waiting for the vet and forgot about it. Just came to say, what you're trying to achieve isn't RAID 0, or even RAID at all. It's a spanned volume, which is variously referred to as JBOD or SPAN.
The real question is, does Android support such a thing. Without checking, no way to know. My gut says no, though.
GibMcFragger said:
As for changing them to show as one in RAID, I would think that would cause more issues that it's worth as both the internal and external drives have to be the same speed of card (highly unlikely as we don't know what flash memory Moto used in the phone), as well as the fact that SD cards tend to corrupt data easily.
Click to expand...
Click to collapse
As was stated previously, the speed of the cards doesn't matter. However, it does mean that the phone now requires that specific (external) SD card be inserted at all times, or the filesystem will be considered corrupt, and data will be lost.
To the OP: the issue with the external SD card not being available in the BMW is a problem with how the BMW handles multi-LUN USB storage devices: multiple storage devices available via one single USB connection. GibMcFragger's suggestion is spot on, with checking for available firmware updates.
Though I don't think it's a good idea, you could always look at a UnionFS mount of the external SD card on top of the internal SD card. This allows for the SD card to be backed up and replaced without any trickery.
NFHimself said:
Not sure what the goal is here, but you could just put a mount of the external sdcard in the internal memory folder, say ln -s /mnt/sdcard-ext /sdcard/Music.
Click to expand...
Click to collapse
I tried doing an ln -s /mnt/sdcard-ext /mnt/sdcard/ExternalSD and got the error:
Code:
link failed Operation not permitted
Then I did su (yes, I'm rooted), and then the same command and got the same error. I then tried doing the ln command without the -s (both as su and regular) and got this error:
Code:
link failed Cross-device link
Any ideas?
Also, editing /system/etc/vold.fstab so that internal sd card mounts first and then mount external sdcard on /mnt/sdcard/ExternalSD doesn't work. Loads internal sd just fine though....
quordandis said:
I tried doing an ln -s /mnt/sdcard-ext /mnt/sdcard/ExternalSD and got the error:
Code:
link failed Operation not permitted
Then I did su (yes, I'm rooted), and then the same command and got the same error. I then tried doing the ln command without the -s (both as su and regular) and got this error:
Code:
link failed Cross-device link
Any ideas?
Click to expand...
Click to collapse
ln does a hardlink which is just two metadata references to the same data blocks. It will look like two different files, but the data is stored in just one place on disk. If you delete one, the data stays (for the other ref) and no space is freed. This is not supported across filesystems, only within a single filesystem.
ln -s creates a symbolic link where the link is just a special file that references the real file, not just the data blocks of that file. This works across filesystems, but is filesystem dependent. I'm pretty sure the vfat filesystem that is doubtlessly on your sdcard doesn't support this.
messing with RAID is risky. A previous poster mentioned something like unionFS, but unfortunately what we're talking about here is individual partition exporting via USB, and so filesystem trickery won't cut it. What you probably want to do is just prevent the internal sdcard from being exported and limit that to only the external sdcard. I believe this can be accomplished from within the android GUI, no?

[Q]Winamp WiFi sync to External SD Card

Hey guys!
I've searched through the forum, and Google, but I've not found anything of help
Is there any setting, any hack or customization of any kind, to make Winamp store the WiFi sync songs to a custom folder? It's putting them on the phone right now, but I'd like them on the External SD card.
Thanks for your help!
+1 on this.
Wifi Sync only syncs data to /sdcard/music folder no matter what we do...
In Samsung Galaxy SL (I9003), /sdcard is internal sdcard and /sd (~/external_sd) is external sd.
I tried to create a symlink to ~/external_sd/Music in /sdcard/music using terminal emulator so that /sdcard/music points to ~/external_sd/Music (or /sd/Music)
But it says operation not permitted.
After a bit of research, it was clear why it was not allowing.
Our external sd card is fat32 filesystem and its not possible to create symlinks on that filesystem.
I was thinking why do we need external sd to be fat32, wasnt it just fine to use ext3 or some other linux friendly file system?
And maybe change fstab to mount it as ext3. smthing like that?
Just checking possiblity.

[Q] My Infuse G4 phone mounts the internal SD card as '._' a hidden mount point

Lately whenever I connect my Infuse G4 to my linux box, the internal SD card gets mounted as ._ . For those familiar with linux, the period in front makes this a hidden partition making it very difficult to work with.
I have not figured out how this changed as it used to mount and work just fine. Any thoughts? I looked at the fstab file but realized that the automount information is stored elsewhere.
Bob
have you tried renaming it?

[Q] Redirect Rdio app storage to sdcard-ext?

Rdio's Android app is a bit of a disaster, but thankfully they're working on a new one. However, in the meantime, any ideas on how to get it to put its local cached data on the external SD card, instead of the internal storage? It seems to explicitly use /sdcard/rdio, and ignores any of the system settings for data storage. If the internal filesystem wasn't fat32, I could just set up a symlink to /sdcard-ext, but that's not possible. I could change the mount locations of the two storage partitions, but then I'd have the opposite problem with a bunch of other apps.
Any ideas on how to get around this? Would rather put music on my 32GB sd card than fill up the internal storage
rustak said:
Rdio's Android app is a bit of a disaster, but thankfully they're working on a new one. However, in the meantime, any ideas on how to get it to put its local cached data on the external SD card, instead of the internal storage? It seems to explicitly use /sdcard/rdio, and ignores any of the system settings for data storage. If the internal filesystem wasn't fat32, I could just set up a symlink to /sdcard-ext, but that's not possible. I could change the mount locations of the two storage partitions, but then I'd have the opposite problem with a bunch of other apps.
Any ideas on how to get around this? Would rather put music on my 32GB sd card than fill up the internal storage
Click to expand...
Click to collapse
would love to know this as well for my GS3.
Try this as root in your terminal emulator or in adb shell:
Code:
mkdir -p /sdcard-ext/rdio
chmod 777 /sdcard-ext/rdio
mount --bind /sdcard-ext/rdio /sdcard/rdio
Note however that I don't have rdio and don't even know what it is, so this is entirely untested.
If this happens to work (and you'll know by files appearing in /sdcard-ext/rdio), you'll need to execute these commands on every boot. If you're on a CM-based ROM, I suggest putting them into your userinit.sh.

Mount external sd

I am trying to mount an external sd card that is ext4 file system. I am mounting it on a directory of my internal sd card. It seems only root sees this. If I transfer a file to this directory as normal user it gets stored on internal sd. If I run df as normal user I don't see the ext4 mount, but if I su then df, I can see the mount. Basically what I'm trying to accomplish is using my external sd with ext4 instead of exfat.
Also if I insert my 128gb sd into my Linux computer it only shows I think 25gb? If I put it in phone I see 128gb? Do I need a new card reader for my computer?
I download a lot of stuff onto phone and sync with computer, using mtp sometimes crashes, that's why I'd like to use ext4 and just toss my sd into computer and transfer.
I don't know why Android wants to use exfat when ext4 is so much better and native already. Maybe just to keep support for windows?

Categories

Resources