I have a rooted phone and on it an application that I've built. My application receives su powers from the superuser app and can call commands that require root, but the problem is that I have a piece of code that has to run from a process with root uid, and the file can't be compiled separately.
Now, is it possible to fork my process and run the child process as root:root? or somehow change the uid to root (I've tried with seteuid / setuid and it didn't work.. probably because the application's setuid flag is off).
I would like something like this:
fork process
if (child-process)
run_special_code()
else
wait_for_the_child_process_to_exit()
Thanks!