Accessing sysfs as RW from a sandboxed app

The cdef and adef files have the “requires:device:” section that allows the mapping of a device into an application or component. It allows, as the first parameter, the file permissions required of the device.

We have a device driver that uses the LED driver framework, which exposes files in /sys/class/leds for control.

The Linux LED framework creates these with 644 permission, and as such we cannot write to them when we use “requires:file:” in our cdef file to pull it in.

What is the proper way to bring in devices exposed using the /sys/ framework so a sandboxed component can use it like you can with a /dev device?

Hi BillD,
To my understanding, there are no direct way to achieve it as a sandboxed app.

But you may refer to gpioService to create your own LED service API for the sandboxed app to use, thus no need to manage /sys/ in the sandboxed app.

Hope it helps.