[PRJ] [DATA2SD] Flashable zips for converting any Rom to Data2SD, For N1

Search This thread

jayfallen

Senior Member
Feb 23, 2010
305
85
Updated April 7th, 2011

All credit to sibere and droidzone and other devs who've developed the Data2SD codes.

Before you do anything with your phone, Pls nanodroid fisrt!!! And flash your phone at YOUR OWN RISK

It's been a while since this post last updated.

In fact, developers of HTC Desire have already create a stable method to implement Data2sd or whatever you call it, which gives you full use of EXT space to install APPs while improving I/O speed at the same time.

The theory is explained here, in case you want to take a further look at it
[DEV][DATA2SD] More space (and more I/O) for your Desire (Updated/EXT4/Flashable ZIP)

And thanks to sibere and droidzone 's great work, now we could make any ROM we like run with Data2sd. here they provide us Flashable ZIP files to make it done
[DATA2SD] Flashable zips for converting any Rom to Data2SD

Updated Instructions and Zips (14/Mar/2011)

I've streamlined the installation procedure so as to make it more generic and compatible with the newer StarBurst zips.

Basic Installation Steps for Data2SD

1. Install your ROM
2. Install the A2SD Killer (specific for your ROM)
3. Next step differs depending on whether you're reflashing your Rom on an existing install, or whether you are installing for the first time.
If you're installing the ROM for the first time:
· Reboot once after running the A2SD Killer
· Setup the timezone, language etc (But not your Google Account/Market)
·Reboot to recovery once again and install the Data2SD Installer
If you're reflashing the ROM (after having installed Data2SD once previously)
·Do not reboot after running the A2SD Killer
·Install the Data2SD Re-Installer right away
·Now reboot.

Download Link:
http://hotfile.com/dl/110226722/85a18a8/Data2SDv11.zip.html
http://www.easy-share.com/1914241904/Data2SDv11.zip


Important Notes from droidzone
Fully supports Cyanogen
Fully supports Clockworkmod3.0+ (Edified)

I wanted to consolidate all the flashable zips for Data2SD into one place, so that I will find it easy to update the links as I modify the scripts, and to also help Sibere to point his link to this post from OP, so that he doesnt need to reupload each file as they are modified.

Once again, I must assert that Data2SD is totally Sibere's work with other devs who've developed Data2SD code of their own. In my opinion, however, this is the best!

My contribution is conversion of his excellent code into flashable scripts which may be installed via Recovery. So you dont have to type out the code.

The flashable zip is packed as a package of zip files. Each zip file within the package is seperate flashable zip

There are the following files:

Killer, Installer and Reinstaller files for Sense Roms

A2SDKillerV11_Sense.zip
Data2SDInstallerv1.3_Sense.zip
Data2SDReInstallerv1.3_Sense.zip

Installer and Reinstaller files for AOSP Gingerbread Roms and CM7 nightlies (excluding Cyanogen 6 and MIUI 2.2 , but including Cyanogen 7 nightlies and MIUI 2.3.3 )

A2SDKillerV11_GB.zip
Data2SDInstallerv1.3_GB.zip
Data2SDReInstaller1.3_GB.zip

Installer and Reinstaller files for Cyanogen 6 and MIUI 2.2 (Not for CM7 nightlies or MIUI 2.3.3), which are Older Version

A2SDKillerV9.zip
Data2SDInstaller_cyanogen.zip
data2sd-Reinstall_cyanogen.zip

Whether you are trying this method for Sense or AOSP Roms, the installation procedure is same. Only the file is different.

Following droidzone's instruction, I tried these flashable ZIPs with MIUI 1.4.1(Gingerbread 2.3.3)

A2SDKillerV11_GB.zip
Data2SDInstallerv1.3_GB.zip

And it's working just fine. No random reboots, no data or APP lost or system crash after reboot. It's stable and fast!


One more note, you can ignore the previous information below...

————————————————————————————————————————————————————————————————————
updata from
melethron's post, and his update package data2whatever.zip included.
you can buy melethron a beer if you want. All credits to melethron!

I test the script with new install MIUI N1 12.24,
so far no reboot issues, or data corruption.

[DATA2whatever] Flashable All-in-one-Solution for Data2sd (HUGE update (dec 23th))

data2whatever v0.2

Features:

- Supports: Ext2, Ext3, Ext4 (and if kernel supports it: ) btrfs, ReiserFS
- Supports loop device as optional addon (as siberes data2sd)
- Flashable zip for many app2sd ROMs (no long setup required)
- It does a e2fsck (disk check) on every boot and creates a logfile on the sdcard (/sdcard/e2fscklog.txt)
- looks nice if you do a logcat on boot
- no "settings lost on reboot" bug like in my old or siberes script
- changes the scheduler for the sd-card and internal to noop for better performance on sd.
- Nandroid Backup of EXT2/3/4 external with AmonRa 2.0.0.1 or any clockwork recovery.
- Removes the common app2sd scripts on its own

Requirements

- A second partition (same as app2sd - Min 512 mb - 1024mb is highly recommended - max 2048 MB or there will be issues with market) in any format (as long as the kernel supports - ext2/3/4 support is default in most kernels - Ext4 or ReiserFS is recommended).
- An app2sd or non app2sd ROM (data2sd versions wont work) (this SHOULD work with most or at least many ROMs . Roms that are confirmed to work can be found in the post below. Please report to me it it works or not so i can update this thread. If it doesn't work i try to make it compatible asap. )

Installation

1.) Full wipe (at least needed on first installation)
2.) Flash the app2sd Version of the ROM of your choice
3.) DONT REBOOT
4.) If you rebooted then start over at 1.)
5.) flash the attached "data2whatever.zip"
6.) now reboot

ADDITIONAL INFO: Even without "life on the edge" you should watch the first 4 "don't"s of "life on the edge". The normal script use the same disk safety methods as NTFS on Windows or EXT4 on linux. But as you know you shouldnt just switch off the computer because there can still be issues in very rare cases. Reboots with tools like "snqs power menu" is the same as a batterypull (or pulling the ac plug on PC) and this isn't good in general (and this also applies for using it with app2sd). If you want to go to recovery just make a normal shutdown and switch the phone on with "volume down" button pressed.


Optional life-on-the-edge add on
you can find this add on in melethron's original post, and try it on your own risk

This patch has the same effect as sibere's and ownhere's script (loop device - the way ownhere does in v4 doesnt work though). Other than those scripts it this addon doesnt need any repartitioning or other setup (like FAT or a third partition) and can simply be installed or removed with a flashable zip. All you need for this is a normal ext 2/3/4 partition (as above ^^). Ext4 is recommended for this (as above) since it is the fastest of those 3. This patch is more risky than normal ext3/4 considering the possibility of data loss. If you want to use this add-on you should watch the following (this also applys to ownheres and sibere script and is NOT more risky than their scripts):

- DON'T use the reboot of snq's powermenu (or any other reboot app)
- DON'T use anything in the "ROM Manager" that makes it reboot.
- DON'T do adb reboot / abd reboot recovery / adb reboot bootloader
- DON'T pull the battery while the phone is on (this should be obvious)
- DON'T remove the "sync" mount options for the Quadrant "boost" (this is a fake boost anyway)

All of this is like a powerloss for the sd-card and has a high change of data corruption.

From my test with this i give you an estimate what can happen if a powerloss occurs or any of the 5 points above happen:

- 50% general chance of corruption that will be autofixed on boot (not a problem)
- 10% chance of forcecloses after reboot of some apps (this can be fixed by deleting the app data or restoring it with titanium (or other) backup)
- REALLY tiny chance (didnt happen for me in over 40 "simulated" powerlosses) that partition gets corrupted (needs complete repartitioning of the microSD so all data on it will be gone then)

As long as you watch the 5 points above and as long as you don't drop the phone and the battery jumps out this will be safe.

Installation of the addon:

- Flash the "life-on-the-edge.zip" any time after you installed "data2whatever".

Installation of the addon:

- Flash the "life-on-the-edge-UNPATCH.zip" any time after you installed "data2whatever" and the addon. (this will revert back to the normal script)

Personal remark: While this is a improvement over normal ext4 it is not the "holy-grale" of a data2sd lag fix. I'm not using this myself and use a ReiserFS as second partition instead which is more safe and completly feels the same as a "loop" device considering performance.



--------------------------------------------------------------------------------


__________________________________________________________________________________
Dec14 info update:

I uploaded A mod script for CM6.1 stable by Carrol

Carrol changes the script to create a ext4 loop device on EXT4 partition.

Code:
	$BUSYBOX mkdir /mnt/asec/extdata
	if [ ! -e /data/data2sd.ext.finish ]; 
	then
		echo "+++Need create ext4 loopback device for data, please wait... this is 1/5 size of your ext partition"
		extsize=`$BUSYBOX df /dev/block/mmcblk0p2|$BUSYBOX grep mmcblk0p2|$BUSYBOX awk '{print $2}'`
		datasize=`$BUSYBOX expr $extsize / 5 / 1024`
		$BUSYBOX dd if=/dev/zero of=/data/ext4 bs=1048576 count=$datasize
		/system/xbin/mkfs.ext4 -b 4096 -m 0 -F -L userdata /data/ext4
		/system/bin/tune2fs -o journal_data_writeback /data/ext4
		/system/bin/e2fsck /data/ext4
		#/system/bin/tune2fs -O ^has_journal /data/ext4
		
		#$BUSYBOX mount -o loop,errors=continue,noatime,nodiratime,nosuid,nodev /data/ext4 /mnt/asec/extdata
		$BUSYBOX mount -o loop,barrier=0,nobh,nouser_xattr,errors=continue,noatime,nodiratime,nosuid,nodev /data/ext4 /mnt/asec/extdata
		$BUSYBOX chown 1000.1000 /mnt/asec/extdata
		$BUSYBOX chmod 771 /mnt/asec/extdata
		$BUSYBOX cp -a /data/data /mnt/asec/extdata/
		sleep 1
		$BUSYBOX umount /mnt/asec/extdata
		sleep 1
		$BUSYBOX touch /data/data2sd.ext.finish
	fi
		
	/system/bin/e2fsck -y -v -f /data/ext4
	#$BUSYBOX mount -o loop,sync,errors=continue,noatime,nodiratime,nosuid,nodev /data/ext4 /mnt/asec/extdata
	#$BUSYBOX mount -o loop,errors=continue,noatime,nodiratime,nosuid,nodev /data/ext4 /mnt/asec/extdata
	$BUSYBOX mount -o loop,barrier=0,nobh,nouser_xattr,errors=continue,noatime,nodiratime,nosuid,nodev /data/ext4 /mnt/asec/extdata
	$BUSYBOX chown 1000.1000 /mnt/asec/extdata
	$BUSYBOX chmod 771 /mnt/asec/extdata

Note that this script is for CM6.1 stable only, only ONE EXT partition needed on your SDCard, and it will be formated into EXT4, do nanodroid before you try

Also a CM6.1 ROM with Data2Ext by Carrol can be found here
CM6.1 ROM with Data2Ext by Carrol
download: http://rom.anshouji.com/htc/N1/bbs.anshouji.com-N1-data2sd-20101213.zip
________________________________________________________
ownhere Data2Ext script V4
Data2ExtV4

2010/12/12 update V4 script:
/data/:ext4, disable journaling
/data/data:ext4 loopfile on ext4 device, enable journaling on ext4 device, disable journaling on ext4 loopfile, for fast and stable sqlite3 access.
really smooth this time

There's a version for Desire, which is here [DATA2EXT] [11/Dec] FULL BENCHMARK, V4, Improve the efficiency of IO
While improving IO efficiency, it moves all userdata to EXT so to avoid insufficient ROM space, cos the whole EXT is recognized as the internal ROM.

with ownhere's v4 script, I got my miui rom working, no data lost or crash after reboot/battery-removed:

1. miui rom 12.03 clean installation(a2sd+ script removed), then flash update.zip of v4 script. working. applying 12.03 to 12.10 and 12.10 to 12.11 ota packages, working.

2. miui rom 12.11 clean installation, flash v4 update.zip, working.

3. miui rom 12.11 with a2sd+ running, 38 apps installed and /data/data moved to ext. The v4 update.zip can still do the job.

However, one problem is that Root explorer couldnot display Chinese filenames of APK , showing only ???. and if install those apks via root explorer, it just reports errors...

Another thing i am not sure of is not knowing how much v4 script could improve when there is only 1 ext partition. According to ownhere, 2 ext partitions are needed to make the best out of his v4 script...


I attached the v4 updtae.zip - Data2ext_update.zip ,in case you might wanna try:
1. BEFORE you try this package, you need to remove the app2ext script(file like 04apps2sd or 01 apps2sd) from /system/etc/init.d, or you would only get bootloop going on and on
2. And of course, Nanodroid...
3. disable signature checking in recovery...
______________________________________________________________________________________________
I tried merging those files into MIUI N1 ROM.
When N1 boots for the 1st time, everything's working just fine.

Now we know the previous script is faking the Quadrant score...
Quadrant bechmark really rocks with I/O scoring 8000+ and a total score @ 3000+

But after reboot, there came some issues:
System config could not be saved;
Home button wouldn't work;
Flight mode and Quiet mode missing in the reboot menu...

Could someone pls help to rewrite the script to fit in N1 ROM?

I think people using N1 would interested in such a script or rom that brings N1 more I/O performance and more space for Apps.

But I have no knowledge of coding, don't know how to fix the issues above.

So I add download link of the script CREATED by ownhere, not by me, hoping someone could make a N1 MOD...
data2ext.zip
data2ext.zip is not a flashable package

Thanks!
 
Last edited:

jayfallen

Senior Member
Feb 23, 2010
305
85
This goes in Q and A.

Also the answer is darktremor. A simple search of the the Nexus One Android Development gets that answer.

Sorry, but I don't think Darktremor Apps2SD script could do the job.

Since there is difference between Apps2SD and Data2Ext:
Apps2SD moves
/data/app, /data/app-private and /data/dalvik-cache to EXT
And with some commands /data/data could also be moved to EXT

But Data2Ext moves
/data/app to EXT4
/data/data to a virtual EXT2 device on EXT4, which is the trick to improve IO efficiency working at peak level...

SO I don't know if there is a answer fort this in Q&A...
 

lsxrx7

Senior Member
Feb 24, 2010
728
51
this comes up after searching

G1 data2sd instruction works for the N1 i suppose ?

http://xdaforums.com/showthread.php?t=527636&highlight=app2sd

**There is NO booting into recovery and wiping of the phone!**

My bad for not being clear on the wipe instructions!
1) (optional) If you are to wipe it (your choice it is not required), then press menu->settings->SD card & phone storage->scroll to bottom of screen and select "Factory data reset". This will wipe the /data partition only removing all apps and settings. BACKUP YOUR /data dir to sd, First or you will need to down load all your apps again to include paid apps!!
2) place data2sd.img in root of SDcard (fat32)
3) terminal in or adb shell in.
4) cp /sdcard/data2sd.sh to /data/local/bin - to copy the script to your user-space
5) chmod 0750 /data/local/bin/data2sd.sh - to make it executable
6) /data/local/bin/data2sd.sh or data2sd.sh may work to run the script

7) once the install is done it should tell you to reboot. If you had the ddms debugger running, you can observer the log as it is working.

8) done. It may boot a little longer if you clean-slate installed and then restored your apps by copying them back into /data/app and /data/app-private which has the affect of reinstalling everything, and thus the boot will take a while if you have alot of apps like I do. Again you can observe this as the Android boots if you have the debugger running.
 

KAwAtA

Senior Member
Jan 15, 2010
995
104
I'm also confused, how does darktremor move all of that to ext? Please explain. I thought darktremor moves apps to ext. If you fail, then you sir are an idiot and gtfo.

A "simple" reread (If that's even enough, maybe 100x more for you) would've told you want he wanted.

Sorry for invading your post jayfallen!!

I for one, am glad you posted this and would like to try it once you get it going.
 
Last edited by a moderator:

jayfallen

Senior Member
Feb 23, 2010
305
85
I edited the thread title, and added download link of the script created by ownhere.

someone might wanna take a look, if you're interested in bring your N1 more I/O performance and more space for Apps.

Thanks for everyone replying this thread. I will try your suggestions.
 

luciefer

Member
Aug 28, 2010
23
1
eVil's hd rom~

it's not work on the evil's hd sense?i try that last night~ but it's very hard!!!
 

jayfallen

Senior Member
Feb 23, 2010
305
85
the thread @ miui.com was posted by me earlier...

that rom is just experimental, if you don't reboot, everything works fine.
once rebooted, config lost and homebutton lost...

I don't know how to fix, that's why I start this thread @ xda, hoping someone could make it work for N1...
 

houzuoguo

Senior Member
Jun 3, 2010
578
86
Hamburg
Not sure if this can help..
Found a post on HiAPK (a Chinese Android discussion forum)
here's the link to the post:
http://www.hiapk.com/bbs/viewthread.php?tid=717815&extra=page=1&filter=type&typeid=211

And here's the link to the ROM:
http://rom.anshouji.com/htc/N1/bbs.anshouji.com-N1-data2sd-20101208.zip

The rom is said to be based on Cyanogen Mod 6.1 Stable, with data2EXT enabled by default.

The attached screenshot comes from a user of the data2Ext rom, note that the internal storage has 0.9GB left.
 

Attachments

  • screenshot.jpg
    screenshot.jpg
    24.8 KB · Views: 615
Last edited:
  • Like
Reactions: Kelvino9

jayfallen

Senior Member
Feb 23, 2010
305
85
there's been new development...

as houzuoguo mentioned, a CM6.1stable+data2ext mod ROM is out, but there're still some issues

ownhere update his script to V3
http://xdaforums.com/showthread.php?t=859419
1.change loopback device to real partition for powersave and better write performance.
2.disable second partition's journaling.
3.You need 3rd partition for /data/data. But even without the third partition of this script can also work(not stable). My partition settings:second partition:1.5G, thrid partition:0.5G

meanwhile, another new approach is coming out:
http://xdaforums.com/showthread.php?t=868102
NILFS2 - data2nilf2 will be much faster then data2ext and won't have Lags.
 

lsxrx7

Senior Member
Feb 24, 2010
728
51
whoa

i m glad there are so many new development out everyday

feel so good knowing the n1 is not being left behind


speaking of this is pretty freaking awesome

Not sure if this can help..
Found a post on HiAPK (a Chinese Android discussion forum)
here's the link to the post:
http://www.hiapk.com/bbs/viewthread.php?tid=717815&extra=page=1&filter=type&typeid=211

And here's the link to the ROM:
http://rom.anshouji.com/htc/N1/bbs.anshouji.com-N1-data2sd-20101208.zip

The rom is said to be based on Cyanogen Mod 6.1 Stable, with data2EXT enabled by default.

The attached screenshot comes from a user of the data2Ext rom, note that the internal storage has 0.9GB left.
...
 
Last edited:

britoso

Senior Member
Jan 13, 2010
2,794
302
Orlando
That is a huge improvement in IO!
Lets hope this reaches a stable state soon :)

I wonder why quadrant weighs so much on disk IO for the total score. :confused:
RNo6H.png
 

bcpk

Senior Member
Feb 11, 2010
460
19
Would someone mind explaining what tangible improvements this makes? Obviously there is an impressive boost in Quadrant scores, but I'm unsure what difference it makes to the actual operation of the device.
 

lsxrx7

Senior Member
Feb 24, 2010
728
51
Would someone mind explaining what tangible improvements this makes? Obviously there is an impressive boost in Quadrant scores, but I'm unsure what difference it makes to the actual operation of the device.

App2sd u get 512mb for ext3.
Data2ext u get at least 2gb for apps and stuff
 

Top Liked Posts