Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
dandiest
Old
(Last edited by dandiest; 17th January 2011 at 05:12 PM.)
#1  
dandiest's Avatar
Senior Member - OP
Thanks Meter 1067
Posts: 1,227
Join Date: May 2007
Location: Singapore

 
DONATE TO ME
Default [initrd][DL Data2SD/Ext4+ V1.5] Enable your build with fast ext4/data.img support

This is my development based on Takaaki's initrd, during I develop my build at http://forum.xda-developers.com/showthread.php?t=913597, I spent a lot of time to enhance the data2sd and ext4, after studying almost all the popular methods: App2SD, Data2SD, Data2ext, Data2whatever, I develop this:

Features:
1. Support both data 2 data.img or ext4.
2. Support SquareFS.
3. Auto-format the 2nd partition with block size of 4096.
4. Utilize the Nand data partition to improve the performance.
5. Switch the PPP/RMNET.
6. Config the gps_zone
7. Support the update without re-flash. (you can fully customize your build based on this feature)
8. Backup the ext4 to data.img (implement in future)
9. Restore the data.img to ext4 (implement in future).

To enable external data.img
1. create '.data' folde under sdcard (/sdcard/.data).
2. create 'config.txt' under '.data' directory.
3. copy old data.img to '.data' directory, otherwise a new data.img will be created.
4. boot into Android.
Config.txt for data2SD.
Quote:
data_img=1
data_ext=0
sd_boost=1
nand_data=0
To enable ext4
1. create '.data' folde under sdcard (/sdcard/.data).
2. create 'config.txt' under '.data' directory.
3. Config.txt for data2SD.
Quote:
data_img=0
data_ext=1
sd_boost=0
nand_data=0
format_ext4=0
For first installation, it is always good to set the format_ext4=1 to format your ext4 partition with proper block size, after 1st boot, change it back to 0.

To config PPP/RMNET and GPS_ZONE
ppp_mode=1 will enable the ppp, set to 0 will use rmnet.
gps_zone='your country code', - country code, us, fr, jp, etc
To update/customize your build
1. Create a folder /DLZUPDATE under your sdcard.
2. put your app's apk under AndroidApps in /DLZUPDATE, that apps will be automatically installed into your data partition.
3. put your kernel file or other under root in /DLZUPDATE, all the files under root will be copied to your build, if your want to upgrade your kernel, just put zImage in /DLZUPDATE/root/system, and module files under /DLZUPDATE/root/system/lib/modules. etc.

Download
DL.Data2SD&EXT4.v1.5.zip

Install
1. extract the zip to a folder on your pc
2. backup your existing initrd.gz using adb
3. In "command prompt" env, run install.
4. your existing initrd.gz will be backup at the same folder named backup.initrd.gz.
5. if your have problem to boot into the system, just try: adb push backup.initrd.gz /system/initrd.gz. (even system can not be booted into the launcher or sense, in some point of time, the adb still can function, so just keep trying.)

Caution: if your build current use app2sd, you have to disable it before using this, rename the init.local.rc under etc to init.local.rc.bak, remove the 00start, 04apps2sd from /system/etc/init.d.

If your build uses boot partition, you should change the installation script to push the initrd.gz to replace the existing one wherever it is.


Thanks to
- ownhere (he is the expert of the ext4 or other file systems, and developed the data2ext.)
- melethron (the author of data2whatever)
- Takaaki (the author of data2sd)
- Cedesmith (He is guru of initrd )

Donation
I do not work for money, but it is always nice to know people really like my work and encourage me carrying on.
The Following 12 Users Say Thank You to dandiest For This Useful Post: [ Click to Expand ]
 
totalcmdext
Old
(Last edited by totalcmdext; 17th January 2011 at 08:17 AM.)
#2  
Recognized Developer
Thanks Meter 58
Posts: 1,106
Join Date: Feb 2006

 
DONATE TO ME
Please could you provide also information in case that NAND rom already use EXT4 for data2ext4 (like AF403 DesireHD stock based 1.0a)?

..... Tester .....

 
zero0zero
Old
#3  
Member
Thanks Meter 2
Posts: 86
Join Date: Aug 2005
Location: Singapore
Good stuff.. thank you!
I am trying your NAND ROM now....
 
saftazeen
Old
#4  
saftazeen's Avatar
Senior Member
Thanks Meter 20
Posts: 166
Join Date: Apr 2010
Location: Cairo
Good knowledge ... keep up cool stuff
i already use ur nand rom
 
dandiest
Old
#5  
dandiest's Avatar
Senior Member - OP
Thanks Meter 1067
Posts: 1,227
Join Date: May 2007
Location: Singapore

 
DONATE TO ME
If you don't want to look into the code to find out the difference, then, how about just try 1st.

Quote:
Originally Posted by totalcmdext View Post
Please could you provide also information in case that NAND rom already use EXT4 for data2ext4 (like AF403 DesireHD stock based 1.0a)?


Sent from my DL DesireZ v2.5 using XDA App
 
jpl69
Old
#6  
jpl69's Avatar
Senior Member
Thanks Meter 51
Posts: 484
Join Date: May 2006
Location: Lisboa
Ok, i've managed to understand the concept of data2ext, and when on initial setup everything gets what i expect, i've 1 GB (depends on ext partition size) of free memory space, but i get an horrible performance even if formated with your tool, i guess it's SD performance/quality because i can't run any ext build published here where most of users claim to get good performance. So i try data2sd but instead of the 512MB (img size created with this) of memory i get only the 80MB of the free nand internal ram. What is stored on this img file ? only settings ? On 20 applications i use only 4 are movable to sd, so after my initial setup (and of course with good performance) i get a lot of memory low warnings.

Thanks
Used to be QTEK S100, QTEK 9100 (Wizard), HTC Touch Cruise, HTC Touch HD,HTC HD2 (LOST BUÁÁÁÁ), TMN Silverbelt / ZTE Raise WQVGA CRAP, Sony Ericson x10i,
Now HTC HD2 (Again), iPhone 4S, Samsung Galaxy Tab 10.1 (P7500)
 
dandiest
Old
#7  
dandiest's Avatar
Senior Member - OP
Thanks Meter 1067
Posts: 1,227
Join Date: May 2007
Location: Singapore

 
DONATE TO ME
Looks like the data2sd was not enforced, what's your configuration in config.txt?

Quote:
Originally Posted by jpl69 View Post
Ok, i've managed to understand the concept of data2ext, and when on initial setup everything gets what i expect, i've 1 GB (depends on ext partition size) of free memory space, but i get an horrible performance even if formated with your tool, i guess it's SD performance/quality because i can't run any ext build published here where most of users claim to get good performance. So i try data2sd but instead of the 512MB (img size created with this) of memory i get only the 80MB of the free nand internal ram. What is stored on this img file ? only settings ? On 20 applications i use only 4 are movable to sd, so after my initial setup (and of course with good performance) i get a lot of memory low warnings.

Thanks


Sent from my DL DesireZ v2.5 using XDA App
 
dandiest
Old
(Last edited by dandiest; 17th January 2011 at 10:25 AM.)
#8  
dandiest's Avatar
Senior Member - OP
Thanks Meter 1067
Posts: 1,227
Join Date: May 2007
Location: Singapore

 
DONATE TO ME
This is good and detail steps http://forum.xda-developers.com/show...&postcount=341 on how to config, better than mine

Sent from my DL DesireZ v2.5 using XDA App
 
FileFixer
Old
#9  
FileFixer's Avatar
Senior Member
Thanks Meter 37
Posts: 530
Join Date: Sep 2007
Location: www.fiatisti.hr / XDA
If i understand this, this is only change existing inird with modified initrd?
Samsung Galaxy SIII 16GB / Foxhound Rising v2.2 JB (Android 4.1.2) / Siyah v1.8.x (3.0.31) / Transcend 32GB Class4

My beginner guides for Linux:
Beginner guide how to make your ROM *.img from Linux OS !!!
http://forum.xda-developers.com/showthread.php?t=913606
Beginner guide how to install new kernel from Linux OS !!!
http://forum.xda-developers.com/showthread.php?t=905237

Prophet/Hermes/Blackstone/Leo/I9100/I9300

 
jpl69
Old
(Last edited by jpl69; 17th January 2011 at 10:58 AM.)
#10  
jpl69's Avatar
Senior Member
Thanks Meter 51
Posts: 484
Join Date: May 2006
Location: Lisboa
I'm sorry but with all this flash/unflash install/uninstall download configure i've lost my config, but i'm sure data_img=1 and data_ext=0
(just a note gps_zone=pt should configure gps to be used here in Portugal right ?)

If you say that it should work i'm going further with my tests and post here results because i don't want to flame this thread.

Update:
I've a stock 8GB class 4 card swaped with 4GB class 2, results on nand/ext4:
Initial setup (with format ext4) 1/2 time, second boot 1 minute and everything runing muuuch smother and faster so or i've got a malfunction card (?) (and i've read someone complaining about a 16GB class 10) or lowest class gets more speed (?)

Update2:
The diference is really amazing, i've got a completly functional android now with this card.
You should mention on your threads that if you get bad results on initial setup forget about that nand, return to SD builds or get other card.

Can you please post your card type please ?
Used to be QTEK S100, QTEK 9100 (Wizard), HTC Touch Cruise, HTC Touch HD,HTC HD2 (LOST BUÁÁÁÁ), TMN Silverbelt / ZTE Raise WQVGA CRAP, Sony Ericson x10i,
Now HTC HD2 (Again), iPhone 4S, Samsung Galaxy Tab 10.1 (P7500)

 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...