yaffs 加入selinux
来源:互联网 发布:网络财经视频直播 编辑:程序博客网 时间:2024/04/30 00:55
拷贝到内核目录
patch -p1 > yaffs_xattr.patch
froyo : ext4 instead of yaffs2
I'm trying to moun /data with ext4 instead of yaffs2 on a froyo
emulator.
1- I enabled the support of ext3 and ext4 in the .config and built a
new kernel
2- I launched the emulator with the new zImage to make sure that there
was no error. No error
3- I replaced yaffs2 with ext4 in the init.rc inside froyo source and
built new system.img and ramdisk.img
mount yaffs2 mtd@userdata /data nosuid nodev --> mount ext4
mtd@userdata /data nosuid nodev
4- I launched the emulator and I got errors. Errors occur: services
always die and there is problem with the framework. Here is a sample
of the error message:
D/AudioHardwareInterface( 152): setMode(NORMAL)
I/CameraService( 152): CameraService started: pid=152
I/AudioFlinger( 152): AudioFlinger's thread 0xb3f0 ready to run
E/keystore( 158): chdir: /data/misc/keystore: No such file or
directory
D/AndroidRuntime( 157):
D/AndroidRuntime( 157): >>>>>>>>>>>>>> AndroidRuntime START
<<<<<<<<<<<<<<
D/AndroidRuntime( 157): CheckJNI is ON
E/dalvikvm( 157): Can't open dex cache '/data/dalvik-cache/
system(at)framework(at)core.
directory
I/dalvikvm( 157): Unable to open or create cache for /system/
framework/core.jar (/data/dalvik-cache/
system(at)framework(at)core.
D/dalvikvm( 157): Unable to process classpath element '/system/
framework/core.jar'
E/dalvikvm( 157): Can't open dex cache '/data/dalvik-cache/
system(at)framework(at)ext.
directory
I/dalvikvm( 157): Unable to open or create cache for /system/
framework/ext.jar (/data/dalvik-cache/
system(at)framework(at)ext.
D/dalvikvm( 157): Unable to process classpath element '/system/
framework/ext.jar'
E/dalvikvm( 157): Can't open dex cache '/data/dalvik-cache/
system(at)framework(at)
directory
I/dalvikvm( 157): Unable to open or create cache for /system/
framework/framework.jar (/data/dalvik-cache/
system(at)framework(at)
D/dalvikvm( 157): Unable to process classpath element '/system/
framework/framework.jar'
E/dalvikvm( 157): Can't open dex cache '/data/dalvik-cache/
system(at)framework(at)
file or directory
I/dalvikvm( 157): Unable to open or create cache for /system/
framework/android.policy.jar (/data/dalvik-cache/
system(at)framework(at)
D/dalvikvm( 157): Unable to process classpath element '/system/
framework/android.policy.jar'
E/dalvikvm( 157): Can't open dex cache '/data/dalvik-cache/
system(at)framework(at)
directory
I/dalvikvm( 157): Unable to open or create cache for /system/
framework/services.jar (/data/dalvik-cache/
system(at)framework(at)
D/dalvikvm( 157): Unable to process classpath element '/system/
framework/services.jar'
E/dalvikvm( 157): ERROR: no valid entries found in bootclasspath '/
system/framework/core.jar:/
framework.jar:/system/
services.jar'
W/dalvikvm( 157): JNI_CreateJavaVM failed
E/AndroidRuntime( 157): JNI_CreateJavaVM failed
I/ServiceManager( 27): service 'media.audio_flinger' died
I/ServiceManager( 27): service 'media.player' died
I/ServiceManager( 27): service 'media.camera' died
I/ServiceManager( 27): service 'media.audio_policy' died
I/ ( 159): ServiceManager: 0xacd0
D/AudioHardwareInterface( 159): setMode(NORMAL)
I/CameraService( 159): CameraService started: pid=159
I/AudioFlinger( 159): AudioFlinger's thread 0xb3f0 ready to run
Did I miss something to mount succesfully /data with ext4?
- show quoted text -
--
unsubscribe: android-kerne...@googlegroups.com
website: http://groups.google.com/group/android-kernel
Thanks for your reply. To enable the support of ext4 I added the
following lines to .config if they were not written or if the value
was set to n.
CONFIG_EXT4_FS=y
CONFIG_EXT4DEV_COMPAT=y
CONFIG_EXT4_FS_XATTR=y
CONFIG_EXT4_FS_POSIX_ACL=y
CONFIG_EXT4_FS_SECURITY=y
CONFIG_JBD=y
CONFIG_JBD2=y
CONFIG_FS_MBCACHE=y
CONFIG_FS_POSIX_ACL=y
I launch make ARCH=arm CROSS_COMPILE=<froyo_path>/
toolchain/arm-eabi-4.4.0/bin/
At the end I get a new zImage file.
Then I modify the init.rc in the froyo folder.
mount yaffs2 mtd@userdata /data nosuid nodev -> mount ext4
mtd@userdata /data nosuid nodev
I launch make to get new system.img ramdisk.img and userdata.img.
That's all I've done. I also tried to use /dev/block/mtdblock1 instead
of mtd@userdata but it didn't work.
Andria
On 10 mai, 03:26, Arindam Roy <rarin...@gmail.com> wrote:
> Hello Andria,
> I am assuming you built the driver as part of kernel aend did not make it a
> module.
> Also, how are ensuring while building the system.img, and ramdisk.img,
> proper ext4 filesystems are being built.
> Can you share the command line, or make file changes?
> Thanks,
> Arindam
>
>
>
>
>
>
>
when I try to compile a newer version than froyo, it writes that I
need a 64-bit computer.
Thanks
Andria
On 10 mai, 03:34, Arindam Roy <rarin...@gmail.com> wrote:
> Also, in Froyo, it might not be a good idea to enable ext4.
> Because the framework code may not be handling the buffering issue for ext4,
> as being done in GB.http://android-developers.
>
> <http://android-developers.
> Thanks,
> Arindam
>
>
>
>
>
>
>
> > Hello Andria,
> > I am assuming you built the driver as part of kernel aend did not make it a
> > module.
> > Also, how are ensuring while building the system.img, and ramdisk.img,
> > proper ext4 filesystems are being built.
> > Can you share the command line, or make file changes?
> > Thanks,
> > Arindam
>
http://osdir.com/ml/android-
-----Original Message-----
From: andria
Sent: 10/05/2011, 2:47 PM
To: Android Linux Kernel Development
Subject: [android-kernel] Re: froyo : ext4 instead of yaffs2
One more thing, I use froyo because I don't have a 64 bit computer.
when I try to compile a newer version than froyo, it writes that I
need a 64-bit computer.
Thanks
Andria
On 10 mai, 03:34, Arindam Roy <rarin...@gmail.com> wrote:
> Also, in Froyo, it might not be a good idea to enable ext4.
> Because the framework code may not be handling the buffering issue for ext4,
> as being done in GB.http://android-developers.
>
> <http://android-developers.
> Thanks,
> Arindam
>
>
>
>
>
>
>
so I manually did the update. I'm now able to compile gingerbread
thanks to you.
mike > I need ext4 because I'll have to use the extended attributes.
I'm on gingerbread now. I did the same steps to enable the support of
ext4 but I got the same errors. I noticed that I didn't post the dmesg
output. Here is what is logged
<6>yaffs: dev is 32505856 name is "mtdblock0"
<6>yaffs: passed flags ""
<4>yaffs: Attempting MTD mount on 31.0, "mtdblock0"
<4>yaffs_read_super: isCheckpointed 0
<4>save exit: isCheckpointed 0
<4>goldfish_nand_read: invalid read, start 400, len 200, dev_size
4000000, write_size 800
<3>end_request: I/O error, dev mtdblock1, sector 2
<3>EXT4-fs: unable to read superblock
<6>yaffs: dev is 32505858 name is "mtdblock2"
<6>yaffs: passed flags ""
<4>yaffs: Attempting MTD mount on 31.2, "mtdblock2"
<4>yaffs_read_super: isCheckpointed 0
There is an error when the system tries to mount /data. Do you think
that it is due to system.img and/or ramdisk.img? Maybe they are meant
to be used with yaffs2.
Thanks
On 10 mai, 21:30, mike digioia <mpd...@gmail.com> wrote:
> But you don't need anything special on your build computer except the
> updated tools necessary for 64 bit. Like java 6 etc. My computer I am using
> for Gingerbread development is an old (7years old) IBM thinkpad.
>
>
>
>
>
>
>
To use a raw mtd device you need to use either yaffs2, jffs2, ubifs
On a MMC device you can use an ext filesystem but you cannot use yaffs2, jffs2 or ubifs
you can't mount ext4 on top of a mtd device. It requires to have a
block device mtd is a flash devices. Becuase ext4 don't know about
wearleaving and other flash specefic things you can not use it
directly on top of a flash device.
cheers Kolja
> unsubscribe: android-kerne...@
> website: http://groups.google.com/
Then I modify the init.rc in the froyo folder.I launch make to get new system.img ramdisk.img and userdata.img.
mount yaffs2 mtd@userdata /data nosuid nodev -> mount ext4
mtd@userdata /data nosuid nodev
Normally userdata.img contains yaffs2 file system so trying to mount it as ext4 will fail.
You can create ext4 filesystem img using f.ex loop device. Use unyaffs to extract userdata.img.
HTH
--
Name Less, the Jedi
Just a friendly Jedi Knight
> mike > I need ext4 because I'll have to use the extended attributes.
Just FYI, upstream yaffs2 supports extended attributes; I have it
working with SELinux (with a couple of small changes that I posted to
the yaffs mailing list).
Stephen > I'll take a look at it. Is it the same patch that was used
for yaffs2 in TaintDroid? What you were working on seems interesting.
What I intend to do is information flow control. Does the version of
SELinux that you use depends on LSM hooks? Is there a link to your
project or its wiki?
Name Less, the Jedi > What do you mean by f.ex? I downloaded the
unyaffs tool but it doesn't work. But you give me a first clue so I'm
gonna find an unyaffs-like tool.
I thought about an other way: instead of yaffs2 image how about
building an ext4 img directly? It seems like the yaffs2 img are built
by the mkyaffs2image command. So maybe I can replace it with
make_ext4fs.
I'll catch you up if I succeed
suggested earlier. The build command worked well after that.
On 12 mai, 11:45, Arindam Roy <rarin...@gmail.com> wrote:
> Hello Andria,
> Good news at least manual merge worked.
> Thanks,
> Arindam
>
>
>
>
>
>
>
Name Less, the Jedi > What do you mean by f.ex? I downloaded the
unyaffs tool but it doesn't work. But you give me a first clue so I'm
gonna find an unyaffs-like tool.
f.ex == for example. Basically create file of desired size using dd:
dd if=/dev/zero of=10MBfile bs=10485760 count=1
then associate it with loop device
losetup -f 10MBfile
make filesystem
mkfs.ext /dev/loop0 <-- use loop device reported by losetup above
Than you can mount it
mount /dev/loop0 /mnt/somedir
and put all the files you need/want.
unyaffs takes single argument being name of yaffs img file and unpacks it to current dir
I thought about an other way: instead of yaffs2 image how about
building an ext4 img directly? It seems like the yaffs2 img are built
by the mkyaffs2image command. So maybe I can replace it with
make_ext4fs.
In the long run this would be better.
You can have a look on CyanogenMod sources as I remember seeing mentions on using ext filesystem in prebuilt images.
> Thanks evrybody for your responses
>
> Stephen > I'll take a look at it. Is it the same patch that was used
> for yaffs2 in TaintDroid?
No, upstream yaffs2 added native support for extended attributes last
year. You can just clone the upstream yaffs2 repository and patch it
into your kernel. If you want new files to automatically have security
attributes set upon creation, you also need the patch I posted to the
yaffs mailing list.
Git repo:
git clone git://www.aleph1.co.uk/yaffs2
Mailing list:
http://lists.aleph1.co.uk/cgi-
> What I intend to do is information flow control. Does the version of
> SELinux that you use depends on LSM hooks?
Truly enforcing information flow control requires mandatory access
controls in the kernel.
Yes, it depends on LSM hooks (but both LSM and SELinux are part of the
mainline kernel, so it just requires enabling the requisite kernel
configuration options and rebuilding).
> project or its wiki?
Not yet; it is still in the early stages.
- yaffs 加入selinux
- 将SELinux的安全特性加入安卓
- 将SELinux的安全特性加入安卓
- selinux
- SELinux
- SELinux
- SELinux
- SELinux
- SELinux
- selinux
- SELinux
- SElinux
- Selinux
- SELinux
- SElinux
- selinux
- SElinux
- selinux
- 弹出对话框,背景颜色逐渐变暗!
- 同人游戏开发手记(三) - 第二章 守护者之剑系列 (2.1 ~ 2.2)
- gsoap测试程序
- 即时通讯音视频开发产品介绍
- 项目一改变数组串
- yaffs 加入selinux
- 苹果产品分辨率
- 75个最佳Web设计资源
- 为什么C++(中文版——感谢waterwalk翻译) -刘未鹏程序语言系列
- 这个程序说什么也点发,,你们懂得!
- Myeclipse8.6下Hibernate框架的配置
- oracle 10046 sql trace
- “使用的设备标识号已超出本地系统范围”
- 指来指去--学指针,找最值