[How-To] data2ext for Reborn, Froyo 2.2 and CM7

Buddlespit

Wannabe kewl
Jan 27, 2011
671
119
0
Visit site
Code:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\Pat>cd/

C:\>adb shell
# su
su
# df -h
df -h
Filesystem                Size      Used Available Use% Mounted on
tmpfs                   210.9M     44.0K    210.9M   0% /dev
tmpfs                   210.9M         0    210.9M   0% /mnt/asec
tmpfs                   210.9M         0    210.9M   0% /mnt/obb
/dev/block/mtdblock5    158.5M    125.3M     33.2M  79% /system
/dev/block/mtdblock6    164.9M     42.2M    122.7M  26% /data
/dev/block/mtdblock1    124.1M     32.9M     91.2M  27% /cache
/dev/block/mmcblk0p2    962.1M    143.3M    818.7M  15% /data/app
/dev/block/mmcblk0p2    962.1M    143.3M    818.7M  15% /data/app-private
/dev/block/mmcblk0p2    962.1M    143.3M    818.7M  15% /data/dalvik-cache
/dev/block/vold/179:1
                          6.5G      1.4G      5.1G  21% /mnt/sdcard
/dev/block/vold/179:1
                          6.5G      1.4G      5.1G  21% /mnt/secure/asec
It looks to me that only /data/app, app-private and dalvik-cache are being moved using acromacks script. I'm also concerned with the "DATA2EXT is enabled but not active" reply I get when I attempt to enable the script.
 

the_maplebar

Well-known member
Jan 18, 2011
171
53
0
Visit site
BTW, looks like for reborn, the script in question is simply names mvdalvik.sh - for CM7 I know it's slightly different. And it's in a different location. If someone can verify the exact location/name for the script that moves dalvik for a froyo build (which is what I assume reborn is), then I can whip up flashable zips for both froyo and gingerbread that'll take care of moving dalvik. Then maybe comes new zips for data2ext if they need to be altered at all..

I use nandroid backups of both on my phone and can confirm the locations of the scripts.

For reborn it is:
/system/etc/mvdalvik.sh

For CM7 it is:
/system/etc/init.d/01mvdalvik

Not sure if this script is standard across froyo roms or if it is specific to Reborn. Reborn is the only froyo rom I have tried.
 

the_maplebar

Well-known member
Jan 18, 2011
171
53
0
Visit site
It looks to me that only /data/app, app-private and dalvik-cache are being moved using acromacks script. I'm also concerned with the "DATA2EXT is enabled but not active" reply I get when I attempt to enable the script.

Here is what I have on Reborn after using the zip on the first post and running through the procedures in the FAQ to move dalvik-cache

Code:
Filesystem                Size      Used Available Use% Mounted on
tmpfs                   212.6M         0    212.6M   0% /dev
/dev/block/mtdblock1    124.1M      1.1M    123.0M   1% /cache
/dev/block/mtdblock5    158.5M    124.2M     34.3M  78% /system
/dev/block/mtdblock6    164.9M     28.0M    136.8M  17% /mnt/asec/data
/dev/block/mtdblock8      1.5M      1.1M    380.0K  75% /persist
tmpfs                   212.6M         0    212.6M   0% /mnt/asec
/dev/block/mmcblk0p2    961.6M    152.9M    808.8M  16% /data
/dev/block/vold/179:1
                         13.9G      6.0G      8.0G  43% /mnt/sdcard
/dev/block/vold/179:1
                         13.9G      6.0G      8.0G  43% /mnt/secure/asec
 

the_maplebar

Well-known member
Jan 18, 2011
171
53
0
Visit site
Acromack, I did a diff of the 40data2ext part of your zip with latest from xda-forums. It looks like your script is using ext2 still. The CM7 roms support ext4 and the modified zip for Reborn includes the needed files to support ext4 as well.
 

Masterjakeway

Well-known member
May 26, 2011
159
10
0
Visit site
$ export PATH=/data/local/bin:$PATH
$ su
# df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 210.9M 44.0K 210.9M 0% /dev
tmpfs 210.9M 0 210.9M 0% /mnt/asec
tmpfs 210.9M 0 210.9M 0% /mnt/obb
/dev/block/mtdblock5 158.5M 125.8M 32.7M 79% /system
/dev/block/mtdblock6 164.9M 35.3M 129.6M 21% /mnt/asec/data
/dev/block/mtdblock1 124.1M 34.4M 89.7M 28% /cache
/dev/block/mmcblk0p2 960.7M 77.9M 882.8M 8% /data/dev/block/vold/179:1
13.9G 8.3G 5.5G 60% /mnt/sdcard
/dev/block/vold/179:1
13.9G 8.3G 5.5G 60% /mnt/secure/asec
#

Does that look right for cm7?
 

the_maplebar

Well-known member
Jan 18, 2011
171
53
0
Visit site
I actually haven't done the dalvik-cache part on CM7 yet, but that looks good. The amount of cache used is pretty low and /data is mounted on the sd card. It looks like you lost some formatting on the last few lines when pasting the output of the df command. I believe it should be:

Code:
/dev/block/mmcblk0p2 960.7M 77.9M 882.8M 8% /data
/dev/block/vold/179:1 13.9G 8.3G 5.5G 60% /mnt/sdcard
/dev/block/vold/179:1 13.9G 8.3G 5.5G 60% /mnt/secure/asec

One more thing you could do to make sure is to look for the dalvik-cache folder. You should find it in /data and not in /cache. The first command should come back as not found, the second should show your dalvik-cache

Code:
ls /cache/dalvik-cache
ls /data/dalvik-cache
 

the_maplebar

Well-known member
Jan 18, 2011
171
53
0
Visit site
Now I have run through the full set of instructions (including moving dalvik-cache) on CM7 too. Here is my df -h output afterwards on CM7

Code:
Filesystem                Size      Used Available Use% Mounted on
tmpfs                   210.9M     44.0K    210.9M   0% /dev
tmpfs                   210.9M         0    210.9M   0% /mnt/asec
tmpfs                   210.9M         0    210.9M   0% /mnt/obb
/dev/block/mtdblock5    158.5M    126.0M     32.5M  79% /system
/dev/block/mtdblock6    164.9M    135.1M     29.8M  82% /mnt/asec/data
/dev/block/mtdblock1    124.1M     34.4M     89.7M  28% /cache
/dev/block/mmcblk0p2    961.6M    186.3M    775.4M  19% /data
/dev/block/vold/179:1
                         13.9G      6.3G      7.7G  45% /mnt/sdcard
/dev/block/vold/179:1
                         13.9G      6.3G      7.7G  45% /mnt/secure/asec

It turns out system apps on the ROM are still put on /cache/dalvik-cache. All of the user apps are on /data/dalvik-cache so there shouldn't be a problem with running out of space.
 

the_maplebar

Well-known member
Jan 18, 2011
171
53
0
Visit site
WARNING: I got the ota update notification tonight. I didn't want to chance accidently updating sometime and bricking my phone so I did the battery pull trick to remove the notification. This meant I got to test out the stability of ext4 on the sdcard. My results were:

1st boot, no access to sd-ext and /data looked like fresh reborn rom
2nd boot, had access to sd-ext and /data but widgets wouldn't load.
3rd boot, everything was back to normal

I'm guessing ext4 and the fsck saved my but repairing the partition after my battery pull.
 

glitchsta

Well-known member
Dec 19, 2010
152
18
0
Visit site
I am trying to get it working with gRom, I am running the GingerKernal and I dont think it is loading the ext4 modules, I am wondering i I can just get the modules from my nandroid of CM7 and put them where they go...here is what I get...

sh-3.2# data2ext --enable
data2ext --enable
insmod: can't read '/system/lib/modules/mbcache.ko': No such file or directory
insmod: can't read '/system/lib/modules/jbd2.ko': No such file or directory
insmod: can't read '/system/lib/modules/ext4.ko': No such file or directory
Data2EXT is already enabled but not active...
sh-3.2#
 

basketthis

Well-known member
Nov 22, 2010
1,470
473
0
Visit site
I am trying to get it working with gRom, I am running the GingerKernal and I dont think it is loading the ext4 modules, I am wondering i I can just get the modules from my nandroid of CM7 and put them where they go...here is what I get...

sh-3.2# data2ext --enable
data2ext --enable
insmod: can't read '/system/lib/modules/mbcache.ko': No such file or directory
insmod: can't read '/system/lib/modules/jbd2.ko': No such file or directory
insmod: can't read '/system/lib/modules/ext4.ko': No such file or directory
Data2EXT is already enabled but not active...
sh-3.2#

The rom needs to support the ext file systems. Make sure gRom supports ext partitions first.
 

glitchsta

Well-known member
Dec 19, 2010
152
18
0
Visit site
Are you comfortable with shell scripts? Take a look at the data2ext script from the reborn zip, it includes the insmod command to load the modules for ext4 support

Yes I know this all you have to do is "insmod /system/lib/modules/ext4.ko" but I do not have the right ext4.ko file, If I could find the ones that would load would be a start...

sh-3.2# insmod /system/lib/modules/ext4.ko
insmod /system/lib/modules/ext4.ko
insmod: init_module '/system/lib/modules/ext4.ko' failed (Exec format error)
sh-3.2#

So far this gingerbread stuff has not been going to well, can't wait till someone can get something good going, My screen is ultrasensitive, I think due to over clocking....we just need to find the ext4 modules for this kernal....the old ones dont work
 

the_maplebar

Well-known member
Jan 18, 2011
171
53
0
Visit site
The new version of Opti-rom 1.1.1 has ext4 file support build in so you should be able to flash the zip for CM7 based builds and go through the steps in the How-to.

If any required exe's are missing you will get errors while setting up the ext partition. This won't hurt anything, but we will need to figure out what is missing and get it added to the rom or a zip.

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
 

blackops1125

Advisor
Mar 19, 2011
1,037
184
0
Visit site
How would I go about setting up Opti-Rom for data2ext?

Sent from my OptiRom v1ed LG Optimus S
This thread is for froyo (ZVD) based ROMS or CM7 roms. You will need to look in that roms thread for directions.


sent from my CM7/Reborn w/ 1 Gb internal storage Optimus S

Always happy to help, hit that thanks button if I did
 
  • Like
Reactions: basketthis

the_maplebar

Well-known member
Jan 18, 2011
171
53
0
Visit site
I'm planning to update the How-to as needed once we have clear steps for ZVH based ROM's. I don't know how to do it yet and I'm still on ZVD so you may get more help from people actually running opti-rom or g-rom
 

basketthis

Well-known member
Nov 22, 2010
1,470
473
0
Visit site
How would I go about setting up Opti-Rom for data2ext?

Sent from my OptiRom v1ed LG Optimus S

This thread is for froyo (ZVD) based ROMS or CM7 roms. You will need to look in that roms thread for directions.

Opti-ROM now supports data2ext, apps2ext, dalvik2cache all natively. :) I will get updated instructions on how to properly move apps to the ext partition on the sd card asap. Please do not flash any files to try accomplish this. We no longer need to flash anything to do this as it's built in. It may mess something up pretty bad.
Also, all ext formats are supported as well. Thanks to drew's newest kernel!
 

the_maplebar

Well-known member
Jan 18, 2011
171
53
0
Visit site
Great info. I see the dalvik2cache and app2sd scripts. Looks like it's using darktremor's app2sd so people can search for info on using that.

I see there is a darktremor's app2sdgui, do you know if the app2sd script including in opti-rom is compatible with the gui?
 

Trending Posts

Forum statistics

Threads
943,225
Messages
6,917,910
Members
3,158,901
Latest member
Summer_glow