yashsingh1/xdaforums huggingface dataset:
[Desire Android Development] sibere:
Not really so far.

There is just 1 command line is the script which should return an error but ATM it's not a big deal.

But if you want to upgrade to any futur devs of data2sd, you won't be able to do so.
[Desire Android Development] Lanbase:
Ok thanks,

I will read into it a bit then..

Cheers
[Desire Android Development] sibere:
If you have this file : /system/etc/install-recovery.sh

It means that you have the hack
[Desire Android Development] Droidzone:
If you'd been reading this thread since one week ago, you would've known that the post which I've written was previously this:

"Sibere, I've finally managed to create a complete flashable zip for your code. Here it is" And just included the zips as attachment. There wasnt anything else.

So, addind something more descriptive is bad?

Sibere's OP clearly mentions that ext4 is needed and also that you need a Sense Rom with init.d supported as a basic requirement of Data2SD. He also mentions a method of adding init.d support.

A person on reading the entire OP then reads the line which says If you're lazy you can use Droidzone's flashable zip, and then is linked to my post. Previously Sibere just used to say that the flashable zip is attached to his post, without any details about the zip. I modified my original post to add some info on the method of installation. To me, it sounds clear enough that a person coming to that post from Sibere's OP is clear headed enough to understand that an init.d supported Sense Rom is an essential prerequisite in installation. (the aosp support has been added just yesterday)..

So, no, I dont see a need to modify the post to add more description which would obviously confuse a newbie, besides making the information redundant. And honestly the post you've linked is not the easiest to make init.d support for a Rom. A person skimming Sibere's post to come to the flashable zip would be making the installation itself dangerous, without knowing the harms of doing something without understanding it properly. And another thing is that this is a Dev thread meant for developers to understand the process and incorporate it into their roms. Data2SD till recently wasnt a newbie friendly toy..

Anyway, I'll add this line to my post:

A rooted Rom with Busybox and init.d support, and which has a kernel supporting ext4 is an absolute requirement for using Data2SD. I dont see a need to link to a post which explains the method of adding init.d support. A simple search on XDA will bring out all the threads dealing with the same. If I started doing that, I'd also have to include and link threads on What a Sense Rom is, what Rooting is, What busybox is and where to get it installed and how, A2sd+ etc etc..All the info can be brought out by anyone who can use the simple search function of XDA. And a person who isnt sensible enough to do that has no business messing around with manually adding Data2SD and is better off using a Custom Rom which has it built in. If I was bringing out a Newbie-friendly guide on Data2SD, I'd have the time and patience to do research on all relevant issues related to the procedure. But since the purpose of my post was to introduce my scripts to those who've gone through the OP, I dont see the necessity of adding more info than what Sibere has to say.
[Desire Android Development] docnasef:
@lanbase: obviously you were going through the same dilema I was facing , and thanks to you it has cleared things up a bit for me!

I checked the file : /system/etc/install-recovery.sh

I do not have it; so hopefully I did not unwittingly point you in the wrong direction

btw could you please keep me/us posted on how things went with you regarding this subject of init.d AND DATA2SD??

and if you could please show me the "nerd" way of s-off my phone?! :confused:

@all the rest of you guyz sibere, droidzone and all

We REALLY do appreciate all your work, but you see sometimes we ördinary guyz" might just be on a different wavelength and thus what seems to you only elementary would be to us completely dumbfounding!!!! :rolleyes:

A little explanation goes a long way!!!!

THANKS AGAIN GUYZ
[Desire Android Development] Lanbase:
I dont have this file? :confused:

Thats good enough for me!

btw following all D2SD threads for over a month now. And enjoy the

sometimes soapworthy discussions and ofcouse the usefull information.

and insights that come from them.

grtz, hope your good droidzone
[Desire Android Development] Droidzone:
I've added more to my OP, which explains the requirements. Should be satisfactory enough. But if someone has to install Data2SD, it's his job finding out how to satisfy each requirement..

Yes, I'm good :D
[Desire Android Development] sibere:
Ho year we provide from time to time some tech info during a discussion on a specific topic, but keep in mind that it's a more a dev thread than a user friendly topic :)

I have updated the Thread topic to reflect that and be more specific too. A kind of warning :)
[Desire Android Development] Lanbase:
Sibere, the enable init.d installers I have used are these:

http://xdaforums.com/showpost.php?p=10454172&postcount=38

I used the one with busybox..

I don't have this file : /system/etc/install-recovery.sh..

Does this mean I have init.d enabled the "right" way?

thx
[Desire Android Development] sibere:
Apparently yes :)

This seems to flash a "good" init.rc because a new ramdisk is flashed. I haven't opened the ramdisk but I assume that the right init.rc is included.
[Desire Android Development] Droidzone:
Will upload on a few more servers..

Easy upload is easiest for me since there's ftp..
[Desire Android Development] sibere:
Just tried this option

Got a I/O QD score of up to 5500+ :D

EXT4 with patched lib and mount options : /dev/block/mmcblk0p2 on /data type ext4 (rw,nosuid,nodev,noatime,nodiratime,commit=60,barrier=0,nobh,stripe=64,data=writeback,noauto_da_alloc)
[Desire Android Development] Lanbase:
I just installed Data2SD on Oxigen, all ok, so now I like to check if unmounting goes ok with shutting down. but in recovery I get the following;

~ # /system/bin/tune2fs -l /dev/block/mmcblk0p2

/system/bin/tune2fs -l /dev/block/mmcblk0p2

/sbin/sh: /system/bin/tune2fs: not found

~ #

How can I check now, do I need to update busybox? need to push tune2fs? :o

Thx
[Desire Android Development] sibere:
Check OP and push e2fsprgs files
[Desire Android Development] Lanbase:
Hmmmmmm....

Not clean... What does this mean, I am better of not using Data2SD with Oxygen?

Any solution?

~ # /system/bin/tune2fs -l /dev/block/mmcblk0p2

/system/bin/tune2fs -l /dev/block/mmcblk0p2

tune2fs 1.41.3 (12-Oct-2008)

Filesystem volume name: userdata

Last mounted on: /data

Filesystem UUID: a7c0de88-2444-4be4-aece-ce2dde0988db

Filesystem magic number: 0xEF53

Filesystem revision #: 1 (dynamic)

Filesystem features: ext_attr resize_inode dir_index filetype extent flex_bg sparse_super large_file uninit_bg dir_nlink extra_isize

Filesystem flags: unsigned_directory_hash

Default mount options: (none)

Filesystem state: not clean

Errors behavior: Continue

Filesystem OS type: Linux

Inode count: 65536

Block count: 262144

Reserved block count: 0

Free blocks: 200817

Free inodes: 61237

First block: 0

Block size: 4096

Fragment size: 4096

Reserved GDT blocks: 63

Blocks per group: 32768

Fragments per group: 32768

Inodes per group: 8192

Inode blocks per group: 512

RAID stride: 64

RAID stripe width: 64

Flex block group size: 16

Filesystem created: Sun Jan 23 22:34:46 2011

Last mount time: Sun Jan 23 23:21:21 2011

Last write time: Sun Jan 23 23:38:37 2011

Mount count: 1

Maximum mount count: 21

Last checked: Sun Jan 23 23:21:20 2011

Check interval: 15552000 (6 months)

Next check after: Fri Jul 22 23:21:20 2011

Reserved blocks uid: 0 (user root)

Reserved blocks gid: 0 (group root)

First inode: 11

Inode size: 256

Required extra isize: 28

Desired extra isize: 28

Default directory hash: half_md4

Directory Hash Seed: 8e8f820c-c03b-4c3a-b7a9-1f7e975685b6

~ #

grtz
[Desire Android Development] jchoong:
Thanks; 1 try on FileFactory and was successful with download. Will try the new scripts on CM7 build 12 and report back.

Edit: Your latest Data2SDInstallerV5_syanogen script works great with CM7 build 12. Thanks again.
[Desire Android Development] ownhere:
great score :)

noauto_da_alloc turn off detection of 0-length file issue on ext4, force delayed allocate, so no real IO occur in bench time. this just like run QD in RAM. hehe.

I ever use this option, but met data loss after power loss.

So I no longer respected performance, but more like stability.

On the basis of stability, get acceptable performance.

But I am frustrated that many SD card, especially the C10 card, if they use a stable mount options, and have actually led to IO errors occur frequently, because the log file system is always a large number of write requests, and these SD cards Unable to process vast amounts of random requests.

So, if you want to get a better SD card compatibility, unsafe mount options can get a better stability of daily use
[Desire Android Development] docnasef:
@ sibere , droidzone.....

the kernel sibere posted

OK GUYZ

Here is an update

Flashed PB99IMG of my orig ROM

ROOTED unrevoked

Flashed sibere's kernel

flashed the init.d

flashed droidzone DATA2SD

DID GET DATA2SD 0.9 GB free on system!

HOWEVER

After 15 mins of usage (while google was syncing my contacts and so forth)

System was very unstable laging and so on

then I actually got a black screen at which even the power button was not working???

I had lights on at the bottom (at the home, back buttons)

but could not see anything

Battery pulled

recovery

Now back to stock rooted ROM with init.d

ANY SUGGESTIONS??? :confused:
[Desire Android Development] sibere:
No... I think it's the case with every AOSP ROM. only SENSE ROMS unmount /data . I then recommend to use a journal to be safer.

In recovery you can do this /system/bin/tune2fs -O has_journal /dev/block/mmcblk0p2 and then run an /system/bin/e2fsck -vf /dev/block/mmcblk0p2
[Desire Android Development] sibere:
Not really except that my kernel was posted just for testing. It's 100% stable on my phone with my ROM but it doesn't mean that it's the same for everyone.
[Desire Android Development] sibere:
Do you have an AOSP ROM?

I never had data corruption with a sense ROM because /data is unmounted by system if you turn off the phone or if the battery dies. In this particular case, the low power is detected by system and the phone is turned off automatically and /data unmounted.

Most of the time, SD are built for a good transfer rate on big files but have a poor IOPS performance. It's like the first SSDs. Since, manufacturers have developed better chips and controlers but it's not the case for our SDs :(
[Desire Android Development] Lanbase:
Ok done..

/system/bin # /system/bin/tune2fs -O has_journal /dev/block/mmcblk0p2

/system/bin/tune2fs -O has_journal /dev/block/mmcblk0p2

tune2fs 1.41.3 (12-Oct-2008)

Creating journal inode: done

This filesystem will be automatically checked every 21 mounts or

180 days, whichever comes first. Use tune2fs -c or -i to override.

/system/bin # /system/bin/e2fsck -vf /dev/block/mmcblk0p2

/system/bin/e2fsck -vf /dev/block/mmcblk0p2

e2fsck 1.41.3 (12-Oct-2008)

Pass 1: Checking inodes, blocks, and sizes

Pass 2: Checking directory structure

Pass 3: Checking directory connectivity

Pass 4: Checking reference counts

Pass 5: Checking group summary information

userdata: ***** FILE SYSTEM WAS MODIFIED *****

4435 inodes used (6.77%)

96 non-contiguous inodes (2.2%)

# of inodes with ind/dind/tind blocks: 0/0/0

Extent depth histogram: 4415/5

69979 blocks used (26.69%)

0 bad blocks

1 large file

3788 regular files

633 directories

0 character device files

0 block device files

0 fifos

0 links

3 symbolic links (3 fast symbolic links)

2 sockets

--------

4426 files

/system/bin #

So my ext4 has journal now and also will be checked every 21 mounts?

Journal will make the chance for data corruption smaller?

Will the ext4 still be flagged unclean after every reboot? (I will check that myself now)

I probably deserve to get flamed now for not memorizing or reading tecnical isues inhere ;)

Cheers!
[Desire Android Development] [deXter]:
That blackscreen - caused by lag - is due to the SD card (IMO). You should use a fast SD card (Class 6 or above) and/or use an SD card with a high IOPS . Also, you could try the mount options mentioned above (noauto_da_alloc etc) for improving the performance. In any case, in the future if you get such a screen with the bottom lights on, just be patient and wait a while. :)
[Desire Android Development] melethron:
Ownhere uses DHD rom and he added unmount of mtd5 to boot.img. Im pretty sure he referred to "adb reboot".

by the way: Its a bit off topic here, but make sure you check this out. Since im not a fan of exploding batteries i remove your Batteryfix from the kernel i use:

http://www.ziggy471.com/2011/01/02/overcharging-batteries/
[Desire Android Development] Lanbase:
Please update Avaritia thread with updated kernels then, I am using your ROM testing performance on all data2sd solutions ( 2 desires ;) thank got there is no dual sim desire :D ),

I am trying to get it work on Oxygen aswell now , so thanx for... "Ownhere uses DHD rom and he added unmount of mtd5 to boot.img. Im pretty sure he referred to "adb reboot"."...

Grtz
[Desire Android Development] melethron:
I didnt recompile the kernel yet. I first wanna check how cyanogen/HTC realize the 100% charge. The default batteries + charger locks overcharge at 4.2 V and not 4.3 as usual (when you charge the phone when its off there is no battery driver running then and it still wont go above 4.2V) so exploding phone isn't an issue. Corrosion might still be an issue but since (original htc) batteries are rather cheap that is not the main concern.

Really good info that ziggy posted:

http://batteryuniversity.com/learn/article/charging_lithium_ion_batteries
[Desire Android Development] Lanbase:
Nice !!

mount

rootfs on / type rootfs (rw)

tmpfs on /dev type tmpfs (rw,relatime,mode=755)

devpts on /dev/pts type devpts (rw,relatime,mode=600)

proc on /proc type proc (rw,relatime)

sysfs on /sys type sysfs (rw,relatime)

/dev/block/mtdblock4 on /cache type yaffs2 (rw,nodev,noatime,nodiratime)

~ # mount /system

mount /system

~ # mount

mount

rootfs on / type rootfs (rw)

tmpfs on /dev type tmpfs (rw,relatime,mode=755)

devpts on /dev/pts type devpts (rw,relatime,mode=600)

proc on /proc type proc (rw,relatime)

sysfs on /sys type sysfs (rw,relatime)

/dev/block/mtdblock4 on /cache type yaffs2 (rw,nodev,noatime,nodiratime)

/dev/block/mtdblock3 on /system type yaffs2 (rw,relatime)

~ # /system/bin/tune2fs -l /dev/block/mmcblk0p2

/system/bin/tune2fs -l /dev/block/mmcblk0p2

tune2fs 1.41.3 (12-Oct-2008)

Filesystem volume name: userdata

Last mounted on: /data

Filesystem UUID: a7c0de88-2444-4be4-aece-ce2dde0988db

Filesystem magic number: 0xEF53

Filesystem revision #: 1 (dynamic)

Filesystem features: has_journal ext_attr resize_inode dir_index filetype needs_recovery extent flex_bg sparse_super large_file uninit_

bg dir_nlink extra_isize

Filesystem flags: unsigned_directory_hash

Default mount options: (none)

Filesystem state: clean

Errors behavior: Continue

Filesystem OS type: Linux

Inode count: 65536

Block count: 262144

Reserved block count: 0

Free blocks: 192112

Free inodes: 61059

First block: 0

Block size: 4096

Fragment size: 4096

Reserved GDT blocks: 63

Blocks per group: 32768

Fragments per group: 32768

Inodes per group: 8192

Inode blocks per group: 512

RAID stride: 64

RAID stripe width: 64

Flex block group size: 16

Filesystem created: Sun Jan 23 22:34:46 2011

Last mount time: Mon Jan 24 13:46:06 2011

Last write time: Mon Jan 24 13:46:06 2011

Mount count: 1

Maximum mount count: 21

Last checked: Mon Jan 24 13:46:02 2011

Check interval: 15552000 (6 months)

Next check after: Sat Jul 23 13:46:02 2011

Reserved blocks uid: 0 (user root)

Reserved blocks gid: 0 (group root)

First inode: 11

Inode size: 256

Required extra isize: 28

Desired extra isize: 28

Journal inode: 8

Default directory hash: half_md4

Directory Hash Seed: 8e8f820c-c03b-4c3a-b7a9-1f7e975685b6

Journal backup: inode blocks

~ #

So now I am safe enough to keep continue using this setup right?

its just that journalling is a little more wear on the sd card hey? + slight performance drop ...

Performance I can check myself, Oxygen is fast anyway...

Grtz !
[Desire Android Development] Droidzone:
@Sibere,

I might have missed a few posts here..Got busy in my thread,...But can you tell me if there is an adb code that can be executed in command line, to force the clean mount in aosp? Also, does anyone know if there is a list if scripts (like init.rc is for startup, anything for shutdown?) in some file, which is executed at shutdown? If so, might be able to add the clean unmount to aosp..?
[Desire Android Development] sibere:
It has been discussed quite a lot In my batt thread. But basically the batt is protected by it's own controler. It's why it can be charged with phone Off. Never got an overcharhed batt and I monitored many times with a shell. You do whatever you like but I keep my battfix in my kernel :)

Sent from my HTC Desire with DATA2SD :)
[Desire Android Development] botellito:
do i have to do the same procedure every time i flash another rom or updating leedroid?
[Desire Android Development] sibere:
The entire file system is check at every boot. This reduces the risk of accumulating data corruption reboot after reboot.

It's unclean when mounted by the system anyway so if you want to check you will have to reboot in recovery and check it unmounted.

Apparently there is a modified ramdisk around the forum specially designed to unmount the ext partition at shutdown/reboot.
[Desire Android Development] sibere:
That's great! If you want to disable journal, just do this in recovery mode:

/system/bin/tune2fs -O ^has_journal /dev/block/mmcblk0p2
[Desire Android Development] sibere:
What I have noticed with my kernel is that the more the battery get close to 4.2v, the lower the charging current is. When the battery is fully charged, the current is 2 to 0mV. The max I'v seen was 4.21v and at this stage the current was reporting 0mv.

The battery is still overtemp protected because I haven't touched this bit of code and in this case the kernel would stop charging.

I understand your point of view and I always warned people with this type of tweak.

however, how is the battery charged when the phone is off like you say? Ziggy says nothing about this. Basically there is no software to take care of stopping the charging current, right?

So when someone charges his phone when it's OFF, what is taking care of regulating the current? IMHO it's the internal battery controler, which is supposed to protect the battery. And that's what happens with my tweak. I'm just changing the charging mode to slow mode and let is go unless something else takes over like overtemp.Obviously this causes battery wear but like you say, HTC batteries are not very expensive ;)

I would definitely not use it on a cheap battery from an unknown manufacturer with a bad controler!!

But I'm not forcing anyone to use it :)
[Desire Android Development] sibere:
A mount is supposed to be clean :)

The issue is with shutting down the phone without unmounting.

The command to unmount is simply unmount /data for instance.

Apparently there is a modified ramdisk which takes care of this for the mtd5 nand. This could be adapted to the mmcblk0p2 SD partition.
[Desire Android Development] Droidzone:
Oops..typo..meant unmount ;)

Hmm..Another script for me.. :)
[Desire Android Development] sibere:
Obviously in recovery mode, it's better to give the full path so in this case /system/xbin/busybox unmount /data or /system/xbin/busybox unmount /dev/block/mmcblk0p2
[Desire Android Development] Droidzone:
In recovery mode? I thought it should be done immediately before each shutdown? By the way would apps freeze up if that script got executed before an actual shutdown?
[Desire Android Development] sibere:
Sorry I wasn't clear...

I mean when you're doing things in recovery like mounting ext to copy stuff to it and then unmounting it, the full path must be given. It's not the case when android is running.

Unfortunately the shutdown process is not so simple. How do you plan to run a script which would unmount /data when the swith off menu is selected?

And this has to be done properly. Check latest AOSP hacks, melethron posted a very interesting info about a tweaked boot.img which is supposed to do this nicely.
[Desire Android Development] Droidzone:
Hmm...have to check that out.
[Desire Android Development] woti23:
the problem is that you can't unmount, not even forced, when files are open (device busy). so the umount is one of the last things thats done while a clean shutdown or reboot, first all processes have to be stopped by the main process (init), files closed, unmount, halt/reboot. at least this is what desktop systems do.

also you won't get a shutdown script working if init binary doesn't support it anyway.
[Desire Android Development] sibere:
I just wonder what would happen is the ext partition is remounted ro and then the phone rebooted. This souldn't lead to data corruption, right?
[Desire Android Development] Lanbase:
I think you misunderstand me, the file sytem was clean after reboot because I aplied ;

/system/bin # /system/bin/tune2fs -O has_journal /dev/block/mmcblk0p2

/system/bin/tune2fs -O has_journal /dev/block/mmcblk0p2

I can't find the tweaked boot.img which is supposed to unmount on shutdown.

so I can't disable journalling yet...

grtz
[Desire Android Development] woti23:
doubt it will work that way as long there are that much processes doing read open files on fs, tried it:

mount -o remount,ro /dev/block/mmcblk0p2

mount: mounting /dev/block/mmcblk0p2 on /system/sd failed: Device or resource busy
[Desire Android Development] sibere:
That is strange. Having a journal shouldn't change the way the phone behaves. whether the partition is unmounted nicely, whether it's not. Not having a journal should make no difference AFAIK
[Desire Android Development] Lanbase:
Ok thats very weird than. You have seen my adb sessions. I am ok with it for the moment. ;) I can disable it again to.check the outcome but i rather not unless i flash that special ramdisk img.

Sent from my HTC Desire
[Desire Android Development] sibere:
There is no big harm with the journal. It's just degrading very slightly performances but on the other hand it's safer :)
[Desire Android Development] Lanbase:
I understand i am happy enough to have oxygen running with d2sd for the moment. Now its safe we can go further tweaking...

Sent from my HTC Desire

Edit. ......You dont happen to know where to search for a link to that unmount mod by ownhere ?
[Desire Android Development] sibere:
Unfortunately no.

Ask melethron, he should know 'coz he posted the info here :)
[Desire Android Development] ptulluri:
Help

droidzone,

1. Data2SD Installer (Installation script)

Scenario: Installing Data2SD for the first time

Instructions:

Complete wipe

Install any Rom (which satisfies the requirements of Data2SD listed in the OP and recapitulated above) through recovery

Once the Rom installation finishes, without leaving Recovery, immediately flash the A2SD Killer flashable zip.If flashed on a non-A2SD Rom, the flash wont do any harm.

Now reboot once into Android desktop. (If the system fails to boot at this point, it means that some exotic A2SD script is lurking beneath.)

Once you confirm that the Rom boots fine, Reboot into Recovery once again

Now flash the Data2SD Installer zip. After it finishes installing, boot into Android and enjoy Data2SD

Followed all steps but got HTC screen after install of Data2SD Installer zip. Any thoughts.
[Desire Android Development] jchoong:
Which particular ROM did you flash? And did you use the correct installer script for the type of ROM flashed?