有关init.rc里面的问题,请高手赐教
请问下,init.rc里面有这样一段:chown system system /sys/class/leds/keyboard-backlight/brightness
chown system system /sys/class/leds/lcd-backlight/brightness
chown system system /sys/class/leds/button-backlight/brightness
chown system system /sys/class/leds/jogball-backlight/brightness
chown system system /sys/class/leds/red/brightness
chown system system /sys/class/leds/green/brightness
chown system system /sys/class/leds/blue/brightness
chown system system /sys/class/leds/red/device/grpfreq
chown system system /sys/class/leds/red/device/grppwm
chown system system /sys/class/leds/red/device/blink
chown system system /sys/class/leds/red/brightness
chown system system /sys/class/leds/green/brightness
chown system system /sys/class/leds/blue/brightness
chown system system /sys/class/leds/red/device/grpfreq
chown system system /sys/class/leds/red/device/grppwm
chown system system /sys/class/leds/red/device/blink
这段语句有什么作用?现在知道 /sys/class/leds/red/device/blink 这个会在lights.c中使用,为什么要更改文件的拥有者? --------------------编程问答-------------------- 应该是为了权限控制~ 确保system可操作,而普通应用程序不能随便操作硬件 --------------------编程问答-------------------- chown /sys/class/leds/red/device/blink 是为了让你的运行系统可以任意的去读写这个目录下的库文件或执行文件,保证系统运行的时候不会因为权限问题阻碍运行。
补充:移动开发 , Android