Permission denied for ttyACM0 Port in nexus 5
Asked Answered
S

1

0

I am trying to connect external GSM modem with nexus 5 and send AT command using android RIL layer.I am using android 5.0 AOSP for nexus 5 downloaded from Google source.

Error: Permission denied with trying to open ttyACM0 port. i have checked this by changing permissions but still permission denied error.

Does there any other permissions do i have to change to open port?

Squirrel answered 24/4, 2015 at 10:3 Comment(0)
M
2

You are getting permission denied because the Android RIL doesn't have the appropriate selinux(Security Enhanced Linux) permissions for that device. As the RIL already has rw permissions to the files in the radio_device context as shown below and in this link.

allow rild radio_device:chr_file rw_file_perms;

So, just change the context of your device file to radio_device so that the RIL has the appropriate permissions to access it by adding the line below to file YOUR_BUILD_DIRECTORY/external/sepolicy/file_context and hopefully it should work.

/dev/ttyACM0        u:object_r:radio_device:s0
Moureaux answered 10/6, 2015 at 10:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.