yashsingh1/xdaforums huggingface dataset:
[General Topics] htc fan89:
Don't Blame S.E for this, you Knew it had 1.6 on it. Hate when People expect the update to come that fast, It takes time for this to happen....
[Desire General] kilohercas:
Hi. i was able to luch HTC desire blue recovery screen, and flash official Froyo room without connecting to USB (before i have to connect to pc and lounch recovery-windows.bat file.

Here is pic ( is it new stuff or just i am very old ? )

Phone is NOT ROOTED
[Desire General] djoni1980:
there is nothing unusual about that... try reaching green recovery without root :p
[Nexus One General] nikmash232:
I'm having major call issues. Everybody keeps saying that my voice is changing or something over the phone. And there is a lot of static. How do I fix this? I am running Cyanogen Mod 6 RC2
[Nexus One General] samagon:
My voice went through some changes you describe when I was younger, don't worry, it will pass.

Seriously though, I've noticed the quality Change once or twice in the calls, not sure if people on the other end picked up any changes or not.
[Nexus One General] nikmash232:
Lol good one..yeah but I ended up installing cyanogen again thru recovery and it seemed to have fixed it. Hopefully I don't run into the same problem.
[Desire Android Development] antweb:
Hey guys!

Together with some others at android-hilfe.de I'm working on an overlay filesystem for the Desire.

We've chosen aufs (Another Unionfs) to implement our idea.

Basically, two filesystems are combined to a single one.

The first filesystem contains the initial data. The second one is used to overlap it.

Aufs first searches the second for files, then the first. We plan to use a fully writeable filesystem for the second and a secured filesystem for the first.

If you want to modify a file on the first partition, you can put it on the second filesystem and change it there.

So we can get indirect write access to the secured filesystem by mounting the aufs partition to the right path so that the system sees it as the original, secured filesystem.

In theory, a full r/w acces to the all partions on the phone could be possible.

Visit the project site for files and instructions.
[Desire Android Development] Beaverman20:
that is actually a pretty good idea... and would be awesome if it could be implemented ;) i have no experience in android development and would therefore not be at much help there, but i could help you with testing, as i don't use my phone for any important stuff :D
[Desire Android Development] billias:
Nice thought. Wish i could help :(
[Desire Android Development] daveba:
Great idea, and it seems it should work and will obviate the need for a eng-SPL.

Have you tried it ? You seem to have all the necessary bits (you don't really need the utils) so i'm not sure what else you need at this point. This should work with adb in normal mode (ie not recovery) as you should be able to remount the system ontop of itself like so:

adb shell

first to get to your desire root shell. Then do

insmod aufs2

Then create some persistent storage on your sdcard

mkdir /sdcard/sysrw

Then mount the dir

mount -t aufs -o br=/sdcard/sysrw=rw:/system=ro none /system

you should now be able to write to /system, so try doing a

touch /system/foo

If that works, you should be away.

Clearly your modules you provide above will be specific to a certain kernel and with so many ROMS out there i can't say it will work with the one i have so you can try and report back.

Putting the persistent storage on the sdcard means that when it is mounted via usb you will loose access to it and bad things will happen.

Also remember if this works you need to add this to your init scripts
[Desire Android Development] antweb:
This step fails. All I get is

mount: No such Device

Every ROM (with a custom kernel) will need some kernel patches anyways as otherwise many simbols are missing (and sure some other stuff, no clue what the aufs kernel patches do in detail). The attachements include a patched stock kernel. To try it out, you'll have to install the included kernel.

Yep, thats the next step after I get a successful mount.
[Desire Android Development] daveba:
So it looks like the mount command doesn't accept 'none' as a non-device argument perhaps which i find strange since /proc is one of those also. Are you getting any messages from 'dmesg' or 'logcat' ?
[Desire Android Development] billias:
My basic question:

If we use more and more the SD card, i believe we will drain more and more battery.

Apps2sd, system2sd etc

Or it is not draining more battery the extended sd usage?
[Desire Android Development] daveba:
Not much stuff gets written to /system constantly. Just a few changes so you shouldn't see much of a drain.
[Desire Android Development] daveba:
Ok, so it looks like this actually works. You can't put the rw partition on a VFAT sdcard partiton only. SO in theory if you make a ext{123} partition on your sdcard it should work. For now i tried with the writeable mtd /data partition on my CM nightly and all works. Look:

adb shell
modprobe aufs
lsmod (to check aufs worked)
mkdir /data/rw
mount -t aufs -o br=/data/rw=rw:/system=ro none /system
(no errors here)
touch /system/foo (YES IT WORKED)
ls -l /system/foo
-rw-rw-rw- 1 root root 0 Aug 8 20:30 /system/foo

A writeable /system !!!

And here is the real data on /data/rw

ls -l /data/rw/
-rw-rw-rw- 1 root root 0 Aug 8 20:30 foo

In theory Metamorph, adblock and all the rest that require /system should now work as expected.
[Desire Android Development] Nekromantik:
could you try metamorph?
[Desire Android Development] Erik97:
finally....
[Desire Android Development] cTrox:
Nice work!! :O

Edit: Ok I tried this but metamorph still gives me an error when trying to set it up.
[Desire Android Development] daveba:
Really ? I just tried it and it worked fine for me...
[Desire Android Development] Ireas:
Could anyone give a step by step guide on doing this?
[Desire Android Development] cTrox:
Oh I just saw, that metamorph is giving me an error because I havn't got enough free space in /system. How much do I need? I have 20MB free.
[Desire Android Development] shawe_ewahs:
+1 I'm very interested on this :D
[Desire Android Development] daveba:
Where did you put the writeable partition on ? Ensure it has enough space. I'm not sure exactly what checks metamorph does when it runs but it definetly succeeded for me.
[Desire Android Development] daveba:
It's exactly as i wrote in the previous page.

You'll need to ROM to have the aufs overlay 'filesystem' built in or as a module. If you're on CM6 you're lucky as it has it builtin (i was suprised it loaded when i did the modprobe myself as i didn't think it was included).

You should see a aufs.ko if it's built in as a module. Try running a jar/grep on your ROM of choice to see if it's included

jar tvf RoufianosV6.zip |grep aufs

gives no output, but

jar tvf cm_bravo-08082010-104323.zip |grep aufs
169400 Fri Feb 29 02:33:46 GST 2008 system/lib/modules/2.6.34.2-cyanogenmod/kernel/fs/aufs/aufs.ko

does.

You can do the steps described earlier (via adb) when your desire is fully booted as it doesn't require it at recovery only.

This needs to be pushed out to rom creators as it needs to be included in the startup scripts or else the next time you reboot your desire you'll lose all changes you made while the overlay was active.
[Desire Android Development] cTrox:
Oh that's why it didn't work I thought I might have to reboot the device to get access :D
[Desire Android Development] Souifen:
Thanx guys ! Someone tested on 2.2
[Desire Android Development] cTrox:
I tested it on the latest CM6 nightly, which is an 2.2 rom.
[Desire Android Development] Daelyn:
What a brilliant solution to our problem. Love it! I'll be watching this and will def. participate once I'm back from my vacation.
[Desire Android Development] Nekromantik:
anyone tried it with any of the 2.2 Sense ROMs?
[Desire Android Development] antweb:
Now I've got it. The problem was, that aufs couldn't write to /tmp.

mount -t aufs -o br=/data/local/rw=rw:/system=ro,xino=/sdcard/.aufs.xino none /system

The extra xino option does the trick.

I'm using it on a stock 2.1 ROM btw.
[Desire Android Development] xtcislove:
Ah there it is i knowed u will finish it =)
[Desire Android Development] totzkotz:
i am using cm6 latest nightly..

if created a directory on my ext partition

mkdir /system/sd/systemrw

and loaded the module with

insmod /system/lib/modules/2.6.34.2-cyanogenmod/kernel/fs/aufs/aufs.ko

and mounted the overlaysystem with

mount -t aufs -o br=/system/sd/systemrw=rw:/system=ro,xino=/sdcard/.aufs.xino none /system

all commands ran fine...

but when i would like to start an app it crashs with an FC
[Desire Android Development] brianius:
Amazing!!! Keep up the good work!

I'll try that in few days after my exams ;)

Sent from my HTC Desire
[Desire Android Development] serverless:
Tested on the latest CM6 nightly and it works great!!! Thank you soooo much!

No need to use adb shell though, I ran the commands using better terminal directly from the phone!
[Desire Android Development] daveba:
What app is crashing ? Are you sure it doesn't crash without the aufs /system ? What is the contents of /system/sd/systemrw ? Can you put your rw overlay on /data somewhere (i.e. the internal fs) and try again. I've set this up and it's working perfectly so fat (bar CM6 bugs). Also try without the 'xino' option as i showed in the first page of this thread.
[Desire Android Development] chuzwuzza:
How do I go about adding this to the init scripts of CM6 nightly?

I tried adding a file called 21aufs to /etc/init.d in recovery mode with the following contents:

#!/system/bin/sh
modprobe aufs
mount -t aufs -o br=/data/rw=rw:/system=ro none /system

and made it chmod 777, but now it just hangs at the white HTC boot screen.
[Desire Android Development] chuzwuzza:
Okay, managed to get it working by removing that file I created, and modifying /etc/init.d/03modules like so:

#!/system/bin/sh
#
# Load any extra modules

MODULES="aufs"

if [ "`getprop persist.net.ipv6`" = "1" ]; then
MODULES="$MODULES ipv6"
fi

for i in $MODULES;
do
modprobe $i;
done

mount -t aufs -o br=/data/rw=rw:/system=ro none /system;

Working fine now automatically :)
[Desire Android Development] daveba:
I not familiar exactly the startup process in android (well i haven't really looked into it) so i'm it could be just because the real /system is not yet mounted. Can you connect to it via adb at this point ? If not you'll need to write out some echo statements in the script to see how far you're really getting and then remove inspect your log file, so do something like

#!/system/bin/sh
echo entering aufs script >/data/aufslog.txt
mount >>/data/aufslog.txt
modprobe aufs
echo modprobe succeeded >>/data/aufslog.txt
mount -t aufs -o br=/data/rw=rw:/system=ro none /system
echo mount succeeded >>/data/aufslog.txt

Then if it hangs again, then reboot into recovery and inspect the aufslog.txt

However when rebooting the desire with any of the several roms i've tried, i get a 1 in 5 chance that it will hang at the white HTC screen. It's reported several times in this forum also so the hang you're getting may only be coincidental.
[Desire Android Development] daveba:
Great you got it working.!!

I'm hoping people will post in their respective ROM threads for this to become universally supported out-of-the-box.
[Desire Android Development] totzkotz:
ok tried with /data/rw and without the "xino" option and same result

EVERY app is crashing like before hmm

i looked into the /data/rw directory with adb shell and it was empty

maybe a2sd with dalvik on ext is the problem?
[Desire Android Development] daveba:
Then it's clearly not mounted correctly.

Can you actually do a

touch /system/filename
ls -l /system/filename

from adb ? I think probably not.
[Desire Android Development] Nekromantik:
do you neded to do that using adb while phone connected?

Also if it does not have it built in, how do you load it as a module?

thanks
[Desire Android Development] billias:
And the "bad" battery life?
[Desire Android Development] Nekromantik:
this has nothing to do with battery life
[Desire Android Development] Pyr0x64:
can this be used alongside a2sd+ on the same ext partition on the sdcard?

would the /system/sd mountpoint cause problems?

[edit] oops, mountpoint, not symlink.

thanks for confirming nagylaci, now i just need to figure out how to switch things around... :rolleyes:
[Desire Android Development] nagylaci:
I can confirm that it's not working. However, after I changed the mountpoint of the ext partition on the sdcard from "/system/sd" to "/sd-ext" it works flawlessly. I now have a writable SYSTEM partition and a2sd+. Thanks everyone for making this possible.
[Desire Android Development] neoKushan:
THat's pretty cool! Is this the kind of thing that can be added to a ROM, perhaps out of the box or as a .zip, or does it need to be manually set up?
[Desire Android Development] antweb:
You just need aufs and the right init scripts in the ROM. Then it should work out of the box.
[Desire Android Development] daveba:
antweb: can you change the subject from [DEV] to [FIXED] as this is now a fully working solution for a writeable /system which somewhat obviates the need for a full engineering SPL=off.
[Desire Android Development] neoKushan:
If I recall correctly, a full S-OFF bootloader would have some additional advantages as well, but still this is pretty damn cool.
[Desire Android Development] daveba:
Hence the word 'somewhat' in my sentence ;)
[Desire Android Development] antweb:
Done :)

You don't need the kernel sources to build the module for example ;)
[Desire Android Development] simonthor:
You need a odexed rom right?

Or is it ok if it's deodexed?
[Desire Android Development] LeeDroid:
Yes. We wouldn't need this as we would be able to aqquire full root!

Fantastic discovery!
[Desire Android Development] StuMcBill:
So is there a good possibility that this will be included in roms from now on?

I am not 100% sure I actually understand what to do with this, but I am sure it will become clear in due course!

Keep up the good work!

Stewart

Sent from my Amiga 500 using Workbench.
[Desire Android Development] ephumuris:
What init scripts to add to a rom?
[Desire Android Development] daveba:
Depends on your rom. An example for CM6 was shown a few pages back.

As mentioned earlier also we need the ROM creators to include the aufs module in their roms first.
[Desire Android Development] kingchris:
Why a so complicated script? I managed it that way:

#!/system/bin/sh
#
# Load any extra modules

MODULES="ipv6 aufs"

for i in $MODULES;
do
modprobe $i;
done

mount -t aufs -o br=/data/rw=rw:/system=ro none /system;

I can provide an Update.zip if needed for cm6 nightly
[Desire Android Development] simonthor:
Yes please. Can't make the normal script work.
[Desire Android Development] fireball2k:
I'd prefer if the update wouldn't change an existing script but just add a new one. :)
[Desire Android Development] daveba:
When i showed the example aufs mount command i didn't really want to be using /data as the backing store. The /data is very small and will fill up fast. What i suggest is (i've currently got a working script but not packaged in a update.zip as it's for my use only) that it checks for a /sdcard/sysrw.fs that is a unix fs which that supports links/sockets/etc which lives on the sdcard FAT partition (so you don't need to repartition your sdcard - i wonder why they don't use this for a2sd variants either) and then you loopback mount it as a writeable partition and overlay it on /system. I've currently got a 512Mb sysrw.fs that seems to be ample for metamorph, adfree and other apps i've installed. Just a few MB's written so far.

I can post my raw script if people are interested.

And i agree the script should not be merged with an existing script from CM6 but be a standalone script.
[Desire Android Development] jayshah:
Because there's an ease-of-setup vs. I/O trade-off when you have an ext* filesystem within a FAT one. I think it's most recommended when IO isn't too high, hence it isn't all that viable for A2SD or swap, but fine for something like this or a chrooted debian.
[Desire Android Development] fireball2k:
If you would use the FAT partition, you'd get a problem as soon as your device is connected to your PC and sharing it's data: the card gets unmounted. Thats why the "FroYo-way" of Apps2SD su*** - the apps become unavailable.
[Desire Android Development] Ireas:
Ok... wheres the error? o_o I'm on the last CM6 Nightly.

C:\Users\Aleks\Downloads>adb push aufs.ko /data/local/aufs.ko
1691 KB/s (3135164 bytes in 1.809s)

C:\Users\Aleks\Downloads>adb shell
~ # insmod /data/local/aufs.ko
insmod /data/local/aufs.ko
insmod: can't insert '/data/local/aufs.ko': invalid module format
[Desire Android Development] Pyr0x64:
not sure why you have an error, but the cm6 nightly builds already have an aufs.ko file in:

/system/lib/modules/2.6.34.2-cyanogenmod/kernel/fs/aufs/

i'd be very interested :)

a quick guide to creating and setting up the sysrw.fs file would be great too ;)
[Desire Android Development] Kali-:
on cm6 just type

# modprobe aufs
[Desire Android Development] antweb:
You're using the file from the first thread? It's only working with the kernel included in the other zip file.
[Desire Android Development] Ireas:
I see .... ok ok i misunderstood the whole situation.

So I need to edit 04modules (i know it was 03 in the example, but on my cyan its 04 for some reason) to load the aufs module on boot.

And and I need a ext partition for this~
[Desire Android Development] totzkotz:
still have the same problems with the newest cm6 nighlty (with a2sd+ and dalvik on ext partition)

what i've done:

in terminal emulator:

1. su

2. modprobe aufs

3. mount -t aufs -o br=/data/rw=rw:/system=ro none /system (with and without xino option)

when i then start an app the application proccess force closes...
[Desire Android Development] AdamG:
I will look into this tonight and see if it is worth including in OpenDesire.
[Desire Android Development] mathojojo:
I got the same error :

insmod: can't insert 'aufs.ko': invalid module format

(on CM6 RC1)

and "modprobe aufs" answer me the following :

modprobe: chdir(2.6.32.9-27243-g48d7a22): No such file or directory
[Desire Android Development] mathojojo:
It would be nice to include this in OpenDesire, if it is stable enough :D
[Desire Android Development] choco_donut:
It is all just work in progress. You can look at code.google.com/p/aufs-desire/

next days. Antweb is working on a documentation.
[Desire Android Development] antweb:
The module wasn't built for your kernel.

http://kerneltrap.org/node/11694
[Desire Android Development] Ireas:
Well modeprobe aufs

doenst do give me any result~ just line skipping
[Desire Android Development] jayshah:
That's good. No news is good news, as they say.

If you get no output, then it means no error. Try "modprobe helloxda" for an error message so you can see your modprobe does indeed work.
[Desire Android Development] Ireas:
Ok ok now, (at least i hope) i full understood this~ will mess around with this later~ x_x
[Desire Android Development] daveba:
Creating the sysrw.fs file is just a ext* filesystem. You can do it via adb or a console like so (you don't need to be at recovery). This will have a 512Mb fs.

busybox dd if=/dev/zero of=/sdcard/sysrw.fs bs=512M seek=1 count=0
mke2fs -F /sdcard/sysrw.fs

This script should happily work even if people don't want to use it as it checks for the existence of /sdcard/sysrw.fs first. You can distribute a gizpped empty filesystem for users to unzip on their /sdcard that will then let this script spring into action.

Here it is i'm doing this from memory since i'm at work).

if [ -f /sdcard/sysrw.fs ]; then
[ -d /mnt/system ] || mkdir /mnt/system

# We need to find the next available loop device, but busybox
# losetup is broken as it only looks in /dev and not /dev/block
# for loop devices so we need to do this manually
i=0 && while [ -b /dev/block/loop$i ]; do i=$((i+1)); done

mknod /dev/block/loop$i b 7 $i
losetup /dev/block/loop$i /sdcard/sysrw.fs
mount /dev/block/loop$i /mnt/system

if [ $? -eq 0 ]; then
# ok, so we succeed all above, so now only modprobe aufs and overmount
modrprobe aufs
mount -t aufs -o br=/mnt/system=rw:/system=ro none /system
fi

fi
[Desire Android Development] daveba:
You can also use 'lsmod' as i showed in the first page to check whether the module loaded succesfully, but no output is good in this case meaning the command succeeded.
[Desire Android Development] daveba:
100% agree, but you'll run out of internal space very quickly as i mentioned. I hadn't seen the 'out of space' icon on my phone until i started running this for a few days, then i realised i'd filled up /data/rw with metamorhph and other apps that were installing on /system.

I use the Froyo app2sd and it's quite nice. I have no probs not unmounting my sdcard as you can do everything without it. There's of course the 'dual mount sd widget' or 'wifi explorer' or ssh, or adb to access the card easily. The benefit of a writeable /system and an inbuilt froyo a2sd outweighs the small negation of usb mounting. So are you saying if i pop the card out of my desire then the non-froyo app2sd still works ? I thought it needed a partition on the sdcard ?
[Desire Android Development] mathojojo:
Ok, which ROM shall I install to get it working ? Do we have a list of compatible ROMs ??

Thank you
[Desire Android Development] fireball2k:
daveba: great work, just the way I wish it should be! I'll give it a try tonight :)
[Desire Android Development] Ireas:
AH now we talk in the right direction ;)

# lsmod
lsmod
aufs 131835 0 - Live 0xbf066000
bcm4329 172947 0 - Live 0xbf039000
ipv6 222589 30 - Live 0xbf000000

Hrhr :D *is now creating an ext3 partition*
[Desire Android Development] kingchris:
so i finished my update.zip

for all the others:

things you have to do.

if u wand to create a seperate script in init.d for aufs

create a file (05aufs)

you have to chmod 750 05aufs

you have to chown root:shell 05aufs

then it will be executet on boot

my 05aufs looks atm like this

#!/system/bin/sh
#
# Load any extra modules

MODULES="aufs"

for i in $MODULES;
do
modprobe $i;
done

mount -t aufs -o br=/data/rw=rw:/system=ro none /system;

and my updater-script like this:

mount("MTD", "system", "/system");
mount("MTD", "userdata", "/data");
package_extract_dir("system", "/system");
set_perm(0, 2000, 0750, "/system/etc/init.d/05aufs");
package_extract_dir("data", "/data");
delete("/data/rw/placeholder");
unmount("/userdata");
unmount("/system");

here the unsigned zip-file

http://www.multiupload.com/SNDKKW6LQK

edit: this will mount aufs to /data/rw.

feel free to modify!

@daveba cant you do the script like that?

if [ -f /sdcard/sysrw.fs ]; then
[ -d /mnt/system ] || mkdir /mnt/system

# We need to find the next available loop device, but busybox
# losetup is broken as it only looks in /dev and not /dev/block
# for loop devices so we need to do this manually
i=0 && while [ -b /dev/block/loop$i ]; do i=$((i+1)); done

mknod /dev/block/loop$i b 7 $i
losetup /dev/block/loop$i /sdcard/sysrw.fs
mount /dev/block/loop$i /mnt/system

if [ $? -eq 0 ]; then
# ok, so we succeed all above, so now only modprobe aufs and overmount
modrprobe aufs
mount -t aufs -o br=/mnt/system=rw:/system=ro none /system
fi
else
busybox dd if=/dev/zero of=/sdcard/sysrw.fs bs=512M seek=1 count=0
mke2fs -F /sdcard/sysrw.fs
fi
[Desire Android Development] antweb:
All ROMs that use the stock 2.6.29 kernel from HTC are compatible with the files from the first post. But you still have to install the patched kernel first.

CM6 does already include an aufs-ready kernel and the module.
[Desire Android Development] Ireas:
@kingchris

So you dont use an ext3 partition?
[Desire Android Development] kingchris:
not atm. i'll try to use the script from daveba for the next version
[Desire Android Development] daveba:
Yup, but i'm at work now and that script was from memory. Will try when i get a chance. If you have more time on your hands feel free to plagarize it and bundle it in a .zip