yashsingh1/xdaforums huggingface dataset:
[Desire Android Development] melethron:
I myself had no lags at all with leedroid (except downloads). Hd roms are more laggy in general. I think this highly dependend on the controller of the sd-card (no the class). Since it is close to impossible to get information on how the controller works it may be different for most people. For me btrfs and nilfs2 sucked in speed so i guess my card has a good controller. For cards with bad controller this might be different.

If you had better results with RCmix then you can try the "life-on-the-edge" mod. This uses "loop" device like in ownhere script (thats in that rom).
[Desire Android Development] Ninolina:
After a while, some things are a little faster.. I will try that mod.. what kernel do you advice me to use? thank you..;)
[Desire Android Development] moebius83:
Well I actually chose to do almost everything manually in recovery (mounting /system/data_internal and moving all the stuff and creating the symlink), because I already had the ext2 partition and I was using sibere's data2sd script but the key points were:

1. enable init.d using the recovery-install.sh trick found on sibere's thread

2. drop the 01data2whatever script inside /system/etc/init.d/

3. it's possible to use HTC stock e2fsck which is called e2fsck_recvy under /system/bin so you can avoid installing the provided one and change the script to use e2fsck_recvy instead

4. minor change to the /system/etc/vold.fstab: I changed "dev_mount sdcard /mnt/sdcard auto ........." to "dev_mount sdcard /mnt/sdcard 1 ......." because otherwise when I used the USB disk mode the second partition on the SD appeared on my computer (potentially dangerous)

I think that's pretty much it, the kernel already supports ext2 and loop (no ext4 though but it can be added as module)

EDIT: anyway, it seems the ext2 partition never gets unmounted cleanly, I always have some minor error on the /sdcard/e2fscklog.txt even now that I don't have the double mounted /data...I wonder what can it be...maybe the loop?
[Desire Android Development] Ninolina:
Well I tried that mod.. Didnt worked for me.. my phone stays at splash screen.. never boot up.. So, I just flash the unpatch and everything is the back as it was..:-) I didnt need to wipe everything but I think there is somerhing wrong with that patch.. Anybody tried it? :-)
[Desire Android Development] moebius83:
ok it seems I re-discovered the issue of asynchronous booting, I examined a stock desire rom with just init.d added, they changed the boot.img in order to change the init.rc by adding:

on property:cm.filesystem.ready=1

class_start default

instead of just class_start default and then the last script inside /system/etc/init.d/ set that property. so basically the whole init process stops and wait for that property to be set, that property is set as the last script of init.d so all the other scripts will execute before unblocking the rest of the boot process...I guess the recovery-install.sh trick is only good for some mods but not for these concerning mountpoints...

So I guess the only way for me would be to flash a new boot.img with init.d enabled...
[Desire Android Development] betalaga:
work good on MidianUI r2e (based on MIUI 12.24)
[Desire Android Development] melethron:
As i already said on all custom roms init.d got always executed first. I had scripts that took 5-10 min and it was never an issue ... dalvikvm etc starts afterwards.

I think the leedroid kernel is fine. You can also try the HAVS kernel from coutts for a tiny power save. That kernel is also based on snqs kernel (the leedroid one). But if you don't need something special like support for another filesystem just stick to leedroids default kernel. Its good.

About 3:.) As you said the stock kernel has ext2 but no ext4 support .... and its the same with the binaries ... you guess now why i added the e2fsck binary ;)

About 4): Never noticed that the "vold" process has it's own fstab file. I also thought about using the process to get a clean unmount on other partitions. Well but i think it starts to late (sd-card gets only mounted when the lock screen is already there). But maybe i can use it to mount a "swap" file on external. Btw: Most custom ROMs have set this value already to 1. I only saw my ext partition one time in a ROM.

Hmm this mod actually does nothing but copying an "empty" file. The default script checks if this file is there and if it is it does something else.

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 has_journal /dev/block/mmcblk0p2;
busybox mount -o noatime,nodiratime,nosuid,nodev /dev/block/mmcblk0p2 /data;
fi;

If the file is there the "then" part is executed. If it is not then the else part is executed.

The only difference is the "busybox losetup" stuff which should work fine with the normal busybox. BUT .... Lee had the nice idea to make a "better" busybox by taking some commands out of it that "aren't needed":

I already told him here that this is a bad idea. And im pretty sure that is the issue ..... ..."many commands aren't used" ..... :mad::mad::mad:

Hmm ill take a look at this but im pretty sure that his "tweak" is the issue .....
[Desire Android Development] melethron:
I add it to confirmed. Thx.
[Desire Android Development] moebius83:
indeed that was the issue, I flashed a stock boot.img with init.d enabled in the way I described on my previous post and now everything is smooth, also /data gets cleanly unmounted on boot, so you and sibere can add a warning that the recovery-install.sh trick will only cause trouble and you actually need a init enabled rom or at least an init enabled boot.img matching the stock rom.

ha! now I understand why you included it, good to know!

good, it's worth mentioning for people trying to install this to a stock rom :-)

next is try to understand why the ext2 partition isn't unmounted cleanly on shutdown, maybe is another stock rom issue...

good then, merry Christmas everyone!
[Desire Android Development] Orka82:
LeeDrOiD v2.3b boot using 0.2e:

I//system/xbin/busybox( 69): +++ Checking for second partition on microSD
I//system/xbin/busybox( 69): +++ Second partition on microSD found: Starting
data2whatever script
I//system/xbin/busybox( 69): +++ Changing scheduler for sd card:
I//system/xbin/busybox( 69): [noop] anticipatory deadline cfq
I//system/xbin/busybox( 69): +++ Changing scheduler for mtd:
I//system/xbin/busybox( 69): [noop] anticipatory deadline cfq
I//system/xbin/busybox( 69): +++ Mounting internal mtd
I//system/xbin/busybox( 69): +++ Checking external Partition:
I//system/xbin/busybox( 69): --- Ext2 / Ext3 / Ext4 Partition found - chec
king filesystem and creating e2fscklog.txt on sd-card
I//system/xbin/busybox( 69): e2fsck 1.41.6 (30-May-2009)
I//system/xbin/busybox( 69): ext2fs_check_if_mount: Can't check if filesystem
is mounted due to missing mtab file while determining whether /dev/block/mmcblk0
p2 is mounted.
I//system/xbin/busybox( 69): --- life-on-the-edge-mod NOT active - mountin
g with default options
I//system/xbin/busybox( 69): tune2fs 1.41.6 (30-May-2009)
I//system/xbin/busybox( 69): ext2fs_check_if_mount: Can't check if filesystem
is mounted due to missing mtab file while determining whether /dev/block/mmcblk0
p2 is mounted.
I//system/xbin/busybox( 69): +++ Moving app from internal to SD-Card
I//system/xbin/busybox( 69): cp: can't stat '/system/data_internal/app/*': No
such file or directory
I//system/xbin/busybox( 69): +++ Moving app-private from internal to SD-Card
I//system/xbin/busybox( 69): cp: can't stat '/system/data_internal/app-private
/*': No such file or directory
I//system/xbin/busybox( 69): +++ Moving data from internal to SD-Card
I//system/xbin/busybox( 69): cp: can't stat '/system/data_internal/data/*': No
such file or directory
I//system/xbin/busybox( 69): +++ Moving dalvik-cache from internal to SD-Card

I//system/xbin/busybox( 69): cp: can't stat '/system/data_internal/dalvik-cach
e/*': No such file or directory
I//system/xbin/busybox( 69): +++ Moving dontpanic from internal to SD-Card
I//system/xbin/busybox( 69): cp: can't stat '/system/data_internal/dontpanic/*
': No such file or directory
I//system/xbin/busybox( 69): +++ Moving drm from internal to SD-Card
I//system/xbin/busybox( 69): +++ Moving local from internal to SD-Card
I//system/xbin/busybox( 69): +++ init script completed

Some strange stuff there?

Internal: ~500MB free (ext4, class 6)

quadrant score: 1060. No change to the score when using life-on-the-edge.

s-off. Busybox 1.17.3.

adb shell df

Filesystem 1K-blocks Used Available Use% Mounted on

df: /etc/mtab: No such file or directory
[Desire Android Development] chding:
anyone try this script on auraxtsense 8.2?
[Desire Android Development] vivmar:
@melethron

srry but i have to report this:

I have cm6 with your script installed, on a ext4 partition,from one day and i have noticed that if i download an application from market, after the installation, i get FC..

This happens every time with any applications that i try to install.Even if i reboot that application installed get FC also if i uninstall and reinstall get FC.

So basically i can't install anything...

This is strange because i haven't noticed error's or any particular thing...could be partition corruption?..even if i haven't the life-on-the-edge add on?
[Desire Android Development] moebius83:
looks good, you can ignore the /system/data_internal errors because the script is trying to move apps from the internal memory to the SD but it has already done that on the first boot.

What's the output for: adb shell mount?
[Desire Android Development] vampy2k5:
check your dmesg log, u see there if your partition is damaged.
[Desire Android Development] vivmar:
how can i do that?

thx
[Desire Android Development] vampy2k5:
with quick system info pro app or with "adb shell dmesg".

try to install a app, after the install error check your dmesg log. there should be a lot of "block errors" if your parition is damaged.
[Desire Android Development] vivmar:
mmmm..i don't see any block errors...so isn't partition problem...
[Desire Android Development] melethron:
This is ok. I'll fix the mtab error messages on the next version. This isn't a problem but those warnings are annoying. ;)

And the copy is also alright. I made it to copy stuff from internal on every boot so ROM update should work in most cases. If there isn't something installed to internal data then it just says that. But that doesn't matter.

About life-on-the-edge and leedroid see this post. see my answer to ninolina

in this posting. I add that info to the the op.

Im not sure what causes this. Im not familiar with cm6.

The partitions are checked every boot. You can check the log at sd-card (e2fscklog.txt). Corruption can also occur without life on the edge if there is powerloss or something similar (snq powermenu, rom manager). This can also happen on cm app2sd and isn't an issue of this script. It is an issue of the tools that make no proper shutdown. Without life-on-the-edge the ext4 partition is journaled (like ntfs on windows or ext4 on linux) and gives much more safety so it is compareable to switching of a pc without shutdown. I add the info to the OP.
[Desire Android Development] iinga:
I also have this error, and a wipe of the dalvik cache normally fixes it. Which is quite long winded/annoying to do every install
[Desire Android Development] MrDevil:
been trying to install on my cousins desire with no success. either market force closes or apps go missing like dialer or contacts etc. works fine on leedroid, just not cm...:confused:

edit: anyone have the 0.2d version? that's the version i used to install on my phone yesterday and it works.

@iinga\vivmar: any of you guys experienced this? apps going missing after flashing?
[Desire Android Development] vivmar:
This is my log:

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

3460 inodes used (3.02%)
145 non-contiguous files (4.2%)
6 non-contiguous directories (0.2%)
# of inodes with ind/dind/tind blocks: 0/0/0
Extent depth histogram: 3438/6
155643 blocks used (33.98%)
0 bad blocks
1 large file

2357 regular files
970 directories
0 character device files
0 block device files
0 fifos
0 links
124 symbolic links (5 fast symbolic links)
0 sockets
--------
3451 files

I'll try a dalvik wipe...
[Desire Android Development] melethron:
Log is fine. If there is something found it says " **** THE FILESYSTEM HAS BEEN MODIFIED ****". But even if this happens it isn't necessary a problem.

Apart from that im pretty sure that this issue is cm6 related. Maybe it does "something" with dalvik-cache. I have no time atm to flash it. Maybe iinga can sort out whats wrong.
[Desire Android Development] vivmar:
davilk wipe isn't good..now i have multi FC's,almost everything...

Edit:after second reboot all back ok ,with no more issues..now i can install app's..
[Desire Android Development] Dany0:
Okay I have a HUGE irritating problem! So i had a 512mb ext3 a2sd partition before, I flashed this and the patch and it got stuck on boot, then I flashed without patch and it worked. But it is SO TERRIBLY SLOW, it's SLOWER then if you'd underclock it to 245mhz!!! I have 8gig class4 card! And vorkkernel -.- Also I have "just" 360 megs free on first boot! =/ expected at least ~400 :mad:

And what's even more awkward is that I can put apps to sd! How can this possibly work without a2sd partition? Please don't tell me it puts it on android.secure -.-'
[Desire Android Development] iinga:
2 points, and then i'll let melethron address the speed:

1) Installed straight after an install would mean that all /data is moved to this sd. This includes all apps and everything else in data, so 140MB for all your apps makes sense.

2) The option "Move to SD" on all apps moves them to the FAT32 partition of the sd card. Even with apps2sd+, this is the same. Apps2sd+ symlinks /data/app to /sd-ext. This does the same but for the whole data folder (-3 directories). The default intall location for data2whatever and apps2sd should be internal, where they will be installed to the sd-ext.
[Desire Android Development] melethron:
what rom do you use? After first boot data2sd is very slow ...

Move app2sd is froyo, so yes. Dont use it and let everything on " "internal" . The ext is your internal but android doesn't know that.
[Desire Android Development] iinga:
What apps are going missing? If its gapps, try reflashing them.

Also, i'm not currently running CM. There is a version of the script in my signature (am yet to update the page).
[Desire Android Development] melethron:
Thanks for answering.

About speed: best improvement that is not included in the script is a aligned partition. Make the partition with gparted.

Ill look for a way to include alignment in the script (recreate partition on first boot).
[Desire Android Development] PilgrimToHyperion:
Can you indicate in the OP what the expected initial boot time will be after installing this? I know you won't be able to give an exact time, but an estimate like 2x or 3x normal time would be nice.

Thanks for the script, trying to install now.

EDIT

I've tried it 4 times now. Initially got bootloops once Leedroid 2.3b starts loading. Redid it and got to the lockscreen, but a message appeared "System process has stopped responding, wait, close" or something similar. I've tried waiting and closing, but it just gives me the white HTC screen again. I will try again. Btw, used 1GB EXT4 on a Kingston 32GB Class 4.
[Desire Android Development] kraml:
Hi melethron, I just read thru your init script in the zip. I noticed that you left the three directories, property, misc, and system from /data on internal NAND instead of move to sdcard like other dirs. Is there any specific reason for that?
[Desire Android Development] MrDevil:
@iinga: we gave up and flashed leedroid instead no problems yet. reflashing gapps does restore the missing apps but market keeps fcs after you do that.

@melethron: how do you align partitions with gparted? how much speed do you gain from it?
[Desire Android Development] melethron:
This totally depends on the rom. Max is 2x I think. But most roms should be the same as app2sd.
[Desire Android Development] melethron:
Yes, these folders are read BEFORE the script starts. If they arent on internal settings, language etc will be resetted after reboot.
[Desire Android Development] melethron:
Just select "align to MiB" in gparted. It should set this as default if it detects that its a sdcard. Thats all.

Speed gain is very different. From 0% on large files up to 200% on random read/writes of small files. But the difference is noticeable because lags are caused by small writes.
[Desire Android Development] woti23:
anyone brave enough to try this one?

static lsof for arm

http://code.google.com/p/android-group-korea/downloads/detail?name=lsof.arm926ejs.static

--help shows command list and -l shows something

at least it doesn't crash at all.
[Desire Android Development] Dany0:
Yea that's great but my problem is that it's SO TERRIBLY SLOW... -.-'

Yes but it's slow even after 3rd boot.

I use MIUI. Also one point, after first boot some system apps were gone! I've rebooted and they magically appeared..mhm
[Desire Android Development] iinga:
Have you tried it on a clean install?

I use MIUI (12-24) and its all fine for me.
[Desire Android Development] Orka82:
Thanks!

I replaced Leedroids busybox with the one in siberes thread. :)

With siberes "hack" (sync ON) i got 1600 in quadrant.

If i try "life-one-the-edge" from this thread i get about 1000 in quadrant score.

Can this be because i'm using your script with ext4 instead of ext2 (as i used when i tried siberes hack).

Edit: Just kidding. Got 1314 now. :)
[Desire Android Development] melethron:
Life on the edge disables the ext4 journal. This is faster then ext2 then (on larger files). I get same score at tap benchmark. Didnt check quadrant.
[Desire Android Development] melethron:
Just checked. I get 1900 without life on the edge. No OC. But my partition is aligned and I use a swap drive atm.
[Desire Android Development] Orka82:
I see. I had to format using Amon_RA's recovery.

I don't know how to do the alignment using Windows.

Need to connect my phone to one of my Linux servers to do that but i'll try.

My card is a 8GB Transcend class 6.
[Desire Android Development] Dany0:
I did it on clean install...
[Desire Android Development] xwishmasterx:
Hi,

what's about LeeDroid 2.3a A2SD - any confirmation with that rom?

wishing you all merry christmas ;)
[Desire Android Development] megat136:
Hi.

How to install DATA2whatever in LeeDroid 2.3b? I have tried follow step by step from the guide but still can't install it with LeeDroid... When I dode flashing DATA2whatever with LeeDroid and reboot my phone always stay at the htc bootscreen. I give up after one hour of waiting. I still new with android.. Maybe some details guide can help me to install DATA2whatever in LeeDroid.. Can anyone help me please...

___________________

BRAVO PVT4 SHIP S-ON

HBOOT-0.93.0001

RADIO-5.11.05.07

ClockworkMod Recovery - 2.5.1.8
[Desire Android Development] xavierjohn22:
Will there be a quick way in the future to UNINSTALL this data2whatever?

Like A2SD+ can be deactivated and reinstall.

Problem is if somehow i dont want data2whatever and decide to bring back the data to original location i have to go through restoring once again.
[Desire Android Development] bluelavender:
Confirmed

Confirmed to work with AuraxtSense 8.2, LeedRoid and Alex ROM. All are smooth.

Melethron, your new script works wonderfully. i must admit i had some reservation trying this one, as your previous script has caused severe lag before in my phone :p But now, this one works really well... Oh, not only that. I'm surprised that the data mount can get recognized during boot and recovery, which is why automatic font-changer by Martino now works with data2whatever :) And nandroid backup & restore also works perfect.

Thanks & good job Melethron :)

BL
[Desire Android Development] Ninolina:
I had the same issue.. Then I did the flashing without wiping and that worked..:-) the best part is that my apps and settings were there too..:-) It works very good..:-) after some time of using it the phone becomes faster and faster..:-)
[Desire Android Development] moebius83:
I had another issue on my stock Desire, the phone suddenly rebooted for some reason, probably the ext partition wasn't unmounted cleanly (I didn't have the phone connected to my pc unfortunately) and my guess is the e2fsck fixed some stuff and then asked to reboot but the phone kept booting so it didn't mount the ext2 to /data and this caused the phone to boot with the internal /data which had the only /system /misc and /property directory, so when the phone booted I got a completely reseted phone, I would've checked what happened but I wasn't near my computer, so I just decided to reboot the phone and this time everything booted correctly, the only things that I had to re-set were the widgets that all gave a "error loading widget" error.

What I'm thinking now is, if this is what really happened, maybe there's a way to check the e2fsck output error? I believe it returns different values if the recovered errors need a reboot and we can handle this on the script? I'm going to investigate on that.

As a side note, what would be the consequences if I decided to modify the init script in order to mount /dev/block/mmcblk0p2 on /data instead of /dev/block/mtdblock5 from the beginning? in this way the ext2 partition would be mounted since the beginning without any need to unmount the old /data and keep stuff on the internal memory?
[Desire Android Development] melethron:
Afaik windows vista and windows 7 recognices a sdd (sdcards etc) of any sort and partition with align to mb as default. But im not sure about this. You can search some guides for this (google :p). The diffulty there is that you need to format as ext4 afterwards and thats not possible with windows (maybe it works if you make an unformated partition and then do a "wipe sd-ext" in CLOCKWORK recovery since this should format the partition - amonra doesnt work for sure since it doesnt format the partition on wipe)

There is also a gparted live-cd which can be used without installing linux (it boots from cd). But i never tested it.

I also plan to make a script that can be flashed with data2whatever and that recreates the partition to be aligned (on the first boot after it is flashed). I already know how i need to do that in general but my scripting skills arent good enough for that. But i look into it...but this may take some time.

Should be the same as 2.3b. No changes in the layout or app2sd from 2.3a to 2.3b.

Did you try 0.2e. It should work with it. Every version before that either didnt work with S-On or didnt work at all ^^. 0.2e should work fine.

This would require a new script of the same length (that does everything the other way around). I have other priorities atm (testing swap, writing an alignment script ....) so you will not see this in near future.

But restoring a nandroid backup from before you flashed it isnt that much time. And also backing up with titanium backup and restoring that isnt that long ....

My script focus and data safety more than on speed. Thats the reason i made the loop stuff optional. There is still room for some improvements without a big dataloss risk.

You can check the e2fscklog.txt in /sdcard. Every boot does a forced check and copies the log to sdcard.

Also the script DOES mount mmcblck0p2 on data and mtdblock5 on /system/data_internal first (All it does BEFORE that is changing the scheduler). /data is mounted by the system before init.d is even called. So if you wanna change that you need to edit android source code. No way to that with an init.d script.