I using serialmanager to access serial port in android. below step:
1. add /dev/ttymxc1 0660 system system in fsl/wibo_8mq/ueventd.freescale.rc
2. add /dev/ttymxc1 u:object_r:serial_device:s0 in fsl/wibo_8mq/sepolicy/file_contexts
3. add allow system_app serial_device:chr_file { getattr open read write ioctl}; in fsl/wibo_8mq/sepolicy/system_app.te
4. move serialchat to package/apps dicectory.
5. add LOCAL_CERTIFICATE := platform in Android.mk of serialchat dicectory.
6. add android:sharedUserId="android.uid.system" in AndroidManifest.xml of serialchat directory.
But when i run serialchat than console show serialxxxjni can't not open /dev/ttymxc1. I guess not get permission. So i setenforce 0 in console than close and run the apk. The serialchat can access serialport. Have any one can suggestion ?
I guess the apk not get permission from selinux.