@devicefarmer/adbkit 2.11.3 → 3.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/dependabot.yml +46 -0
- package/CONTRIBUTING.md +28 -0
- package/README.md +749 -759
- package/bin/adbkit +1 -1
- package/dist/index.d.ts +24 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -0
- package/dist/package.json +84 -0
- package/dist/src/Callback.d.ts +2 -0
- package/dist/src/Callback.d.ts.map +1 -0
- package/dist/src/Callback.js +3 -0
- package/dist/src/Callback.js.map +1 -0
- package/dist/src/ClientOptions.d.ts +6 -0
- package/dist/src/ClientOptions.d.ts.map +1 -0
- package/dist/src/ClientOptions.js +3 -0
- package/dist/src/ClientOptions.js.map +1 -0
- package/dist/src/CpuStats.d.ts +17 -0
- package/dist/src/CpuStats.d.ts.map +1 -0
- package/dist/src/CpuStats.js +3 -0
- package/dist/src/CpuStats.js.map +1 -0
- package/dist/src/Device.d.ts +5 -0
- package/dist/src/Device.d.ts.map +1 -0
- package/dist/src/Device.js +3 -0
- package/dist/src/Device.js.map +1 -0
- package/dist/src/DeviceWithPath.d.ts +9 -0
- package/dist/src/DeviceWithPath.d.ts.map +1 -0
- package/dist/src/DeviceWithPath.js +3 -0
- package/dist/src/DeviceWithPath.js.map +1 -0
- package/dist/src/ExtendedPublicKey.d.ts +7 -0
- package/dist/src/ExtendedPublicKey.d.ts.map +1 -0
- package/dist/src/ExtendedPublicKey.js +3 -0
- package/dist/src/ExtendedPublicKey.js.map +1 -0
- package/dist/src/Features.d.ts +2 -0
- package/dist/src/Features.d.ts.map +1 -0
- package/dist/src/Features.js +3 -0
- package/dist/src/Features.js.map +1 -0
- package/dist/src/Forward.d.ts +6 -0
- package/dist/src/Forward.d.ts.map +1 -0
- package/dist/src/Forward.js +3 -0
- package/dist/src/Forward.js.map +1 -0
- package/dist/src/FramebufferMeta.d.ts +60 -0
- package/dist/src/FramebufferMeta.d.ts.map +1 -0
- package/dist/src/FramebufferMeta.js +3 -0
- package/dist/src/FramebufferMeta.js.map +1 -0
- package/dist/src/FramebufferStreamWithMeta.d.ts +10 -0
- package/dist/src/FramebufferStreamWithMeta.d.ts.map +1 -0
- package/dist/src/FramebufferStreamWithMeta.js +3 -0
- package/dist/src/FramebufferStreamWithMeta.js.map +1 -0
- package/dist/src/Properties.d.ts +2 -0
- package/dist/src/Properties.d.ts.map +1 -0
- package/dist/src/Properties.js +3 -0
- package/dist/src/Properties.js.map +1 -0
- package/dist/src/Reverse.d.ts +5 -0
- package/dist/src/Reverse.d.ts.map +1 -0
- package/dist/src/Reverse.js +3 -0
- package/dist/src/Reverse.js.map +1 -0
- package/dist/src/SocketOptions.d.ts +6 -0
- package/dist/src/SocketOptions.d.ts.map +1 -0
- package/dist/src/SocketOptions.js +3 -0
- package/dist/src/SocketOptions.js.map +1 -0
- package/dist/src/StartActivityOptions.d.ts +12 -0
- package/dist/src/StartActivityOptions.d.ts.map +1 -0
- package/dist/src/StartActivityOptions.js +3 -0
- package/dist/src/StartActivityOptions.js.map +1 -0
- package/dist/src/StartServiceOptions.d.ts +57 -0
- package/dist/src/StartServiceOptions.d.ts.map +1 -0
- package/dist/src/StartServiceOptions.js +3 -0
- package/dist/src/StartServiceOptions.js.map +1 -0
- package/dist/src/TrackerChangeSet.d.ts +7 -0
- package/dist/src/TrackerChangeSet.d.ts.map +1 -0
- package/dist/src/TrackerChangeSet.js +3 -0
- package/dist/src/TrackerChangeSet.js.map +1 -0
- package/dist/src/WithToString.d.ts +4 -0
- package/dist/src/WithToString.d.ts.map +1 -0
- package/dist/src/WithToString.js +3 -0
- package/dist/src/WithToString.js.map +1 -0
- package/dist/src/adb/DeviceClient.d.ts +376 -0
- package/dist/src/adb/DeviceClient.d.ts.map +1 -0
- package/dist/src/adb/DeviceClient.js +517 -0
- package/dist/src/adb/DeviceClient.js.map +1 -0
- package/dist/src/adb/auth.d.ts +8 -0
- package/dist/src/adb/auth.d.ts.map +1 -0
- package/dist/src/adb/auth.js +87 -0
- package/dist/src/adb/auth.js.map +1 -0
- package/dist/src/adb/client.d.ts +29 -0
- package/dist/src/adb/client.d.ts.map +1 -0
- package/dist/src/adb/client.js +73 -0
- package/dist/src/adb/client.js.map +1 -0
- package/dist/src/adb/command/host/connect.d.ts +6 -0
- package/dist/src/adb/command/host/connect.d.ts.map +1 -0
- package/dist/src/adb/command/host/connect.js +36 -0
- package/dist/src/adb/command/host/connect.js.map +1 -0
- package/dist/src/adb/command/host/devices.d.ts +10 -0
- package/dist/src/adb/command/host/devices.d.ts.map +1 -0
- package/dist/src/adb/command/host/devices.js +40 -0
- package/dist/src/adb/command/host/devices.js.map +1 -0
- package/dist/src/adb/command/host/deviceswithpaths.d.ts +9 -0
- package/dist/src/adb/command/host/deviceswithpaths.d.ts.map +1 -0
- package/dist/src/adb/command/host/deviceswithpaths.js +46 -0
- package/dist/src/adb/command/host/deviceswithpaths.js.map +1 -0
- package/dist/src/adb/command/host/disconnect.d.ts +6 -0
- package/dist/src/adb/command/host/disconnect.d.ts.map +1 -0
- package/dist/src/adb/command/host/disconnect.js +35 -0
- package/dist/src/adb/command/host/disconnect.js.map +1 -0
- package/dist/src/adb/command/host/index.d.ts +9 -0
- package/dist/src/adb/command/host/index.d.ts.map +1 -0
- package/dist/src/adb/command/host/index.js +23 -0
- package/dist/src/adb/command/host/index.js.map +1 -0
- package/dist/src/adb/command/host/kill.d.ts +6 -0
- package/dist/src/adb/command/host/kill.d.ts.map +1 -0
- package/dist/src/adb/command/host/kill.js +24 -0
- package/dist/src/adb/command/host/kill.js.map +1 -0
- package/dist/src/adb/command/host/trackdevices.d.ts +6 -0
- package/dist/src/adb/command/host/trackdevices.d.ts.map +1 -0
- package/dist/src/adb/command/host/trackdevices.js +27 -0
- package/dist/src/adb/command/host/trackdevices.js.map +1 -0
- package/dist/src/adb/command/host/transport.d.ts +6 -0
- package/dist/src/adb/command/host/transport.d.ts.map +1 -0
- package/dist/src/adb/command/host/transport.js +24 -0
- package/dist/src/adb/command/host/transport.js.map +1 -0
- package/dist/src/adb/command/host/version.d.ts +7 -0
- package/dist/src/adb/command/host/version.d.ts.map +1 -0
- package/dist/src/adb/command/host/version.js +29 -0
- package/dist/src/adb/command/host/version.js.map +1 -0
- package/dist/src/adb/command/host-serial/forward.d.ts +6 -0
- package/dist/src/adb/command/host-serial/forward.d.ts.map +1 -0
- package/dist/src/adb/command/host-serial/forward.js +33 -0
- package/dist/src/adb/command/host-serial/forward.js.map +1 -0
- package/dist/src/adb/command/host-serial/getdevicepath.d.ts +6 -0
- package/dist/src/adb/command/host-serial/getdevicepath.d.ts.map +1 -0
- package/dist/src/adb/command/host-serial/getdevicepath.js +26 -0
- package/dist/src/adb/command/host-serial/getdevicepath.js.map +1 -0
- package/dist/src/adb/command/host-serial/getserialno.d.ts +6 -0
- package/dist/src/adb/command/host-serial/getserialno.d.ts.map +1 -0
- package/dist/src/adb/command/host-serial/getserialno.js +24 -0
- package/dist/src/adb/command/host-serial/getserialno.js.map +1 -0
- package/dist/src/adb/command/host-serial/getstate.d.ts +6 -0
- package/dist/src/adb/command/host-serial/getstate.d.ts.map +1 -0
- package/dist/src/adb/command/host-serial/getstate.js +24 -0
- package/dist/src/adb/command/host-serial/getstate.js.map +1 -0
- package/dist/src/adb/command/host-serial/index.d.ts +7 -0
- package/dist/src/adb/command/host-serial/index.d.ts.map +1 -0
- package/dist/src/adb/command/host-serial/index.js +19 -0
- package/dist/src/adb/command/host-serial/index.js.map +1 -0
- package/dist/src/adb/command/host-serial/listforwards.d.ts +8 -0
- package/dist/src/adb/command/host-serial/listforwards.d.ts.map +1 -0
- package/dist/src/adb/command/host-serial/listforwards.js +34 -0
- package/dist/src/adb/command/host-serial/listforwards.js.map +1 -0
- package/dist/src/adb/command/host-serial/waitfordevice.d.ts +6 -0
- package/dist/src/adb/command/host-serial/waitfordevice.d.ts.map +1 -0
- package/dist/src/adb/command/host-serial/waitfordevice.js +33 -0
- package/dist/src/adb/command/host-serial/waitfordevice.js.map +1 -0
- package/dist/src/adb/command/host-transport/clear.d.ts +6 -0
- package/dist/src/adb/command/host-transport/clear.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/clear.js +39 -0
- package/dist/src/adb/command/host-transport/clear.js.map +1 -0
- package/dist/src/adb/command/host-transport/framebuffer.d.ts +12 -0
- package/dist/src/adb/command/host-transport/framebuffer.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/framebuffer.js +113 -0
- package/dist/src/adb/command/host-transport/framebuffer.js.map +1 -0
- package/dist/src/adb/command/host-transport/getfeatures.d.ts +8 -0
- package/dist/src/adb/command/host-transport/getfeatures.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/getfeatures.js +35 -0
- package/dist/src/adb/command/host-transport/getfeatures.js.map +1 -0
- package/dist/src/adb/command/host-transport/getpackages.d.ts +7 -0
- package/dist/src/adb/command/host-transport/getpackages.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/getpackages.js +45 -0
- package/dist/src/adb/command/host-transport/getpackages.js.map +1 -0
- package/dist/src/adb/command/host-transport/getproperties.d.ts +8 -0
- package/dist/src/adb/command/host-transport/getproperties.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/getproperties.js +37 -0
- package/dist/src/adb/command/host-transport/getproperties.js.map +1 -0
- package/dist/src/adb/command/host-transport/index.d.ts +28 -0
- package/dist/src/adb/command/host-transport/index.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/index.js +61 -0
- package/dist/src/adb/command/host-transport/index.js.map +1 -0
- package/dist/src/adb/command/host-transport/install.d.ts +6 -0
- package/dist/src/adb/command/host-transport/install.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/install.js +42 -0
- package/dist/src/adb/command/host-transport/install.js.map +1 -0
- package/dist/src/adb/command/host-transport/isinstalled.d.ts +6 -0
- package/dist/src/adb/command/host-transport/isinstalled.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/isinstalled.js +37 -0
- package/dist/src/adb/command/host-transport/isinstalled.js.map +1 -0
- package/dist/src/adb/command/host-transport/listreverses.d.ts +8 -0
- package/dist/src/adb/command/host-transport/listreverses.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/listreverses.js +38 -0
- package/dist/src/adb/command/host-transport/listreverses.js.map +1 -0
- package/dist/src/adb/command/host-transport/local.d.ts +8 -0
- package/dist/src/adb/command/host-transport/local.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/local.js +24 -0
- package/dist/src/adb/command/host-transport/local.js.map +1 -0
- package/dist/src/adb/command/host-transport/log.d.ts +8 -0
- package/dist/src/adb/command/host-transport/log.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/log.js +24 -0
- package/dist/src/adb/command/host-transport/log.js.map +1 -0
- package/dist/src/adb/command/host-transport/logcat.d.ts +9 -0
- package/dist/src/adb/command/host-transport/logcat.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/logcat.js +37 -0
- package/dist/src/adb/command/host-transport/logcat.js.map +1 -0
- package/dist/src/adb/command/host-transport/monkey.d.ts +8 -0
- package/dist/src/adb/command/host-transport/monkey.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/monkey.js +50 -0
- package/dist/src/adb/command/host-transport/monkey.js.map +1 -0
- package/dist/src/adb/command/host-transport/reboot.d.ts +6 -0
- package/dist/src/adb/command/host-transport/reboot.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/reboot.js +24 -0
- package/dist/src/adb/command/host-transport/reboot.js.map +1 -0
- package/dist/src/adb/command/host-transport/remount.d.ts +6 -0
- package/dist/src/adb/command/host-transport/remount.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/remount.js +24 -0
- package/dist/src/adb/command/host-transport/remount.js.map +1 -0
- package/dist/src/adb/command/host-transport/reverse.d.ts +6 -0
- package/dist/src/adb/command/host-transport/reverse.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/reverse.js +33 -0
- package/dist/src/adb/command/host-transport/reverse.js.map +1 -0
- package/dist/src/adb/command/host-transport/root.d.ts +6 -0
- package/dist/src/adb/command/host-transport/root.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/root.js +32 -0
- package/dist/src/adb/command/host-transport/root.js.map +1 -0
- package/dist/src/adb/command/host-transport/screencap.d.ts +8 -0
- package/dist/src/adb/command/host-transport/screencap.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/screencap.js +36 -0
- package/dist/src/adb/command/host-transport/screencap.js.map +1 -0
- package/dist/src/adb/command/host-transport/shell.d.ts +9 -0
- package/dist/src/adb/command/host-transport/shell.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/shell.js +27 -0
- package/dist/src/adb/command/host-transport/shell.js.map +1 -0
- package/dist/src/adb/command/host-transport/startactivity.d.ts +13 -0
- package/dist/src/adb/command/host-transport/startactivity.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/startactivity.js +166 -0
- package/dist/src/adb/command/host-transport/startactivity.js.map +1 -0
- package/dist/src/adb/command/host-transport/startservice.d.ts +7 -0
- package/dist/src/adb/command/host-transport/startservice.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/startservice.js +17 -0
- package/dist/src/adb/command/host-transport/startservice.js.map +1 -0
- package/dist/src/adb/command/host-transport/sync.d.ts +7 -0
- package/dist/src/adb/command/host-transport/sync.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/sync.js +25 -0
- package/dist/src/adb/command/host-transport/sync.js.map +1 -0
- package/dist/src/adb/command/host-transport/tcp.d.ts +8 -0
- package/dist/src/adb/command/host-transport/tcp.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/tcp.js +24 -0
- package/dist/src/adb/command/host-transport/tcp.js.map +1 -0
- package/dist/src/adb/command/host-transport/tcpip.d.ts +6 -0
- package/dist/src/adb/command/host-transport/tcpip.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/tcpip.js +32 -0
- package/dist/src/adb/command/host-transport/tcpip.js.map +1 -0
- package/dist/src/adb/command/host-transport/trackjdwp.d.ts +7 -0
- package/dist/src/adb/command/host-transport/trackjdwp.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/trackjdwp.js +25 -0
- package/dist/src/adb/command/host-transport/trackjdwp.js.map +1 -0
- package/dist/src/adb/command/host-transport/uninstall.d.ts +6 -0
- package/dist/src/adb/command/host-transport/uninstall.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/uninstall.js +40 -0
- package/dist/src/adb/command/host-transport/uninstall.js.map +1 -0
- package/dist/src/adb/command/host-transport/usb.d.ts +6 -0
- package/dist/src/adb/command/host-transport/usb.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/usb.js +32 -0
- package/dist/src/adb/command/host-transport/usb.js.map +1 -0
- package/dist/src/adb/command/host-transport/waitbootcomplete.d.ts +6 -0
- package/dist/src/adb/command/host-transport/waitbootcomplete.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/waitbootcomplete.js +27 -0
- package/dist/src/adb/command/host-transport/waitbootcomplete.js.map +1 -0
- package/dist/src/adb/command.d.ts +17 -0
- package/dist/src/adb/command.d.ts.map +1 -0
- package/dist/src/adb/command.js +43 -0
- package/dist/src/adb/command.js.map +1 -0
- package/dist/src/adb/connection.d.ts +24 -0
- package/dist/src/adb/connection.d.ts.map +1 -0
- package/dist/src/adb/connection.js +115 -0
- package/dist/src/adb/connection.js.map +1 -0
- package/dist/src/adb/dump.d.ts +4 -0
- package/dist/src/adb/dump.d.ts.map +1 -0
- package/dist/src/adb/dump.js +38 -0
- package/dist/src/adb/dump.js.map +1 -0
- package/dist/src/adb/framebuffer/rgbtransform.d.ts +16 -0
- package/dist/src/adb/framebuffer/rgbtransform.d.ts.map +1 -0
- package/dist/src/adb/framebuffer/rgbtransform.js +47 -0
- package/dist/src/adb/framebuffer/rgbtransform.js.map +1 -0
- package/dist/src/adb/jdwptracker.d.ts +41 -0
- package/dist/src/adb/jdwptracker.d.ts.map +1 -0
- package/dist/src/adb/jdwptracker.js +85 -0
- package/dist/src/adb/jdwptracker.js.map +1 -0
- package/dist/src/adb/keycode.d.ts +292 -0
- package/dist/src/adb/keycode.d.ts.map +1 -0
- package/dist/src/adb/keycode.js +298 -0
- package/dist/src/adb/keycode.js.map +1 -0
- package/dist/src/adb/linetransform.d.ts +17 -0
- package/dist/src/adb/linetransform.d.ts.map +1 -0
- package/dist/src/adb/linetransform.js +93 -0
- package/dist/src/adb/linetransform.js.map +1 -0
- package/dist/src/adb/parser.d.ts +37 -0
- package/dist/src/adb/parser.d.ts.map +1 -0
- package/dist/src/adb/parser.js +269 -0
- package/dist/src/adb/parser.js.map +1 -0
- package/dist/src/adb/proc/stat.d.ts +30 -0
- package/dist/src/adb/proc/stat.d.ts.map +1 -0
- package/dist/src/adb/proc/stat.js +131 -0
- package/dist/src/adb/proc/stat.js.map +1 -0
- package/dist/src/adb/protocol.d.ts +17 -0
- package/dist/src/adb/protocol.d.ts.map +1 -0
- package/dist/src/adb/protocol.js +29 -0
- package/dist/src/adb/protocol.js.map +1 -0
- package/dist/src/adb/sync/entry.d.ts +8 -0
- package/dist/src/adb/sync/entry.d.ts.map +1 -0
- package/dist/src/adb/sync/entry.js +16 -0
- package/dist/src/adb/sync/entry.js.map +1 -0
- package/dist/src/adb/sync/pulltransfer.d.ts +10 -0
- package/dist/src/adb/sync/pulltransfer.d.ts.map +1 -0
- package/dist/src/adb/sync/pulltransfer.js +24 -0
- package/dist/src/adb/sync/pulltransfer.js.map +1 -0
- package/dist/src/adb/sync/pushtransfer.d.ts +13 -0
- package/dist/src/adb/sync/pushtransfer.d.ts.map +1 -0
- package/dist/src/adb/sync/pushtransfer.js +30 -0
- package/dist/src/adb/sync/pushtransfer.js.map +1 -0
- package/dist/src/adb/sync/stats.d.ts +23 -0
- package/dist/src/adb/sync/stats.d.ts.map +1 -0
- package/dist/src/adb/sync/stats.js +54 -0
- package/dist/src/adb/sync/stats.js.map +1 -0
- package/dist/src/adb/sync.d.ts +31 -0
- package/dist/src/adb/sync.d.ts.map +1 -0
- package/dist/src/adb/sync.js +322 -0
- package/dist/src/adb/sync.js.map +1 -0
- package/dist/src/adb/tcpusb/packet.d.ts +27 -0
- package/dist/src/adb/tcpusb/packet.d.ts.map +1 -0
- package/dist/src/adb/tcpusb/packet.js +94 -0
- package/dist/src/adb/tcpusb/packet.js.map +1 -0
- package/dist/src/adb/tcpusb/packetreader.d.ts +26 -0
- package/dist/src/adb/tcpusb/packetreader.d.ts.map +1 -0
- package/dist/src/adb/tcpusb/packetreader.js +100 -0
- package/dist/src/adb/tcpusb/packetreader.js.map +1 -0
- package/dist/src/adb/tcpusb/rollingcounter.d.ts +8 -0
- package/dist/src/adb/tcpusb/rollingcounter.d.ts.map +1 -0
- package/dist/src/adb/tcpusb/rollingcounter.js +17 -0
- package/dist/src/adb/tcpusb/rollingcounter.js.map +1 -0
- package/dist/src/adb/tcpusb/server.d.ts +19 -0
- package/dist/src/adb/tcpusb/server.d.ts.map +1 -0
- package/dist/src/adb/tcpusb/server.js +78 -0
- package/dist/src/adb/tcpusb/server.js.map +1 -0
- package/dist/src/adb/tcpusb/service.d.ts +37 -0
- package/dist/src/adb/tcpusb/service.d.ts.map +1 -0
- package/dist/src/adb/tcpusb/service.js +173 -0
- package/dist/src/adb/tcpusb/service.js.map +1 -0
- package/dist/src/adb/tcpusb/servicemap.d.ts +10 -0
- package/dist/src/adb/tcpusb/servicemap.d.ts.map +1 -0
- package/dist/src/adb/tcpusb/servicemap.js +42 -0
- package/dist/src/adb/tcpusb/servicemap.js.map +1 -0
- package/dist/src/adb/tcpusb/socket.d.ts +45 -0
- package/dist/src/adb/tcpusb/socket.d.ts.map +1 -0
- package/dist/src/adb/tcpusb/socket.js +284 -0
- package/dist/src/adb/tcpusb/socket.js.map +1 -0
- package/dist/src/adb/tracker.d.ts +17 -0
- package/dist/src/adb/tracker.d.ts.map +1 -0
- package/dist/src/adb/tracker.js +72 -0
- package/dist/src/adb/tracker.js.map +1 -0
- package/dist/src/adb/util.d.ts +10 -0
- package/dist/src/adb/util.d.ts.map +1 -0
- package/dist/src/adb/util.js +17 -0
- package/dist/src/adb/util.js.map +1 -0
- package/dist/src/adb.d.ts +13 -0
- package/dist/src/adb.d.ts.map +1 -0
- package/dist/src/adb.js +28 -0
- package/dist/src/adb.js.map +1 -0
- package/dist/src/cli.d.ts +2 -0
- package/dist/src/cli.d.ts.map +1 -0
- package/dist/src/cli.js +86 -0
- package/dist/src/cli.js.map +1 -0
- package/dist/src/index.d.ts +19 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +12 -0
- package/dist/src/index.js.map +1 -0
- package/package.json +53 -33
- package/.semaphore/publish.yml +0 -19
- package/.semaphore/semaphore.yml +0 -27
- package/index.js +0 -4
- package/lib/adb/auth.js +0 -78
- package/lib/adb/client.js +0 -576
- package/lib/adb/command/host/connect.js +0 -46
- package/lib/adb/command/host/devices.js +0 -64
- package/lib/adb/command/host/deviceswithpaths.js +0 -70
- package/lib/adb/command/host/disconnect.js +0 -46
- package/lib/adb/command/host/kill.js +0 -36
- package/lib/adb/command/host/trackdevices.js +0 -40
- package/lib/adb/command/host/transport.js +0 -36
- package/lib/adb/command/host/version.js +0 -42
- package/lib/adb/command/host-serial/forward.js +0 -45
- package/lib/adb/command/host-serial/getdevicepath.js +0 -38
- package/lib/adb/command/host-serial/getserialno.js +0 -38
- package/lib/adb/command/host-serial/getstate.js +0 -38
- package/lib/adb/command/host-serial/listforwards.js +0 -56
- package/lib/adb/command/host-serial/waitfordevice.js +0 -45
- package/lib/adb/command/host-transport/clear.js +0 -45
- package/lib/adb/command/host-transport/framebuffer.js +0 -114
- package/lib/adb/command/host-transport/getfeatures.js +0 -51
- package/lib/adb/command/host-transport/getpackages.js +0 -51
- package/lib/adb/command/host-transport/getproperties.js +0 -51
- package/lib/adb/command/host-transport/install.js +0 -48
- package/lib/adb/command/host-transport/isinstalled.js +0 -47
- package/lib/adb/command/host-transport/listreverses.js +0 -55
- package/lib/adb/command/host-transport/local.js +0 -36
- package/lib/adb/command/host-transport/log.js +0 -36
- package/lib/adb/command/host-transport/logcat.js +0 -48
- package/lib/adb/command/host-transport/monkey.js +0 -42
- package/lib/adb/command/host-transport/reboot.js +0 -36
- package/lib/adb/command/host-transport/remount.js +0 -36
- package/lib/adb/command/host-transport/reverse.js +0 -45
- package/lib/adb/command/host-transport/root.js +0 -46
- package/lib/adb/command/host-transport/screencap.js +0 -52
- package/lib/adb/command/host-transport/shell.js +0 -39
- package/lib/adb/command/host-transport/startactivity.js +0 -184
- package/lib/adb/command/host-transport/startservice.js +0 -33
- package/lib/adb/command/host-transport/sync.js +0 -38
- package/lib/adb/command/host-transport/tcp.js +0 -36
- package/lib/adb/command/host-transport/tcpip.js +0 -46
- package/lib/adb/command/host-transport/trackjdwp.js +0 -120
- package/lib/adb/command/host-transport/uninstall.js +0 -44
- package/lib/adb/command/host-transport/usb.js +0 -46
- package/lib/adb/command/host-transport/waitbootcomplete.js +0 -42
- package/lib/adb/command.js +0 -56
- package/lib/adb/connection.js +0 -117
- package/lib/adb/dump.js +0 -15
- package/lib/adb/framebuffer/rgbtransform.js +0 -55
- package/lib/adb/keycode.js +0 -225
- package/lib/adb/linetransform.js +0 -87
- package/lib/adb/parser.js +0 -291
- package/lib/adb/proc/stat.js +0 -137
- package/lib/adb/protocol.js +0 -45
- package/lib/adb/sync/entry.js +0 -23
- package/lib/adb/sync/pulltransfer.js +0 -31
- package/lib/adb/sync/pushtransfer.js +0 -40
- package/lib/adb/sync/stats.js +0 -54
- package/lib/adb/sync.js +0 -343
- package/lib/adb/tcpusb/packet.js +0 -112
- package/lib/adb/tcpusb/packetreader.js +0 -121
- package/lib/adb/tcpusb/rollingcounter.js +0 -21
- package/lib/adb/tcpusb/server.js +0 -79
- package/lib/adb/tcpusb/service.js +0 -203
- package/lib/adb/tcpusb/servicemap.js +0 -48
- package/lib/adb/tcpusb/socket.js +0 -312
- package/lib/adb/tracker.js +0 -89
- package/lib/adb/util.js +0 -13
- package/lib/adb.js +0 -29
- package/lib/cli.js +0 -66
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import Logcat from '@devicefarmer/adbkit-logcat';
|
|
3
|
+
import Connection from './connection';
|
|
4
|
+
import Sync from './sync';
|
|
5
|
+
import ProcStat from './proc/stat';
|
|
6
|
+
import Forward from '../Forward';
|
|
7
|
+
import Reverse from '../Reverse';
|
|
8
|
+
import StartActivityOptions from '../StartActivityOptions';
|
|
9
|
+
import StartServiceOptions from '../StartServiceOptions';
|
|
10
|
+
import Bluebird from 'bluebird';
|
|
11
|
+
import { Duplex } from 'stream';
|
|
12
|
+
import Stats from './sync/stats';
|
|
13
|
+
import Entry from './sync/entry';
|
|
14
|
+
import PushTransfer from './sync/pushtransfer';
|
|
15
|
+
import { ReadStream } from 'fs';
|
|
16
|
+
import PullTransfer from './sync/pulltransfer';
|
|
17
|
+
import { Properties } from '../Properties';
|
|
18
|
+
import { Features } from '../Features';
|
|
19
|
+
import FramebufferStreamWithMeta from '../FramebufferStreamWithMeta';
|
|
20
|
+
import WithToString from '../WithToString';
|
|
21
|
+
import JdwpTracker from './jdwptracker';
|
|
22
|
+
import DeviceWithPath from '../DeviceWithPath';
|
|
23
|
+
import Client from './client';
|
|
24
|
+
export default class DeviceClient {
|
|
25
|
+
readonly client: Client;
|
|
26
|
+
readonly serial: string;
|
|
27
|
+
constructor(client: Client, serial: string);
|
|
28
|
+
/**
|
|
29
|
+
* Gets the serial number of the device identified by the given serial number. With our API this doesn't really make much sense, but it has been implemented for completeness. _FYI: in the raw ADB protocol you can specify a device in other ways, too._
|
|
30
|
+
*
|
|
31
|
+
* @returns The serial number of the device.
|
|
32
|
+
*/
|
|
33
|
+
getSerialNo(): Bluebird<string>;
|
|
34
|
+
/**
|
|
35
|
+
* Gets the device path of the device identified by the given serial number.
|
|
36
|
+
* @returns The device path. This corresponds to the device path in `client.listDevicesWithPaths()`.
|
|
37
|
+
*/
|
|
38
|
+
getDevicePath(): Bluebird<DeviceWithPath['path']>;
|
|
39
|
+
/**
|
|
40
|
+
* Gets the state of the device identified by the given serial number.
|
|
41
|
+
*
|
|
42
|
+
* @returns The device state. This corresponds to the device type in `client.listDevices()`.
|
|
43
|
+
*/
|
|
44
|
+
getState(): Bluebird<string>;
|
|
45
|
+
/**
|
|
46
|
+
* Retrieves the properties of the device identified by the given serial number. This is analogous to `adb shell getprop`.
|
|
47
|
+
*
|
|
48
|
+
* @returns An object of device properties. Each key corresponds to a device property. Convenient for accessing things like `'ro.product.model'`.
|
|
49
|
+
*/
|
|
50
|
+
getProperties(): Bluebird<Properties>;
|
|
51
|
+
/**
|
|
52
|
+
* Retrieves the features of the device identified by the given serial number. This is analogous to `adb shell pm list features`. Useful for checking whether hardware features such as NFC are available (you'd check for `'android.hardware.nfc'`).
|
|
53
|
+
* @param [flags] Flags to pass to the `pm list packages` command to filter the list
|
|
54
|
+
* ```
|
|
55
|
+
* -d: filter to only show disabled packages
|
|
56
|
+
* -e: filter to only show enabled packages
|
|
57
|
+
* -s: filter to only show system packages
|
|
58
|
+
* -3: filter to only show third party packages
|
|
59
|
+
* ```
|
|
60
|
+
* @returns An object of device features. Each key corresponds to a device feature, with the value being either `true` for a boolean feature, or the feature value as a string (e.g. `'0x20000'` for `reqGlEsVersion`).
|
|
61
|
+
*/
|
|
62
|
+
getFeatures(): Bluebird<Features>;
|
|
63
|
+
/**
|
|
64
|
+
* 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.
|
|
65
|
+
*
|
|
66
|
+
* @param flags TODO
|
|
67
|
+
* @returns An object of device features. Each key corresponds to a device feature, with the value being either `true` for a boolean feature, or the feature value as a string (e.g. `'0x20000'` for `reqGlEsVersion`)
|
|
68
|
+
*/
|
|
69
|
+
getPackages(flags?: string): Bluebird<string[]>;
|
|
70
|
+
/**
|
|
71
|
+
* Attemps to retrieve the IP address of the device. Roughly analogous to `adb shell getprop dhcp.<iface>.ipaddress`.
|
|
72
|
+
*
|
|
73
|
+
* @param [iface] The network interface. Defaults to `'wlan0'`.
|
|
74
|
+
*
|
|
75
|
+
* @returns The IP address as a `String`.
|
|
76
|
+
*/
|
|
77
|
+
getDHCPIpAddress(iface?: string): Bluebird<string>;
|
|
78
|
+
/**
|
|
79
|
+
* Forwards socket connections from the ADB server host (local) to the device (remote). This is analogous to `adb forward <local> <remote>`. It's important to note that if you are connected to a remote ADB server, the forward will be created on that host.
|
|
80
|
+
*
|
|
81
|
+
* @param local A string representing the local endpoint on the ADB host. At time of writing, can be one of:
|
|
82
|
+
* - `tcp:<port>`
|
|
83
|
+
* - `localabstract:<unix domain socket name>`
|
|
84
|
+
* - `localreserved:<unix domain socket name>`
|
|
85
|
+
* - `localfilesystem:<unix domain socket name>`
|
|
86
|
+
* - `dev:<character device name>`
|
|
87
|
+
* @param remote A string representing the remote endpoint on the device. At time of writing, can be one of:
|
|
88
|
+
* Any value accepted by the `local` argument
|
|
89
|
+
* `jdwp:<process pid>`
|
|
90
|
+
* @returns true
|
|
91
|
+
*/
|
|
92
|
+
forward(local: string, remote: string): Bluebird<boolean>;
|
|
93
|
+
/**
|
|
94
|
+
* Lists forwarded connections on the device. This is analogous to `adb forward --list`.
|
|
95
|
+
*
|
|
96
|
+
* @returns An array of forward objects with the following properties:
|
|
97
|
+
* - **serial** The device serial.
|
|
98
|
+
* - **local** The local endpoint. Same format as `client.forward()`'s `local` argument.
|
|
99
|
+
* - **remote** The remote endpoint on the device. Same format as `client.forward()`'s `remote` argument.
|
|
100
|
+
*/
|
|
101
|
+
listForwards(): Bluebird<Forward[]>;
|
|
102
|
+
/**
|
|
103
|
+
* Reverses socket connections from the device (remote) to the ADB server host (local). This is analogous to `adb reverse <remote> <local>`. It's important to note that if you are connected to a remote ADB server, the reverse will be created on that host.
|
|
104
|
+
* @param remote A string representing the remote endpoint on the device. At time of writing, can be one of:
|
|
105
|
+
* - `tcp:<port>`
|
|
106
|
+
* - `localabstract:<unix domain socket name>`
|
|
107
|
+
* - `localreserved:<unix domain socket name>`
|
|
108
|
+
* - `localfilesystem:<unix domain socket name>`
|
|
109
|
+
* @param local A string representing the local endpoint on the ADB host. At time of writing, can be any value accepted by the `remote` argument.
|
|
110
|
+
*/
|
|
111
|
+
reverse(remote: string, local: string): Bluebird<boolean>;
|
|
112
|
+
/**
|
|
113
|
+
* Lists forwarded connections on the device. This is analogous to `adb reverse --list`.
|
|
114
|
+
*
|
|
115
|
+
* @returns An array of Reverse objects with the following properties:
|
|
116
|
+
* - **remote** The remote endpoint on the device. Same format as `client.reverse()`'s `remote` argument.
|
|
117
|
+
* - **local** The local endpoint on the host. Same format as `client.reverse()`'s `local` argument.
|
|
118
|
+
*/
|
|
119
|
+
listReverses(): Bluebird<Reverse[]>;
|
|
120
|
+
/**
|
|
121
|
+
* return a new connection to ADB.
|
|
122
|
+
*/
|
|
123
|
+
private connection;
|
|
124
|
+
/**
|
|
125
|
+
* return a new connextion to the current Host devices
|
|
126
|
+
*/
|
|
127
|
+
transport(): Bluebird<Connection>;
|
|
128
|
+
/**
|
|
129
|
+
* Runs a shell command on the device. Note that you'll be limited to the permissions of the `shell` user, which ADB uses.
|
|
130
|
+
*
|
|
131
|
+
* @param command The shell command to execute. When `String`, the command is run as-is. When `Array`, the elements will be rudimentarily escaped (for convenience, not security) and joined to form a command.
|
|
132
|
+
*
|
|
133
|
+
* @returns A readable stream (`Socket` actually) containing the progressive `stdout` of the command. Use with `adb.util.readAll` to get a readable String from it.
|
|
134
|
+
*/
|
|
135
|
+
shell(command: string | ArrayLike<WithToString>): Bluebird<Duplex>;
|
|
136
|
+
/**
|
|
137
|
+
* Puts the device into root mode which may be needed by certain shell commands. A remount is generally required after a successful root call. **Note that this will only work if your device supports this feature. Production devices almost never do.**
|
|
138
|
+
*
|
|
139
|
+
* @return true
|
|
140
|
+
*/
|
|
141
|
+
reboot(): Bluebird<boolean>;
|
|
142
|
+
/**
|
|
143
|
+
* Attempts to remount the `/system` partition in read-write mode. This will usually only work on emulators and developer devices.
|
|
144
|
+
*
|
|
145
|
+
* @returns true
|
|
146
|
+
*/
|
|
147
|
+
remount(): Bluebird<boolean>;
|
|
148
|
+
/**
|
|
149
|
+
* Puts the device into root mode which may be needed by certain shell commands. A remount is generally required after a successful root call. **Note that this will only work if your device supports this feature. Production devices almost never do.**
|
|
150
|
+
*
|
|
151
|
+
* @return true
|
|
152
|
+
*/
|
|
153
|
+
root(): Bluebird<boolean>;
|
|
154
|
+
/**
|
|
155
|
+
* Starts a JDWP tracker for the given device.
|
|
156
|
+
*
|
|
157
|
+
* Note that as the tracker will keep a connection open, you must call `tracker.end()` if you wish to stop tracking JDWP processes.
|
|
158
|
+
*
|
|
159
|
+
* @returns The JDWP tracker, which is an [`EventEmitter`][node-events]. The following events are available:
|
|
160
|
+
* - **add** **(pid)** Emitted when a new JDWP process becomes available, once per pid.
|
|
161
|
+
* - **remove** **(pid)** Emitted when a JDWP process becomes unavailable, once per pid.
|
|
162
|
+
* - **changeSet** **(changes, pids)** All changes in a single event.
|
|
163
|
+
* - **changes** An object with the following properties always present:
|
|
164
|
+
* - **added** An array of pids that were added. Empty if none.
|
|
165
|
+
* - **removed** An array of pids that were removed. Empty if none.
|
|
166
|
+
* - **pids** All currently active pids (including pids from previous runs).
|
|
167
|
+
* - **end** Emitted when the underlying connection ends.
|
|
168
|
+
* - **error** **(err)** Emitted if there's an error.
|
|
169
|
+
*/
|
|
170
|
+
trackJdwp(): Bluebird<JdwpTracker>;
|
|
171
|
+
/**
|
|
172
|
+
* Fetches the current **raw** framebuffer (i.e. what is visible on the screen) from the device, and optionally converts it into something more usable by using [GraphicsMagick][graphicsmagick]'s `gm` command, which must be available in `$PATH` if conversion is desired. Note that we don't bother supporting really old framebuffer formats such as RGB_565. If for some mysterious reason you happen to run into a `>=2.3` device that uses RGB_565, let us know.
|
|
173
|
+
*
|
|
174
|
+
* Note that high-resolution devices can have quite massive framebuffers. For example, a device with a resolution of 1920x1080 and 32 bit colors would have a roughly 8MB (`1920*1080*4` byte) RGBA framebuffer. Empirical tests point to about 5MB/s bandwidth limit for the ADB USB connection, which means that it can take ~1.6 seconds for the raw data to arrive, or even more if the USB connection is already congested. Using a conversion will further slow down completion.
|
|
175
|
+
*
|
|
176
|
+
* @param format The desired output format. Any output format supported by [GraphicsMagick][graphicsmagick] (such as `'png'`) is supported. Defaults to `'raw'` for raw framebuffer data.
|
|
177
|
+
*
|
|
178
|
+
* @returns The possibly converted framebuffer stream. The stream also has a `meta`.:
|
|
179
|
+
*/
|
|
180
|
+
framebuffer(format?: string): Bluebird<FramebufferStreamWithMeta>;
|
|
181
|
+
/**
|
|
182
|
+
* Takes a screenshot in PNG format using the built-in `screencap` utility. This is analogous to `adb shell screencap -p`. Sadly, the utility is not available on most Android `<=2.3` devices, but a silent fallback to the `client.framebuffer()` command in PNG mode is attempted, so you should have its dependencies installed just in case.
|
|
183
|
+
*
|
|
184
|
+
* Generating the PNG on the device naturally requires considerably more processing time on that side. However, as the data transferred over USB easily decreases by ~95%, and no conversion being required on the host, this method is usually several times faster than using the framebuffer. Naturally, this benefit does not apply if we're forced to fall back to the framebuffer.
|
|
185
|
+
*
|
|
186
|
+
* For convenience purposes, if the screencap command fails (e.g. because it doesn't exist on older Androids), we fall back to `client.framebuffer(serial, 'png')`, which is slower and has additional installation requirements.
|
|
187
|
+
*
|
|
188
|
+
* @return The PNG stream.
|
|
189
|
+
*/
|
|
190
|
+
screencap(): Bluebird<Duplex>;
|
|
191
|
+
/**
|
|
192
|
+
* Opens a direct connection to a unix domain socket in the given path.
|
|
193
|
+
*
|
|
194
|
+
* @param path The path to the socket. Prefixed with `'localfilesystem:'` by default, include another prefix (e.g. `'localabstract:'`) in the path to override.
|
|
195
|
+
*
|
|
196
|
+
* @returns The connection (i.e. [`net.Socket`][node-net]). Read and write as you please. Call `conn.end()` to end the connection.
|
|
197
|
+
*/
|
|
198
|
+
openLocal(path: string): Bluebird<Duplex>;
|
|
199
|
+
/**
|
|
200
|
+
* Opens a direct connection to a binary log file, providing access to the raw log data. Note that it is usually much more convenient to use the `client.openLogcat()` method, described separately.
|
|
201
|
+
*
|
|
202
|
+
* @param name The name of the log. Available logs include `'main'`, `'system'`, `'radio'` and `'events'`.
|
|
203
|
+
*
|
|
204
|
+
* @returns The binary log stream. Call `log.end()` when you wish to stop receiving data.
|
|
205
|
+
*/
|
|
206
|
+
openLog(name: string): Bluebird<Duplex>;
|
|
207
|
+
/**
|
|
208
|
+
* Opens a direct TCP connection to a port on the device, without any port forwarding required.
|
|
209
|
+
|
|
210
|
+
* @param port The port number to connect to.
|
|
211
|
+
* @param host Optional. The host to connect to. Allegedly this is supposed to establish a connection to the given host from the device, but we have not been able to get it to work at all. Skip the host and everything works great.
|
|
212
|
+
*
|
|
213
|
+
* @returns The TCP connection (i.e. [`net.Socket`][node-net]). Read and write as you please. Call `conn.end()` to end the connection.
|
|
214
|
+
*/
|
|
215
|
+
openTcp(port: number, host?: string): Bluebird<Duplex>;
|
|
216
|
+
/**
|
|
217
|
+
* Starts the built-in `monkey` utility on the device, connects to it using `client.openTcp()` and hands the connection to [adbkit-monkey][adbkit-monkey], a pure Node.js Monkey client. This allows you to create touch and key events, among other things.
|
|
218
|
+
*
|
|
219
|
+
* For more information, check out the [adbkit-monkey][adbkit-monkey] documentation.
|
|
220
|
+
*
|
|
221
|
+
* @param port Optional. The device port where you'd like Monkey to run at. Defaults to `1080`.
|
|
222
|
+
*
|
|
223
|
+
* @returns The Monkey client. Please see the [adbkit-monkey][adbkit-monkey] documentation for details.
|
|
224
|
+
*/
|
|
225
|
+
openMonkey(port?: number): Bluebird<Duplex>;
|
|
226
|
+
/**
|
|
227
|
+
* Calls the `logcat` utility on the device and hands off the connection to [adbkit-logcat][adbkit-logcat], a pure Node.js Logcat client. This is analogous to `adb logcat -B`, but the event stream will be parsed for you and a separate event will be emitted for every log entry, allowing for easy processing.
|
|
228
|
+
*
|
|
229
|
+
* For more information, check out the [adbkit-logcat][adbkit-logcat] documentation.
|
|
230
|
+
*
|
|
231
|
+
* @param options Optional. The following options are supported:
|
|
232
|
+
* - **clear** When `true`, clears logcat before opening the reader. Not set by default.
|
|
233
|
+
*
|
|
234
|
+
* @returns The Logcat client. Please see the [adbkit-logcat][adbkit-logcat] documentation for details.
|
|
235
|
+
*/
|
|
236
|
+
openLogcat(options?: {
|
|
237
|
+
clear?: boolean;
|
|
238
|
+
}): Bluebird<Logcat>;
|
|
239
|
+
/**
|
|
240
|
+
* Tracks `/proc/stat` and emits useful information, such as CPU load. A single sync service instance is used to download the `/proc/stat` file for processing. While doing this does consume some resources, it is very light and should not be a problem.
|
|
241
|
+
*
|
|
242
|
+
* @returns The `/proc/stat` tracker, which is an [`EventEmitter`][node-events]. Call `stat.end()` to stop tracking. The following events are available:
|
|
243
|
+
* - **load** **(loads)** Emitted when a CPU load calculation is available.
|
|
244
|
+
* - **loads** CPU loads of **online** CPUs. Each key is a CPU id (e.g. `'cpu0'`, `'cpu1'`) and the value an object with the following properties:
|
|
245
|
+
* - **user** Percentage (0-100) of ticks spent on user programs.
|
|
246
|
+
* - **nice** Percentage (0-100) of ticks spent on `nice`d user programs.
|
|
247
|
+
* - **system** Percentage (0-100) of ticks spent on system programs.
|
|
248
|
+
* - **idle** Percentage (0-100) of ticks spent idling.
|
|
249
|
+
* - **iowait** Percentage (0-100) of ticks spent waiting for IO.
|
|
250
|
+
* - **irq** Percentage (0-100) of ticks spent on hardware interrupts.
|
|
251
|
+
* - **softirq** Percentage (0-100) of ticks spent on software interrupts.
|
|
252
|
+
* - **steal** Percentage (0-100) of ticks stolen by others.
|
|
253
|
+
* - **guest** Percentage (0-100) of ticks spent by a guest.
|
|
254
|
+
* - **guestnice** Percentage (0-100) of ticks spent by a `nice`d guest.
|
|
255
|
+
* - **total** Total. Always 100.
|
|
256
|
+
*/
|
|
257
|
+
openProcStat(): Bluebird<ProcStat>;
|
|
258
|
+
/**
|
|
259
|
+
* Deletes all data associated with a package from the device. This is roughly analogous to `adb shell pm clear <pkg>`.
|
|
260
|
+
*
|
|
261
|
+
* @param pkg The package name. This is NOT the APK.
|
|
262
|
+
*
|
|
263
|
+
* @returns true
|
|
264
|
+
*/
|
|
265
|
+
clear(pkg: string): Bluebird<boolean>;
|
|
266
|
+
/**
|
|
267
|
+
* Installs the APK on the device, replacing any previously installed version. This is roughly analogous to `adb install -r <apk>`.
|
|
268
|
+
*
|
|
269
|
+
* Note that if the call seems to stall, you may have to accept a dialog on the phone first.
|
|
270
|
+
*
|
|
271
|
+
* @param apk When `String`, interpreted as a path to an APK file. When [`Stream`][node-stream], installs directly from the stream, which must be a valid APK.
|
|
272
|
+
* @returns true
|
|
273
|
+
*/
|
|
274
|
+
install(apk: string | ReadStream): Bluebird<boolean>;
|
|
275
|
+
/**
|
|
276
|
+
* Installs an APK file which must already be located on the device file system, and replaces any previously installed version. Useful if you've previously pushed the file to the device for some reason (perhaps to have direct access to `client.push()`'s transfer stats). This is roughly analogous to `adb shell pm install -r <apk>` followed by `adb shell rm -f <apk>`.
|
|
277
|
+
*
|
|
278
|
+
* Note that if the call seems to stall, you may have to accept a dialog on the phone first.
|
|
279
|
+
*
|
|
280
|
+
* @param apk The path to the APK file on the device. The file will be removed when the command completes.
|
|
281
|
+
* @returns true
|
|
282
|
+
*/
|
|
283
|
+
installRemote(apk: string): Bluebird<boolean>;
|
|
284
|
+
/**
|
|
285
|
+
* Uninstalls the package from the device. This is roughly analogous to `adb uninstall <pkg>`.
|
|
286
|
+
*
|
|
287
|
+
* @param pkg The package name. This is NOT the APK.
|
|
288
|
+
* @returns true
|
|
289
|
+
*/
|
|
290
|
+
uninstall(pkg: string): Bluebird<boolean>;
|
|
291
|
+
/**
|
|
292
|
+
* Tells you if the specific package is installed or not. This is analogous to `adb shell pm path <pkg>` and some output parsing.
|
|
293
|
+
*
|
|
294
|
+
* @param pkg The package name. This is NOT the APK.
|
|
295
|
+
*
|
|
296
|
+
* @returns `true` if the package is installed, `false` otherwise.
|
|
297
|
+
*/
|
|
298
|
+
isInstalled(pkg: string): Bluebird<boolean>;
|
|
299
|
+
/**
|
|
300
|
+
* Starts the configured activity on the device. Roughly analogous to `adb shell am start <options>`.
|
|
301
|
+
*
|
|
302
|
+
* @param options The activity configuration.
|
|
303
|
+
*/
|
|
304
|
+
startActivity(options: StartActivityOptions): Bluebird<boolean>;
|
|
305
|
+
/**
|
|
306
|
+
* Starts the configured service on the device. Roughly analogous to `adb shell am startservice <options>`.
|
|
307
|
+
* @param options The activity configuration.
|
|
308
|
+
*/
|
|
309
|
+
startService(options: StartServiceOptions): Bluebird<boolean>;
|
|
310
|
+
/**
|
|
311
|
+
* Establishes a new Sync connection that can be used to push and pull files. This method provides the most freedom and the best performance for repeated use, but can be a bit cumbersome to use. For simple use cases, consider using `client.stat()`, `client.push()` and `client.pull()`.
|
|
312
|
+
*
|
|
313
|
+
* @returns The Sync client. See below for details. Call `sync.end()` when done.
|
|
314
|
+
*/
|
|
315
|
+
syncService(): Bluebird<Sync>;
|
|
316
|
+
/**
|
|
317
|
+
* Retrieves information about the given path.
|
|
318
|
+
*
|
|
319
|
+
* @param path The path.
|
|
320
|
+
*
|
|
321
|
+
* @returns An [`fs.Stats`][node-fs-stats] instance. While the `stats.is*` methods are available, only the following properties are supported:
|
|
322
|
+
- **mode** The raw mode.
|
|
323
|
+
- **size** The file size.
|
|
324
|
+
- **mtime** The time of last modification as a `Date`.
|
|
325
|
+
*/
|
|
326
|
+
stat(path: string): Bluebird<Stats>;
|
|
327
|
+
/**
|
|
328
|
+
* A convenience shortcut for `sync.readdir()`, mainly for one-off use cases. The connection cannot be reused, resulting in poorer performance over multiple calls. However, the Sync client will be closed automatically for you, so that's one less thing to worry about.
|
|
329
|
+
*
|
|
330
|
+
* @param path See `sync.readdir()` for details.
|
|
331
|
+
* @returns Files Lists
|
|
332
|
+
*/
|
|
333
|
+
readdir(path: string): Bluebird<Entry[]>;
|
|
334
|
+
/**
|
|
335
|
+
* A convenience shortcut for `sync.pull()`, mainly for one-off use cases. The connection cannot be reused, resulting in poorer performance over multiple calls. However, the Sync client will be closed automatically for you, so that's one less thing to worry about.
|
|
336
|
+
*
|
|
337
|
+
* @param path See `sync.pull()` for details.
|
|
338
|
+
*
|
|
339
|
+
* @returns A `PullTransfer` instance.
|
|
340
|
+
*/
|
|
341
|
+
pull(path: string): Bluebird<PullTransfer>;
|
|
342
|
+
/**
|
|
343
|
+
* A convenience shortcut for `sync.push()`, mainly for one-off use cases. The connection cannot be reused, resulting in poorer performance over multiple calls. However, the Sync client will be closed automatically for you, so that's one less thing to worry about.
|
|
344
|
+
*
|
|
345
|
+
* @param contents See `sync.push()` for details.
|
|
346
|
+
* @param path See `sync.push()` for details.
|
|
347
|
+
* @param mode See `sync.push()` for details.
|
|
348
|
+
*/
|
|
349
|
+
push(contents: string | ReadStream, path: string, mode?: number): Bluebird<PushTransfer>;
|
|
350
|
+
/**
|
|
351
|
+
* Puts the device's ADB daemon into tcp mode, allowing you to use `adb connect` or `client.connect()` to connect to it. Note that the device will still be visible to ADB as a regular USB-connected device until you unplug it. Same as `adb tcpip <port>`.
|
|
352
|
+
*
|
|
353
|
+
* @param port Optional. The port the device should listen on. Defaults to `5555`.
|
|
354
|
+
* @returns The port the device started listening on.
|
|
355
|
+
*/
|
|
356
|
+
tcpip(port?: number): Bluebird<number>;
|
|
357
|
+
/**
|
|
358
|
+
* Puts the device's ADB daemon back into USB mode. Reverses `client.tcpip()`. Same as `adb usb`.
|
|
359
|
+
*
|
|
360
|
+
* @returns true
|
|
361
|
+
*/
|
|
362
|
+
usb(): Bluebird<boolean>;
|
|
363
|
+
/**
|
|
364
|
+
* Waits until the device has finished booting. Note that the device must already be seen by ADB. This is roughly analogous to periodically checking `adb shell getprop sys.boot_completed`.
|
|
365
|
+
*
|
|
366
|
+
* @returns true
|
|
367
|
+
*/
|
|
368
|
+
waitBootComplete(): Bluebird<boolean>;
|
|
369
|
+
/**
|
|
370
|
+
* Waits until ADB can see the device. Note that you must know the serial in advance. Other than that, works like `adb -s serial wait-for-device`. If you're planning on reacting to random devices being plugged in and out, consider using `client.trackDevices()` instead.
|
|
371
|
+
*
|
|
372
|
+
* @returns The device ID. Can be useful for chaining.
|
|
373
|
+
*/
|
|
374
|
+
waitForDevice(): Bluebird<string>;
|
|
375
|
+
}
|
|
376
|
+
//# sourceMappingURL=DeviceClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeviceClient.d.ts","sourceRoot":"","sources":["../../../src/adb/DeviceClient.ts"],"names":[],"mappings":";AACA,OAAO,MAAM,MAAM,6BAA6B,CAAC;AACjD,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,IAAI,MAAM,QAAQ,CAAC;AAE1B,OAAO,QAAQ,MAAM,aAAa,CAAC;AAyCnC,OAAO,OAAO,MAAM,YAAY,CAAC;AACjC,OAAO,OAAO,MAAM,YAAY,CAAC;AACjC,OAAO,oBAAoB,MAAM,yBAAyB,CAAC;AAC3D,OAAO,mBAAmB,MAAM,wBAAwB,CAAC;AACzD,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,KAAK,MAAM,cAAc,CAAC;AACjC,OAAO,KAAK,MAAM,cAAc,CAAC;AACjC,OAAO,YAAY,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAChC,OAAO,YAAY,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,yBAAyB,MAAM,8BAA8B,CAAC;AACrE,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAC3C,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAC/C,OAAO,MAAM,MAAM,UAAU,CAAC;AAM9B,MAAM,CAAC,OAAO,OAAO,YAAY;aACH,MAAM,EAAE,MAA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