Android udev /dev 设备节点权限

/*************************************************************************
 *                  Android udev /dev 设备节点权限
 * 说明:
 *     现在的Linux系统设备节点权限一般都是通过动态配置,之前一直没找到具体
 * 在哪里配置的说明,这次在看参考书的时候发现ueventd.rc就是用来做这件事的。
 *
 *                                   2016-5-14 深圳 南山平山村 曾剑锋
 ************************************************************************/

一、参考文档:
    Embedded Android
        https://www.google.co.id/url?sa=t&rct=j&q=&esrc=s&source=web&cd=5&ved=0ahUKEwiWwcrbqtjMAhWDppQKHdhjBroQFgg5MAQ&url=http%3A%2F%2Fwww.staroceans.org%2Fkernel-and-driver%2F%255BEmbedded.Android(2013.3)%255D.Karim.Yaghmour.pdf&usg=AFQjCNHe5Ey14egLQXgmOpP-PGN510ALgA

二、原文:
    1. 页码:58
    2. 内容:
    udev events
    As I explained earlier, access to devices in Linux is done through nodes within the /dev directory. In the old days, Linux distributions would ship with thousands of entries in that directory to accommodate all possible device configurations. Eventually, though, a few schemes were proposed to make the creation of such nodes dynamic. For some time now, the system in use has been udev, which relies on runtime events generated by the kernel every time hardware is added or removed from the system.  In most Linux distributions, the handling of udev hotplug events is done by the udevd daemon. In Android, these events are handled by the ueventd daemon built as part of Android’s init and accessed through a symbolic link from /sbin/ueventd to /init. To know which entries to create in /dev, ueventd relies on the /ueventd.rc and /ueventd.<device_name>.rc files.

三、总结:
    之前遇到需要修改权限之类的事情,一般都是在init.rc中进行修改,那时候觉得挺奇怪的,因为一般会有专门给设备节点设置权限的文件,那里明显不是,但也没找到准确的地方,现在终于找到依据了。

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值