Stericson / RootTools

RootTools Library
1.6k stars 484 forks source link

execute code ( not command ) as root #69

Closed oabukmail closed 6 years ago

oabukmail commented 7 years ago

Hello All

is it possible to execute part of code ( not commands ) as root

i have a code to open socket in deep of the system , and it gives permission denied

is it possible to run it as root ?

Fusion commented 7 years ago

If you mean Java code, then the process is a tad involved but you can find how to do this here: https://github.com/Stericson/RootTools/wiki/Java-as-root

oabukmail commented 7 years ago

ya , i saw this after posting the issue

but im still trying to make it work with android studio project structure since the RootClass still doesn't work with android studio structure