adb-driver
TypeScript icon, indicating that this package has built-in type declarations

0.1.8 • Public • Published

adb-driver

tested with jest code style: prettier

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)
}

Readme

Keywords

none

Package Sidebar

Install

npm i adb-driver

Weekly Downloads

2,058

Version

0.1.8

License

MIT

Unpacked Size

7.23 MB

Total Files

10

Last publish

Collaborators

  • dustyface
  • diydyq
  • yupeng528
  • yinhunfeixue
  • lewiscutey
  • susanpan