1.4.0 • Published 3 months ago
nodejs-adb-wrapper v1.4.0
Node.JS Android Bridge wrapper
A Node.JS module to connect Android devices using ADB. Example:
Installation
npm install nodejs-adb-wrapper --save # use the library
Example
Check and run test.js for complete examples
Options
- 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'
Methods
sleep(ms)
Async helper for waiting in ms miliseconds
checkTail()
Check if Android device have tail
command.
return boolean
adbShell(params)
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
osShell(params, id)
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
1.4.0
3 months ago
1.3.9
3 months ago
1.3.8
6 months ago
1.3.7
8 months ago
1.3.6
8 months ago
1.3.5
9 months ago
1.3.4
9 months ago
1.3.3
9 months ago
1.3.2
9 months ago
1.3.1
9 months ago
1.3.0
9 months ago
1.2.0
2 years ago
1.2.3
2 years ago
1.2.2
2 years ago
1.2.1
2 years ago
1.1.7
2 years ago
1.1.6
2 years ago
1.1.5
2 years ago
1.1.4
2 years ago
1.1.3
2 years ago
1.1.1
2 years ago
1.1.0
2 years ago
1.0.6
2 years ago
1.1.2
2 years ago
1.0.5
2 years ago
1.0.4
2 years ago
1.0.3
2 years ago
1.0.2
2 years ago
1.0.1
2 years ago
1.0.0
2 years ago