outsider
12-23-2008, 05:03 PM
http://forum.xda-developers.com/forumdisplay.php?f=448
Original post: http://www.androidin.net/thread-1099-1-1.html
AS usual, this is for those WITH ROOT ONLY
Preparation:
1. Installed JF RC30 V1.2 (only if you are using JF RC30 1.2 , for rc8 ..further work is need to recompile the kernel.img on step 7, maybe someone can workout for that)
2. Make a NANDROID backup
3. A MICRO-SD card with 2 partitions divided : (1) a fat-32 partition, (2) a ext2
* the fat 32 will be mounted as sdcard and the ext2 will replace the internal storage, make your own decision for the size~
4. A Linux terminal
P.S.. I am lazy to type all exact command but i have tried myself it is usable..the procedure is only for those familiar with linux ~~~
Procedure:
1. Check USB debugging on the phone setting
2. Connect with USB and get root via ADB SHELL
3. adb pull /system/etc/mountd.conf ( to a temporary directory for editing)
4. open the pulled mountd.conf (edit: change "mmcblk0" to "mmcblk0p1")
5. rm -f /system/etc/mountd.conf and adb push the edited one for replacement (adb push *the temporary directory* /system/etc/mountd.conf
6. Get mkbootimg directory from git://android.git.kernel.org/platform/system/core.git , then compiling mkbootimg to executable, Write a extractor to extract the bootimg from bootimg.h (original developer has written the extractor, so this step can be ignored, just download the extract_bootimg.c
7. extract bootimg by extract_bootimg.c, get kernel.img and ramdisk.img (keep kernel.img as original)
8. extract ramdisk.img by gunzip < ../ramdisk.img | cpio -id to a specific folder
9. Edit the init.rc from the extracted file 1. add 1 line "mkdir /sd 0771 system system" before rootfs remount -ro ; 2. after mtd mount, add 3 lines "insmod /system/modules/2.6.25-01843-gfea26b0/kernel/fs/ext2/ext2.ko", "mknod /dev/mmcblk0p2 b 179 2 1000" , "mount ext2 /dev/mmcblk0p2 /sd noatime nodiratime" (4 lines in total, *2.6.25-01843-gfea26b0* is referred to JF's RC30 V1.2..i don't know if other version got the same build, please check carefully by yourself)
10 CD into the folder storing the extracted data on step 8 (inculding the edited init.rc)
11. find | cpio -co | gzip > ../ramdisk_new.img
12. please check whether the ramdisk_new.img and kernel.img store in the same folder
13 CD into the folder storing ramdisk_new.img and kernel.img
14. RUN mkbootimg --kernel kernel.img --ramdisk ramdisk_new.img -o boot_new.img
15. adb push the *boot_new.img* /sdcard
16. cat /dev/zero >> /dev/mtd/mtd2
17. flash_image boot /sdcard/boot_new.img
18. busybox cp -a /data/app /sd/
19.rm -r /data/app
20.ln -s /sd/app /data/app
21 reboot (from adb shell) and pray for it
P.S. I tried and both software installed from SD and market is installed to ext2 sd partition autmoatically. but the phone will freeze if I remove sdcard and need to softreset.
The orginial developer mention for those don't need the partition mounted as a directory of rootfs,
can replace step 6-17 by editing /system/init.rc directly (after mtd mount, add 3 lines "insmod /system/modules/2.6.25-01843-gfea26b0/kernel/fs/ext2/ext2.ko", "mknod /dev/mmcblk0p2 b 179 2 1000" , "mount ext2 /dev/mmcblk0p2 /sd noatime nodiratime)
Original post: http://www.androidin.net/thread-1099-1-1.html
AS usual, this is for those WITH ROOT ONLY
Preparation:
1. Installed JF RC30 V1.2 (only if you are using JF RC30 1.2 , for rc8 ..further work is need to recompile the kernel.img on step 7, maybe someone can workout for that)
2. Make a NANDROID backup
3. A MICRO-SD card with 2 partitions divided : (1) a fat-32 partition, (2) a ext2
* the fat 32 will be mounted as sdcard and the ext2 will replace the internal storage, make your own decision for the size~
4. A Linux terminal
P.S.. I am lazy to type all exact command but i have tried myself it is usable..the procedure is only for those familiar with linux ~~~
Procedure:
1. Check USB debugging on the phone setting
2. Connect with USB and get root via ADB SHELL
3. adb pull /system/etc/mountd.conf ( to a temporary directory for editing)
4. open the pulled mountd.conf (edit: change "mmcblk0" to "mmcblk0p1")
5. rm -f /system/etc/mountd.conf and adb push the edited one for replacement (adb push *the temporary directory* /system/etc/mountd.conf
6. Get mkbootimg directory from git://android.git.kernel.org/platform/system/core.git , then compiling mkbootimg to executable, Write a extractor to extract the bootimg from bootimg.h (original developer has written the extractor, so this step can be ignored, just download the extract_bootimg.c
7. extract bootimg by extract_bootimg.c, get kernel.img and ramdisk.img (keep kernel.img as original)
8. extract ramdisk.img by gunzip < ../ramdisk.img | cpio -id to a specific folder
9. Edit the init.rc from the extracted file 1. add 1 line "mkdir /sd 0771 system system" before rootfs remount -ro ; 2. after mtd mount, add 3 lines "insmod /system/modules/2.6.25-01843-gfea26b0/kernel/fs/ext2/ext2.ko", "mknod /dev/mmcblk0p2 b 179 2 1000" , "mount ext2 /dev/mmcblk0p2 /sd noatime nodiratime" (4 lines in total, *2.6.25-01843-gfea26b0* is referred to JF's RC30 V1.2..i don't know if other version got the same build, please check carefully by yourself)
10 CD into the folder storing the extracted data on step 8 (inculding the edited init.rc)
11. find | cpio -co | gzip > ../ramdisk_new.img
12. please check whether the ramdisk_new.img and kernel.img store in the same folder
13 CD into the folder storing ramdisk_new.img and kernel.img
14. RUN mkbootimg --kernel kernel.img --ramdisk ramdisk_new.img -o boot_new.img
15. adb push the *boot_new.img* /sdcard
16. cat /dev/zero >> /dev/mtd/mtd2
17. flash_image boot /sdcard/boot_new.img
18. busybox cp -a /data/app /sd/
19.rm -r /data/app
20.ln -s /sd/app /data/app
21 reboot (from adb shell) and pray for it
P.S. I tried and both software installed from SD and market is installed to ext2 sd partition autmoatically. but the phone will freeze if I remove sdcard and need to softreset.
The orginial developer mention for those don't need the partition mounted as a directory of rootfs,
can replace step 6-17 by editing /system/init.rc directly (after mtd mount, add 3 lines "insmod /system/modules/2.6.25-01843-gfea26b0/kernel/fs/ext2/ext2.ko", "mknod /dev/mmcblk0p2 b 179 2 1000" , "mount ext2 /dev/mmcblk0p2 /sd noatime nodiratime)