Android Debug Bridge host protocol client
npm install adbhost
npm install adbhost
Enable tcp transport in adb on your device
simple shell (pass your device IP address as a command line parameter):
``js`
var adbhost = require('adbhost');
var adb = adbhost.createConnection({host: process.argv[2]});
var shell = adb.createStream('shell:');
process.stdin.pipe(shell);
shell.pipe(process.stdout);
`js`
conn = adbhost.createConnection(opts);ops.port, opts.host, opts.stream
- create connection to device.
`js``
s = conn.createStream(path);
- returns duplex stream. Path is a string with service name.