I'm going to write an Android App to read raw packet from native code with raw socket interface. My phone is rooted so my native code can access to the native code by using runtime.exec("su"). But I don't know how to efficient transfer packets between the native code and Java code. (In this case, the native code and Java code are running in different processes) Since my App must process the raw packets from the native code as efficient as possible, I need a "fast tunnel" between them. Any ideas or suggestions?
P.S. I have tired Android NDK, but in NDK, native code and Java code are running in the same process so the native code cannot have the root privilege to access raw socket.