Execute Root Commands and read output Xamarin
问题 I can't read the file from the root directory. How to do it? I use the command for reading Java.Lang.Process suProcess = Java.Lang.Runtime.GetRuntime().Exec(new string[] { "su", "-c", "cat /data/misc/vpn/state" }); but how do I get an answer? 回答1: The Java.Lang.Process class has some interesting Streams you will need to read from. InputStream and ErrorStream . First of all, after you have created your process, you will need to wait for it. This can be done nicely with .WaitForAsync() . This