yashsingh1/xdaforums huggingface dataset:
[Desire Android Development] melethron:
@everyone

Could you please tell me if you're if you are s-off....?

I use "busybox mount -o remount,rw /system;" in the script and i totally forgot that system can not be mounted read-write without s-off when the ROM loaded. So im not sure if this works in init.d scripts .... but i think not.

I can fix this easily (but if it DOES work with s-on i dont need to fix an issue that is not there ;) ).
[Desire Android Development] gizz68erz:
no i'm not s-off :( now i know why i get loops with both zips
[Desire Android Development] melethron:
Don't worry i fix this. S-off is not really required for this but i didn't even think one second that system is read-only and cant be changed ...

Edit: by the way the exact issue that the script wants to make a folder in /system where internal is mounted. If it cant create the folder then it cant mount the internal memory there and then it cant copy stuff from internal to external.
[Desire Android Development] gizz68erz:
haha ok...are u going 2 do it in the next few hours? if not maybe i'll s-off my desire...started reading bout it 1min ago =D
[Desire Android Development] MrDevil:
I'm s-off. Noticed a small bug today after doing the a wipe and install cm including gapps, google search and calendar were missing till a reflash of gapps was done. any other cm user got this prob?
[Desire Android Development] melethron:
Already fixed ....
[Desire Android Development] adionita:
x

it booted the 4th time :D ! How can i check if this thing worked or not ? Shouldn't it show 1 gb internal memory ? i only get 140 mb :(
[Desire Android Development] melethron:
Yeah you should see that in internal. If you didn't S-OFF try again with the new version. I made something stupid in the script so it only worked with S-OFF. ^^
[Desire Android Development] gizz68erz:
ok you r faster than me....my pc is already booted with the s-off ISO =) but i dont have a working rom on my desire right now xD

so i'll give your fixed script a try

edit: hmmm it's hanging for more than 5mins at the htc logo....doesn't think that this is normal?

edit2: did u fix the CM version too? maybe i should try this cuz it doesn't look like its booting up with the normal one

edit3: i'll give it up 4 today....too tired =/
[Desire Android Development] MrDevil:
After some testing, I found that everything works except the market fcs everytime. Tried everything from reflashing to updating to the latest market. I'm using the cm script. Anyone know of a workaround?
[Desire Android Development] melethron:
Cm version is included in the new version. If you have adb the following would help me. While it hangs on the screen do "adb shell df"

Market has issues if the partition is larger then 2gb or the partition is a "logical" partition. So this could be the issue ...
[Desire Android Development] adionita:
I tried the new s-on version but the launcher and almost all apps keep fc everytime. Can send you some log so that you can check out or somethin ?
[Desire Android Development] _bryan_:
seems great in miui(at least better than any other version I tried or made myself)

I modified a little on the original version

init.local.rc, I think it should be 01data2whatever,am i right?

# CyanogenMod Extras
service 01data2whatever /system/etc/init.d/01data2whatever
user root
group root
oneshot

I also add a mtab file in /system/etc/,it seems e2fsck need this file

after first boot the setupwizard not run, it seems all the data2xxx modify i tried these weeks have this problem

I use miui 0.12.17 chinese original version and second partitions of sd is EXT4 ,made with gparted and aligend in ubuntu 10.10

by now no fc :p, I'll test more and give feedback

@melethron

is reiserFS better than ext4 for data2sd? I compiled vorkKernel with reiserFS support. I tried btrfs yestoday and give up because lag when write.
[Desire Android Development] Ninolina:
I just tried v0.2c and my phone want even boot up.. Its jusr stays at splash screen.. I am using LeeDroid ROM.. I noticed that when flashing v0.2c it only delete files.. at least thats what is wtiten on the screen.. I am S-OFF..:-) Can you help me?
[Desire Android Development] MrDevil:
How do i check if the partition is "logical"? Btw I created the partition with amonra recovery.

Edit: I had a look at the 0.2c script. the init.local.rc has an error, the file says 55data2whatever when it should say 01data2whatever.

Also the exact method that i used was cm->d2we script. But touching the droid didn't do anything so i flashed gapps and voila. So far so good.
[Desire Android Development] iinga:
Yes this is my fault. I had too many init.local.rc's lying around when i compiled the one for CM.

@melethron: hate to make more work for you, but my mistake means you'll need to reupload.
[Desire Android Development] melethron:
When flashing there is a "copy system files" and then it deletes the usual app2sd scripts. The delete was done before in the init.d script and now it's in the update script (so it works with s-on). Hope i didn't make i typo ... i need to update my rom anyway and reflash so i try leedroid again.

If its created with amonra or clockwork then its fine. Both create a "primary" and not a "logical" partition. That only matters for those that use gparted or some other programm on PC.

Fixed the 55 -> 01 mistake.

Uploaded it. Btw. it was still my fault that this error was in. I moved the init.local.rc from the old file in although i had your new version downloaded already. Didn't look in the file ....
[Desire Android Development] DuneBug:
I'm in the same boat.. I keep hanging on the HTC logo after a reboot on LeeDroid 2.3b s-on. Tried full wipes, Factory data reset, wipe sd-ext. Still doesnt work on multple attempts. Installed data2whatever 0.2c right after the LeeDroid 2.3b without a reboot inbetween. Can't figure out whats going on. No errors during installation.

On another note, I formatted a 1GB ext4 on gparted (on a 16GB class 6 Transcend) and just cant get my desire to read it. everytime I try to mount sd-ext I get an error about how a file exists and unable to mount (or reformat in clockwork for that matter). Any idea why? I formatted it as a primary partition (not extended) and after the Fat32 partition. When I format as ext3 all works fine. So thats what I'm using at the moment.
[Desire Android Development] ownjoouk:
with the CM version my market has disappeared.

Even after a reflash of gapps the market still isn't there?

Strange. Anyone else have this?

EDIT: And my partition is spot on 2gb before anyone asks...... lol
[Desire Android Development] melethron:
I try it myself. S-on is not an issue anymore but maybe i made a mistake when fixing this.
[Desire Android Development] vivmar:
confirmed..all ok...

you have to use the procedure above...
[Desire Android Development] ownjoouk:
OK cool.

I read earlier patch then gapps- that is probably where I have gone wrong.
[Desire Android Development] melethron:
@ all

I updated the op. 0.2d has an error in. I messed up the s-off fix (was out with some friends and where a bit drunk ^^) and after that it didn't remove the app2sd scripts at all.
[Desire Android Development] vivmar:
np..downloaded 2.e..;)
[Desire Android Development] melethron:
Had the same issue with 0.2c. The problem was not the 5 deletions in recovery. The problem was that the update script didn't make that deletions at all because of a typo. That way there was 01data2whatever 02cachedalvikcache and 40a2sd running on boot. That messed up dalvik cache completly and it was not there at all. That causes a "bootloop" before the actual boot animation even starts (stuck on white screen).

It is fixed now and works with leedroid. Sorry for any problems.

Sorry for the issues with 02.c. The error there was my fault. I test any update i make in future to see if it works.

About the issue with your card. Can you post the exact error you get. Maybe you have an old version of recovery that doesn't work with ext4 (but im not sure on this). If you have adb you can try the following. Do "adb shell" in recovery and then the following:

mkdir /sd-ext

This command can cause an error but it is to make sure that the folder exists.

busybox mount /dev/block/mmcblk0p2 /sd-ext

If this works its not an issue with ext4 and the partition is recognized.
[Desire Android Development] DuneBug:
You did get me worried but no problem at all! I think you're doing a smashing job for the community!

As for the rest, I'm unable to troubleshoot right now as I'm off for a work trip for a couple of days. I'll try and get access and troubleshoot from there. But off hand from memory, I do remember the error having to do with the fact that "mmcblk0p2" already exists and thus cannot be mounted. I'll redo this when I get a chance and write the actual error msg out verbatim.

For the mean time though, I got this working on my ext3! Thanks a bunch Melethron.. and for the record, I do prefer your method of safety over speed.. esp if its mostly artificial speed! ;) But lets not open that can of worms again! :D
[Desire Android Development] woti23:
made the TAP Benchmark with the TAP data directory in a reiserfs

/dev/block/mmcblk0p6 on /data/reiserfs type reiserfs (rw,nosuid,nodev,noatime,nodiratime,barrier=flush)

btrfs compared to reiserfs

dbwrites 6 (btrfs) to 28 (reiserfs) per second

dbreads reiserfs -10% smaller than btrfs

dbdeletes about the same

filewrites

10k reiserfs = btrfs speed x 1.5

1M reiserfs = btrfs speed x 2

filereads

10k about the same

1M about the same

stress readwrite: btrfs better at read, reiserfs better at write

kernel neophyte testkernel

would be nice to get the filesystems (reiserfs,btrfs,xfs) at least as modules default into all the rom kernels, not only into the testkernels

and also all the schedulers as choice

current scheduler SD: noop anticipatory [deadline] cfq bfq

current scheduler NAND: noop anticipatory [deadline] cfq bfq
[Desire Android Development] MrDevil:
Have you tried cm-patch-apps? it's works for me. if i flash cm-gapps-patch some stuff would disappear for me to.
[Desire Android Development] rootxtx:
Problem...

I have more free MB in internal memory, 600MB+.

I have, problem, Installation of applications takes a long time, what is problem?

My HTC Desire is, rooted, S-OFF, and install LeeDrOiD 2.3b rom with a2sd, and have made ext4 1GB.

On test Quadrant Standard long standing in test Database write 4/4.

Tnx
[Desire Android Development] hongkongtom:
Will it work on MCR with A2SD+ ?
[Desire Android Development] moebius83:
hi all!

I'm running this script (the symlink version) on a Stock rooted HTC Desire rom where I enabled the init.d but for some reason I got this error on boot:

I//system/xbin/busybox( 88): [noop] anticipatory deadline

I//system/xbin/busybox( 88): +++ Mounting internal mtd

I//system/xbin/busybox( 88): umount: can't umount /data: Device or resource busy

so for some reason it can't umount the original /data at the time the init script runs, this results in the /data dir used to mount both mtdblock5 and loop0 (mmcblk0p2, my ext2 partition) and in the mtdblock5 mounted on both /data and /system/data_internal as shown here:

/dev/block/mtdblock5 /data yaffs2 rw,nosuid,nodev,relatime 0 0

/dev/block/mtdblock5 /system/data_internal yaffs2 rw,nosuid,nodev,noatime,nodiratime 0 0

/dev/block/loop0 /data ext2 rw,sync,nosuid,nodev,noatime,nodiratime,errors=continue 0 0

everything works fine anyway but maybe it can cause some trouble.

As another note, I don't know if it's related, but the ext2 partition isn't unmounted correctly on shutdown since I always see errors on the /sdcard/e2fscklog.txt after rebooting the phone (I'm using the Power Off option on the stock HTC menu, no reboot or other strange things).

EDIT:

I modified the 01data2whatever script to understand why /data can't be unmounted on boot, and it turns out this process is using the /data filesystem:

keystore 70 1 1732 420 20 0 0 0 c023348c afd0e5ac S /system/bin/keystore

I guess it's something HTC Stock specific, even if inside the /init.rc that service is listed after the recovery_install.sh (script used to enable init.d scripts on stock kernel).
[Desire Android Development] melethron:
Give it a try and report back. I cant test every ROM myself. This would take to much time. If its working i add it to working confirmed if its not then i ll add to not working yet. Ill try to fix the issues with the roms that don't work over time.

This are general issues of data2sd. You can speed up quadrant if you use the life-on-the-edge patch but this doesnt represent the real performance. Also lags and slow installs are an issue. I myself can life with that cause i dont install apps very often and besides of that its smooth as long as there is no download/install. But everyone has to figure that out on its own. More space + lags on downloads/installs or normal space + a bit faster.

I wonder about your low score in general. Your partition is properly aligned?!

I have a class 2 kingston microSDHC with 16GB. For the test i installed the rom fresh and didn't setup accounts/wifi/apn so that no background sync interferes with the benching. I ran 5 tests in a row and the mean values of db writes (only writes cause lags - as also confirmed by this google-dev) are this:

EXT4

(rw,nosuid,nodev,noatime,nodiratime,barrier=1,data=ordered):

db writes: 34

BTRFS

(rw,nosuid,nodev,noatime,nodiratime,ssd_spread,noacl)

db writes: 16,2

ReiserFS

(rw,nosuid,nodev,noatime,nodiratime)

db writes: 40,2

Nand

(nosuid,nodev,noatime,nodiratime, + some other default stuff):

db writes: 54

Btrfs was a complete fail. The speed increase i felt was because of partition alignement and scheduler switching). Sorry for that bad idea.

On an unjournaled loop device i get like 200. This will increase speed heavy in some situations (for example a click on "superuser accept") as it practicaly skips the commit() or fsync(). But on the other side it causes slowdowns if there is not only a write done but read afterwards (also check the google dev article on this again). So if some data is writen to db and then recalled it has slowdowns there. One example would be the list of titanium backup or the app launcher. It first fetches all apps and writes it to db and reads the list if you scroll down afterwards. The scrolling is not as smooth as without loop then. So loop is a two-sided sword considering performance. As it is more risky in addition ill stick with reiserfs for now.

But apart from that i really wonder of those different results on the same class of sd-cards. Maybe kingston uses good controllers even on cheap microsds. My Rom for example is completly smooth for me but other say it lags horrible on a class 6 sd. As i've seen values on a class 6 sd that are lower than mine i think this could be the issue. So data2sd might be different considering smoothness for different microSDs (even on the same class- and class 2 might be even better than a class 6).
[Desire Android Development] melethron:
Hmm i think the failing unmount on shutdown seems to be caused by this. I did about 3 test with a synced loop device and it always got unmounted after a normal shutdown. If you can edit to script yourself you can edit those lines:

echo " +++ Mounting internal mtd";
busybox umount /data;
busybox sleep 1;

to this:

echo " +++ Mounting internal mtd";
sync;
sleep 1;
busybox umount /data;
busybox sleep 1;

This would force any ongoing writes to /data to be finished and then unmounts. But as im not sure what is using /data at this time i'm not sure if it helps. If this will help you i'll add it to next version. (dont forget to "chmod 755 01data2whatever" after you pushed the script to init.d - also if you can't edit it on your own i can send you another zip with that in to give it a try)
[Desire Android Development] woti23:
well, i have a sandisc class 2 , 32 GB, which is in price the same with as the kingston 16GB, maybe thats the difference.

and maybe that i use now 3 filesystems beneath (yaffs,ext4 + reiser or btrfs)

maybe not the best test condition

aligned - it is with gparted

but then, i don't have the impression that its slow (but im no gamer) or laggy at all

the only short lagg is if it has booted, a few seconds till everything is started, but that seems quite normal to me
[Desire Android Development] moebius83:
thanks I'm pretty used to hack stuff around so I'm doing some research, I added some info by editing my previous post including what's using /data, I'll keep trying
[Desire Android Development] Ph@lo:
I have a total noob question, but I wiped my previous MCR8 incl. Apps2SD+ (which was on ext3 1024mb ) and wiped everything else.

Then installed LeeDroid 2.3b A2SD and followed instructions for Data2Whatever.

Glad to report everything works fine but when I check internal phone storage through Android it says ~48MB remaining...this can't be right surely. I was expecting something like 900mb remaining.
[Desire Android Development] Alex-V:
Wow.... thats it :p:p:p:)

have updated my rom with it...works perfect for me...Big big thanks for... :)

and which you a happy christmas

with kind regards...Alex
[Desire Android Development] melethron:
Hmm i also use sense roms (leedroid and my hd rom) and i dont have this issue. But im sure that android loads stuff from /data before init.d is called. I noticed this because there is a bug if /data/property is on sd. The data there is loaded before the scripts mounts the sd and thus it gets its values from the internal (the "no settings on reboot saved" bug). Hmm so if sync doesnt help you can still "killall -9" as you know what causes this ;) .

Are you sure you used the newest version (0.2e). Because this looks like the bugs of 0.2d/c or the soff bug in the version before that.
[Desire Android Development] melethron:
Well maybe sandisc use some ****ty controllers.... But note that my score is also lower after i set up everything completly and there are also lower scores if a background sync is done. I wanted nothing to interfere with the bench to get "clean" results so i tried to prevent anything that could access data.

Same to you .... :)
[Desire Android Development] Ph@lo:
Hi, I used "LeeDrOiD_V2.3b_A2SD" with "data2whatever-v0.2e" but will try a different ROM (maybe MCR9 or Gingerbread Oxygen RC2) and see if that makes any difference.
[Desire Android Development] moebius83:
that's what I though, but now another very bad thing happened, killing that service allowed /data to cleanly unmount on boot, the problem is, e2fsck kicked in and started checking the ext2 partition, what happened is that it took too long (cause it found errors I guess) and the system kept booting, (probably they have asynchronous init? is it normal that the system didn't wait for the fsck to finish?), so at one point the phone complained it couldn't find the /data/system/entropy.dat because /data was still unmounted at that point...what happened is that it thought it was a first boot of the phone and everything got screwed:

System package com.google.android.gm has changed from uid: 10050 to 10004; old data erased

this line appeared for every single application and now I basically have a fresh formatted phone :)

time to restore my nandroid backup I guess...it's probably better than restoring the application data with titanium backup...

How would clockwork recovery work with restoring the ext partition? I noticed it created an sd-ext.img during the backup. Do I need to do something particular or just boot into recovery and restore?
[Desire Android Development] melethron:
hmm are you sure this happened while e2fsck is running. I had init scripts that took really long and there was nothing that interfered ever. Other system stuff begann always after init.d. So maybe it couldnt find the file because that file was the error e2fsck found ^^ (did you look if it is in "lost+found")
[Desire Android Development] melethron:
Hmm i tested it with leedroid 2.3b and the 0.2e script. If you have adb it would help if you post the first 20-30 lines of the output of "adb logcat" while you boot. And ontop the output of "adb shell df".
[Desire Android Development] sibere:
If you want to know what's using the nand, you can use the fuser command. Unfortunately we don't have the lsof command which in this case would be helpful too.

fuser -m /dev/block/mtdblock5 will give you a list of PIDs, which should be killed automatically (NOT RECOMMMENDED) if you add the -k option.

If you do that in a script before mounting mmcblk0p2, and directing the output to a log, you should get the list of processes which use the nand before the sd is mounted.
[Desire Android Development] moebius83:
the reason I suppose this happened is because I was watching the logs as the system booted and I saw that e2fsck started checking the filesystem, in the meantime other stuff happened (including the /data/system/entropy.dat error) and at one point the log shows the rest of the 01data2whatever script where the e2fsck finished and the other stuff.

Also since /data/system/entropy.dat actually resides on the internal memory it's impossible it didn't find it because the file was corrupted, but it didn't find it because /data wasn't mounted yet.

Maybe all this is happening because of the way init.d is implemented (with the install-recovery.sh trick), how is it working on other ROMS?

this is the relevant part of the install-recovery.sh service inside init.rc:

service flash_recovery /system/etc/install-recovery.sh
oneshot

and this is the actual content of /system/etc/install-recovery.sh:

#!/system/bin/sh

# hook into the system startup sequence, /system/etc/install-recovery.sh

CM_FILESYSTEM_READY=$(getprop cm.filesystem.ready)

if [ "x$CM_FILESYSTEM_READY" = "x" ]; then
BUSYBOX=/system/xbin/busybox
if [ -x "$BUSYBOX" ]; then
SYSINITDIR=/system/etc/init.d
if [ -d "$SYSINITDIR" ]; then
log -t SysInit "Starting sysinit scripts from $SYSINITDIR"
/system/bin/logwrapper "$BUSYBOX" run-parts "$SYSINITDIR"
fi
else
log -p e -t SysInit "No $BUSYBOX found, skipping sysinit"
fi
else
log -p w -t SysInit 'sysinit is already completed, skipping'
fi

# EOF
[Desire Android Development] moebius83:
that's exactly what I did:

echo " +++ Mounting internal mtd";
busybox umount /data;
MOUNTCHECK=$?;
if [ $MOUNTCHECK -eq 1 ]; then
for pid in `busybox fuser -m /data`;
do
ps -p $pid;
done;
echo " +++ killing processes using /data";
busybox fuser -mk /data;
busybox umount /data;
fi;
#busybox sleep 1;
busybox mount -o noatime,nodiratime,nosuid,nodev /dev/block/mtdblock5 /system/data_internal;

and found out (by interactively watching adb logcat) the process keystore kept /data busy so I decided to kill it with the fuser -mk option and everything worked but then I had a different problem as you can read that I think it comes from the fact that the init scripts run asynchronously, I'm using the init.d script enabler found on your data2sd thread, so maybe that's the reason...I have no experience how init.d is implemented on other ROMs
[Desire Android Development] sibere:
Look for the forums, there is a way to start a script from init.rc instead of using the script enabler. everything is run in sequence in init.rc. I wanted to try this myself but I really don't have time ATM to play with it :(
[Desire Android Development] melethron:
Never had that problem myself cause all roms i ever used had init.d enabled as default and other stuff always started after everything from init.d completed fine.. I add stock roms to "issues possible" for now. Would be nice if you post here how you got it to work so i can link to that in op.
[Desire Android Development] Ninolina:
I finally tried the v0.2e.. It was a long boot up but it went ok.. I didnt have the issue with unknown IMEI and everything seems fine..;) The only thing is the lag which is always present no metter if I download or instal anything.. Every time I start any app it takes too long to open....:( I dont know how much lag is normal but I used the RCMixHD_v014b_D2Ext ROM and it was much faster then Leedroid with data2whatever v0.2e..:( Is that normal too? maybe because the d2ext was integrated to ROM? Is that make any difference? Thanks for all your efforts..;)
[Desire Android Development] ernest33:
Great !

Using Oxygen GingerBread RC2 with data2w 0.2e :p

Thanks a lot !