close

Android L 對於 Security 方面有更嚴密要求

很多driver問題解決之後(訊號正常,初始化動作正常),還是發現無法順利啟動

這是非常讓人摸不著頭緒的,尤其是在開發初期更是打擊自己信心

但是其實仔細看 kernel log 或是 android log 會發現有些裝置或是daemon無法開啟成功的現象

會顯示permission denied

這就是權限不足,在 android L 有採用新的 SELinux 管理方式 (kernel 3.0以上版本)

必須要針對不同使用需求去添加權限,否則都會有顯示permission denied

 

範例 denied { read write } for pid=2998 comm="Thread-206" name="fm" dev="tmpfs" ino=5151 scontext=u:r:system_app:s0 tcontext=u:object_r:fm_device:s0 tclass=chr_file permissive=0

解法

allow system_app fm_device:chr_file { read write };
or
allow system_app fm_device:chr_file rw_file_perms;

arrow
arrow

    傑克便便 發表在 痞客邦 留言(0) 人氣()