java - Write GPIO value from Android application using Binder -
i want change value of gpio android application on android 4.2.2.
i tried using application jni can not write value file. reason root able write file , application runs user permission given android or system user. none of them can write value file.
a possible solution create native daemon , have app communicate through sockets. load system , not sure if secure.
another solution create server , client process , have them communicate through binder. client application , send commands server.
my question is: type of process should server in order able have root permissions , used binder , android app?
thanks
if building own custom rom via daemon or custom service, noted. either way work , wouldn't impact system cpu load, if done correctly. using service , binder
typical way done in android , how of system services work. need careful, though. not open security hole in system (allowing app bind service , therefore "talk" kernel), inadvertently violate cdd if make service part of android namespace. service or daemon have process run 'system' user on rom in order gain access kernel exposed device handle. if started via init easy do. see init.rc
documentation or existing 1 example.
Comments
Post a Comment