lundi 28 mars 2016

sysfs read/write permission for an android app

Hi,

I have been writing a simple application where I want to toggle GPIO pin.
I am trying to export a gpio pin and then set direction and value.

But I am getting following error.
java.io.FileNotFoundException: /sys/class/gpio/export: open failed: EACCES (Permission denied)

Can any one tell me, how would I provide the required permission ?
Note that, with adb commands I am able to export the gpio pin and set the direction or values.

From app level its not working.

Thanks


from xda-developers http://ift.tt/1REMut5
via IFTTT

Aucun commentaire:

Enregistrer un commentaire