How is the GPIO access possible from within an Android (Java) app? How do we need to set permissions to access sysfs?
The Java method
<code> public boolean activationPin(){</code>
<code> String command = String.format("echo %d > /sys/class/gpio/export", this.pin);</code>
<code> try {</code>
<code> Runtime.getRuntime().exec(new String[] {"su", "-c", command});</code>
<code> return true;</code>
<code> } catch (IOException e) {</code>
<code> return false;</code>
<code> }</code>
<code> }</code>
leads to the exception "java.io.IOException: Cannot run program "su": error=13, Permission denied"