android - How to execute ADB commands within an app -


i've got partially rooted android device. partial root, mean can run root commands through adb. i've figured out how run these commands locally within terminal emulator on device itself. question is, how go writing code android application executes adb command (or multiple commands) button press? can't find explains how run direct adb commands through app interface. clarify, involves "su" not work on device. only accepts adb input root access.

not sure if works on android, have tried this:

runtime rt = runtime.getruntime(); process pr = rt.exec("adb root"); 

if provide more info need use adb in manner, there may better workaround. unlikely need behavior in app, , believe frowned upon. sounds want app have root, seems unportable , unnecessary approach.


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -