So, I have a custom Android application that works like System (built into the system application in my ROM). And Ive written a native daemon that works great and works as root. However, I was wondering how they can communicate? I know that I can have my own daemon creating a network socket, and the application connects to it, but using a local socket for IPC seems even better, but I'm struggling to find some code for it.
I decided that I could create a socket as described here , but I have no idea how to communicate with it in Java.
Any help would be greatly appreciated.
In addition, at first I wrote my own library and used JNI to communicate with it with Java, but quickly realized that it clearly works in the application context, so it cannot be run as root, which is a requirement, and something that can make own demon. Is using sockets a better alternative here or will binder work?
Thank you, ton!
source share