js-adb
v1.0.5
Published
An ADB controller that you can send commands via JavaScript.
Downloads
4
Readme
// import it
const JSADB = require("js-adb");
// start an instance
const instance = new JSADB();
// optionally you can specify a device name in case of multitasking..
// it is equivalent to the -s parameter on the ADB command line.
const deviceName = "emulator-5545";
// functions works asynchronously, so make sure to add "await"
async function test() {
await instance.screenshot("picture.png", deviceName);
await instance.dumpWindowXML(deviceName);
console.log(await instance.listOfInstalledApps());
// don't know which devices are available? no need to worry no more..
console.log(await instance.getDeviceList());
}
test();