Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/343.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/187.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 如何将LightVpn配置为在没有根的情况下工作_Java_Android - Fatal编程技术网

Java 如何将LightVpn配置为在没有根的情况下工作

Java 如何将LightVpn配置为在没有根的情况下工作,java,android,Java,Android,我发现这个项目非常适合我想做的事情,但它需要根访问权限。如果我使用平台密钥对APK进行签名,并在设备没有根目录的情况下将其放在system/app目录中,是否有办法实现这一点 public static Process run(String command) throws IOException { ProcessBuilder builder = new ProcessBuilder("su"); Process p = builder.start(); DataOutputStr

我发现这个项目非常适合我想做的事情,但它需要根访问权限。如果我使用平台密钥对APK进行签名,并在设备没有根目录的情况下将其放在system/app目录中,是否有办法实现这一点

public static Process run(String command) throws IOException {
  ProcessBuilder builder = new ProcessBuilder("su");
  Process p = builder.start();
  DataOutputStream dos = new DataOutputStream(p.getOutputStream());
  dos.writeBytes(command + "\n");
  dos.flush();
  dos.writeBytes("exit\n");
  dos.flush();
  return p;
}

等一下。。。如何使用平台密钥签名???用于定制rom