yashsingh1/xdaforums huggingface dataset:
[Desire Android Development] Droidzone:
Oh well, I thought it might've been looped to Fat32! :o
[Desire Android Development] melethron:
Yep, 3.0.0.5 didnt work. But the updates aren't needed for desire. I made a 2.5.1.8 and a 2.5.0.7 version and posted them in my rom thread. I update the OP of the thread when i release the next version.

(quote snipped)

You can take the either a zimage out of a zip or the kernel.img from a extracted boot.img. Apart from that you need to replace everything in /system/lib/modules (make sure you delete all the old files before and replace them with modules of the rom or the zipped kernel installer). Most likely the bootloop comes from a missing or incompatible module.

Apart from that you need to add init.d support to ramdisk. I think kitchen has an option for that called "app2sd support" (not sure i made it by hand - dont use the darktremor app2sd ... the init.d is the cyanogen one). Without that the init.d script wont be run.
[Desire Android Development] Droidzone:
Thanks a lot! Alex was telling me the same thing in his thread..And apparently you taught him, and you've added more info to what I was processing.. :)

Hadnt applied the kernel yet..Bootloop was because of Leedroid's A2SD scripts, though I removed the main one..

With Leedroid Non A2SD version, it's ok now..smooth and a lot faster! Even on Class 4..Dont need to buy the Class 10 card after all...You guys rock!

I particularly like this version. If you do a script (flashable zip) on this one (or already have), please add a note, will you? :)

Too many manual commands! :D

By the way, here's a batch file for the pushing part.. :)
[Desire Android Development] melethron:
About the script:

1.) I wont make a a regular zip for an UNJOURNALED device. Ownheres sqlite patch is better and less risky and i rather use that on a journaled ext3/4. If you want to use an unjournaled ext4 use data2whatever (WITHOUT life on the edge) and add a ^ to the code there (marked red)

# LIFE-ON-THE-EDGE Mod
if [ -e /system/life-on-the-edge ];
then
echo " --- life-on-the-edge mod active - mounting as loop device";
tune2fs -O ^has_journal /dev/block/mmcblk0p2;
busybox losetup /dev/block/loop0 /dev/block/mmcblk0p2;
busybox mount -o sync,noatime,nodiratime,nosuid,nodev /dev/block/loop0 /data;
else
echo " --- life-on-the-edge-mod NOT active - mounting with default options";
tune2fs -O [COLOR="Red"]^[/COLOR]has_journal /dev/block/mmcblk0p2;
busybox mount -o barrier=0,noatime,nodiratime,nosuid,nodev /dev/block/mmcblk0p2 /data;
fi;
fi;

2.) about format with stride. RTFM ......

stride=stride-size
Configure the filesystem for a RAID array with
stride-size filesystem blocks. This is the number of
blocks read or written to disk before moving to the
next disk, which is sometimes referred to as the
chunk size. This mostly affects placement of
filesystem metadata like bitmaps at mke2fs time to
avoid placing them on a single disk, which can hurt
performance. It may also be used by the block allo‐
cator.

stripe-width=stripe-width
Configure the filesystem for a RAID array with
stripe-width filesystem blocks per stripe. This is
typically stride-size * N, where N is the number of
data-bearing disks in the RAID (e.g. for RAID 5
there is one parity disk, so N will be the number of
disks in the array minus 1). This allows the block
allocator to prevent read-modify-write of the parity
in a RAID stripe if possible when the data is writ‐
ten.

a.) Setting one stripe-width for all is fail .... You dont know the channel count of your microSD (2-4).

b.) You don't know the erase block size. Also one setting "for all" is fail....

and most important

c.) This is intended to manage the writes of metadata. NO JOURNAL = NO METADATA.....
[Desire Android Development] woti23:
yes, TAP bench 246 db writes / sec with JFS
[Desire Android Development] melethron:
With loop or sqlite patch? Apart from that i wonder why it should be unstable?!
[Desire Android Development] woti23:
/data/data on JFS formated image file with integrity option, loop mounted.

sqlite patch also

with same config but ext4 image loop mounted and sync option 200

can't say if unstable, because had no crash ;-)
[Desire Android Development] melethron:
Make a reboot script in init.d :p

Well im not a friend of loop. I test it without. B+ tree filesystems seem to be good for sqlite but i thought the speed increase from reiserfs is related to the tail packing.
[Desire Android Development] peterme58:
Thank you so much sebire, melethron, ownhere, this is a screen shot from my desire with the tepic' s latest rom, with the richardrip's v5e kernel at 1113 mHz and with 1 gb ext 4 data space according to op (with the libsqlite recommendation)!!!

And no fc, no random reboot, no lag! Thank you again!
[Desire Android Development] sibere:
I'm not really into exotic FS. You should keep in mind again that the main purpose is space, not quadrant/TAP scores :)
[Desire Android Development] sibere:
@droidzone

Your problem could come from the other script 02dalvik..... try again without it
[Desire Android Development] Droidzone:
Thanks.

Is it possible to run bash scripts from the adb shell? To automate the chmod-ing and the chown-ing.. There are a lot of these this time :)

Would that happen if I add bash support to my rom?
[Desire Android Development] Droidzone:
Just tried the patched libsqlite.so, and my scores improved tremendously..I'm also not concerned about projecting scores, but only about getting storage space w/o much lags..The latest scripts do the job very well.. Thanks..
[Desire Android Development] sibere:
Well, you can also thank ownhere :)

I've just used his method to patch the original lib.
[Desire Android Development] sibere:
happy that you're happy.

Hemmm wow 5400+ CPU with v5e? I only have about 5200 with v5e @ 1113MHz... weird!

But once again ... that's quadrant ;)
[Desire Android Development] Droidzone:
@Sibere, I dont see an MB align option in Gparted. Is this something Gparted does on its own?
[Desire Android Development] melethron:
There should be an option to select "align to cylinder" or "align to MiB". You can also use this:

http://xdaforums.com/showpost.php?p=10522990&postcount=394

It makes the Partition aligned and formats it. You can then reformat it with siberes option or remove the journal. The Partition alignement will stay after that. It actually does the same as gparted.
[Desire Android Development] sibere:
Maybe you can use this Guide. http://xdaforums.com/showthread.php?p=10480202#post10480202

I didn't use gparted for partitioning my SD but fdisk. Apparently there is a option to check to switch from align to block to align to MB
[Desire Android Development] Droidzone:
@Sibere,

Would the new script protect against corruption on Battery pull? Was wondering if the snq reboot menus were safe..I removed them from my rom which uses d2sd
[Desire Android Development] sibere:
Not at all. Even with journal it would not be safe because sync option is not used. It would be probably safe ( or at least safer) with journal (ordered) barrier=1 and sync options and without the patched lib. In this case tho you would surely get poor performances and huge lags.

I do not recommend using anything else than the standard power off option because it is unmounting the /data partition properly and safely.
[Desire Android Development] Droidzone:
Thanks..Though the Gparted option still is invisible to me!

Ok..Thanks..
[Desire Android Development] sibere:
Did you try this guide?

http://xdaforums.com/showthread.php?p=10480202#post10480202
[Desire Android Development] melethron:
Wrong. No need to sync.

1. Autocommit

2. Fsync after every file on sqlite.

3. Ext4 journal checksums

Also barrier is completly useless because sd cards have no build in write cache.....

Answer to rest follows.

Edit: sgs devs made reboot stress tests without unmount. Init script with 30 sec reboot. They use Ext 4 ordered journal, barrier=0, async.
[Desire Android Development] melethron:
Live cd? I use gparted in ubuntu and there it works fine....
[Desire Android Development] iroironz:
Make sure you have the latest version of gparted (gparted-live-0.7.1-1.iso). I originally had an older version the align to MiB option was also greyed out.

Jay.
[Desire Android Development] iroironz:
Hey Sibere,

Working great and very fast, stable etc. Many thanks for your work and contributions to making my desire greato.

Quick question, you've mentioned a few times you have dalvik-cache on nand (original /dev/block/mtdblock5 partition) - are you using a "mount -o bind" or symlink to /data/dalvik-cache?

Jay.
[Desire Android Development] sibere:
Thanks :)

Never use a bind mount on /data if you have a sense rom. This prevents the clean unmount of the /data and leaves the ext partiton unclean. I will post an update with this option but in the mean time use symlink if you want to play with it :)

Sent from my HTC Desire using my fingers
[Desire Android Development] danarama:
Ok, so I did this right at the beginning and am still using the.original method. Only thing I've changed is sd card and sync on.

I'm finding it hard to ascertain what exactly has changed with this method. Can someone please help explain what I'm missing out on?

Also, finding apps slow to open recently, if phone has been running for a couple of days. If I turn.off and on, it seems fine for a day or so, but then it seems to clog up again.

This is only since changing my sd and sync on.

Since I can't schedule reboots, any.other ideas as to what could be causing this?
[Desire Android Development] peterme58:
I can confirm that the nandroid backup works perfect with clockwork recovery.
[Desire Android Development] fisha21:
Bit fiddly to set up but well worth it! Thanks so much for explaining how to set it up so clearly.

Two questions for anyone with the answers:

1. If I flash a new kernel, the data2sd set up will remain intact as long as I don't wipe? (think I remember reading this but can't find where)

2. If I do a clockwork backup, and then do a wipe or otherwise disturb the data2sd setup, restoring the nandroid backup will also restore the data2sd setup?

Apologies if these have been answered already, did try reading through first before asking, but 117 pages man! :eek:

Also, off topic, but....funniest thing I've read on here in ages! -->
[Desire Android Development] danarama:
1) yes. Also if you put the 01data and busybox in a rom.zip file, if you're flahing without a wipe, you will still have data 2sd.

2) yes, but if you wipe then restore the sd-ext via nandroid, you're redoing everything you just wiped anyway.

If you have to wipe to get a rom to work, go through the entire process again, but you will need to re-format the second partition too.

If you use titanium, you can uninstall user apps via that which is almost the same thing.
[Desire Android Development] sibere:
Thanks ;) There is surely a better way to say this with a bit of humour but my English is not good enough ;)

moving on to your questions, Danfrance answered nicely.

clockworkmod can backup and restore ext partition.

If you wipe data with clockworkmod, it'll wipe the internal NAND data, not the ext partiton.

data2sd setup (script and apps) are in the /system partiton and as long as you don't install another ROM, you won't do anything bad to settings.

You can flash any kernel you like. Kernels+initram are not in /system. As long as your kernel has ext4 support and is sense compatible, you're safe to flash as much as you like :)
[Desire Android Development] fisha21:
Thanks Danfrance and sibere for your detailed replies. Just to clarify, if I wanted to upgrade to a new version of my current ROM, the d2SD setup would remain intact as long as I didn't wipe beofre flashing, and put busybox/data01 into the new ROM zip? Would I also need to put the contents of e2fsprogs-arm.zip into the ROM zip?

Would quite like to understand how this works, rather than just follow the steps without knowing what it is I'm doing. Any pointers for some info that might explain it to someone with very limited programming knowledge?
[Desire Android Development] sibere:
Basically you will keep everything on ext partition (/data) and loose all the rest.

If you upgrade, you'll have to push at least 01data,busybox and e2fsprogs to you new rom (/system)

You won't have to copy nand /data to you ext nor format again the ext partition.
[Desire Android Development] danarama:
Actually, Sibere I have a question.

Lets forget about titanium for the minute,

With the EXT2 file, if I want to achieve essentially a data reset, but to leave the EXT2 file within the FAT32 partition (but with no data within it), is there any way to easily achieve that?

For example, I want to flash a rom and require a data wipe, but don't want to have to recreate the EXT file itself, how is it possible? Is it even possible?

Titanium removes some stuff, but not everything.
[Desire Android Development] sibere:
You still have the old version with ext2 file mounted via loop file?

It is possible indeed.

That's what I did when I upgraded my sense rom. (I didn't even wiped /data)

When you wipe, you actually wipe the internal /data, not the ext file or partition.

Once you've flashed your rom, pushed back 01data, busybox & stuff, the phone will remount the untouched ext2 file and you should get all your apps back :)

But this means that it's like you didn't wiped you /data!

If you want to wipe it, just mount it in recovery mode with a loop, then select wipe /data in recovery menu and unmount /data manually. Your ext2 file should be wiped correctly.
[Desire Android Development] danarama:
Cool thanks. I'm a novice though, would you please be so kind as to supply me the command for mounting with loop?
[Desire Android Development] sibere:
Well it was on the 1st version tutorial ... Should have left it ;)

Anyway

Boot in recovery then mount sd-ext. then type

/system/xbin/busybox mount -o loop,sync /sd-ext/ext2 /data

to unmount

cd /

/system/xbin/busybox umount -d /data
[Desire Android Development] danarama:
Ace. Many thanks :)
[Desire Android Development] Droidzone:
Thanks..I dont still see that option in any of the menus, but could be b/c I'm running Gparted as a Virtual device under VMW. Will see if the option appears in the LiveCD

Thanks for these two..I'd an inkling that this was what was happening..Appreciate the mount/unmount of loop file thing..Pinned it for reference..But the new script doesnt have a loop file, does it? It's just plain ext4?

If you get time, it'd be useful to add an index at the bottom of the OP, with a link to these particularly useful posts related to the main post, like:

"For installating new roms which require wipe, see Post #45

For mounting/unmounting loop file for wipe, see Post #46" etc.. It'd be extremely helpful..Just a suggestion..You're already dedicating a lot of time to this, and cant appreciate enough!

Experimented with a lot of roms..Right now, on the latest MIUI with the latest ext4 script"

Tried:

Aurax..Nice and simple

Leedroid...A2SD+ version-remove 2 scripts

.................Non A2SD....straightforward

Teppic74's Rooted Rom (which is plain Sense+dsixda kitchen cooked): Straightforward

Cyanogen...Require a manual addition to init.rc

Defrost....I havent tried it, but danfrance confirms it works.

DHD Roms...So far, couldnt get them to work...Havent tried the new script yet.
[Desire Android Development] bluelavender:
Try this before you execute busybox :

chmod 777 system/xbin/busybox

(Yeap . Kinda drastic :-))
[Desire Android Development] sibere:
5% extra storage !

Guys you can blame me... But I forgot an option in the mke2fs command line...

But nothing to worry about. It's just that I left the system reserve 5% of space for root user on the ext partition

Look at the OP I've changed and corrected the mke2fs command line.

However, the good thing is, if you want to claim all that little space back, you can do it without erasing the ext partition.

What you can do (not mandatory tho) is to install e2fsprogs on you device in

recovery mode

and then mount your sdcard :

mount /system

mount /dev/block/mmcblk0p2 /sd-ext

/system/bin/tune2fs -m 0 /sd-ext/ext2

umount /sd-ext

adb reboot

And voila you left now 0% of space to root ;)

I got 44mb back with this from a 870Mb partition

You can get e2fsprogs from OP too
[Desire Android Development] danarama:
Day two :)

I am going to take this down to basics.

I am going to reflash clockwork recovery to remove the patched recovery used for custom mtd layout.

I am going to wipe and format /system, /data and /cache

Download a fresh Defrost rom with a2sd script pre-removed and flash.

Then try again....

I will not be beaten ;)
[Desire Android Development] blingblingslyna:
this looks like the lagfix for galaxy s/vibrant/captivate
[Desire Android Development] danarama:
Its similar. The file system for the galaxy was flawed so overlayed with another FS
[Desire Android Development] sibere:
May the force be with you young Jedi :)
[Desire Android Development] _bryan_:
finally I made it.:D

miui 11.26 with original kernel, s-off

the error i encounter before i think is because i make a nand backup and flashed n1table hboot then restore. maybe that brings some serious error in the system

I installed the rom again and now is ok and all my app is back.

thanks sibere, thanks AndroHero!!!
[Desire Android Development] sibere:
You're welcome and congrats !

Do you have sync activated? what is your SD class? Is this @ stock speed?

yes I'm a bit curious ;)
[Desire Android Development] _bryan_:
I use a class6 8G SD card @1116 sync disabled
[Desire Android Development] wollyka:
Thanks for the help :)
[Desire Android Development] sibere:
With a class 6 and sync OFF you should get even more than that for I/Os

Anyway, this a very good score :)
[Desire Android Development] quad2012:
seems like I just have to give it a go by myself xD but one last question as this seems similar to the galaxy s etc. lagfix how do you people experience it? Is it worth doing it beside the insane quadrant scores?
[Desire Android Development] sibere:
We have no need for a lag fix on the Desire.

The issue is user data space on this phone.

The I/O boost is just a side effect ;)
[Desire Android Development] danarama:
Ok I've done all my MKII prep...

Can anyone confirm that its the latest STABLE busybox binary I need? 17.x please?
[Desire Android Development] sibere:
Yep, the link in OP is the latest so far
[Desire Android Development] danarama:
Thanks very muchly :)

(link is broken by the way)
[Desire Android Development] quad2012:
Ahh thanks for the answer thought something like this, might give it a try when my 512mb arent enough anymore :D
[Desire Android Development] sibere:
updated :D
[Desire Android Development] fogbav:
Äääätsch ... 8) (German) ... Links were broken ... 8)
[Desire Android Development] danarama:
Noooooooooooooooooo!!!

I'm still getting failed: no such file or directory on this line:

/system/xbin/busybox mount -o loop /sd-ext/ext2 /sd

Any Idea's please master yoda?

C:\android-sdk-windows\tools>adb shell
* daemon not running. starting it now *
* daemon started successfully *
~ # mount /system
mount /system
~ # mount /data
mount /data
mount /sdcard
mount /sdcard
~ # mount /sdcard
~ # exit
exit

C:\android-sdk-windows\tools>adb push c:\users\dan\desktop\busybox-armv6l /syste
m/xbin
1584 KB/s (1062992 bytes in 0.655s)

C:\android-sdk-windows\tools>adb push c:\users\dan\desktop\01data /system/etc/in
it.d
22 KB/s (362 bytes in 0.015s)

C:\android-sdk-windows\tools>adb shell
~ # chmod 755 /system/etc/init.d/01data
chmod 755 /system/etc/init.d/01data
~ # cd /
cd /
~ # mount /dev/block/mmcblk0p2 /sd-ext
mount /dev/block/mmcblk0p2 /sd-ext
~ # dd if=/dev/zero of=/sd-ext/ext2 bs=1048576
dd if=/dev/zero of=/sd-ext/ext2 bs=1048576
dd: writing '/sd-ext/ext2': No space left on device
1022+0 records in
1020+1 records out
1070575616 bytes (1021.0MB) copied, 87.798049 seconds, 11.6MB/s
~ # /system/xbin/busybox mke2fs -m 0 -F -L userdata /sd-ext/ext2
/system/xbin/busybox mke2fs -m 0 -F -L userdata /sd-ext/ext2
Filesystem label=userdata
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
65408 inodes, 261371 blocks
0 blocks (0%) reserved for the super user
First data block=0
Maximum filesystem blocks=4194304
8 block groups
32768 blocks per group, 32768 fragments per group
8176 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376
~ # mkdir /sd
mkdir /sd
~ # /system/xbin/busybox mount -o loop /sd-ext/ext2 /sd
/system/xbin/busybox mount -o loop /sd-ext/ext2 /sd
mount: can't setup loop device: No such file or directory
[Desire Android Development] danarama:
I can also confirm Old version works on Gingervillain 0.7. Haven't got it working on 0.8 yet

As per this post:

http://xdaforums.com/showpost.php?p=10615041&postcount=1418
[Desire Android Development] sibere:
I have answered to your post on this thread. Could be helpful for other users :)
[Desire Android Development] danarama:
Thank you sibere, much appreciated. I saw that :)

At the moment, I am considering going to a more standard apps2sd+ and custom mtd layout as I had before.

I like data2sd a lot, but I am a flash maniac and its easier to maintain on the fly

Well this is unless I manage to get it working today without neglecting the missus too much ;)

I think its.just the change between the 2 Rom versions, moving to dark tremor that is the issue.

To upgrade to.ext4, is the actual.partition ext 4 now?

Is.it best to start from scratch with op or is there something different I should do?

Thanks again for your support. As always greatly appreciated.
[Desire Android Development] Droidzone:
Direct installation of Data2sd by flashing zip through recovery

Please see this post. Will update the links there.
[Desire Android Development] danarama:
Thanks dude
[Desire Android Development] Droidzone:
I'm happily close a Rom release for my new Rom... Thanks to Sibere for Data2Sd, and Firerat's huge help in porting the commands to update-script!
[Desire Android Development] bpivk:
How did you manage to do that, I end up in a boot loop as soon as I remove a2sd script on any HD roms.

I've been strugling to use this for a day now on RCMix and some other roms.
[Desire Android Development] Droidzone:
Well, try the badnewz one. It doesn't have a problem with removing the a2sd script.
[Desire Android Development] bpivk:
Can you give me the link to the correct one? I've used update-bnz-1.7c-signed.zip and it didn't even install.
[Desire Android Development] Droidzone:
That's exactly what I used..And I got it from here
[Desire Android Development] Droidzone:
Sibere,

Could you explain what this command does?

:> /system/etc/mtab
[Desire Android Development] bpivk:
Ok. I'll try it again. Thanks

Just to confirm: You only removed 40a2sd script from /system/etc/init.d/ and then copied the zip file and installed it?

Because I did that with the previous rom and it didn't work. Except I've also removed some apk's which shouldn't effect it.
[Desire Android Development] Droidzone:
Also update the update-script to remove references to the a2sd script
[Desire Android Development] bpivk:
Could you please give me a link to the script or it's contents? Because I get an error. It seems that I'm deleting too much or doing something wrong.
[Desire Android Development] Droidzone:
Ok. Here you go
[Desire Android Development] sibere:
Sure! It's creating the empty file mtab :)
[Desire Android Development] Droidzone:
Edit: Guess that might not be appropriate..

May I use the new script in a Rom I'm cooking?