Using the legacy sysfs GPIO under Android and Linux the first step in the process is toe export
the particular GPIO pins you want to use. And when you are done with
Note: GPIO access via this legacy sysfs interface has been deprecated since version 4.8 of the Linux kernel (https://www.kernel.org/doc/Documentation/gpio/sysfs.txt). It will removed from kernel in 2020. The new way of doing GPIO is via the “descriptor-based” character device ABI (Application Binary Interface). You should do a research for Libgpiod (Library General Purpose Input/Output device) and start at https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/about/