HTC Legend: full r/w access via overlay filesystem

Status
Not open for further replies.

c_man

Senior Member
May 3, 2010
334
6
0
London, UK
Hey all,

No idea at all if this is possible or even applicable to the Legend [I'm not a dev, but still learning about Android :D], but I thought it deserves a thread of its own just in case the method allows us to run metamorph on the Legend...

ValMar73 posted the quoted text below HERE

Dear All,

I just noticed that people applied a trick to desire roms to obtain a kind of writing permissions on /system. Essentially, they create a "shadow" /system dir and the system looks for files in this dir before getting the ones from system.

See the details here:

http://forum.xda-developers.com/showthread.php?t=748025

People could run metamorph on the Desire with this and they applied to CM6 nightlies (Desire version)

Now, this should be applicable also to the Legend, right? All that is needed is the aufs module for the kernel. Does anyone know if this module is in the kernel in CM6 for the Legend?

Valerio
If the above is not applicable to the Legend... MOD: please feel free to delete thread.
 
Last edited by a moderator:

lucloner

Member
Jul 18, 2010
14
0
0
I. they havn't succeed.

II. our kernel didn't include aufs, neither desire. you should compile module. it's called cross compile to get binaries via a pc.

or you can use aufs module for desire, with your own risk. anyway, it couldn't turn your legend to a bomb.

III. you should remount aufs to "the right mountpoint".

you should change fstab with update.zip <------ it could damage your system.

IV. sorry for my pool english.
 
G

GuestD1017

Guest
Theta did succeed. The thread is listed as Fixed. On Page 6 they are discussing how to best implement it.

Sent from my Desire using Tapatalk
 

BlaY0

Retired Recognized Developer
Sep 15, 2007
1,553
566
0
Medvode
Yes, it could be done. The principle is the same as on those Asus EEE PCs. Haven't read that Desire thread in all but I'm familiar with procedure to achive this. But the question is... is it worth? What would one gain with this? You still won't be able to remove fileas from system partition for real and you'll have references to "deleted" files on data partition which also will take space and inodes. So basically for any "deleted" file from system partition, you'll have less space on data partition.

First as lucloner said, you need aufs module. Then you'll need rw store. It can be directory on data partition or small image with file-system in it also on data partition. Then you have to mount aufs and mount-move partitions to the right places. It is imperative that this procedure is done as soon as possible in init.rc before any other service is run. Guys at Desire thread put the script into run-parts init.d script (I believe) which I wouldn't suggest. The possibility to damage the system is really infinitesimal and everything can be reversed. Also fstab is not an issue as there is no fstab in initramfs environment.

When I have time (possibly beginning of next week) I will prepare myself a cross-compiling environment for compiling kernel and try to compile aufs module for Legend's 2.6.29-5f084974 kernel. Then I will try to prepare init.rc with integrated aufs procedure.
 

BlaY0

Retired Recognized Developer
Sep 15, 2007
1,553
566
0
Medvode
Have you tried compcache on some embedded device yet? I mean what's the actual gain? You have to take into acount that you have slow processor and compression would take time thus battery would drain faster.
 

lucloner

Member
Jul 18, 2010
14
0
0
compcache is great! it performans in my pIII laptop with 480 ram and ubuntu 10.04.

if you want to more ram, compcache is faster and better than swap. and drain battery faster for sure.

as a module, it could be disabled. i just decide to try.

in wiki:
wiki.cyanogenmod.com/index.php?title=Swap_and_Compcache

-------------
no i've not tried it on embedded device.
forgive my damn english.
 
Last edited:

BlaY0

Retired Recognized Developer
Sep 15, 2007
1,553
566
0
Medvode
OK guys, I managed to cross-compile Legend's kernel and add aufs module. I tried it and it worked.

You can download kernel and aufs module for Legend 2.03.405.3 (kernel version 2.6.29-5f084974) and give it a shot. Be advised, that there is only kernel image (not boot.img) and actual module aufs.ko in this zip archive.

You can try aufs like this (of course you have to be root and know what you are doing):

Code:
insmod /<dir_to_aufs_module>/aufs.ko
mount -o remount,rw rootfs /
mkdir /aufs
mkdir /rw
mount -o dirs=/rw:/data=ro -t aufs none /aufs
...now you should see contents of /data in /aufs. Any changes to /aufs should now be reflected in /rw and /data stays intact. Be careful not to drain all RAM as you are playing on initramfs ;)

Please report back or feel free to continue the implementation.
 
Status
Not open for further replies.