I'm working on a rooted Android 2.3. In my application, using jni mechanism I call a native (c/c++) function that needs root permissions to operate, thats why it always fails (even though my phone is rooted - because the specific process/app need to grant the root permission) .
I want to move that function to an external executable that will run on the linux by the command "sudo exec_name" that I will run from java (Runtime.getRuntime().exec("sudo ...");)
So
1) How can I compile a native executable? (not a library as usual [.so])
2) After I have a stand alone executable, where in the system I have to put it and with what permissions?