Thanks Stephen Smalley!
The problem was solved. I got the new yaffs2 version by "git clone git://
www.aleph1.co.uk/yaffs2" which you mentioned before, and using the ".sh"
file in it to replace the original yaffs2.
Now the change to the xattr of the file will last even after the reboot of
the emulator.
Dywisdomno1


2013/1/15 董钰 <dywisdom...@gmail.com>

> >What kernel are you using?
> I 've used "git clone https://android.googlesource.com/kernel/goldfish.git";
> to get my kernel souce code. and using "android-goldfish-2.6.29" branch.
> Found no xattr support for yaffs2, then used the patch from
> www.enck.org/tools/yaffs_xattr.patch
> to patch the kernel, and found the above problem.
>
> >Also, how are you invoking the emulator?
> I set ANDROID_PRODUCT_OUT to my out dir which have .img files. And 
> use"emulator
> -show-kernel -kernel kernel/goldfish/arch/arm/boot/zImage" to invoke the
> emulator
>
> >And which partition are you trying to modify?  /data or /system?
> I try to change the xattr of the file in /data/local.
>
> I'm wondering if i can get the detailed process to patch the kernel source.
> Thank you again for your help!
>
> Dywisdomno1
>
>
>
> 2013/1/14 Stephen Smalley <s...@tycho.nsa.gov>
>
>> On 01/13/2013 11:15 PM, 董钰 wrote:
>> > Hello
>> > I want to set security label(use xattr security.mylabel) of the file in
>> > Yaffs2 on Android.
>> > I've been able to use setxattr syscall to set security label, and use
>> > getxattr syscall to verify the change right after that.
>> > The problem is that the change is gone when i reboot the emulator.I used
>> > to try the same process on linux and ext2 filesystem,and the change
>> > will last like forever.
>> >
>> > Is is about the emulator? Or it is all about the support level of xattr
>> > in Yaffs2?
>> >
>> > Thank you for any help.
>>
>> What kernel are you using?  We had to patch the emulator kernel for SE
>> Android, back-porting a more recent snapshot of the yaffs2 code that
>> provides native support for xattrs and applying a further change to
>> ensure that new inodes are assigned a SELinux attribute on creation.
>>
>> Also, how are you invoking the emulator?
>>
>
>

Reply via email to