A Node.JS module to connect Android devices using ADB. Example:
npm install nodejs-adb-wrapper --save # use the library
Check and run test.js for complete examples
- ip - The device IP (mandatory)
- config: JSON object, contains:
- path - Path for adb binary (eq: '/usr/bin/' ), default: ''
- interval - Requests interval in milliseconds, default: 1000
- timeout - Request timeout in milliseconds, default: 1000
- playbackDelayOff - Playback delay before it considered there's no media playing, default: 10000
- retryPowerOn - How many retry before power on request considered failure, default: 10
- keycodePowerOn - Keycode to power on device, default: 'KEYCODE_POWER'
- keycodePowerOff - Keycode to power on device, default: 'KEYCODE_POWER'
Async helper for waiting in ms miliseconds
Check if Android device have tail
command.
return boolean
Wrapper to run ADB command
parameters Available parameters:
- params: string - the adb command, eg:
dumpsys
return { result, message }
- result: boolean - return true if the command succeded
- message: string - contain stdout/stderr output
Wrapper to run shell command
parameters Available parameters:
- params: string - the shell command, eg:
dumpsys
- id: string - process id
return { result, message }
- result: boolean - return true if the command succeded
- message: string - contain stdout/stderr output