Change system time & write GPIO value by APP in Android JB 4.3

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Change system time & write GPIO value by APP in Android JB 4.3

784 次查看
tftu
Contributor III

Hi All,

     I think this is a general question for Android JB 4.3 which include a new security control, SELinux.

     Our project originally was based on imx6 & Android ICS 4.0.3, due to cost concern we downgrade the CPU to imx6 Sololite but upgrade the BSP to Android JB 4.3 w/o choice since it's the only available version for imx6 Sololite. But due to JB 4.3's strict security, our below solution for "system time change & writing GPIO value by APP" which works in ICS 4.0.3 is failed in JB 4.3:

1. Add below into /device/fsl/imx6/etc/init.rc :

chmod 666 /dev/alarm (for system time)

chmod 666 /sys/class/gpio/gpio12/value

2. Implement OnTimeChangedListener for system time update in APP

3. Execute shell command in APP to control the GPIO

     Have surveyed and realize maybe JNI is a possibility but we'd like to know if we still can apply the same by adding the "write-in" permission as above mentioned? All suggestions and comments are more than welcome!

-tftu

标签 (3)
0 项奖励
回复
0 回复数