可用使用Runtime.getRuntime.exec(“adb command”)。
Java代码如下:
1 2 3 4 5 6 7 8
| public static void main(String[] arges){ String adbCommand = "adb push E:/soft/bilibili.apk /storage/emulated/0/Download"; try{ Runtime.getRuntime.exec(adbCommand); } catch (Exception e) { System.out.println("上传失败!"); } }
|