yashsingh1/xdaforums huggingface dataset:
[Vibrant Android Development] ttabbal:
It moves dalvik and data back to the internal sdcard mounted on /data. It also removes the scripts used by the enabler to start the thing up, so /system/bin will be stock, or close to it. If you used the userinit or the vibranta2sd zip, my disabler won't clean up the userinit script they use. It only cleans up after the enabler. I didn't want to risk deleting someone's customized script. Also, my stuff doesn't run any other userinit scripts, though it could be modded easily to do so. This hack seems the most interesting use of a boot script at the moment.

You shouldn't get a speed boost from wiping dalvik, unless it generates the cache differently on the next run or you had something corrupted I suppose, though I expect corruption would cause FCs rather than slowdowns.

Most apps are already zip-aligned these days, I doubt doing it again would make a big difference, but it wouldn't hurt either.
[Vibrant Android Development] zimphishmonger:
Can you explain the different between the dc2ext and vibrant a2sd update.zips? Thanks!
[Vibrant Android Development] ttabbal:
dc2ext is the newer version that does the file copy in recovery. The vibrant a2sd version does it at boot. Unfortunately, the stock Android boot doesn't wait for our script to finish, causing a race condition. And this thing boots fast enough that it's up and trying to read the files we are in the middle of copying and changing the mount points out on. dc2ext should be much safer to use because of this, at boot all it does is mount the ext partition and bind mount the directories to /data.

Once JAC or someone else gets us a kernel/ramdisk with the ability to wait during boot, and run shutdown scripts, this will be a lot easier and more reliable during install/revert. We can also fsck before mounting and properly dismount the ext partition, which will prevent corruption of the file system. With ext3, it should be rare to get corruption even with an unclean shutdown, but it can happen. It sounds like JAC is close, so hopefully soon.
[Vibrant Android Development] zimphishmonger:
Sounds great, thanks for your excellent explanation. I will use the dc2ext for the time being, as it sounds safer and very similar to the cache-bind script I used on my G1. Thanks for putting it together! :-)
[Vibrant Android Development] INeedYourHelp:
2.2 kernal doesn't support ext3/ext4
[Vibrant Android Development] ttabbal:
I hope it helps. It's working great for me, and I only had to re-flash the stock odin a few times during development. :D

I can't believe how crappy the internal flash is. The difference on some apps is huge. I hope like hell it's a driver problem, maybe that rfs file system? I find it amusing that it seems to be vfat with permissions layered on top. If you mount it with -t auto, you get plain vfat. :rolleyes: Sounds like the old umsdos filesystem that nobody in their right mind uses and isn't even supported anymore.
[Vibrant Android Development] ttabbal:
Find out what it does support.

cat /proc/filesystems

That should list all the filesystems your kernel knows how to deal with. On the stock vibrant kernel, ext2 and ext3 are supported, no ext4. I would hope you have at least ext3 available.
[Vibrant Android Development] rhcp011235:
Hey guys,

Ive been fooling with this stuff for awhile now. It does increase speed high.

I have the FC stuff fixed. and most of the other issues fixed.

but have you guys noticed gmail sync not working anymore?

im getting this

W/ResponseProcessCookies( 2331): Cookie rejected: "[version: 0][name: GX][value: DQAAAJMAAACA9glzCOE83mukRTeTC_HqhXKLvHiejeRNAFjdFGPc6ECw4T68PHGv4jDHc3xXlKMHMqAlRZ-r5Wmo7XxnsMNhBw-maO85PLn4dyUcEGPE9Mfcp03ncW3zxDncL6BhSckbMpjMKmLVKNeqLMWKsNc0YVd-aSVsGGu_-Ql8Sjyxmn4R5CmFiR9IyhqkQO-XLQrsdAmNOjY0N1QLMK10IkAe][domain: mail.google.com][path: /proxy/gmail/mail][expiry: Tue Aug 17 14:27:47 America/Detroit 2010]". Illegal domain attribute "mail.google.com". Domain of origin: "android.clients.google.com"
D/dalvikvm( 2331): GC freed 2645 objects / 723496 bytes in 65ms
I/Gmail ( 2331): MainSyncRequestProto: lowestBkwdConvoId: 0, highestHandledServerOp: 1990
W/ResponseProcessCookies( 2331): Cookie rejected: "[version: 0][name: GX][value: DQAAAJQAAABEp5-BWyeelSPEN2CmcLN3Lgl8_acz0dG-X7bfQ7Xfc0krdynhtfZ86DY723QLsOYA57_x1G_yh72dxGpDmc_CFq9z4mHO0v9V182agNX3Lfc2vpCQbPyCrpHV90CJfieJXW6hYnK6esiJGfHxtQAvFGNsRMNIwBEu_KCd2n964qvvbgyamVsa8BU582F15gQSb_3_5Pf1k1Uhooj1Jp6G][domain: mail.google.com][path: /proxy/gmail/mail][expiry: Tue Aug 17 14:27:48 America/Detroit 2010]". Illegal domain attribute "mail.google.com". Domain of origin: "android.clients.google.com"
D/dalvikvm( 2331): GC freed 2157 objects / 108752 bytes in 36ms
[Vibrant Android Development] junkdruggler:
My gmail is still working... Its the only thing NoLed works for on my phone..
[Vibrant Android Development] rhcp011235:
Hmmm. Did you wipe? I may need to do a full wipe. apply this. and tit back.

Im not sure whats up. anymore.
[Vibrant Android Development] junkdruggler:
Nope... Just parted 14/1.9/0

Renamed update

Reboot recovery

Flashed and booted...
[Vibrant Android Development] rhcp011235:
Don't get it.

I guess ill wait for one of the two guys to look.

Its the only thing holding me back. and its major. and i cant seem to figure it out.
[Vibrant Android Development] mcbooth:
Thanks for the help.

Yes I did push the files manually because I can't use clockworkmod recovery on a 2.2 rom, and the signature check fails when trying to flash the update.zip through the stock recovery.

I did it through adb shell, su, but i'm still getting 'device or resource busy' when running the enable.sh. First line it says mounting dev/block then failed due to resource busy. It's a freshly formatted ext3 2gb partition, second partition on a 32gb card.

I'm trying this because i want to see a lag fix for 2.2 roms. On the i9000 we can use the ext4 kernel for 2.1 roms no worries, this is a good experiement for me.
[Vibrant Android Development] ttabbal:
Yeah, the signiture is using the test keys, so the stock recovery might not like it.

What's the output of "mount" when you get this error? Sounds like something's got the partition mounted....
[Vibrant Android Development] mcbooth:
# mount

mount

rootfs / rootfs ro,relatime 0 0

tmpfs /dev tmpfs rw,relatime,mode=755 0 0

devpts /dev/pts devpts rw,relatime,mode=600 0 0

proc /proc proc rw,relatime 0 0

sysfs /sys sysfs rw,relatime 0 0

none /acct cgroup rw,relatime,cpuacct 0 0

/dev/block/stl6 /mnt/.lfs j4fs rw,relatime 0 0

tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0

none /dev/cpuctl cgroup rw,relatime,cpu 0 0

/dev/block/stl9 /system rfs rw,relatime,vfat,llw,check=no,gid/uid/rwx,iocharset=

utf8 0 0

/dev/block/mmcblk0p2 /data rfs rw,nosuid,nodev,relatime,vfat,llw,check=no,gid/ui

d/rwx,iocharset=utf8 0 0

/dev/block/stl10 /dbdata rfs rw,nosuid,nodev,relatime,vfat,llw,check=no,gid/uid/

rwx,iocharset=utf8 0 0

/dev/block/stl11 /cache rfs rw,nosuid,nodev,relatime,vfat,llw,check=no,gid/uid/r

wx,iocharset=utf8 0 0

/dev/block/stl3 /efs rfs rw,nosuid,nodev,relatime,vfat,llw,check=no,gid/uid/rwx,

iocharset=utf8 0 0

/dev/block/mmcblk1p2 /sd-ext ext2 rw,noatime,nodiratime,errors=continue 0 0

/dev/block/mmcblk1p2 /data/data ext2 rw,noatime,nodiratime,errors=continue 0 0

/dev/block/mmcblk1p2 /data/dalvik-cache ext2 rw,noatime,nodiratime,errors=contin

ue 0 0

/dev/block/vold/179:1 /mnt/internal_sd vfat rw,dirsync,nosuid,nodev,noexec,relat

ime,uid=1000,gid=1015,fmask=0002,dmask=0002,allow_utime=0020,codepage=cp437,ioch

arset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0

/dev/block/vold/179:9 /mnt/internal_sd/external_sd vfat rw,dirsync,nosuid,nodev,

noexec,relatime,uid=1000,gid=1015,fmask=0002,dmask=0002,allow_utime=0020,codepag

e=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0

/dev/block/vold/179:9 /mnt/secure/asec vfat rw,dirsync,nosuid,nodev,noexec,relat

ime,uid=1000,gid=1015,fmask=0002,dmask=0002,allow_utime=0020,codepage=cp437,ioch

arset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0

tmpfs /mnt/internal_sd/external_sd/.android_secure tmpfs ro,relatime,size=0k,mod

e=000 0 0
[Vibrant Android Development] justanothercrowd:
Worked out all the glaring bugs with the kernel/initramfs setup. Everything works (WiFi,Rotation BT etc etc) and I'm just putting some final touches and then I can release and you guys will have EXT4 and won't have to deal with the race conditions
[Vibrant Android Development] robavila721:
thats awesome jac cant wait
[Vibrant Android Development] anomalous3:
sweet! any chance I can include it in my deodexed build?
[Vibrant Android Development] junkdruggler:
Anomaly ROM plus JACs kernel... I see great things in the works...
[Vibrant Android Development] shaunm1989:
Cant get running on 2.2 rom for i9000, same as mcboof, wont mount sdcard (device busy) and pushing files seems to get excat same error as well, shows no boot animation
[Vibrant Android Development] ttabbal:
His post shows the mount points active and correct, so it won't be able to mount them again. How did they get mounted? Do you have files in /sd-ext/data and /sd-ext/dalvik-cache?
[Vibrant Android Development] ttabbal:
NICE!! Looking forward to doing this right.
[Vibrant Android Development] mcbooth:
Mine is working now, yes I have files inside /sd-ext

Now to remember exactly how i did it so i can pass it on to the i9000 crowd!!

You guys are awesome, i'm getting 1610 quadrant on the i9000 JP3 rom (2.2)
[Vibrant Android Development] AustinKnight45:
So is it ok to wipe dalvik cache and cache in clockwork that is if it works even ?
[Vibrant Android Development] ttabbal:
It's fine, but it won't actually wipe the files on the SD. That's why I included the dalvik-cache wipe ZIP.

For the i9000 guys, here's the script commands with the loops unrolled and such. Execute them one at a time and let me know what fails. This is enable.sh, the dc2ext.sh is quite simple, so just use it for your tests. Again, do this all from a root shell in recovery. They should all be prefixed with "busybox", so "busybox mount ..." and such.

mount -o noatime,nodiratime -t auto /dev/block/mmcblk1p2 /sd-ext
mount -t rfs /dev/block/mmcblk0p2 /data
rm -r /sd-ext/dalvik-cache
cp -rp /data/dalvik-cache /sd-ext/
chown 1000:1000 /sd-ext/dalvik-cache
chmod 771 /sd-ext/dalvik-cache
rm -r /data/old-dalvik-cache
mv /data/dalvik-cache /data/old-dalvik-cache
mkdir /data/dalvik-cache
chown 1000:1000 /data/dalvik-cache
chmod 771 /data/dalvik-cache
rm -r /sd-ext/data
cp -rp /data/data /sd-ext/
chown 1000:1000 /sd-ext/data
chmod 771 /sd-ext/data
mv /data/data /data/old-data
mkdir /data/data
chown 1000:1000 /data/data
chmod 771 /data/data
sync
umount /sd-ext
umount /data

These are the important bits from dc2ext.sh (executed at boot). The other stuff creates the mount point /sd-ext.

mount -o noatime,nodiratime -t auto /dev/block/mmcblk1p2 /sd-ext

mount -o bind /sd-ext/data /data/data;
mount -o bind /sd-ext/dalvik-cache /data/dalvik-cache;
[Vibrant Android Development] justanothercrowd:
Yes feel free to have people use my kernel in conjunction with your build for ext and proper script support :) Or include it with an update package just give credit is all I ask.

We haven't figured out a way to flash the kernel without ODIN yet but hopefully soon. I'll let ya know once we do. Working on the FM Radio today/tonight.
[Vibrant Android Development] justanothercrowd:
Kernel is up. All scripts go in /system/etc/init.d just like a normal linux box :) I included you script since i'm dead tired and been up for over 24 hrs. Didn't feel like re-writing it. If you make any updates send em my way and I'll include them as long as they are safe. I'm concerned with tweaking the kernel more than I am with data to EXT etc.

This way we can leave playlogos alone and launch the scripts proper. Plus you can add or remove scripts with ease. Just make sure you leave the completion script or set the fs prop in a script if you remove it. Otherwise the default services wont launch and youll be sitting at the Vibrant screen.

:)

Enjoy!
[Vibrant Android Development] ttabbal:
Thanks man! I'll get to work on it as soon as I can. I'll keep you updated with scripts and such. May as well divide the work since I haven't had time to set up a kernel build env. And ext4, I'll have to try that just to see what the performance change is like. I doubt it's too significant.

Do we have shutdown scripts? A proper umount for /sd-ext would be nice..
[Vibrant Android Development] justanothercrowd:
Shutdown isnt implemented yet but will be :) I just wanted to get this out there for folks to have and to get some feedback. I ran the kernel for 2 days with no panics etc so now its just about adding more goodies.
[Vibrant Android Development] mcbooth:
We actually got this working yesterday reliably on 2 phones AND were able to replicate it.

We are both on a 2.2 base rom, JP3, so we can't use the existing i9000 ext3/4 kernel to mount the partition. This script works very nicely to produce 1600+ quadrant, stable after 24 hours.

We followed the instructions from the first post of this thread but with some differences. Grabbed the playlogosnow and playlogos1 from http://getyourboneon.com/enableuserinit.zip and put them in /system/bin.

Then grabbed the userinit from http://getyourboneon.com/vibranta2sd.zip and renamed to userinit.sh and put it in /data/local

Working absolutely fine. No other combination would work correctly.

Do you suggest any changes to the userinit script we used? I'd like to pass this to the i9000 thread with your permission, as there are people there smarter than me who can improve it
[Vibrant Android Development] anomalous3:
OP updated, use JACs kernel instead; more friendly and ext4 flies without much data corruption.
[Vibrant Android Development] mcbooth:
You sure this will work on i9000 with android 2.2, the kernel version is 2.6.32.9.

If you guys have built this from 2.1 source then the kernel is probably .29 and therefore may not be compatible?? Correct me if i'm wrong. I'd love for this to work on i9000 2.2
[Vibrant Android Development] anomalous3:
yeah, it probably won't work, not because of the .29 version but because of slight differences in board layouts, etc. Pretty sure there's an i9000 kernel out there that does this though. If that doesn't work, though, feel free to use my method.
[Vibrant Android Development] louis chan:
I have a i9000, and try install the following first. It doesn't work.

enableuserinit.zip

the update fails. Seems something like CSC problem.

Then, I manually do it modifying those files. It works.

Now, I upgrade i9000 to JG4 (still 2.1).

Want to this Apps2sd instead of i9000's way.

But got a trouble. Can't mount ext4 partitiion, simply because the dynamic loadable module is not there (believe it is ext3.ko and ext4.ko）.

If anyone sends me the ext3.ko and ext4.ko binary, I can make a try.

edit: just found out that ext3 is natively supported in kernel. no need for ko files.

I use this playlogo trick. It works, and now running data2sd with ext3 partition in a i9000.

Didn't do the dalvik-cache moving. I cut those lines in script.

update.zip method possibly not work in i9000. I did these all by adb shell.

I
[Vibrant Android Development] dc41:
How are you all partitioning the external sd card? Are you using a separate card reader? I don't have a separate card reader, but I can plug my Captivate into a usb port on a Ubuntu machine and Gparted sees the card, but the partition fails because it says the device is in use by the system.

Does the card need to be out of the phone in order to create the ext3/fat32 partitions?
[Vibrant Android Development] ttabbal:
Most likely used an external card reader. There's always the auto partitioning zip file I posted in my thread about this stuff.
[Vibrant Android Development] shznit:
you need to unmount the partition in Linux before Gparted will let you mess with it.
[Vibrant Android Development] AustinKnight45:
Is there a undo for this I've had it running for awhile and have done a factory reset and this hack is still there, I just want to see if it helps with my font issue I'm having sometimes I have the default font and some other times I have rosemary font just when my phone feels like it when I reboot.
[Vibrant Android Development] AustinKnight45:
Hu so theres no revert other then flashing with odin.
[Vibrant Android Development] junkdruggler:
Austin a one click kinda fix would be to flash eugenes userinit... Its so you can push/pull files through adb. It over writes this... Just mounts /system as rw...
[Vibrant Android Development] frank707:
Works perfect. Thanks!

Amazing work! Was comparing your userinit.sh script to mimocans fix. the only difference i see is that the busybox ln -s /disk/data /data/data isn't there. Not sure what it purpose is, but would it benefit your userinit.sh at all?
[Vibrant Android Development] anomalous3:
MT3G uses internal NAND for the /data partition which is considerably faster than apps2sd. The Vibrant, however, uses a partition on the internal SD card which is actually a good bit slower than apps2sd on an external class 6 SD card.
[Vibrant Android Development] ttabbal:
Feel free to package it. I have a few thoughts for improvements, but it might make a decent beta.
[Vibrant Android Development] ttabbal:
Looks like the other one is using symlinks. Mine uses bind mounts. Different approaches. I didn't do that because the op said they tried it and it didn't work.
[Vibrant Android Development] anomalous3:
I think the reason it didn't work was because I had the permissions wrong, but bind mounting is generally seen as a better way to do this anyways.
[Vibrant Android Development] frank707:
Thanks for the quick response. Testing out a bunch of apps after running this script and the phone runs flawless.

For those who just care to know. Benchmarks:

Using the original stall fix method 1

Quadrant Benchmarks were between 800-900

With anomalous3 userinit enabler & ttabbal userinit.sh

Quadrant Benchmarks are at 1500+
[Vibrant Android Development] skater4690:
oh ok i guess that would make sense but i hate how theres all those files on my sdcard lol. and what would happen when you wiped? i never used a2sd so i dont know much about that area except that it put lots of crap on my sd card lol
[Vibrant Android Development] anomalous3:
a2sd doesn't put stuff on the regular FAT partition of the sdcard, so you shouldn't see anything when pulling it up on a windows machine. I believe that clockwork recovery has an option to wipe a2sd, but I don't believe a standard wipe removes the stuff on a2sd.

Going to test the apps2sd packaged version shortly.

[edit]uuughh updater scripting hell. Updating works, then it doesn't[/edit]
[Vibrant Android Development] All~G1:
Just wondering if the DL in OP is the updated script? Thanks for getting the ball rolling guys!!!
[Vibrant Android Development] skater4690:
well when i use root explorer i see all the files and folders that were in there and when i had it in my cpu i could see them as well there was just a bunch of stuff and i didnt like it much but if this makes the phone better i will have to deal with it lol
[Vibrant Android Development] ttabbal:
I don't think that clockwork can access the external sd. If not, it can't wipe the ext partition. We should probably make an update.zip or something to clean the data with.

I don't think there is an integrated update.zip for the latest script. Just download and copy the script, set permissions, then tell rom manager to flash the enabler. It will reboot, do its thing, and reboot back into android. Check with ' mount' or 'df' at the terminal or adb shell.
[Vibrant Android Development] ttabbal:
Don't go to /sd-ext and you won't see any of it. :)
[Vibrant Android Development] rhcp011235:
I flashed it + user the init.

i got a quad of 903. How did the last guy 1500+?
[Vibrant Android Development] anomalous3:
I'm busy testing an integrated update.zip for this.....had to put the userinit in the /system/bin directory so I didn't run into syntax errors (my updater scripting isn't the best), but we're all big boys (and girls) here so I doubt that will cause too much trouble.
[Vibrant Android Development] rhcp011235:
# mount

rootfs / rootfs ro 0 0

tmpfs /dev tmpfs rw,mode=755 0 0

devpts /dev/pts devpts rw,mode=600 0 0

proc /proc proc rw 0 0

sysfs /sys sysfs rw 0 0

/dev/block/stl6 /mnt/.lfs j4fs rw 0 0

tmpfs /sqlite_stmt_journals tmpfs rw,size=4096k 0 0

none /dev/cpuctl cgroup rw,cpu 0 0

/dev/block/stl9 /system rfs ro,vfat,log_off,check=no,gid/uid/rwx,iocharset=utf8 0 0

/dev/block/mmcblk0p2 /data rfs rw,nosuid,nodev,vfat,llw,check=no,gid/uid/rwx,iocharset=utf8 0 0

/dev/block/mmcblk0p3 /data_tmo rfs rw,nosuid,nodev,vfat,llw,check=no,gid/uid/rwx,iocharset=utf8 0 0

/dev/block/stl10 /dbdata rfs rw,nosuid,nodev,vfat,llw,check=no,gid/uid/rwx,iocharset=utf8 0 0

/dev/block/stl11 /cache rfs rw,nosuid,nodev,vfat,llw,check=no,gid/uid/rwx,iocharset=utf8 0 0

/dev/block/stl3 /efs rfs rw,nosuid,nodev,vfat,llw,check=no,gid/uid/rwx,iocharset=utf8 0 0

/dev/block/mmcblk1p2 /sd-ext ext2 rw,noatime,nodiratime,errors=continue 0 0

/dev/block//vold/179:1 /sdcard vfat rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1015,fmask=0102,dmask=0002,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0

/dev/block//vold/179:9 /sdcard/sd vfat rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1015,fmask=0000,dmask=0000,allow_utime=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0

# ls /sd-ext

app

app-private

dalvik-cache

lost+found

app_s

userinit.d

It's def working. Im just not sure how he went to 1500 on quad test. I want that :)
[Vibrant Android Development] ttabbal:
I'm not sure how good quadrant is, but I just got 1776 on my vibrant running this. I didn't run it before, so it's hard to say how big an improvement this is.

Note that if you didn't clean your ext partition before running this, the script won't copy all your existing data, but it will mount the directories. This could cause issues. I recommend using a shell to run mkfs.ext2 on mmcblk1p2 before running the script. I'll try to come up with a way to fix this in the script.
[Vibrant Android Development] anomalous3:
OP updated. Quadrant score is about 1125, still not a bad improvement. I'll try cleaning my ext partition though.
[Vibrant Android Development] rhcp011235:
Ah perhaps thats why, I did not clean mine. Let me try that.
[Vibrant Android Development] rhcp011235:
Hmm i tried using clockwork to format my ext part. on my sd card. I went to 928.

What exactly did you do? exact commands? and did you apply that lag fix? because i did.
[Vibrant Android Development] anomalous3:
anyone who hasn't tried this yet, can you test the apps2sd zip? I can only get it to work about half the time but I'm not sure if it's just a quirk of my phone.

[edit] It appears that the success or failure of this may depend on whether one has the latest version of busybox installed.
[Vibrant Android Development] ttabbal:
Can you include the latest version in the zip file?
[Vibrant Android Development] frank707:
I got the 1500 Quadrant scores after following the steps to undo the method 1 lag fix.

adb shell

su

rm /data/data

mv /data/data.bak /data/data

reboot

i partioned my class 6 8gb SD into fat (7gb)/ext3(1gb) using paragon HD manager

then i downloaded the userinit.sh and placed it in the data/local directory and from adb shell ran chmod 755 data/local/userinit.sh before rebooting to apply the userinitenabler through ClockworkMod Recovery.
[Vibrant Android Development] anomalous3:
I can try in a future version, but at the moment I'm a little stumped; when I use traditional update scripting, clockwork recovery is VERY persnickety and won't work, and when I use updater-script with the updater-binary, it will only work with the newest version of busybox installed. Oh and, after clearing my ext partition and setting it up as ext2 quadrant gave me this:
[Vibrant Android Development] WilliamStern:
jesus! lol