我想在运行时从正在运行的android avd中提取文件并执行此操作:
String[] cmd ={ "adb pull /sdcard/dataFolder/dataFile /path/folder/"};
try{
Process pr = run.exec(cmd);
pr.waitFor();
System.out.println("cmd execution done");
pr.destroy();
} catch (IOException e) {
System.out.println("IOException");
e.printStackTrace();
} catch (InterruptedException e) {
System.out.println("InterruptedException");
e.printStackTrace();
}
打印“cmd execution done”但不将文件拉入本地文件夹。使用来自终端的相同命令可以正常工作。我哪里错了?