Domanda

I have a daemon written in C language. I also have an android application that uses this daemon via socket. Daemon run with system. Is it possible to add compilled C daemon to android application and run it from application?

È stato utile?

Soluzione

I guess it is possible, but just in case your device is rooted.You should include the daemon as part of your application, see NDK if you don't know how to do it, and somwhere in your application code call it like

Runtime.getRuntime().exec("su root " + "path to daemon");

where 'su' is super user utility, which forks your application and executes daemon in sepparate proccess with elevated permissions.

Altri suggerimenti

I don't know much about this, but you can start here Android NDK

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top