You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-15Lines changed: 4 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -396,18 +396,7 @@ Retrieves the features of the device identified by the given serial number. This
396
396
* Returns: `Promise`
397
397
* Resolves with: `features` (see callback)
398
398
399
-
#### client.getPackages(serial[, callback])
400
-
401
-
Retrieves the list of packages present on the device. This is analogous to `adb shell pm list packages`. If you just want to see if something's installed, consider using `client.isInstalled()` instead.
402
-
403
-
***serial** The serial number of the device. Corresponds to the device ID in `client.listDevices()`.
404
-
***callback(err, packages)** Optional. Use this or the returned `Promise`.
405
-
-**err**`null` when successful, `Error` otherwise.
Retrieves the list of packages present on the device. This is analogous to `adb shell pm list packages`. If you just want to see if something's installed, consider using `client.isInstalled()` instead.
413
402
@@ -812,7 +801,7 @@ client.listDevices()
812
801
.then(function(devices) {
813
802
returnPromise.map(devices, function(device) {
814
803
returnclient.shell(device.id, 'logcat') // logcat just for illustration,
815
-
// prefer client.openLogcat in real use
804
+
// prefer client.openLogcat in real use
816
805
.then(function(conn) {
817
806
var line =0
818
807
conn.on('data', function(data) {
@@ -821,8 +810,8 @@ client.listDevices()
821
810
line +=1
822
811
// close the stream and the running process
823
812
// on the device will be gone, gracefully
824
-
if (line >100) conn.end()
825
-
});
813
+
if (line >100) conn.end()
814
+
})
826
815
conn.on('close', function() {
827
816
// here `ps` on the device shows the logcat process is gone
0 commit comments