!!!THIS IS A WORK IN PROGRESS THREAD. IF YOU DO NOT UNDERSTAND ANY PART OF THE FIRST TWO POSTS, YOU SHOULD PROBABLY WAIT UNTIL A DEV FIXES THIS AND MAKES IT READY FOR ALL OF US!!!
Index
- Post 1 - Intro and Issue/ Benefits
- Post 2 - Links for Test ROMs, Installation Instructions, Workarounds
- Post 3 - Misc & Changelog
So here is an experiment. Using mount ext4 /dev/block/mmcblk0p2 /data in init.rc, instead of mount yaffs2 mtd@userdata /data. I have two T-Mobile HD2, one running time-tested CM7 Nightlies by cmhtcleo team, and the other running the awesome ParanoidAndroid 1.97a by Xylograph. I tested this in both these ROMs with amazing results - see screenshots below.
Attachment 1271018 Attachment 1271019
From what I have seen over ~24 hours of using both the phones, the benefits of this method are:
- Space - Obvisiouly. The 1GB/ 2GB/ 4GB sd-ext partition will be mounted as internal memory, instead of the usual /data partition from NAND
- Reliability - EXT4 partition is arguably better than YAFFS2. More over, you can get around bad blocks in NAND with this method.
- Performance - A fast SD Card gives better transfer speeds than NAND (My ParanoidAndroid build is noticeably faster after this modification, with my Class 6 Transcend SD Card with 4GB sd-ext partition)
- Simplicity - Don't have to worry about hoards of the a2sd scripts and their variants, and carry-out trial and error as to which ones work reliably with your ROM of choice. /data is transparently and natively mounted to sd-ext, so no more low-sound or other odd issues
- /data/data can be in the sd-ext partition, and ROM updates will not corrupt it like in some a2sd scripts
- Hassle-free - Whether an EU HD2 or TMoUS HD2, you set a large size for /system and forget about partitioning, as the internal userdata partition is not used at all and can be of whatever size. I am using 300 MB system in both my phones.
Devs - Would be great if you can help me with a way to reliably mount the ext partition to /data in init.rc!!! :)
So here are the list of issues with this modification at this stage:
- Mounting - /dev/block/mmcblk0p2 is not getting mounted to /data at every boot/ reboot reliably. This results is the phone not booting at all (Gingerbread) or giving an Encryption Failed, wipe data prompt (This is a feature of ICS/ JB, if /data is not accessible, the OS will boot with a temporary /data file system to show this error).
I have not been able to find a way to reliably carry out this mount - my best guess is that the SD Card Reader interface is not getting ready in time to be mounted to /data. I do not know how to make the boot process wait until the device is available. - ClockWorkMod/ Other recoveries - As the recovery boot images are still mounting userdata to /data and the ext partition to sd-ext, you will have to access sd-ext to access your data. What this means is that if you are moving ROMs, a direct CWM backup restore won't work unless the new ROM also has this modification
- Performance- is only as good or bad as your SD Card. My second HD2 has a class 2 SD Card, and I do not find any performance difference. While this is not bad, the SD Card I am talking about is a decent SanDisk card. If you have something with poor transfer rates, performance will suffer
- SD Card cannot be removed from the system while Android is running!!!
The Test ROMs are added to the second post. Those who are willing to test, please follow the instructions that come along with it. In addition to testing the phone by rebooting, I would like to know if any apps/ setting or Android itself behaves differently from how you usually had it before this modification. Please post your feedback!!!