I am not responsible for anything you do to your phone. If this goes wrong, it's not my fault. Read the whole post, and the last few pages of the thread. This will get you up to speed. Backup everything! Twice. No, I'm not joking. Do a nandroid, then do a titanium backup.
Important note! Ext4 does NOT work with ClockworkMOD 2.5.x. Nandroid backups will not work unless you upgrade to CWM 3! (data2ext4)
Greetings, earthlings! I have got a new version for you! Almost. Read this: http://forum.xda-developers.com/showpost.php?p=11931210&postcount=341
Update 26/01/2011
Ok, so someone asked about continuing support for ext2. So I will. Ain't I nice.
Both scripts are updated, and should have improved performance, as well as a bugfix
With both you don't need to start over, just flash the zip and you're done. Backup anyway (of course).
EXT4 version:
Yes, ext4 is slower in benchmarks. No, it doesn't have a real world impact. Not that I can see anyway. As always feedback is welcomed. I really mean that, if your phone genuinely becomes slower, let me know.
The zip is named data2ext4-V4.zip
EXT2 version:
This is rather simpler to set up, but is not as safe. It is slightly faster though
The zip is named data2ext2-v7.zip
1st boot will take a while, it's copying stuff across.
Java on my PC sucks (it won't work), and I still can't sign zips. You'll live, just toggle signature verification in CWM
Semi-disclaimer:
This is my first real foray into scripting. I am still learning, so this is not as good as it could be. I release this to you to give me an incentive to make it better. I still need to look into mount options and the like, I'm sure this can go faster. Once again, I would class this as beta quality.
Important note! Ext4 does NOT work with ClockworkMOD 2.5.x. Nandroid backups will not work unless you upgrade to CWM 3! (data2ext4)
Greetings, earthlings! I have got a new version for you! Almost. Read this: http://forum.xda-developers.com/showpost.php?p=11931210&postcount=341
Update 26/01/2011
Ok, so someone asked about continuing support for ext2. So I will. Ain't I nice.
EXT4 version:
Yes, ext4 is slower in benchmarks. No, it doesn't have a real world impact. Not that I can see anyway. As always feedback is welcomed. I really mean that, if your phone genuinely becomes slower, let me know.
The zip is named data2ext4-V4.zip
Instructions (new users):
- Ensure that mmcblk0p2 isn't mounted anywhere. You can do this by running "mount|egrep mmcblk0p2". If that returns anything, the ext partition is mounted. Unmount it using "umount directory/that/mmcblk0p2/is/mounted/to". Most often it's mounted to /sd-ext; in this case run "umount /sd-ext"
- Format the ext partition to ext4:
Code:mke2fs -m0 -b4096 /dev/block/mmcblk0p2 tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p2 e2fsck -yf /dev/block/mmcblk0p2 tune2fs -o journal_data_writeback /dev/block/mmcblk0p2 tune2fs -O ^has_journal /dev/block/mmcblk0p2- Flash the attached zip and reboot to normal mode
- Open up a terminal or use ADB to execute "data2ext --enable"
- Reboot
Intructions (upgrading from ext2):
This should keep all your existing data. Back it up anyway
- Disable data2ext
- Upgrade to ext4 thusly:
Code:tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p2 e2fsck -yf /dev/block/mmcblk0p2 tune2fs -o journal_data_writeback /dev/block/mmcblk0p2 tune2fs -O ^has_journal /dev/block/mmcblk0p2- Flash the attached zip
- Enable data2ext
EXT2 version:
This is rather simpler to set up, but is not as safe. It is slightly faster though
The zip is named data2ext2-v7.zip
- Flash the zip
- ensure /dev/block/mmcblk0p2 isn't mounted anywhere
- Format the ext partition to ext2 with a 4KB block size
Code:mke2fs -m0 -b4096 /dev/block/mmcblk0p2- Run this:
Code:data2ext --enable- Reboot and enjoy
1st boot will take a while, it's copying stuff across.
Java on my PC sucks (it won't work), and I still can't sign zips. You'll live, just toggle signature verification in CWM
Semi-disclaimer:
This is my first real foray into scripting. I am still learning, so this is not as good as it could be. I release this to you to give me an incentive to make it better. I still need to look into mount options and the like, I'm sure this can go faster. Once again, I would class this as beta quality.
What is data2ext?
The phones internal memory is divided into several partitions. The 3 key ones are /system, /data and /cache. The rest we don't need to worry about too much. /system is where the ROM lives. By default it's read only (regardless of S-ON or S-OFF). All the data on our phones (apps, app data, game progress and a few other bits and bobs) is stored on /data. We have a pitiful amount of storage on /data (about 190MB), so we quickly run out when installing apps. 1 solution is to move /data/app (this is where most of the apps are stored) to a partition on your SD card (formatted to ext). But the internal memory still fills up, as anything not in /data/app stays on internal (caches, data and shizz). Other solutions have arisen, like moving dalvik-cache there to the ext partition too. But with the advent of fast SD cards it became possible to move the whole data partition to the ext partition. So people did; this means that the internal memory is barely used (aside from a few bits here and there, they're symlinked back to their original location).
It ain't workin'!
Ok. Get a logcat, and use pastebin to paste it here. Then we might be able to work it out, ye?
To use logcat:
Download this and extract it to a known location. Navigate to that folder, and press SHIFT while right-clicking. In the menu there should be a "Open command window here" option. Click it. Now type "adb logcat". Press CTRL+C to end the output. Right click and press mark, then click and drag over all the text and hit ENTER. It's now copied to the clipboard. CTRL+V to paste it somewhere... To debug issues with this script I need the first 5-10 seconds of the boot process.
To make life easier, I need the bit between "--START OF SCRIPT, PASTE LOGCAT FROM HERE ON!--" and "I DON'T NEED ANY MORE OF THE LOGCAT!"![]()
Changelog
Version 1
Versions 2 through 4 were internal testing ones
- initial release
Version 5
EXT4(v3) version initial release
- Fixed dalvik-cache rebuild
- Made more likely to work
EXT4 V4
EXT2 V7
- Improved performance
- Bugfix (unmount /sd-ext if it exists)
- Improved performance
- Bugfix (unmount /sd-ext if it exists)
Hereafter I shall rename these to make managing this changelog easier![]()
Credits:
BlaY0
Anyone who's ever made data2ext scripts. I looked at a few![]()
Attachments
-
152.4 KB Views: 8,328
-
152.5 KB Views: 7,494
Last edited: