[Sony Xperia ZR] NisJ:
Hi,

This is my first android device, so am pretty much a newbie for android.

Have created this mod to mount external SD card partition as internal partition.

I took pointers from a lot of threads on xda forums to get this working, so I feel bound to share it.

Note: Have only tested it with Android 4.1.

(I'm not responsible for any Damage to your phone. Use at your own risk.)

Note: This will likely result in data loss. Backup!

Required :

1.	Root Access

2.	init.d support click here

3.	Root Browser click here

4.	SManager click here

5.	An sd card (duh!) (with class 10 SD cards preferable)

6.	Some way to partition your SD Card (like MiniTool Partition Manager)

Install instructions:

1.	Create two ‘fat32’ partitions on SD card(EDIT: PS: both partitions should be Primary). Your first partition will be mounted as normal extSd card, and your second partition will be mounted as internal SD Card for your apps. (I partitioned my 64GB(10^9 bytes) sd card with ~16 GB 1st partition and ~42 GB 2nd partition)

2.	Copy and paste “mountSd” to etc/init.d folder. (If you don’t have such a folder, means you lack init.d support. click here and follow instructions to enable it) This script creates another mount point called ‘sdcard2’ and mounts current internal sd card there. It also tries to mount second partition to ‘sdcard0’ location, but seems to fail some times (as fat32 is not natively supported linux partition it seems, but could be wrong), so step 3 is required.

3.	Copy ‘mountSdFailSafe.txt’ to your phone’s ‘/data’ folder. Now with ‘SManager’, register this file as script with ‘su’ and ‘boot’ selected. (click and hold script -> in context menu click ‘Open As..’ -> ‘Script/Executable’ -> Is Script = true, select ‘su’ and ‘boot’ buttons)

4.	Restart.

This should do it. Once restarted, second partition will be shown as internal memory.

Note:

You will lose all app data and other app related customizations. You may be able to restore it by simply copy pasting ‘Android’ folder from ‘/storage/sdcard2’ to ‘/storage/sdcard0’. This has not been tested by me but should work theoretically (as I started with a blank phone, and so did not need to back up my app data). Or you could use Titanium Backup.

Some Issues that occur due to this mod:

I have been using this mod since the past 2 weeks, and the phone is quite stable with this mod.

The only issue I have faced is that when connected to PC (Windows 8) through USB, ‘My Computer’ keeps crashing unless and until you disconnect the phone. Otherwise it seems to be working fine. To circumvent this issue I have been using Samba to share files between PC and my phone.

Please share how it works out for you guys.

Other Notes:

I tried to get this working with ext4 partition, which has a +ves that it will not require step ‘3’ of install instructions and supports file sizes >4GB, but there are loads of permission issues happening, which I could not solve.

(Thought of setting “set GID” bit and then finding and adding all users to root group but failed. Also tried to set owner group ‘sdcard_rw’ without much success. May be someone who knows linux better may know how to solve this, Could not find much help on the forums as it seems others are facing a similar problem see more)

Thanks to:

For basic idea (PS: do not use the given method exactly as you will end up in a boot loop. For some reason, ‘sdcard1’ mount point has to be mounted by system only and can’t be mounted any other way, it seems.)

http://xdaforums.com/showthread.php?t=2180733

Edit:

Simplified installation if you do not care for easy accessibility to your orig internal memory:

Use this video tutorial by ashwin123:

The only exceptions are that, you need to partition your card,

and you have to use the file 'mountSdFailSafe.txt' instead of the file in the package mentioned by him.

[YOUTUBE]qBzQIxCFtxQ[/YOUTUBE]