2

I've got a Samsung GT-I9505 phone with Google Edition Rom installed. As my phone comes with 16Gb internal storage, I bought a 32Gb microSD. However, the phone still uses emulated SD card to store all data.

I looked through the filesystem and found two places which might be of interest:

symlink: /sdcard -> /storage/emulated/legacy
symlink: /storage/sdcard0 -> /storage/emulated/legacy

My actual SD card, however, is at /storage/extSdCard

As far as I get it, apps use the first symlink to access SD card. I tried to use terminal emulator with root permissions to make these symlinks point to the right direction, however, it says that the filesystem is read-only.

This is where I got stuck and ask for your help to make my phone use the right SD card.

1

As far as I know, you can change this by editing /system/etc/vold.fstab, but if it doesn't have what you need, you might have to tamper with init.rc inside boot.img.

I'm not sure if what you're aiming to do is safe though, what with the recent switch to fuse sdcards.

  • I edited vold.fstab, but no visible changes after reboot. – svz May 10 '14 at 14:21
  • 1
    @svz Then I guess the storages are mounted by init. I guess you can try and modify init.rc, but be sure to take a Nandroid backup first - tampering with the kernel is risky business! – aureljared May 10 '14 at 14:25
  • I can see no sign of sdcard or anything similar in init.rc. – svz May 10 '14 at 14:34
  • @svz Really? It must be in one of the other init files. – aureljared May 11 '14 at 0:16
  • @svz Wait, I think I got it. It's in init.qcom.rc. Look for export EXTERNAL_STORAGE – aureljared May 11 '14 at 6:44
1

Multiple approaches here, none tried myself as I never had that issue:

First, before manually altering the symlinks, you might need to re-mount the root file system read-write. Still, even if you succeed this way, you might have to repeat the actions after each reboot – so let's check for other alternatives.

There are several apps availabe which care for this kind of problem, some of them even specific to Samsung devices. A good candidate is probably Root External 2 Internal SD, which "swaps" the two cards just the way you want to do it. No manual fiddling with init.rc or vold.fstab required.

  • I tried the app: Root External 2 Internal SD, but it didn't help. Remounting /system partition did allow me to move a bit further, but changing /sdcard symlink to /storage/extSdCard doesn't seem to help. Apps are still saving data to emulated SD card. – svz May 10 '14 at 13:33
  • Have you checked any of the other candidates from behind the first link in my answer? – Izzy May 10 '14 at 13:49
  • I looked through the list, but what those apps seem to offer is different from what I want. They offer to mount external SD card to some location on internal one, while I wish to completely replace it. Probably, I'm misunderstanding the way things work, but on my HTC Sensation with Cyanogenmod 11 it was like this: when there is no SD card, the phone uses emulated one, but as soon as SD card is inserted, it overrides the emulated card. The behaviour implemented in AOSP 4.4.2 looks strange to me. – svz May 10 '14 at 14:15
  • Looks like changing the symlinks does not "fool" the system calls apps use (getExternalFilesDirs() etc). Sad news. But maybe investigating API references on External Storage and its Device Specific Configuration can shed some light and provide helpful hints? – Izzy May 10 '14 at 14:41
  • Well, I think we've reached the point where it is reasonable to ask whether this feature is worth the time spent. I suppose, this is caused by requirement that each user should have an isolated primary external storage, which is hardly possible with a single sd card. Thanks for your help, I'll continue to look for a solution, but in a "background mode", I guess. – svz May 10 '14 at 15:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.