Execute system command from Kotlin code?
Go to solution
Solved by wasab,
Kotlin can run on Java virtual machine so it can run all the standard Java libraries so just use the Java runtime.
Spoiler
Runtime.getRuntime().exec("...")
If you are programming on Android, "su" is an useful command if your phone is rooted. Your app can do crazy thing with the system.... Just some tips

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now