How can i edit the file in the sys directory using JNI and NDk in android.
Actually i Need to edit these file "/sys/class/gpio/gpio41/value"
.
Asked
Active
Viewed 1,922 times
-1

Rune FS
- 21,497
- 7
- 62
- 96

user1925921
- 120
- 1
- 10
-
1NDK or not, this is not doable on a non-rooted device. Once the device is rooted, however, it's regular file I/O. Are you stuck on the latter? – Seva Alekseyev Feb 15 '13 at 02:14
-
@SevaAlekseyev By changing the mode I can nw edit the file using: chmod 777 /sys/class/gpio/gpio41/value – user1925921 Feb 15 '13 at 05:11
-
OK, so what's your question now? By the way, when the situation changes, it's better to edit the question rather than write comments. – Seva Alekseyev Feb 18 '13 at 17:37