I use a Galaxy S5 (G900H) with rooted Android 5.0.
I am connecting a serial device to it via USB using cdc-acm driver (compiled in the kernel) and trying to read it from my android application, It works fine on other devices (older and newer).
When connecting the device, the device file /dev/ttyACM0 is created but when trying to read from it I receive an error Permission denied.
and setting SELinux to Permissive mode - everything works fine and the app reads the device file successfully.
After connecting the USB in Enforcing mode, the dmesg says:
I tried making a new policy using audit2allow but couldn't find any "denied" message to use in order to create an "allow" rule.
Is there any way to use the device file via my app without setting SELinux to permissive? I can edit the kernel and make a new one if needed, but I really prefer not to.