Skip to content

Instantly share code, notes, and snippets.

@gholker
Last active November 23, 2016 00:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gholker/7950aa6fbcc003a4a2a569a9b39ff124 to your computer and use it in GitHub Desktop.
Save gholker/7950aa6fbcc003a4a2a569a9b39ff124 to your computer and use it in GitHub Desktop.
How to link internal SD to external SD (Sony Xperia M C2005 Android 4.3)

How to link internal sd folder with external folder:

Note: these instructions are somewhat specific to the Sony Xperia M C2005 Android 4.3

  1. Root phone with TowelRoot: https://towelroot.com/
  2. Installed busybox: https://play.google.com/store/apps/details?id=com.bitcubate.root.busybox.complete
  3. Tried "mount -o bind folder1 folder2", but the bind wouldn't work when not root
  4. Used FolderMount app to link the folders (2.9.9 as of writing)
  5. Found that phone would reboot during the process. Found this explanation:

I have the Xperia phone/tablet model number XXX and after updating to Android 4.2, I'm getting reboots every time I try to mount.
This issue spans from the rooting method and has nothing to do with FolderMount. Any app that attempts to remount your /system partition will cause your tablet/phone to reboot. Please consult THIS PAGE for a workaround.

  1. Ended up downloading the fix from here. Thanks, [NUT]@xda!

  2. Didn't run the fix directly. Read through the install.sh to see how it works and did the steps manually. Which was:

    1. busybox mount -o remount,rw / -> makes / directory writeable
    2. chmod 644 /sbin/ric -> makes ric not executable
    3. busybox pkill -f /sbin/ric -> stops ric process
    4. Added /system/etc/install-recovery-2.sh that would do the same process every time the phone booted. It gets called from the pre-existing install-recovery.sh.
    5. chmod 755 /system/etc/install-recovery-2.sh -> make script executable
  3. Used FolderMount and the phone didn't reboot. Paid for premium features (>3 mounts and more) because I was impressed with how easy the app made the process of mounting directories.

/system/etc/install-recovery-2.sh contents:

!/system/bin/sh

pkill -f /sbin/ric; mount -o remount,rw /; chmod 644 /sbin/ric

Notes:

  • I made a lot of missteps along the way and this is the solution that eventually worked.
  • Wanted to save it for myself and share it in case it might help anyone in a similar position

Analytics

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment