Comparing version
(function() { | ||
var ClearCommand, Client, Connection, ForwardCommand, FrameBufferCommand, GetDevicePathCommand, GetFeaturesCommand, GetPackagesCommand, GetPropertiesCommand, GetSerialNoCommand, GetStateCommand, HostDevicesCommand, HostDevicesWithPathsCommand, HostKillCommand, HostTrackDevicesCommand, HostTransportCommand, HostVersionCommand, InstallCommand, IsInstalledCommand, ListForwardsCommand, LogCommand, Logcat, LogcatCommand, Monkey, MonkeyCommand, Parser, ProcStat, Promise, RemountCommand, ScreencapCommand, ShellCommand, StartActivityCommand, Sync, SyncCommand, TcpCommand, UninstallCommand, WaitBootCompleteCommand, debug; | ||
var ClearCommand, Client, Connection, ForwardCommand, FrameBufferCommand, GetDevicePathCommand, GetFeaturesCommand, GetPackagesCommand, GetPropertiesCommand, GetSerialNoCommand, GetStateCommand, HostDevicesCommand, HostDevicesWithPathsCommand, HostKillCommand, HostTrackDevicesCommand, HostTransportCommand, HostVersionCommand, InstallCommand, IsInstalledCommand, ListForwardsCommand, LogCommand, Logcat, LogcatCommand, Monkey, MonkeyCommand, Parser, ProcStat, Promise, RebootCommand, RemountCommand, ScreencapCommand, ShellCommand, StartActivityCommand, Sync, SyncCommand, TcpCommand, UninstallCommand, WaitBootCompleteCommand, debug; | ||
@@ -52,2 +52,4 @@ Monkey = require('adbkit-monkey'); | ||
RebootCommand = require('./command/host-transport/reboot'); | ||
RemountCommand = require('./command/host-transport/remount'); | ||
@@ -191,2 +193,8 @@ | ||
Client.prototype.reboot = function(serial, callback) { | ||
return this.transport(serial).then(function(transport) { | ||
return new RebootCommand(transport).execute(); | ||
}).nodeify(callback); | ||
}; | ||
Client.prototype.remount = function(serial, callback) { | ||
@@ -193,0 +201,0 @@ return this.transport(serial).then(function(transport) { |
{ | ||
"name": "adbkit", | ||
"version": "2.0.8", | ||
"version": "2.0.9", | ||
"description": "A pure Node.js client for the Android Debug Bridge.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -562,2 +562,12 @@ # adbkit | ||
#### client.reboot(serial[, callback]) | ||
Reboots the device. Similar to `adb reboot`. Note that the method resolves when ADB reports that the device has been rebooted (i.e. the reboot command was successful), not when the device becomes available again. | ||
* **serial** The serial number of the device. Corresponds to the device ID in `client.listDevices()`. | ||
* **callback(err)** Optional. Use this or the returned `Promise`. | ||
- **err** `null` when successful, `Error` otherwise. | ||
* Returns: `Promise` | ||
* Resolves with: `true` | ||
#### client.remount(serial[, callback]) | ||
@@ -564,0 +574,0 @@ |
161059
1.3%50
2.04%2978
1.22%861
1.18%