adb-driver
v0.1.8
Published
A ADB(Android Debugging Bridge) command executor
Downloads
5,221
Keywords
Readme
adb-driver
usage
sample1
const adbDriver = require('adb-driver')
const { execADBCommand } = adbDriver
execADBCommand(`adb devices`).then(result => {
if (result instanceof Error) {
console.error(`fail to execute adb devices`)
return
}
console.info(`you can parse your devices info here: ${result}`)
})
sample2
const adbDriver = require('adb-driver')
const { execADBCommand } = adbDriver
async function getDevices(callback) {
const result = await execADBCommand(`adb devices`)
if (result instanceof Error) {
console.error(`fail to execute adb devices`)
return callback(result)
}
console.log(`you can parse your devices info here`)
callback(null, result)
}