1

Background information

I own a Samsung Galaxy S Relay 4G running Android 4.1.2. It comes with 8 GB of built-in NAND flash, which is almost full by now. Luckily, it also has a MicroSD card slot.

My carrier doesn't offer handset subsidies. I hope not to have to upgrade to a new phone before the BlackBerry Priv comes out: I want a device with a physical keyboard.

On my device, /storage/sdcard0 occupies 2 GB out of the 8 GB.

Of the 2 GB:

  • OsmAnd offline maps take up 800 MB.

  • Downloaded podcasts and whatnot take up about 600 MB.

  • Google Translate's offline data takes up 200 MB.

  • The rest is miscellaneous.

Because I'm not running Android 6.0 "Marshmallow" or higher, my device doesn't include support for adoptable storage.

My questions

I'd like to move /storage/sdcard0 from built-in NAND (8 GB) to the removable MicroSD card I've bought (32 GB). The entire MicroSD card is formatted as FAT32. In the place of the old /storage/sdcard0, I plan to leave a symbolic link.

I've experimented a bit, and it's clear that I'll have to root my phone first. That's fine.

I wonder:

  1. Does /storage/sdcard0 include any file ownership or permission data which I don't want to lose?

  2. Will Android (and all my apps) work fine even if /storage/sdcard0 is actually a symbolic link instead of a folder? If you believe they'll work fine, then how do you know this? :)

  3. Is there anything else I should know before doing this?

2
  • Well, I don't think just rooting is enough.. You also need to edit the boot.img to create a sym link for /storage/sdcard0 to /storage/sdcard1 .. (You may also have to format the SD card to EXT4 format). I'm not sure if that will work 100%, try it yourself.. Moreover, actually the internal storage is part of the /data partiton.. So basically, I think internal storage will be located actually in /data/media/0 So, nothing wrong in trying if you have proper backup and if you can repair your phone :)
    – Gokul NC
    Oct 21, 2015 at 7:20
  • You can't just create a symlink after rooting
    – Gokul NC
    Oct 21, 2015 at 7:27

1 Answer 1

1

Multiple things in this context:

  • apps might directly support using the external SD card as storage, check with their settings. This will save you some headaches, as it then works without "tricks". When changing to the new storage, apps might even offer to copy/move their data over, which would be the easiest thing for you to do.
  • As Gokul mentioned in his comments on your question: it's not as simple as just creating a symlink from the old storage to the new – after the next boot, that is most likely gone (which can be worked around by editing the boot image – or by facilitating init.d with a fitting script, if supported). You could however symlink each directory separately (e.g. /storage/sdcard0/foobar -> /storage/external_sd/foobar, which should do even without root and, more importantly, survive a reboot without "additional tricks"
  • both external storages use VFAT, so no user permissions covered (VFAT doesn't support them), so "nothing to lose" in this context ;)
8
  • I looked into the matter some more. Oct 21, 2015 at 12:43
  • On my device: • /dev/fuse is mounted on /storage/sdcard0 (fuse, rw). • /dev/block/vold/179:33 is mounted on /storage/extSdCard (vfat, rw). • An initramfs is mounted on / (rootfs, ro), and it seems that /storage is part of that initramfs. Oct 21, 2015 at 12:44
  • 1
    So, indeed, it seems that any symlink I'd create in /storage would disappear upon rebooting. I think I shall instead take one of your suggestions: I think I shall move and symlink some individual subdirectories of /storage/sdcard0. Oct 21, 2015 at 12:49
  • Exactly that – it's the safest and easiest variant, and should be possible via adb shell even without root (I cannot test that, as I don't have any non-rooted device here ;)
    – Izzy
    Oct 21, 2015 at 13:00
  • 1
    Instead, I've switched to using your first suggestion. In one of OsmAnd's settings screens, I've set it to look for its maps directory on the removable card. And I've used a file-management tool to move the maps directory to that card. This has worked fine, and I now have more than a gigabyte of available NAND flash. Oct 21, 2015 at 15:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .