yashsingh1/xdaforums huggingface dataset:
[Legend Android Development] BlaY0:
Another minor change... check OP.

For those who already successfully applied version 0.5 there's no need to apply 0.5.1...
[Legend Android Development] areicko:
When I try to flash my legend with your new version, I've a "error in /sdcard/legend_aufs.zip (status 6) Installation aborted".

Do I have to remove your previous version ? How can I do that ?

Thank you
[Legend Android Development] BlaY0:
Yeah, thanx m8. Was my fault (silly syntax error). Please download again. Should work now. No need to remove anything.

Please report.
[Legend Android Development] maxq1:
noob question

excuse my noobishness: i do get the point of all this (indeed, i guess it's awesome!), but i'm confused on some points:

how do i revert to my base image/system if ever i need to? do i simply delete the overlay? if so, dare i ask how? good ol' adb?

do i have the option to place the overlay on a non-ext partition on the sd card? or is an ext partition necessary if i don't want the overlay on the phone's internal storage?

using the aufs_no_kernel version won't overwrite dumfuq's OC kernel or the kernel that came w/ azure, right?
[Legend Android Development] BlaY0:
1. Just disable overlay via adb (check 1st post).

2. Nope. Ext2/3 is necessary (for now). What partition do you have in mind?

3. Right.
[Legend Android Development] maxq1:
wooha! some more clarifications...

if i do that, data written to the overlay is still there, right? if so & if i want to try out another kernel/rom, do i need to wipe whatever partition the overlay was in? the process will then be a) wipe partition, b) re-enable overlay then c) install new rom/kernel. is that it?

i was hoping plain ol' fat so i don't need to re-partition my sd :D

haven't been this giddy to have my question answered since i asked my then-fiancee to marry me :D:D

thanks for your patience thus far, man!
[Legend Android Development] BlaY0:
1. Yep. You can delete just /data/sysrw or sysrw directory on your sdcard and all your overlay data are gone. If you test another ROM it is always good to wipe.

2. Nope. Not gonna happen. AUFS does not support FAT. Besides, you can not put system files to a FAT partition because you can't set permissions/ownership of files and you can't do symlinks for example...

3. Its only a phone ;)
[Legend Android Development] maxq1:
thanks for enlightening!

hehe. just exaggerating, my man! but honestly, this + kickass rom + OC kernel = AWESOMENESS!

also, isn't there a potential for a pseudo-sys2sd for this (aside from the nandroid alternative thingy)? i'm thinking this because after enabling overlay on your sd then installing apps (particularly those that need to be on internal memory/storage for their widgets to work) to phone, the installations essentially should be on sd, right (overlay on sd, ergo anything on overlay is on sd)? or am i just getting ahead of myself here? :confused:
[Legend Android Development] esset:
Right. What am I doing wrong?

I reboot into Recovery mode with Clockworkmod.

I install the .zip by using the menuthingy in recovery-mode.

Then I mount /system using adb on my computer and when I write "adb-windows.exe shell aufs --enable" I get "aufs: not found" returned.

Using the ROM in my sig.

Kernel: 2.6.29-5f084974 (blayo@testink #1)
[Legend Android Development] BlaY0:
Hmm, aufs is in /system/xbin. Maybe you don't have it in your PATH. Check your PATH variable or run aufs with absolute path.
[Legend Android Development] esset:
Thanks.

"/system/xbin/aufs --enable" gives me

Enabling read-write /system overlay...
touch: /data/local/dosysoverlay: No such file or directory
Please reboot your phone for changes to take effect...

Should it work like this or did I miss something with installing dosysoverlay? :P

EDIT: looks like I can delete stuff from /system. Cool :)

EDIT2: And on reboot the stuff I deleted came back. Hmmm. (tried deleting Youtube.apk)
[Legend Android Development] BlaY0:
This probably means you don't have /data/local directory (yet) because you just wiped your data partition. On first boot (after wipe) it will be created and then you can do "aufs --enable" to create /data/local/dosysoverlay... no need to do that from recovery, just hook up you gizmo and issue:

adb shell aufs --enable

...no need to actually reboot your gizmo:

adb shell stop zygote
adb shell /etc/init.d/70aufs
adb shell start zygote

...these will stop the entire framework (screen goes black), do the overlay and start framework again - you will see your boot animation again.

EDIT: You are running run-parts from init.rc right?
[Legend Android Development] esset:
Alright, now I didn't get the error from dosysoverlay for the first line. Now I got error from issuing "/etc/init.d/70aufs" - "/etc/init.d/70aufs: not found".

I'm sorry, what? I'm not so greatly into linux/unix world :P
[Legend Android Development] BlaY0:
1st your system should meet the requirements (1st post) then I can help U.

One should at least know what to do if he/she gets an error saying "File xyz not found." or "xyz: Permssion denied." It's the same as you would learn how to slice a loaf of bread... you don't ask how to do it when you buy another one at some other store... right?
[Legend Android Development] esset:
Oh wow, totally missed out on checking if I had the "# run-parts integrated in init.rc script (/etc/init.d)".

But from the sounds of it, I can't ask you to help me set that up?
[Legend Android Development] BlaY0:
Check my posts in Chef Central subforum... I think I have already wrote something about run-parts there...
[Legend Android Development] smartsreenath:
bro ...is this will work on cyanogen 6. nightly builds....???????:confused::confused::confused:i checked on superfryo......its not working.....

FOLLOW ME http://smartsreenath.blogspot.com/
[Legend Android Development] TheGrammarFreak:
I just set it up on build 25, it was a bit of a pain to work out. Instead of

aufs --enable

do

/system/xbin/aufs --enable

I'd like to point out that this solution is in this very thread.
[Legend Android Development] smartsreenath:
thanks bro...........:):):)

FOLLOW ME http://smartsreenath.blogspot.com/
[Legend Android Development] qzem:
SuperFroyo has this already build in overlay. Developer of superfroyo was actually forced to include this script to get his rom working properly on other Legends.

EDIT: corrected my post because of false statement.
[Legend Android Development] smartsreenath:
bro not working........

i tried whitetigerdk rom .....i easily put ubuntu in my legend....

but cm6 after installing the zip and by typing cmds that you given .....shows read and write / system overlay already enabled......

but i can't put ubuntu on my mobile........

FOLLOW ME http://smartsreenath.blogspot.com/
[Legend Android Development] BlaY0:
I changed installation instructions in 1st post for less confusion and more rebooting ;) Ppl are very fond of rebooting (if it doesn't work let's reboot... twice) and not so happy if they need to find something out on their own :rolleyes:

I would release much more to this community but I don't have the nerves for "It doesn't work!", "It gives me an error.", "Can you guide me step by step.", "Can you tie my shoelaces." and alike.

Hmm, what exactly was changed? I'm asking because my script is supposed to be generic.
[Legend Android Development] TheGrammarFreak:
I'm not being funny, but I can deal with that if you like. I'm no expert, but I want to learn. So I'll happily deal with noobs for you. I learn how all your MODs work, answer the stupid questions, and the community benefits from your work.

----------------------------------------

Keep trying (don't repeat the same commands over and over though), the scripts are meant for use in recovery mode. Look through all zips/scripts you're using, understand what they do and you'll be able to get it to work. Also, when you say CM 6 do you mean Azure, nightlies or "SuperFroyo"? Also, ease off with the "...............". It makes it really hard to follow what you're saying. Help me to help you, yeah?
[Legend Android Development] maxq1:
OP/guys..finally got some time to give this a go but i'd like to confirm first:

is a swap partition necessary for overlay to work?

any suggestions on how much to allocate for the ext partition? would 512mb be enough?

would partitioning my sd card under gparted (in ubuntu) do? i just feel more comfy doing so on a pc than on my device

thanks in advance to anyone who could help!
[Legend Android Development] BlaY0:
1. Swap partition is not required (at least it wasn't when I last checked the requirements in 1st post).

2. 512 MB is more than enough... I tested with 128 MB.

3. Will do but there are some fine guides (with screenshots) even YouTube clips out there on how to do it with parted in recovery mode. Even any app2sd guide has its part on partitioning.
[Legend Android Development] cryshop:
BlaYo

1. I flashed your mod

2. Reboot.

3. Then do "adb shell aufs --enable"

4. It asked me restart to take effect.

5. After rebooting, I try to use Adfree but still get error.

6. Tried to install Metamorph, but no help also.

How could I check your mod is running well or not?

Running Mytouch Legend ROM with A2SD

Edit : Ok, I ran "aufs --enable" again and it says system overlay is already running, doing nothing... but adfree and metamorph are not in the house.
[Legend Android Development] TheGrammarFreak:
Ensure that a2sd is indeed being run before the overlay script is called. It's all kicking around in your /system/etc/init.d/ folder (the scripts in there run in a certain order, the number at the beginning of each scripts defines the order. 70aufs is the overlay script (I think))

As for checking: Run

adb shell mount

and look for something along the lines of

overlay on /system type aufs (ro,si=7aa272d7)

in there somewhere. If it's not something's wrong

EDIT:

CRAAAAP! I forgot something important:

If you start piddling around with init scripts (like renaming them to change orders, or editing the scripts in any way) you need to make it executable again... I think... Either way this can't hurt:

chmod 0750 [i]path-to-edited-script[/i]
[Legend Android Development] cryshop:
Thank you for quick response!

In etc/init.d/ my a2sd is 04apps2sd and overlay script is 70aufs. So basically, there's nothing wrong with that order right?

And for the checking : overlay : permission denied :(
[Legend Android Development] TheGrammarFreak:
No problem

Yeah, that order looks fine to me. :D

What command are you issuing to get that? The command I gave should be run when the phone is running normally, not in recovery mode if that's what you were doing. It'll also dump a lot of other stuff on the screen, you'll have to read through it a bit. :D
[Legend Android Development] cryshop:
Okay, ran the command again and it gives me no "overlay" thing :(

As I mentioned, I also tried to run "aufs --enable" again and it says : system overlay is already running, doing nothing...
[Legend Android Development] TheGrammarFreak:
Well, I get this:

C:\AndroidSDK\tools-clean>adb shell /system/xbin/aufs --enable
Read-write /system overlay is already enabled, doing nothing...

and AdFree works for me. So I'm not sure why it's not working for you...
[Legend Android Development] cryshop:
Don't worry, we will figure this out sometime :D

And there's a little problem : my device boots twice before getting to the homescreen (hmmm...)
[Legend Android Development] BlaY0:
OK, here's what you will do:

power-off your gizmo

hook it up with your PC (USB cable)

run adb logcat on your PC (it should sit there and wait for your gizmo to be available)

turn on your gizmo

wait until log pops up your command promt

stop logcat (CTRL+C)

...scroll back up and you should see (among 1st few lines of log) what's going on with overlay and report back.

That's not a normal behaviour.
[Legend Android Development] TheGrammarFreak:
I knew I'd forgotten something: logcat. Sorry.

Swyped from my HTC Legend
[Legend Android Development] BlaY0:
No sign of system overlay being set. And why's that? Because MyTouch Legend ROM doesn't incorporate run-parts mechanism so nothing from /system/etc/init.d is actually being run.
[Legend Android Development] TheGrammarFreak:
I'm not doubting you, but the apps2sd script is being run. Why is that?

EDIT: Also, assuming the apps2sd scripts that were found in init.d are the ones being run at the beginning, could you copy the contents of 70aufs into the apps2sd script, save it and chmod it? Would that get the overlay working?

Swyped from my HTC Legend
[Legend Android Development] BlaY0:
Nope. App2sd MyTouch ROM is using isn't actually run via run-parts from /system/etc/init.d but directly from init.rc. That script in init.d is there just because ;) I was curious myself and dled that ROM (needed like 15 minutes over HSDPA) just to convince myself.

EDIT: What is actually being run is /system/bin/a2sd which then launches /system/bin/launcha2sd with "boot" parameter. That /system/bin/a2sd is actually the same as that script from init.d. Well yeah, one could edit /system/bin/a2sd to run my /system/etc/init.d/70aufs also... that would certainly work.
[Legend Android Development] TheGrammarFreak:
Cool. Why did you download over mobile data? That must eat through contracted MB like nothing else...

Cryshop: I'd say you've got everything you need to make it work now. :D
[Legend Android Development] BlaY0:
Coz at home that's my pipe to the internets and I have unlimited plan so no worries...
[Legend Android Development] maxq1:
er..i think i got this to work on my device. but the thing is,

shouldn't the sysrw directory be on the ext3 partition of my sd card?

right now it's in /data (on the phone's internal memory, i think) and the only contents on the ext3 partition is a 0byte 'lost+found' folder.

things i did that were not on the first post:

mounted both sdcard & sd-ext (or ext-sd, which i assumed to be the ext partition) via partitions menus, clockworkmod recovery, on the first time i enabled overlay

mounted /system for '/system/xbin/aufs --enable' to work (only logical, i guess)

after enabling overlay & rebooting, tried re-doing it to check if it's working. had the results as attached (hope it's clear & big enough) along w/ the mount command (is there a parameter i'm missing for this?).

EDIT: ok, mount should be issued WHILE in normal mode, not recovery. posted before i read. sorry for this. my question still remains though...
[Legend Android Development] cryshop:
Cool, now I figured out what the problem is. Thank you for all your hard works (and helps) :D

@maxp1 : your screenshot looks exactly like mine :D
[Legend Android Development] foosoomin:
hello threadstarter,

May i enquire, will this modification turn our Legend onto a "S-OFF" Hboot device ?

Can you explain ?
[Legend Android Development] BlaY0:
You got it all wrong... you won't see a thing in recovery mode because overlay can not work in recovery mode... there's no aufs support in recovery's system kernel. What --enable does is just making a file in /data/local thus preparing system overlay to run in normal mode...

Well, as I said... after you enable you reboot into normal operation mode and check mount there. If you have ext2 or ext3 partition on sdcard (presuming you don't use app2sd) it should be mounted under /data/sd and in there sysrw directory should be created. If this ext2 or 3 partition was mounted before (like for the purpose of app2sd), then script uses its mountpoint and creates sysrw directory there. DarkTremor's app2sd mountpoint is /system/sd if I recall.

Now issue mount command from normal mode and show me its output.

Nope.

There is everything explained in 1st post.
[Legend Android Development] maxq1:
wow, i wasn't following directions, i guess. anyway, attached are my logcat & mount results BEFORE enabling overlay properly. but the thing is, after enabling overlay in normal mode, i get essentially the same results as before. sysrw is still under /data. am i doing something wrong? is it because i haven't mounted the ext3 part PRIOR to enabling overlay?

btw,

do you mean i have ext partitions but don't use it for apps2sd? if so, i think that's my case. i'm using azure 1.0.1 btw and i did/do move apps to the fat32 part of my sdcard.

man, really thanking you for your patience w/ me! just a little more please? :o
[Legend Android Development] BlaY0:
Hey m8, I'm really disappointed with you... from your 1st screenshot it can clearly be seen that script doesn't find your SD card in less than 5 seconds thus aborting SD mount and continuing with mount on internal storage...

Now issue:

adb shell ls -l /dev/block

...and paste output here (no screenshots plz, just copy/paste text from your command prompt).
[Legend Android Development] lndroid:
Great work! Works as a charm and thanks to this my phone is close to perfect. Keep it up!
[Legend Android Development] maxq1:
@ BlaY0

i think I already know what I’m doing wrong. geez, my bad. got it to work now though. i’m using darktremor’s apps2sd & now sysrw is on my /sd-ext. heap of thanks, man!
[Legend Android Development] maxq1:
on another note, this got me to think…

let’s say i installed something that made my device not to boot properly but i could get to recovery just fine. how do i revert to my base image/system then, assuming i’ve got overlay enabled previously? would simply deleting the sysrw folder (wherever it may be) within recovery do the job of booting properly to the base system?
[Legend Android Development] BlaY0:
Yes. I think I might have answered this before...
[Legend Android Development] maxq1:
yes, but in a different context. but won't deleting the sysrw directory have any dire consequences if you've got overlay enabled? i'm guessing not 'coz all it would find is a sort of a 'blank' overlay then boot to the base instead. is this correct? :confused:
[Legend Android Development] BlaY0:
No. Overlay script just creates sysrw directory if it isn't there, but you have to remove sysrw while in recovery mode. Deleting sysrw while in live system could bring your device into a boot-loop or it simply won't boot.
[Legend Android Development] TheGrammarFreak:
Nope, as long as the apps2sd script runs first you'll be fine. :D
[Legend Android Development] BlaY0:
One think to add. If you don't use app2sd and still have ext partition, it might fail to check it for errors if you don't have e2fsck on your system. CM does have it by default but others don't. But they have e2fsck_recvy, so you should make a symbolic link:

adb shell ln -s e2fsck_recvy /system/bin/e2fsck

...and it should work.
[Legend Android Development] lessirey:
Does anyone know if this would work on a rooted legend with htc stock froyo rom ?
[Legend Android Development] smartsreenath:
me too have the doubt:confused::confused::confused:

.
[Legend Android Development] whitetigerdk:
@BlaY0:

When source for kernel 32 is released would you then please consider adding aufs support for it? :)
[Legend Android Development] BlaY0:
If S-OFF comes first then we won't actually need it...

I personally don't believe, that we will get hands on kernel source this year. But there is still a slight chance that maybe HTC will surprise us ;)

Sent from my HTC Legend
[Legend Android Development] whitetigerdk:
Guess AlphaRev might be playing us like HTC ;) Last check they already patched hboot 1.00 but still not released anything.. they might even change name to HT(Second) .. lol..
[Legend Android Development] denisman:
Even with S-Off it would be nice if you find the time to release a new overlay after kernel release. After reading your posts about possible risks with S-Off, I'd prefer the safe overlay. Pretty sure I am not alone with this.

I'll just wait and see what happens. :D
[Legend Android Development] lessirey:
htc can never be trusted on anything :p

they just did it as you already know by now. hope overlay filesystem would be available for us too sooon...
[Legend Android Development] BlaY0:
OK, I reworked the script a little adding more error handling. Also changed installation script a little and dropped auplink binary.

It should work with my customized FroYo kernel although I didn't tested it as I use my own version which doesn't incorporate partition handling...

From now on I will update only aufs_no_kernel.zip.
[Legend Android Development] whitetigerdk:
Unfortunately it doesn't .. Tried both new kernel-mods.. with no kernel aufs script.. Stuck at HTC bootscreen.. :( don't have my own pc (at repair) so can't even do a logcat ) :( :( :(
[Legend Android Development] BlaY0:
Then I can not help.

One can debug this process manually... after installing the "update" and booting into normal mode connect your Legend to your PC and do:

adb shell
aufs --enable
stop zygote
/system/etc/init.d/70aufs

...and inspect the output. If everything is OK, you can restart GUI:

start zygote
exit

...and you're set.
[Legend Android Development] whitetigerdk:
unfortunately I can't..

Seems like the phone freezes before system is mounted so no way too boot it up.. and no way to be able to run "aufs --enable"... :(

Looking for a way to enable it directly in the rom..

Like we did it in my rev 4 for 2.1
[Legend Android Development] BlaY0:
Just boot into ClockworkMod recovery and remove /data/local/dosysoverlay file via adb. Reboot and follow the procedure from my previous post.

Sent from my HTC Legend
[Legend Android Development] bestv2:
aufs_no_kernel.zip doesn`t work in cm6.1_stable

whatever i do,it always says that read-only system

aufs --enable already
[Legend Android Development] BlaY0:
Find out why it doesn't work and I will fix it...

Sent from my HTC Legend
[Legend Android Development] bestv2:
thanks for your work~.~

:D
[Legend Android Development] BlaY0:
So I guess you won't do a logcat and find out where's the problem?
[Legend Android Development] bestv2:
eh~i will have a try
[Legend Android Development] bestv2:
sorry ,when i enable aufs or delete sth under /system in terminal emulator nothing happen in the logcat,confused:confused:
[Legend Android Development] BlaY0:
Aufs is initiated on system start so reboot your phone and catch first 100 lines of logcat...
[Legend Android Development] bestv2:
thank you,i`ve known what my problem is
[Legend Android Development] Briix:
Mine says out of memory when I try to write to /system.

How do I fix that?
[Legend Android Development] TheGrammarFreak:
Issue "mount" on your phone to see if the overlay was correctly set. Look for "overlay on /system" in the ouptut
[Legend Android Development] Briix:
rootfs on / type rootfs (ro)

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

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

proc on /proc type proc (rw)

sysfs on /sys type sysfs (rw)

none on /acct type cgroup (rw,cpuacct)

tmpfs on /mnt/asec type tmpfs (rw,mode=755,gid=1000)

none on /dev/cpuctl type cgroup (rw,cpu)

/dev/block/mtdblock3 on /system type yaffs2 (ro)

/dev/block/mtdblock5 on /data type yaffs2 (rw,nosuid,nodev)

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

shm on /dev/shm type tmpfs (rw,size=4096k)

/dev/block/vold/179:1 on /mnt/sdcard type vfat (rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)

/dev/block/vold/179:1 on /mnt/secure/asec type vfat (rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)

tmpfs on /mnt/sdcard/.android_secure type tmpfs (ro,size=0k,mode=000)

#

That's the output of the mount command
[Legend Android Development] TheGrammarFreak:
The overlay hasn't been initiated, get a logcat of the first 10 seconds of the boot. :D Also, check that your ROM meets the requirements.
[Legend Android Development] greenolive:
Hey guys!

Trying to make this overlay thing happen, but when I check the output of

/system/etc/init.d/70aufs, it says that my kernel has nog aufs-support. I thought

that CM6.1 did have this. Should I use the patch for kernels without aufs-support then,

or is this something perhaps a logcat can help solve?

EDIT:

And I should also mention that the script then continues to try and load the aufs module,

but fails and aborts.