yashsingh1/xdaforums huggingface dataset:
[Motorola Droid and Milestone General] MenoDev:
What advise do you need? There is an in depth instruction on top.

However, it is not very complicated, i can tell since I'm into this about 1 month and succeeded with a minimum or even less amount of knowhow.

The vulnerable recovery is working for all boot loader versions and does allow to access the update.zip.

You'll need either RSD Lite or sb_reflash, depending on your OS. So boot into bootloader mode (holding up the d-pad on start), apply the vulnerable recovery sbf and fire up your update.zip once thee flashing is done. (assuming you have followed the instructions on how to prepare your sdcard for OpenRecovery, eg. the G.O.T distro requires a differnt structure)

If you get a checksumm error, check out the log files and modify the file, or use a script to recalculate the checksum. But this is rarely the case.

Ohh.. and talking about "original sbf", you might want to read the difference between Service and "normal"
[Motorola Droid and Milestone General] vladstercr:
Whats the difference?

By the way...I didnt had to prepare the sd card in a special way or something...Nor to format it in a particular way...It was pretty easy the whole process though...

Now I have switched to GOT 2.2.1 Froyo with CM6 mod but I'm very dissapointed on the battery life... Think I'm gonna try other 2.2 Roms with 2.1 kernel...

Thanks for your reply!
[Motorola Droid and Milestone General] MenoDev:
Know what I observed in my case? Installing the 2.2.1 firmware with no "got-fix" and no root makes my battery last very long
[Motorola Droid and Milestone General] vladstercr:
what do you mean by "no got-fix"

Please let me know....And also...Did you have the GOT 2.2.1 where the battery last less?
[Motorola Droid and Milestone General] MenoDev:
You get the G.O.T 2.01 OpenRecovery Version along with the Firmware files.

Usually one supposed to boot into recovery and apply some mods, the first one would be fix 2.2.1 issues... and so on.

I was lazy and didn't, but simply flashed the Firmware. And to my surprise the battery was lasting longer.

But you know, I can't tell if it's depending on the Distro or whatever. Hovewer, I'm not that of a version junkie, rather looking for a decent distribution, and luckily i found one. Even if it was 2.0 it would have been cool for me. Now 2.3 resp. 3.0 is around the corner, then the whole race starts again...
[Motorola Droid and Milestone General] MenoDev:
Btw... they announced froyo for next week for the milestone in this forum.. so we hopefully will all be fine, if not, we will still have to deal with the fact that Android is very nice, but not yet rock solid
[Motorola Droid and Milestone General] vladstercr:
Yes... I never applied those fixes too... Still the battery last very little time...

As an example:

Before I went to sleep last night the battery was fully charged...no apps running...3g disabled...everything disabled...phone idle for 7 hours...and when I woke up and check... I got 60% of the battery...

Thats frustrating...

I must admit I have the Cyanogenmod running...Would this be the issue?
[Galaxy S I9000 Android Development] hardcore:
Hi guys,

Now that several lagfixes are using the ext4 filesystem, perhaps we should look at optimizing ext4 for performance and lifespan of the flash memory.

One of the main things we can change is the journaling method to data=writeback. This should reduce writes and improve performance at a slight expense of reliability. Quote:

"In data=writeback mode, ext4 does not journal data at all. This mode provides a similar level of journaling as that of XFS, JFS, and ReiserFS in its default mode - metadata journaling. A crash+recovery can cause incorrect data to appear in files which were written shortly before the crash. This mode will typically provide the best ext4 performance."

One explanation here:

http://blog.smartlogicsolutions.com...ions-to-improve-ext4-file-system-performance/

Reference here:

http://git.kernel.org/?p=linux/kern...02ac5fa36d7f4c07856fe9cf89391e08986f7;hb=HEAD

HOW TO

1. Change the default mount option of the partition using tune2fs. You need to use a version of tune2fs that supports ext4, the one in busybox 1.17 does NOT. A working version is attached to this post.

- Push the tune2fs file to the phone's SD CARD:

adb push tune2fs /sdcard/

- Copy the tune2fs file to /data/

adb shell

su

cp /sdcard/tune2fs /data/

Now change the options:

/data/tune2fs -o journal_data_writeback /dev/block/mmcblk0p2

To verify:

/data/tune2fs -l /dev/block/mmcblk0p2

Look for the line that says:

Default mount options: journal_data_writeback

* Repeat the above for all other ext4 partitions.

It should take effect after a reboot. The next time it will be mounted automatically with data=writeback. You might have to do the tune2fs settings and reboot twice to get it to stick - I'm not sure why, but I had to.

You can verify this using the mount command:

# busybox mount | grep ext4

/dev/block/mmcblk0p2 on /data type ext4 (rw,noatime,barrier=0,nobh,data=writeback,noauto_da_alloc)

/dev/block/stl10 on /dbdata type ext4 (rw,noatime,barrier=0,nobh,data=writeback,noauto_da_alloc)

2. In addition to that, you can also edit the mount options to include the nobh option, which is a further minor optimization for data=writeback mode.

I personally use the options noatime,barrier=0,nobh,data=writeback. Voodoo already uses some of them like noatime and barrier=0.

I do it using a startup script (you need to know how to use/modify a startup script), with the following commands:

for k in $(busybox mount | grep ext4 | cut -d " " -f3)

do

sync

busybox mount -o remount,barrier=0,nobh $k

done

EDIT: Attached tune2fs that supports ext4. Works on Froyo kernels with ext4 support.
[Galaxy S I9000 Android Development] s88:
I posted the same request in another thread and i though it will be better if i do it here.

I found e2fsprogs-ext4.zip, but not sure if this is the correct zip.

it will be great if you can provide it here.

For others willing to try it, please change the /dev/block/mmcblk0pX to whatever you are using now.

my system is using /dev/block/mmcblk0p4
[Galaxy S I9000 Android Development] hardcore:
I've attached it here, it worked for me with the Universal Lagfix Froyo kernel that supports ext4.
[Galaxy S I9000 Android Development] mdalacu:
And did you notice any improvements with new mount options?
[Galaxy S I9000 Android Development] danzel:
busybox 1.17.1 says invalid option -o on tune2fs :(

==

i need the version attached to this thread, busybox version only supports ext2 and ext3
[Galaxy S I9000 Android Development] s88:
copy tune2fs into /system/xbin and chmod 755
[Galaxy S I9000 Android Development] chanw4:
Write back will cause data loses on crashes and it will increase read time on read miss since you need to write the block back to the main mem before reading a new block.
[Galaxy S I9000 Android Development] s88:
how & where do i edit mount options?
[Galaxy S I9000 Android Development] hardcore:
I didn't do any benchmarks, but in theory it should be better - reduced periodic journal writes (better battery life, flash lifespan and performance).
[Galaxy S I9000 Android Development] danzel:
I don't know about performance but my SGS feels like a little bit snappier.

Thanks for this info.
[Galaxy S I9000 Android Development] hardcore:
There is always a risk of slight data loss during crash, even with data=ordered. And we are already using some even more 'risky' options like barrier=0 and noauto_da_alloc anyway.

This setting increases the risk a bit more.
[Galaxy S I9000 Android Development] hardcore:
He's referring to the busybox 1.17.1 version. It doesnt support the ext4 options. For the version attached here, you have to copy it to somewhere else like /data/ before u can execute it. You don't really need to copy it to /system/xbin.
[Galaxy S I9000 Android Development] RyanZA:
Yeah but I think at some point you're just throwing away the safety of EXT4, and might as well just use EXT2 since it writes faster even with these options on. (Can anybody confirm this? I did a check and EXT2 is still faster even with these mount options... while EXT4 reads faster. But writes are more important than reads on MoviNAND from my usability experience, since the reads are generally fast enough anyway.)
[Galaxy S I9000 Android Development] hardcore:
Hi Ryan, it's different. ext4 with data=writeback still uses journaling but only for metadata, which supposedly "provides a similar level of journaling as that of XFS, JFS, and ReiserFS".

So it's still safer than ext2 but without the speed (and more importantly, battery or flash write lifespan) impact full data+metadata journaling.

More detailed information in the sources here:

http://git.kernel.org/?p=linux/kern...02ac5fa36d7f4c07856fe9cf89391e08986f7;hb=HEAD
[Galaxy S I9000 Android Development] s88:
hardcore,

how do you change the mount options? like buffer from 1 to 0 and nobh, etc
[Galaxy S I9000 Android Development] hardcore:
I've made a clearer procedure in the first post. To change some options you might need a startup script though.
[Galaxy S I9000 Android Development] ashwinds:
That sounds very promising :D

Followed the procedure - had to do it twice as well to make it stick...dont see any obvious changes in the last 5 minutes. Will update after using it for a while.

PS: how persistent is that setting? what circumstance does it get reset? When a new kernel is installed?
[Galaxy S I9000 Android Development] bobbel:
Does it work with 2.1 too?
[Galaxy S I9000 Android Development] s88:
yes, it does. I am using JM9, and it feel faster.

take note i only change the data to write_back, haven't figure out a way to do the rest.

for write back, it can be done on the terminal emulator.
[Galaxy S I9000 Android Development] bobbel:
Cool, I give it a try.

One Question:

When I enter the mount cmd I have:

/dev/block/mmcblk0p4 /data ext4 rw,noatime,...

So I have to use

/data/tune2fs -o journal_data_writeback /dev/block/mmcblk0p4 (instead mmcblk0p2)

Right?
[Galaxy S I9000 Android Development] hardcore:
Right.

....
[Galaxy S I9000 Android Development] ashwinds:
Yes - thats right
[Galaxy S I9000 Android Development] bobbel:
Thank you both, it worked ;)
[Galaxy S I9000 Android Development] danzel:
startup script

when can i put the startup script so I can apply the "nobh" option?

does SGS have any /etc/fstab so I can permanently put that option on mount?

TIA
[Galaxy S I9000 Android Development] hardcore:
As for startup script, that's a bit complicated to explain again, but you can use the Search.

And no, the SGS and (I think) Android in general doesn't use /etc/fstab.
[Galaxy S I9000 Android Development] EarlZ:
Could you possibly make an automated script for this via adb or something
[Galaxy S I9000 Android Development] fomofo:
I'm a command line noob, so I might be doing something wrong...

Using the verify # busybox mount | grep ext4 command, it returns the mmsblk0p2 information but not the stl10.

Is this normal? I have the Voodoo5 Pre6 lagfix.
[Galaxy S I9000 Android Development] hardcore:
Its normal. Voodoo only converts the /data partition which is at mmcblk0p?.
[Galaxy S I9000 Android Development] fomofo:
Ah...now I get it.

Thanks for the reply and your dev work.
[Galaxy S I9000 Android Development] XziTe:
Hey guys i have a little Question you say: "* Repeat the above for all other ext4 partitions."

But how i know whats my another ext4 Partitions?

i changed the Option for Filysystem Volumename: DATA

(with

/data/tune2fs -o journal_data_writeback /dev/block/mmcblk0p2)

but how i can change the another partitions?

I configuried my ext4 in ULF like this:

data-fs = ext4

cache = ext4

dbdata = ext4

data loop = ext2

cache loop = ext2

dbdata loop = ext2

bind data to dbdata = false

Thanks for help :)
[Galaxy S I9000 Android Development] tristecire:
mount command

Hi

Try this

Type adb shell

mount

you'll see a list of your mounted partitions.

Withs all details.

And so your 3, maybe, ext4 partitions with their system name

Hope this helps
[Galaxy S I9000 Android Development] Bo$s:
in shell type:

mount | grep ext4

and it will list all ext4 partitions.
[Galaxy S I9000 Android Development] XziTe:
ok i'll found this partitions and changed!

/dev/block/mmcblk0p2 /res/odata ext4 rw,noatime, barrier=1,data=writeback 0 0

/dev/block/stl10 /res/odbdata ext4 rw,noatime, barrier=1,data=writeback 0 0

/dev/block/stl11 /res/ocache ext4 rw,noatime, barrier=1,data=writeback 0 0

Now i read a tutorial how to make an startupscript (cant link the post because newbie)

in the userinit.sh i wrote the following:

# Tweak cfq io scheduler
for i in $(ls -1 /sys/block/stl*) $(ls -1 /sys/block/mmc*) $(ls -1 /sys/block/bml*) $(ls -1 /sys/block/tfsr*)
do echo "0" > $i/queue/rotational
echo "1" > $i/queue/iosched/low_latency
echo "1" > $i/queue/iosched/back_seek_penalty
echo "1000000000" > $i/queue/iosched/back_seek_max
echo "3" > $i/queue/iosched/slice_idle
done
# Remount all partitions with noatime
for k in $(busybox mount | grep ext4 | cut -d " " -f3)
do
sync
busybox mount -o remount,barrier=0,nobh $k
done

# Tweak kernel VM management
echo "0" > /proc/sys/vm/swappiness
echo "10" > /proc/sys/vm/dirty_ratio
echo "1000" > /proc/sys/vm/vfs_cache_pressure
echo "4096" > /proc/sys/vm/min_free_kbytes

# Tweak kernel scheduler, less aggressive settings
echo "4000000" > /proc/sys/kernel/sched_latency_ns
echo "1000000" > /proc/sys/kernel/sched_wakeup_granularity_ns
echo "800000" > /proc/sys/kernel/sched_min_granularity_ns

# Miscellaneous tweaks
setprop dalvik.vm.startheapsize 8m

But why is my barrier=1?

I think my startupscript doesnt work. But i do everthing from the tutorial .. hmm :/

Hope you guys can help me.

Thanks a lot for your posts and answers!
[Galaxy S I9000 Android Development] tristecire:
Eh, should'nt your script begin with :

#! /system/bin/sh

to work ?
[Galaxy S I9000 Android Development] XziTe:
Dont know sorry, iam a completly newbie ;D

This command is in the playlogos1 file
[Galaxy S I9000 Android Development] spline1:
Beginner Question:

write back for data is (/-o data/tune2fs journal_data_writeback / dev/block/mmcblk0p2)

is the command for dbdata then: / dbdata/tune2fs-o journal_dbdata_writeback / dev/block/mmcblk0p2 ... ?

and for cache / cache/tune2fs-o journal_cache_writeback / dev/block/mmcblk0p2

or?

Thanks for Help
[Galaxy S I9000 Android Development] Bo$s:
No. Type

mount | grep ext4

and it will list all ext4 mounts. Then type

data/tune2fs -o journal_data_writeback /dev/block/x

but replace x with values listed from mount command (probably stl10 and stl11).

So final commands probably will look like this (if you're using all=ext4 lagfix):

data/tune2fs -o journal_data_writeback /dev/block/mmcblk0p2
data/tune2fs -o journal_data_writeback /dev/block/stl10
data/tune2fs -o journal_data_writeback /dev/block/stl11

Then reboot, after reboot type again

mount | grep ext4

All mounts should have data=writeback option. In my case i had to set journal_data_writeback option for stl11 three times (with reboots) to get it working.
[Galaxy S I9000 Android Development] spline1:
Thanks a lot :-)
[Galaxy S I9000 Android Development] spline1:
No is not going:

I have /dev/block/stl10 /dbdata ext4 rw,noatime,barrier=0,data=ordered,noauto_da_alloc 0 0

and

/dev/block/stl11 /cache ext4 rw,noatime,barrier=0,data=ordered,noauto_da_alloc 0 0

When i type this command:

data/tune2fs -o journal_data_writeback /dev/block/stl10

it writes:

data/tune2fs: Permission denied while trying to open /dev/block/stl10

Couldn't find valid filesystem superblock.

What is wrong?
[Galaxy S I9000 Android Development] ashwinds:
Are you running those as root? ie after a su?
[Galaxy S I9000 Android Development] spline1:
oh yes I have Forgot at the beginning with su.

Now without denied

but still, I type the command and to mount | grep ext4 comes again .... data = ordered
[Galaxy S I9000 Android Development] Bo$s:
Like I said - you have to reboot after using tune2fs and sometimes you have to do it a few times.
[Galaxy S I9000 Android Development] spline1:
yes i need 3 reboot's for stl11

and now works :-)
[Galaxy S I9000 Android Development] Peacemanibk:
Just as a general question what about the option to completely disable the ext4 journal? As far as i have understood it from some articles testing it on ssd's this should be faster then ext2. Sure its less safe, but on the other hand whats if you get a power loss just when writing to the journal and you corrupt it? And when with the metadata journal your file data is still corrupted, wouldnt it be just enouth to make a file.system ckeck after power loss? The data is gone anyway or?
[Galaxy S I9000 Android Development] spline1:
lose i the settings when I take the new K-7 kernel?

Edit:

it works :-)
[Galaxy S I9000 Android Development] fenerbuuh:
thank you for this information.

it works for me.
[Galaxy S I9000 Android Development] thunderteaser:
ext4 without journaling means ext2, in few words.

As RyanZa explained (but correct me if I'm saying bullshits) ext4 is faster on writing operations while ext2 on reading ones, and that's what we want from our Android device, since writing is fast enough.

Let me share my experience with you: I'm using Ubuntu GNU/Linux as default OS since 2006, when I installed 6.06 LTS "Dapper Drake", which used ext2 by default. In 9 distribution upgrades I've never had to reformat my system drive, so today I'm still on ext2. I experience power loss at least once per week (yeah, I know...), and just once (probably twice) in four years the fsck discovered some errors (which were fixed).

Four years without data loss.

Either I might just be lucky, or ext2 is reliable enough, it's up to your judgement. :)

What I'd most probably choose is hardcore's mount points, but using ext2 instead of ext4. I just have to give it a try but I'm too lazy for this... :p
[Galaxy S I9000 Android Development] Peacemanibk:
Well - agree with you that ext2 is reliable enough for our devices. Thats exactly why i asked for ext4 without journalling. Disagree that this is exactly the same as ext2, there are different block allocation algorithms and some other things - the question is if this small differences would increase/decrease I/O speed or if it doesnt matter at all.
[Galaxy S I9000 Android Development] thunderteaser:
Indeed. If you care about benchmarks, ext4 will give the best results, due to faster write speeds. The way ext4 uses clusters is almost the same as ext2 and there is no notable difference, imho. Using writeback is the only way of "disabling" the journal. Anyway I "felt" the system more responsive with ext2, but I haven't tried writeback with ext4 yet.
[Galaxy S I9000 Android Development] hardcore:
data=writeback does not disable the journal. it sets the journaling to metadata-only.

data=writeback = metadata journaling

data=ordered = metadata + data journaling

for comparisons, JFS and XFS only do metadata journaling.
[Galaxy S I9000 Android Development] Kel Ghu:
Any comment about Battery Life?

I'm using JFS right now. It gives me the best battery ever, but ext4 with metadata only sounds better. I hope sztupy will integrate this in his ULF. I'm too lazy to do all this myself everytime I flash a new ROM.

BTW, what FS does the Nexus One use?
[Galaxy S I9000 Android Development] thunderteaser:
Yes, that's why I wrote "disabling" in quotes, meaning that you can't really disable journaling. :)

I didn't know about jfs and xfs using only metadata journaling (you've teached me one more thing) but probably that's why people report that jfs is really fast (but not very reliable).
[Galaxy S I9000 Android Development] spline1:
I have trying JFS, ext2 and ext4.

JFS in Use to bugy, ext2 is unsafe and there is no lagfix for ext2,

ext4 is good but jounaling is very bad for the Accu resource.

With ext4 and jounaling only writeback i have the longest Battery performance.

Word !
[Galaxy S I9000 Android Development] Kel Ghu:
I am using JFS right now and have no problem. None with locale nor with time (because it's both set on automatic). And it's giving me the best battery life.

I am wondering if Ext4 with metadata only or ext2-only had good battery life like JFS.
[Galaxy S I9000 Android Development] over2097:
JFS uses less CPU than ext4 so theoretically you should have better battery life out of the box. The moment you enable writeback and noatime the CPU hit for ext4 diminishes so it is still a bit worse than JFS but not really that significant.
[Galaxy S I9000 Android Development] DamianGto:
So ext2 is not safe?

You need to learn more about how sgs works.

No lagfix for ext2?

Weird that i have it then...

before you do this statement you should have read more about it.

You are wrong in almost everything you did write.

Sent from GT-I9000 jpo. My own kernel for z4mod and with 342MB Ram
[Galaxy S I9000 Android Development] GwynBleidd:
Yes you can.

tune2fs -O ^has_journal

Don't try that without a full nandroid backup though.
[Galaxy S I9000 Android Development] spline1:
@DamianGto

So ext2 is not safe?

You need to learn more about how sgs works.

Unsafe = without journaling.

Read the masses an post's the diskus from many users, ryanza and supercurio.

No lagfix for ext2?

Weird that i have it then...

I mean Lagfix right lagfix , not a loop!

z4 is the first native ext2 Lagfix !

before you do this statement you should have read more about it.

You are wrong in almost everything you did write.

I think you must read a lot :-)

Quote hardcore:

Ext2:
[Galaxy S I9000 Android Development] DamianGto:
I think you have missed alot facts.

Journal on sgs don't make it safer.

On spinning disc it's does.

You cant compare it with a system on a computer with spinning disc.

They don't work the same way.

So ext2 is safe. Haven't seen any report of a broken ext2 filesystem on sgs.

Even ryanza think it safe.

Ext2 is what i use on my data. No loop. I use z4mod if you missed that.

I have tried alot around z4mod to make sure it works.

I have found alot of bugs that is fixed. So i think i know how it works:-P

Sent from GT-I9000 jpo. My own kernel for z4mod and with 342MB Ram
[Galaxy S I9000 Android Development] spline1:
Hey i search a long time for native ext2 Lagfix !

I like the optimized Kernels from hardcore, Unfortunately, however, the szyupy UCLF has no ext2 at all schematic.

so I guess ext4 without jounaling as alternative.

and i read, ext4 is faster on reading

I think the option of Data loss is real on SSD's. but is no Problem with a fresh Backup for me.
[Galaxy S I9000 Android Development] dupel:
Journaling on our phones doesnt to anything for safety. Once your data is corrupted, it is well beyond being recoverable (know it, happened to me on ext4).
[Galaxy S I9000 Android Development] spline1:
and this?

http://www.delltechcenter.com/page/A+Comparison+of+Ext2,+Ext3+and+Ext4+Performance

ext4 is faster on reading.

And reading is the most work on SGS
[Galaxy S I9000 Android Development] DamianGto:
Well that's for spinning disc.

Ext4 is slower then ext2 in overall.

You see this when using the sgs.

Sent from GT-I9000 jpo. My own kernel for z4mod and with 342MB Ram
[Galaxy S I9000 Android Development] dupel:
Pardon me for bargaining into discussion, but I distinctly remember reading (link from days when ext2 vs ext4 was at its beginning) a very good test (on ssd) where ext4 was faster on reading aswell. And there is pretty much no difference (that you could notice) when you switch to writeback on writing aswell.
[Galaxy S I9000 Android Development] GwynBleidd:
Just removed journals for my ext4 partitions:

e2fsck /dev/block/stl10 [stl11, mmcblk0p2]

/data/tune2fs -O ^has_journal /dev/block/stl10 [stl11, mmcblk0p2]

or just

/data/tune2fs -O ^has_journal /dev/block/stl10 [stl11, mmcblk0p2] -f

-f is kinda scary but meh :)

I'll see what happens to the battery, will write back like tomorrow.
[Galaxy S I9000 Android Development] DamianGto:
Ext4 still has more overhead. It still do more. You can see that on battery drain people do have with ext4.

So ext2 is better for the sgs.

Compare a kernel with ext2 and one with ext4 you will see that the kernel with ext2 is always better.

I have done this and i did drop all support in my kernel for ext4.

Sent from GT-I9000 jpo. My own kernel for z4mod and with 342MB Ram