Quantcast
Channel: xda-developers - HD2 Android NAND Development
Viewing all articles
Browse latest Browse all 164

[DEV/ TEST] Solution for App/ Data 2 SD(Ext) Woes [Test ROMs Attached]

$
0
0
!!!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!!!

IndexI had been using one form of sd-ext scripts or other to move either parts of the data partition to sd-ext, or mount sd-ext to /data. All of them had their own drawbacks, and came with some limitations or glitches.

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.
Then why is this still a Dev/ Test thread, and why have I attached my versions of these ROMs here? Because there is a catch - the sd-ext partition is not getting mounted as /data at every boot. This results in the the phone not crossing second boot (Gingerbread - stuck at the initrd.gz's logo), or getting an Encryption Failed error in Android (Jelly Bean 4.1.1/ ParanoidAndroid).

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!!!

Attached Thumbnails
Click image for larger version

Name:	Screenshot_2012-08-20-09-52-59.jpg
Views:	N/A
Size:	29.1 KB
ID:	1271018   Click image for larger version

Name:	screenshot-1345440025666.jpg
Views:	N/A
Size:	23.3 KB
ID:	1271019  

Viewing all articles
Browse latest Browse all 164

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>