当前位置:首页 > 操作系统 > MacOs

mac java执行adb devices命令

public static void main(String[] args) {

Process process = null;

String osName = System.getProperty("os.name 


");

String command = "/Users/zhouhaijun/androidsdk/android-sdk-macosx/platform-tools/adb devices";   //sdk所在位置

try

{

process=Runtime.getRuntime().exec(command);

InputStreamReader ir  =new InputStreamReader(process.getInputStream());

LineNumberReader input= new LineNumberReader(ir);

String line;

while((line=input.readLine())!=null)

System.out.println(line);

}

catch(IOException e){

System.err.println("IOException"+e.getMessage());

}

System.out.println(osName+"/n");

}

   


}


本文出自 “知止内明” 博客,请务必保留此出处http://357712148.blog.51cto.com/6440370/1976023

mac java执行adb devices命令

标签:mac通过java执行adb devices命令

本文系统来源:http://357712148.blog.51cto.com/6440370/1976023


【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!

相关教程推荐

其他课程推荐