Is easy from Android but you need to use a JNI to run the native C++ code.
If you want to avoid using the FriendlyArm version and the need to sign with the platform-tools signature files, this code I created works well under Android 5 and above and also includes I2C
https://github.com/davemclaughlin/GPIOdriver