@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
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
var Assert, Command, FrameBufferCommand, Protocol, RgbTransform, debug, spawn,
|
|
2
|
-
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
|
3
|
-
hasProp = {}.hasOwnProperty;
|
|
4
|
-
|
|
5
|
-
Assert = require('assert');
|
|
6
|
-
|
|
7
|
-
spawn = require('child_process').spawn;
|
|
8
|
-
|
|
9
|
-
debug = require('debug')('adb:command:framebuffer');
|
|
10
|
-
|
|
11
|
-
Command = require('../../command');
|
|
12
|
-
|
|
13
|
-
Protocol = require('../../protocol');
|
|
14
|
-
|
|
15
|
-
RgbTransform = require('../../framebuffer/rgbtransform');
|
|
16
|
-
|
|
17
|
-
FrameBufferCommand = (function(superClass) {
|
|
18
|
-
extend(FrameBufferCommand, superClass);
|
|
19
|
-
|
|
20
|
-
function FrameBufferCommand() {
|
|
21
|
-
return FrameBufferCommand.__super__.constructor.apply(this, arguments);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
FrameBufferCommand.prototype.execute = function(format) {
|
|
25
|
-
this._send('framebuffer:');
|
|
26
|
-
return this.parser.readAscii(4).then((function(_this) {
|
|
27
|
-
return function(reply) {
|
|
28
|
-
switch (reply) {
|
|
29
|
-
case Protocol.OKAY:
|
|
30
|
-
return _this.parser.readBytes(52).then(function(header) {
|
|
31
|
-
var meta, stream;
|
|
32
|
-
meta = _this._parseHeader(header);
|
|
33
|
-
switch (format) {
|
|
34
|
-
case 'raw':
|
|
35
|
-
stream = _this.parser.raw();
|
|
36
|
-
stream.meta = meta;
|
|
37
|
-
return stream;
|
|
38
|
-
default:
|
|
39
|
-
stream = _this._convert(meta, format);
|
|
40
|
-
stream.meta = meta;
|
|
41
|
-
return stream;
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
case Protocol.FAIL:
|
|
45
|
-
return _this.parser.readError();
|
|
46
|
-
default:
|
|
47
|
-
return _this.parser.unexpected(reply, 'OKAY or FAIL');
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
})(this));
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
FrameBufferCommand.prototype._convert = function(meta, format, raw) {
|
|
54
|
-
var proc, transform;
|
|
55
|
-
debug("Converting raw framebuffer stream into " + (format.toUpperCase()));
|
|
56
|
-
switch (meta.format) {
|
|
57
|
-
case 'rgb':
|
|
58
|
-
case 'rgba':
|
|
59
|
-
break;
|
|
60
|
-
default:
|
|
61
|
-
debug("Silently transforming '" + meta.format + "' into 'rgb' for `gm`");
|
|
62
|
-
transform = new RgbTransform(meta);
|
|
63
|
-
meta.format = 'rgb';
|
|
64
|
-
raw = this.parser.raw().pipe(transform);
|
|
65
|
-
}
|
|
66
|
-
proc = spawn('gm', ['convert', '-size', meta.width + "x" + meta.height, meta.format + ":-", format + ":-"]);
|
|
67
|
-
raw.pipe(proc.stdin);
|
|
68
|
-
return proc.stdout;
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
FrameBufferCommand.prototype._parseHeader = function(header) {
|
|
72
|
-
var meta, offset;
|
|
73
|
-
meta = {};
|
|
74
|
-
offset = 0;
|
|
75
|
-
meta.version = header.readUInt32LE(offset);
|
|
76
|
-
if (meta.version === 16) {
|
|
77
|
-
throw new Error('Old-style raw images are not supported');
|
|
78
|
-
}
|
|
79
|
-
offset += 4;
|
|
80
|
-
meta.bpp = header.readUInt32LE(offset);
|
|
81
|
-
offset += 4;
|
|
82
|
-
meta.size = header.readUInt32LE(offset);
|
|
83
|
-
offset += 4;
|
|
84
|
-
meta.width = header.readUInt32LE(offset);
|
|
85
|
-
offset += 4;
|
|
86
|
-
meta.height = header.readUInt32LE(offset);
|
|
87
|
-
offset += 4;
|
|
88
|
-
meta.red_offset = header.readUInt32LE(offset);
|
|
89
|
-
offset += 4;
|
|
90
|
-
meta.red_length = header.readUInt32LE(offset);
|
|
91
|
-
offset += 4;
|
|
92
|
-
meta.blue_offset = header.readUInt32LE(offset);
|
|
93
|
-
offset += 4;
|
|
94
|
-
meta.blue_length = header.readUInt32LE(offset);
|
|
95
|
-
offset += 4;
|
|
96
|
-
meta.green_offset = header.readUInt32LE(offset);
|
|
97
|
-
offset += 4;
|
|
98
|
-
meta.green_length = header.readUInt32LE(offset);
|
|
99
|
-
offset += 4;
|
|
100
|
-
meta.alpha_offset = header.readUInt32LE(offset);
|
|
101
|
-
offset += 4;
|
|
102
|
-
meta.alpha_length = header.readUInt32LE(offset);
|
|
103
|
-
meta.format = meta.blue_offset === 0 ? 'bgr' : 'rgb';
|
|
104
|
-
if (meta.bpp === 32 || meta.alpha_length) {
|
|
105
|
-
meta.format += 'a';
|
|
106
|
-
}
|
|
107
|
-
return meta;
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
return FrameBufferCommand;
|
|
111
|
-
|
|
112
|
-
})(Command);
|
|
113
|
-
|
|
114
|
-
module.exports = FrameBufferCommand;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
var Command, GetFeaturesCommand, Protocol,
|
|
2
|
-
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
|
3
|
-
hasProp = {}.hasOwnProperty;
|
|
4
|
-
|
|
5
|
-
Command = require('../../command');
|
|
6
|
-
|
|
7
|
-
Protocol = require('../../protocol');
|
|
8
|
-
|
|
9
|
-
GetFeaturesCommand = (function(superClass) {
|
|
10
|
-
var RE_FEATURE;
|
|
11
|
-
|
|
12
|
-
extend(GetFeaturesCommand, superClass);
|
|
13
|
-
|
|
14
|
-
function GetFeaturesCommand() {
|
|
15
|
-
return GetFeaturesCommand.__super__.constructor.apply(this, arguments);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
RE_FEATURE = /^feature:(.*?)(?:=(.*?))?\r?$/gm;
|
|
19
|
-
|
|
20
|
-
GetFeaturesCommand.prototype.execute = function() {
|
|
21
|
-
this._send('shell:pm list features 2>/dev/null');
|
|
22
|
-
return this.parser.readAscii(4).then((function(_this) {
|
|
23
|
-
return function(reply) {
|
|
24
|
-
switch (reply) {
|
|
25
|
-
case Protocol.OKAY:
|
|
26
|
-
return _this.parser.readAll().then(function(data) {
|
|
27
|
-
return _this._parseFeatures(data.toString());
|
|
28
|
-
});
|
|
29
|
-
case Protocol.FAIL:
|
|
30
|
-
return _this.parser.readError();
|
|
31
|
-
default:
|
|
32
|
-
return _this.parser.unexpected(reply, 'OKAY or FAIL');
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
})(this));
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
GetFeaturesCommand.prototype._parseFeatures = function(value) {
|
|
39
|
-
var features, match;
|
|
40
|
-
features = {};
|
|
41
|
-
while (match = RE_FEATURE.exec(value)) {
|
|
42
|
-
features[match[1]] = match[2] || true;
|
|
43
|
-
}
|
|
44
|
-
return features;
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
return GetFeaturesCommand;
|
|
48
|
-
|
|
49
|
-
})(Command);
|
|
50
|
-
|
|
51
|
-
module.exports = GetFeaturesCommand;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
var Command, GetPackagesCommand, Protocol,
|
|
2
|
-
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
|
3
|
-
hasProp = {}.hasOwnProperty;
|
|
4
|
-
|
|
5
|
-
Command = require('../../command');
|
|
6
|
-
|
|
7
|
-
Protocol = require('../../protocol');
|
|
8
|
-
|
|
9
|
-
GetPackagesCommand = (function(superClass) {
|
|
10
|
-
var RE_PACKAGE;
|
|
11
|
-
|
|
12
|
-
extend(GetPackagesCommand, superClass);
|
|
13
|
-
|
|
14
|
-
function GetPackagesCommand() {
|
|
15
|
-
return GetPackagesCommand.__super__.constructor.apply(this, arguments);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
RE_PACKAGE = /^package:(.*?)\r?$/gm;
|
|
19
|
-
|
|
20
|
-
GetPackagesCommand.prototype.execute = function() {
|
|
21
|
-
this._send('shell:pm list packages 2>/dev/null');
|
|
22
|
-
return this.parser.readAscii(4).then((function(_this) {
|
|
23
|
-
return function(reply) {
|
|
24
|
-
switch (reply) {
|
|
25
|
-
case Protocol.OKAY:
|
|
26
|
-
return _this.parser.readAll().then(function(data) {
|
|
27
|
-
return _this._parsePackages(data.toString());
|
|
28
|
-
});
|
|
29
|
-
case Protocol.FAIL:
|
|
30
|
-
return _this.parser.readError();
|
|
31
|
-
default:
|
|
32
|
-
return _this.parser.unexpected(reply, 'OKAY or FAIL');
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
})(this));
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
GetPackagesCommand.prototype._parsePackages = function(value) {
|
|
39
|
-
var features, match;
|
|
40
|
-
features = [];
|
|
41
|
-
while (match = RE_PACKAGE.exec(value)) {
|
|
42
|
-
features.push(match[1]);
|
|
43
|
-
}
|
|
44
|
-
return features;
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
return GetPackagesCommand;
|
|
48
|
-
|
|
49
|
-
})(Command);
|
|
50
|
-
|
|
51
|
-
module.exports = GetPackagesCommand;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
var Command, GetPropertiesCommand, Protocol,
|
|
2
|
-
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
|
3
|
-
hasProp = {}.hasOwnProperty;
|
|
4
|
-
|
|
5
|
-
Command = require('../../command');
|
|
6
|
-
|
|
7
|
-
Protocol = require('../../protocol');
|
|
8
|
-
|
|
9
|
-
GetPropertiesCommand = (function(superClass) {
|
|
10
|
-
var RE_KEYVAL;
|
|
11
|
-
|
|
12
|
-
extend(GetPropertiesCommand, superClass);
|
|
13
|
-
|
|
14
|
-
function GetPropertiesCommand() {
|
|
15
|
-
return GetPropertiesCommand.__super__.constructor.apply(this, arguments);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
RE_KEYVAL = /^\[([\s\S]*?)\]: \[([\s\S]*?)\]\r?$/gm;
|
|
19
|
-
|
|
20
|
-
GetPropertiesCommand.prototype.execute = function() {
|
|
21
|
-
this._send('shell:getprop');
|
|
22
|
-
return this.parser.readAscii(4).then((function(_this) {
|
|
23
|
-
return function(reply) {
|
|
24
|
-
switch (reply) {
|
|
25
|
-
case Protocol.OKAY:
|
|
26
|
-
return _this.parser.readAll().then(function(data) {
|
|
27
|
-
return _this._parseProperties(data.toString());
|
|
28
|
-
});
|
|
29
|
-
case Protocol.FAIL:
|
|
30
|
-
return _this.parser.readError();
|
|
31
|
-
default:
|
|
32
|
-
return _this.parser.unexpected(reply, 'OKAY or FAIL');
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
})(this));
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
GetPropertiesCommand.prototype._parseProperties = function(value) {
|
|
39
|
-
var match, properties;
|
|
40
|
-
properties = {};
|
|
41
|
-
while (match = RE_KEYVAL.exec(value)) {
|
|
42
|
-
properties[match[1]] = match[2];
|
|
43
|
-
}
|
|
44
|
-
return properties;
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
return GetPropertiesCommand;
|
|
48
|
-
|
|
49
|
-
})(Command);
|
|
50
|
-
|
|
51
|
-
module.exports = GetPropertiesCommand;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
var Command, InstallCommand, Protocol,
|
|
2
|
-
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
|
3
|
-
hasProp = {}.hasOwnProperty;
|
|
4
|
-
|
|
5
|
-
Command = require('../../command');
|
|
6
|
-
|
|
7
|
-
Protocol = require('../../protocol');
|
|
8
|
-
|
|
9
|
-
InstallCommand = (function(superClass) {
|
|
10
|
-
extend(InstallCommand, superClass);
|
|
11
|
-
|
|
12
|
-
function InstallCommand() {
|
|
13
|
-
return InstallCommand.__super__.constructor.apply(this, arguments);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
InstallCommand.prototype.execute = function(apk) {
|
|
17
|
-
this._send("shell:pm install -r " + (this._escapeCompat(apk)));
|
|
18
|
-
return this.parser.readAscii(4).then((function(_this) {
|
|
19
|
-
return function(reply) {
|
|
20
|
-
switch (reply) {
|
|
21
|
-
case Protocol.OKAY:
|
|
22
|
-
return _this.parser.searchLine(/^(Success|Failure \[(.*?)\])$/).then(function(match) {
|
|
23
|
-
var code, err;
|
|
24
|
-
if (match[1] === 'Success') {
|
|
25
|
-
return true;
|
|
26
|
-
} else {
|
|
27
|
-
code = match[2];
|
|
28
|
-
err = new Error(apk + " could not be installed [" + code + "]");
|
|
29
|
-
err.code = code;
|
|
30
|
-
throw err;
|
|
31
|
-
}
|
|
32
|
-
})["finally"](function() {
|
|
33
|
-
return _this.parser.readAll();
|
|
34
|
-
});
|
|
35
|
-
case Protocol.FAIL:
|
|
36
|
-
return _this.parser.readError();
|
|
37
|
-
default:
|
|
38
|
-
return _this.parser.unexpected(reply, 'OKAY or FAIL');
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
})(this));
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
return InstallCommand;
|
|
45
|
-
|
|
46
|
-
})(Command);
|
|
47
|
-
|
|
48
|
-
module.exports = InstallCommand;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
var Command, IsInstalledCommand, Parser, Protocol,
|
|
2
|
-
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
|
3
|
-
hasProp = {}.hasOwnProperty;
|
|
4
|
-
|
|
5
|
-
Command = require('../../command');
|
|
6
|
-
|
|
7
|
-
Protocol = require('../../protocol');
|
|
8
|
-
|
|
9
|
-
Parser = require('../../parser');
|
|
10
|
-
|
|
11
|
-
IsInstalledCommand = (function(superClass) {
|
|
12
|
-
extend(IsInstalledCommand, superClass);
|
|
13
|
-
|
|
14
|
-
function IsInstalledCommand() {
|
|
15
|
-
return IsInstalledCommand.__super__.constructor.apply(this, arguments);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
IsInstalledCommand.prototype.execute = function(pkg) {
|
|
19
|
-
this._send("shell:pm path " + pkg + " 2>/dev/null");
|
|
20
|
-
return this.parser.readAscii(4).then((function(_this) {
|
|
21
|
-
return function(reply) {
|
|
22
|
-
switch (reply) {
|
|
23
|
-
case Protocol.OKAY:
|
|
24
|
-
return _this.parser.readAscii(8).then(function(reply) {
|
|
25
|
-
switch (reply) {
|
|
26
|
-
case 'package:':
|
|
27
|
-
return true;
|
|
28
|
-
default:
|
|
29
|
-
return _this.parser.unexpected(reply, "'package:'");
|
|
30
|
-
}
|
|
31
|
-
})["catch"](Parser.PrematureEOFError, function(err) {
|
|
32
|
-
return false;
|
|
33
|
-
});
|
|
34
|
-
case Protocol.FAIL:
|
|
35
|
-
return _this.parser.readError();
|
|
36
|
-
default:
|
|
37
|
-
return _this.parser.unexpected(reply, 'OKAY or FAIL');
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
})(this));
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
return IsInstalledCommand;
|
|
44
|
-
|
|
45
|
-
})(Command);
|
|
46
|
-
|
|
47
|
-
module.exports = IsInstalledCommand;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
var Command, ListReversesCommand, Protocol,
|
|
2
|
-
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
|
3
|
-
hasProp = {}.hasOwnProperty;
|
|
4
|
-
|
|
5
|
-
Command = require('../../command');
|
|
6
|
-
|
|
7
|
-
Protocol = require('../../protocol');
|
|
8
|
-
|
|
9
|
-
ListReversesCommand = (function(superClass) {
|
|
10
|
-
extend(ListReversesCommand, superClass);
|
|
11
|
-
|
|
12
|
-
function ListReversesCommand() {
|
|
13
|
-
return ListReversesCommand.__super__.constructor.apply(this, arguments);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
ListReversesCommand.prototype.execute = function() {
|
|
17
|
-
this._send("reverse:list-forward");
|
|
18
|
-
return this.parser.readAscii(4).then((function(_this) {
|
|
19
|
-
return function(reply) {
|
|
20
|
-
switch (reply) {
|
|
21
|
-
case Protocol.OKAY:
|
|
22
|
-
return _this.parser.readValue().then(function(value) {
|
|
23
|
-
return _this._parseReverses(value);
|
|
24
|
-
});
|
|
25
|
-
case Protocol.FAIL:
|
|
26
|
-
return _this.parser.readError();
|
|
27
|
-
default:
|
|
28
|
-
return _this.parser.unexpected(reply, 'OKAY or FAIL');
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
})(this));
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
ListReversesCommand.prototype._parseReverses = function(value) {
|
|
35
|
-
var i, len, local, ref, ref1, remote, reverse, reverses, serial;
|
|
36
|
-
reverses = [];
|
|
37
|
-
ref = value.toString().split('\n');
|
|
38
|
-
for (i = 0, len = ref.length; i < len; i++) {
|
|
39
|
-
reverse = ref[i];
|
|
40
|
-
if (reverse) {
|
|
41
|
-
ref1 = reverse.split(/\s+/), serial = ref1[0], remote = ref1[1], local = ref1[2];
|
|
42
|
-
reverses.push({
|
|
43
|
-
remote: remote,
|
|
44
|
-
local: local
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
return reverses;
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
return ListReversesCommand;
|
|
52
|
-
|
|
53
|
-
})(Command);
|
|
54
|
-
|
|
55
|
-
module.exports = ListReversesCommand;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
var Command, LocalCommand, Protocol,
|
|
2
|
-
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
|
3
|
-
hasProp = {}.hasOwnProperty;
|
|
4
|
-
|
|
5
|
-
Command = require('../../command');
|
|
6
|
-
|
|
7
|
-
Protocol = require('../../protocol');
|
|
8
|
-
|
|
9
|
-
LocalCommand = (function(superClass) {
|
|
10
|
-
extend(LocalCommand, superClass);
|
|
11
|
-
|
|
12
|
-
function LocalCommand() {
|
|
13
|
-
return LocalCommand.__super__.constructor.apply(this, arguments);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
LocalCommand.prototype.execute = function(path) {
|
|
17
|
-
this._send(/:/.test(path) ? path : "localfilesystem:" + path);
|
|
18
|
-
return this.parser.readAscii(4).then((function(_this) {
|
|
19
|
-
return function(reply) {
|
|
20
|
-
switch (reply) {
|
|
21
|
-
case Protocol.OKAY:
|
|
22
|
-
return _this.parser.raw();
|
|
23
|
-
case Protocol.FAIL:
|
|
24
|
-
return _this.parser.readError();
|
|
25
|
-
default:
|
|
26
|
-
return _this.parser.unexpected(reply, 'OKAY or FAIL');
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
})(this));
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
return LocalCommand;
|
|
33
|
-
|
|
34
|
-
})(Command);
|
|
35
|
-
|
|
36
|
-
module.exports = LocalCommand;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
var Command, LogCommand, Protocol,
|
|
2
|
-
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
|
3
|
-
hasProp = {}.hasOwnProperty;
|
|
4
|
-
|
|
5
|
-
Command = require('../../command');
|
|
6
|
-
|
|
7
|
-
Protocol = require('../../protocol');
|
|
8
|
-
|
|
9
|
-
LogCommand = (function(superClass) {
|
|
10
|
-
extend(LogCommand, superClass);
|
|
11
|
-
|
|
12
|
-
function LogCommand() {
|
|
13
|
-
return LogCommand.__super__.constructor.apply(this, arguments);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
LogCommand.prototype.execute = function(name) {
|
|
17
|
-
this._send("log:" + name);
|
|
18
|
-
return this.parser.readAscii(4).then((function(_this) {
|
|
19
|
-
return function(reply) {
|
|
20
|
-
switch (reply) {
|
|
21
|
-
case Protocol.OKAY:
|
|
22
|
-
return _this.parser.raw();
|
|
23
|
-
case Protocol.FAIL:
|
|
24
|
-
return _this.parser.readError();
|
|
25
|
-
default:
|
|
26
|
-
return _this.parser.unexpected(reply, 'OKAY or FAIL');
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
})(this));
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
return LogCommand;
|
|
33
|
-
|
|
34
|
-
})(Command);
|
|
35
|
-
|
|
36
|
-
module.exports = LogCommand;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
var Command, LineTransform, LogcatCommand, Protocol,
|
|
2
|
-
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
|
3
|
-
hasProp = {}.hasOwnProperty;
|
|
4
|
-
|
|
5
|
-
Command = require('../../command');
|
|
6
|
-
|
|
7
|
-
Protocol = require('../../protocol');
|
|
8
|
-
|
|
9
|
-
LineTransform = require('../../linetransform');
|
|
10
|
-
|
|
11
|
-
LogcatCommand = (function(superClass) {
|
|
12
|
-
extend(LogcatCommand, superClass);
|
|
13
|
-
|
|
14
|
-
function LogcatCommand() {
|
|
15
|
-
return LogcatCommand.__super__.constructor.apply(this, arguments);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
LogcatCommand.prototype.execute = function(options) {
|
|
19
|
-
var cmd;
|
|
20
|
-
if (options == null) {
|
|
21
|
-
options = {};
|
|
22
|
-
}
|
|
23
|
-
cmd = 'logcat -B *:I 2>/dev/null';
|
|
24
|
-
if (options.clear) {
|
|
25
|
-
cmd = "logcat -c 2>/dev/null && " + cmd;
|
|
26
|
-
}
|
|
27
|
-
this._send("shell:echo && " + cmd);
|
|
28
|
-
return this.parser.readAscii(4).then((function(_this) {
|
|
29
|
-
return function(reply) {
|
|
30
|
-
switch (reply) {
|
|
31
|
-
case Protocol.OKAY:
|
|
32
|
-
return _this.parser.raw().pipe(new LineTransform({
|
|
33
|
-
autoDetect: true
|
|
34
|
-
}));
|
|
35
|
-
case Protocol.FAIL:
|
|
36
|
-
return _this.parser.readError();
|
|
37
|
-
default:
|
|
38
|
-
return _this.parser.unexpected(reply, 'OKAY or FAIL');
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
})(this));
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
return LogcatCommand;
|
|
45
|
-
|
|
46
|
-
})(Command);
|
|
47
|
-
|
|
48
|
-
module.exports = LogcatCommand;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
var Command, MonkeyCommand, Promise, Protocol,
|
|
2
|
-
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
|
3
|
-
hasProp = {}.hasOwnProperty;
|
|
4
|
-
|
|
5
|
-
Promise = require('bluebird');
|
|
6
|
-
|
|
7
|
-
Command = require('../../command');
|
|
8
|
-
|
|
9
|
-
Protocol = require('../../protocol');
|
|
10
|
-
|
|
11
|
-
MonkeyCommand = (function(superClass) {
|
|
12
|
-
extend(MonkeyCommand, superClass);
|
|
13
|
-
|
|
14
|
-
function MonkeyCommand() {
|
|
15
|
-
return MonkeyCommand.__super__.constructor.apply(this, arguments);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
MonkeyCommand.prototype.execute = function(port) {
|
|
19
|
-
this._send("shell:EXTERNAL_STORAGE=/data/local/tmp monkey --port " + port + " -v");
|
|
20
|
-
return this.parser.readAscii(4).then((function(_this) {
|
|
21
|
-
return function(reply) {
|
|
22
|
-
switch (reply) {
|
|
23
|
-
case Protocol.OKAY:
|
|
24
|
-
return _this.parser.searchLine(/^:Monkey:/).timeout(1000).then(function() {
|
|
25
|
-
return _this.parser.raw();
|
|
26
|
-
})["catch"](Promise.TimeoutError, function(err) {
|
|
27
|
-
return _this.parser.raw();
|
|
28
|
-
});
|
|
29
|
-
case Protocol.FAIL:
|
|
30
|
-
return _this.parser.readError();
|
|
31
|
-
default:
|
|
32
|
-
return _this.parser.unexpected(reply, 'OKAY or FAIL');
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
})(this));
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
return MonkeyCommand;
|
|
39
|
-
|
|
40
|
-
})(Command);
|
|
41
|
-
|
|
42
|
-
module.exports = MonkeyCommand;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
var Command, Protocol, RebootCommand,
|
|
2
|
-
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
|
3
|
-
hasProp = {}.hasOwnProperty;
|
|
4
|
-
|
|
5
|
-
Command = require('../../command');
|
|
6
|
-
|
|
7
|
-
Protocol = require('../../protocol');
|
|
8
|
-
|
|
9
|
-
RebootCommand = (function(superClass) {
|
|
10
|
-
extend(RebootCommand, superClass);
|
|
11
|
-
|
|
12
|
-
function RebootCommand() {
|
|
13
|
-
return RebootCommand.__super__.constructor.apply(this, arguments);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
RebootCommand.prototype.execute = function() {
|
|
17
|
-
this._send('reboot:');
|
|
18
|
-
return this.parser.readAscii(4).then((function(_this) {
|
|
19
|
-
return function(reply) {
|
|
20
|
-
switch (reply) {
|
|
21
|
-
case Protocol.OKAY:
|
|
22
|
-
return _this.parser.readAll()["return"](true);
|
|
23
|
-
case Protocol.FAIL:
|
|
24
|
-
return _this.parser.readError();
|
|
25
|
-
default:
|
|
26
|
-
return _this.parser.unexpected(reply, 'OKAY or FAIL');
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
})(this));
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
return RebootCommand;
|
|
33
|
-
|
|
34
|
-
})(Command);
|
|
35
|
-
|
|
36
|
-
module.exports = RebootCommand;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
var Command, Protocol, RemountCommand,
|
|
2
|
-
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
|
3
|
-
hasProp = {}.hasOwnProperty;
|
|
4
|
-
|
|
5
|
-
Command = require('../../command');
|
|
6
|
-
|
|
7
|
-
Protocol = require('../../protocol');
|
|
8
|
-
|
|
9
|
-
RemountCommand = (function(superClass) {
|
|
10
|
-
extend(RemountCommand, superClass);
|
|
11
|
-
|
|
12
|
-
function RemountCommand() {
|
|
13
|
-
return RemountCommand.__super__.constructor.apply(this, arguments);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
RemountCommand.prototype.execute = function() {
|
|
17
|
-
this._send('remount:');
|
|
18
|
-
return this.parser.readAscii(4).then((function(_this) {
|
|
19
|
-
return function(reply) {
|
|
20
|
-
switch (reply) {
|
|
21
|
-
case Protocol.OKAY:
|
|
22
|
-
return true;
|
|
23
|
-
case Protocol.FAIL:
|
|
24
|
-
return _this.parser.readError();
|
|
25
|
-
default:
|
|
26
|
-
return _this.parser.unexpected(reply, 'OKAY or FAIL');
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
})(this));
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
return RemountCommand;
|
|
33
|
-
|
|
34
|
-
})(Command);
|
|
35
|
-
|
|
36
|
-
module.exports = RemountCommand;
|