@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,45 +0,0 @@
|
|
|
1
|
-
var Command, Protocol, ReverseCommand,
|
|
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
|
-
ReverseCommand = (function(superClass) {
|
|
10
|
-
extend(ReverseCommand, superClass);
|
|
11
|
-
|
|
12
|
-
function ReverseCommand() {
|
|
13
|
-
return ReverseCommand.__super__.constructor.apply(this, arguments);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
ReverseCommand.prototype.execute = function(remote, local) {
|
|
17
|
-
this._send("reverse:forward:" + remote + ";" + local);
|
|
18
|
-
return this.parser.readAscii(4).then((function(_this) {
|
|
19
|
-
return function(reply) {
|
|
20
|
-
switch (reply) {
|
|
21
|
-
case Protocol.OKAY:
|
|
22
|
-
return _this.parser.readAscii(4).then(function(reply) {
|
|
23
|
-
switch (reply) {
|
|
24
|
-
case Protocol.OKAY:
|
|
25
|
-
return true;
|
|
26
|
-
case Protocol.FAIL:
|
|
27
|
-
return _this.parser.readError();
|
|
28
|
-
default:
|
|
29
|
-
return _this.parser.unexpected(reply, 'OKAY or FAIL');
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
case Protocol.FAIL:
|
|
33
|
-
return _this.parser.readError();
|
|
34
|
-
default:
|
|
35
|
-
return _this.parser.unexpected(reply, 'OKAY or FAIL');
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
})(this));
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
return ReverseCommand;
|
|
42
|
-
|
|
43
|
-
})(Command);
|
|
44
|
-
|
|
45
|
-
module.exports = ReverseCommand;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
var Command, Protocol, RootCommand,
|
|
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
|
-
RootCommand = (function(superClass) {
|
|
10
|
-
var RE_OK;
|
|
11
|
-
|
|
12
|
-
extend(RootCommand, superClass);
|
|
13
|
-
|
|
14
|
-
function RootCommand() {
|
|
15
|
-
return RootCommand.__super__.constructor.apply(this, arguments);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
RE_OK = /restarting adbd as root/;
|
|
19
|
-
|
|
20
|
-
RootCommand.prototype.execute = function() {
|
|
21
|
-
this._send('root:');
|
|
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(value) {
|
|
27
|
-
if (RE_OK.test(value)) {
|
|
28
|
-
return true;
|
|
29
|
-
} else {
|
|
30
|
-
throw new Error(value.toString().trim());
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
case Protocol.FAIL:
|
|
34
|
-
return _this.parser.readError();
|
|
35
|
-
default:
|
|
36
|
-
return _this.parser.unexpected(reply, 'OKAY or FAIL');
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
})(this));
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
return RootCommand;
|
|
43
|
-
|
|
44
|
-
})(Command);
|
|
45
|
-
|
|
46
|
-
module.exports = RootCommand;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
var Command, LineTransform, Parser, Promise, Protocol, ScreencapCommand,
|
|
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
|
-
Parser = require('../../parser');
|
|
12
|
-
|
|
13
|
-
LineTransform = require('../../linetransform');
|
|
14
|
-
|
|
15
|
-
ScreencapCommand = (function(superClass) {
|
|
16
|
-
extend(ScreencapCommand, superClass);
|
|
17
|
-
|
|
18
|
-
function ScreencapCommand() {
|
|
19
|
-
return ScreencapCommand.__super__.constructor.apply(this, arguments);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
ScreencapCommand.prototype.execute = function() {
|
|
23
|
-
this._send('shell:echo && screencap -p 2>/dev/null');
|
|
24
|
-
return this.parser.readAscii(4).then((function(_this) {
|
|
25
|
-
return function(reply) {
|
|
26
|
-
var transform;
|
|
27
|
-
switch (reply) {
|
|
28
|
-
case Protocol.OKAY:
|
|
29
|
-
transform = new LineTransform;
|
|
30
|
-
return _this.parser.readBytes(1).then(function(chunk) {
|
|
31
|
-
transform = new LineTransform({
|
|
32
|
-
autoDetect: true
|
|
33
|
-
});
|
|
34
|
-
transform.write(chunk);
|
|
35
|
-
return _this.parser.raw().pipe(transform);
|
|
36
|
-
})["catch"](Parser.PrematureEOFError, function() {
|
|
37
|
-
throw new Error('No support for the screencap command');
|
|
38
|
-
});
|
|
39
|
-
case Protocol.FAIL:
|
|
40
|
-
return _this.parser.readError();
|
|
41
|
-
default:
|
|
42
|
-
return _this.parser.unexpected(reply, 'OKAY or FAIL');
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
})(this));
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
return ScreencapCommand;
|
|
49
|
-
|
|
50
|
-
})(Command);
|
|
51
|
-
|
|
52
|
-
module.exports = ScreencapCommand;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
var Command, Protocol, ShellCommand,
|
|
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
|
-
ShellCommand = (function(superClass) {
|
|
10
|
-
extend(ShellCommand, superClass);
|
|
11
|
-
|
|
12
|
-
function ShellCommand() {
|
|
13
|
-
return ShellCommand.__super__.constructor.apply(this, arguments);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
ShellCommand.prototype.execute = function(command) {
|
|
17
|
-
if (Array.isArray(command)) {
|
|
18
|
-
command = command.map(this._escape).join(' ');
|
|
19
|
-
}
|
|
20
|
-
this._send("shell:" + command);
|
|
21
|
-
return this.parser.readAscii(4).then((function(_this) {
|
|
22
|
-
return function(reply) {
|
|
23
|
-
switch (reply) {
|
|
24
|
-
case Protocol.OKAY:
|
|
25
|
-
return _this.parser.raw();
|
|
26
|
-
case Protocol.FAIL:
|
|
27
|
-
return _this.parser.readError();
|
|
28
|
-
default:
|
|
29
|
-
return _this.parser.unexpected(reply, 'OKAY or FAIL');
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
})(this));
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
return ShellCommand;
|
|
36
|
-
|
|
37
|
-
})(Command);
|
|
38
|
-
|
|
39
|
-
module.exports = ShellCommand;
|
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
var Command, Parser, Protocol, StartActivityCommand,
|
|
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
|
-
StartActivityCommand = (function(superClass) {
|
|
12
|
-
var EXTRA_TYPES, RE_ERROR;
|
|
13
|
-
|
|
14
|
-
extend(StartActivityCommand, superClass);
|
|
15
|
-
|
|
16
|
-
function StartActivityCommand() {
|
|
17
|
-
return StartActivityCommand.__super__.constructor.apply(this, arguments);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
RE_ERROR = /^Error: (.*)$/;
|
|
21
|
-
|
|
22
|
-
EXTRA_TYPES = {
|
|
23
|
-
string: 's',
|
|
24
|
-
"null": 'sn',
|
|
25
|
-
bool: 'z',
|
|
26
|
-
int: 'i',
|
|
27
|
-
long: 'l',
|
|
28
|
-
float: 'l',
|
|
29
|
-
uri: 'u',
|
|
30
|
-
component: 'cn'
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
StartActivityCommand.prototype.execute = function(options) {
|
|
34
|
-
var args;
|
|
35
|
-
args = this._intentArgs(options);
|
|
36
|
-
if (options.debug) {
|
|
37
|
-
args.push('-D');
|
|
38
|
-
}
|
|
39
|
-
if (options.wait) {
|
|
40
|
-
args.push('-W');
|
|
41
|
-
}
|
|
42
|
-
if (options.user || options.user === 0) {
|
|
43
|
-
args.push('--user', this._escape(options.user));
|
|
44
|
-
}
|
|
45
|
-
return this._run('start', args);
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
StartActivityCommand.prototype._run = function(command, args) {
|
|
49
|
-
this._send("shell:am " + command + " " + (args.join(' ')));
|
|
50
|
-
return this.parser.readAscii(4).then((function(_this) {
|
|
51
|
-
return function(reply) {
|
|
52
|
-
switch (reply) {
|
|
53
|
-
case Protocol.OKAY:
|
|
54
|
-
return _this.parser.searchLine(RE_ERROR)["finally"](function() {
|
|
55
|
-
return _this.parser.end();
|
|
56
|
-
}).then(function(match) {
|
|
57
|
-
throw new Error(match[1]);
|
|
58
|
-
})["catch"](Parser.PrematureEOFError, function(err) {
|
|
59
|
-
return true;
|
|
60
|
-
});
|
|
61
|
-
case Protocol.FAIL:
|
|
62
|
-
return _this.parser.readError();
|
|
63
|
-
default:
|
|
64
|
-
return _this.parser.unexpected(reply, 'OKAY or FAIL');
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
})(this));
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
StartActivityCommand.prototype._intentArgs = function(options) {
|
|
71
|
-
var args;
|
|
72
|
-
args = [];
|
|
73
|
-
if (options.extras) {
|
|
74
|
-
args.push.apply(args, this._formatExtras(options.extras));
|
|
75
|
-
}
|
|
76
|
-
if (options.action) {
|
|
77
|
-
args.push('-a', this._escape(options.action));
|
|
78
|
-
}
|
|
79
|
-
if (options.data) {
|
|
80
|
-
args.push('-d', this._escape(options.data));
|
|
81
|
-
}
|
|
82
|
-
if (options.mimeType) {
|
|
83
|
-
args.push('-t', this._escape(options.mimeType));
|
|
84
|
-
}
|
|
85
|
-
if (options.category) {
|
|
86
|
-
if (Array.isArray(options.category)) {
|
|
87
|
-
options.category.forEach((function(_this) {
|
|
88
|
-
return function(category) {
|
|
89
|
-
return args.push('-c', _this._escape(category));
|
|
90
|
-
};
|
|
91
|
-
})(this));
|
|
92
|
-
} else {
|
|
93
|
-
args.push('-c', this._escape(options.category));
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
if (options.component) {
|
|
97
|
-
args.push('-n', this._escape(options.component));
|
|
98
|
-
}
|
|
99
|
-
if (options.flags) {
|
|
100
|
-
args.push('-f', this._escape(options.flags));
|
|
101
|
-
}
|
|
102
|
-
return args;
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
StartActivityCommand.prototype._formatExtras = function(extras) {
|
|
106
|
-
if (!extras) {
|
|
107
|
-
return [];
|
|
108
|
-
}
|
|
109
|
-
if (Array.isArray(extras)) {
|
|
110
|
-
return extras.reduce((function(_this) {
|
|
111
|
-
return function(all, extra) {
|
|
112
|
-
return all.concat(_this._formatLongExtra(extra));
|
|
113
|
-
};
|
|
114
|
-
})(this), []);
|
|
115
|
-
} else {
|
|
116
|
-
return Object.keys(extras).reduce((function(_this) {
|
|
117
|
-
return function(all, key) {
|
|
118
|
-
return all.concat(_this._formatShortExtra(key, extras[key]));
|
|
119
|
-
};
|
|
120
|
-
})(this), []);
|
|
121
|
-
}
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
StartActivityCommand.prototype._formatShortExtra = function(key, value) {
|
|
125
|
-
var sugared;
|
|
126
|
-
sugared = {
|
|
127
|
-
key: key
|
|
128
|
-
};
|
|
129
|
-
if (value === null) {
|
|
130
|
-
sugared.type = 'null';
|
|
131
|
-
} else if (Array.isArray(value)) {
|
|
132
|
-
throw new Error("Refusing to format array value '" + key + "' using short syntax; empty array would cause unpredictable results due to unknown type. Please use long syntax instead.");
|
|
133
|
-
} else {
|
|
134
|
-
switch (typeof value) {
|
|
135
|
-
case 'string':
|
|
136
|
-
sugared.type = 'string';
|
|
137
|
-
sugared.value = value;
|
|
138
|
-
break;
|
|
139
|
-
case 'boolean':
|
|
140
|
-
sugared.type = 'bool';
|
|
141
|
-
sugared.value = value;
|
|
142
|
-
break;
|
|
143
|
-
case 'number':
|
|
144
|
-
sugared.type = 'int';
|
|
145
|
-
sugared.value = value;
|
|
146
|
-
break;
|
|
147
|
-
case 'object':
|
|
148
|
-
sugared = value;
|
|
149
|
-
sugared.key = key;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
return this._formatLongExtra(sugared);
|
|
153
|
-
};
|
|
154
|
-
|
|
155
|
-
StartActivityCommand.prototype._formatLongExtra = function(extra) {
|
|
156
|
-
var args, type;
|
|
157
|
-
args = [];
|
|
158
|
-
if (!extra.type) {
|
|
159
|
-
extra.type = 'string';
|
|
160
|
-
}
|
|
161
|
-
type = EXTRA_TYPES[extra.type];
|
|
162
|
-
if (!type) {
|
|
163
|
-
throw new Error("Unsupported type '" + extra.type + "' for extra '" + extra.key + "'");
|
|
164
|
-
}
|
|
165
|
-
if (extra.type === 'null') {
|
|
166
|
-
args.push("--e" + type);
|
|
167
|
-
args.push(this._escape(extra.key));
|
|
168
|
-
} else if (Array.isArray(extra.value)) {
|
|
169
|
-
args.push("--e" + type + "a");
|
|
170
|
-
args.push(this._escape(extra.key));
|
|
171
|
-
args.push(this._escape(extra.value.join(',')));
|
|
172
|
-
} else {
|
|
173
|
-
args.push("--e" + type);
|
|
174
|
-
args.push(this._escape(extra.key));
|
|
175
|
-
args.push(this._escape(extra.value));
|
|
176
|
-
}
|
|
177
|
-
return args;
|
|
178
|
-
};
|
|
179
|
-
|
|
180
|
-
return StartActivityCommand;
|
|
181
|
-
|
|
182
|
-
})(Command);
|
|
183
|
-
|
|
184
|
-
module.exports = StartActivityCommand;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
var Command, Parser, Protocol, StartActivityCommand, StartServiceCommand,
|
|
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
|
-
StartActivityCommand = require('./startactivity');
|
|
12
|
-
|
|
13
|
-
StartServiceCommand = (function(superClass) {
|
|
14
|
-
extend(StartServiceCommand, superClass);
|
|
15
|
-
|
|
16
|
-
function StartServiceCommand() {
|
|
17
|
-
return StartServiceCommand.__super__.constructor.apply(this, arguments);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
StartServiceCommand.prototype.execute = function(options) {
|
|
21
|
-
var args;
|
|
22
|
-
args = this._intentArgs(options);
|
|
23
|
-
if (options.user || options.user === 0) {
|
|
24
|
-
args.push('--user', this._escape(options.user));
|
|
25
|
-
}
|
|
26
|
-
return this._run('startservice', args);
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
return StartServiceCommand;
|
|
30
|
-
|
|
31
|
-
})(StartActivityCommand);
|
|
32
|
-
|
|
33
|
-
module.exports = StartServiceCommand;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
var Command, Protocol, Sync, SyncCommand,
|
|
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
|
-
Sync = require('../../sync');
|
|
10
|
-
|
|
11
|
-
SyncCommand = (function(superClass) {
|
|
12
|
-
extend(SyncCommand, superClass);
|
|
13
|
-
|
|
14
|
-
function SyncCommand() {
|
|
15
|
-
return SyncCommand.__super__.constructor.apply(this, arguments);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
SyncCommand.prototype.execute = function() {
|
|
19
|
-
this._send('sync:');
|
|
20
|
-
return this.parser.readAscii(4).then((function(_this) {
|
|
21
|
-
return function(reply) {
|
|
22
|
-
switch (reply) {
|
|
23
|
-
case Protocol.OKAY:
|
|
24
|
-
return new Sync(_this.connection);
|
|
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
|
-
return SyncCommand;
|
|
35
|
-
|
|
36
|
-
})(Command);
|
|
37
|
-
|
|
38
|
-
module.exports = SyncCommand;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
var Command, Protocol, TcpCommand,
|
|
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
|
-
TcpCommand = (function(superClass) {
|
|
10
|
-
extend(TcpCommand, superClass);
|
|
11
|
-
|
|
12
|
-
function TcpCommand() {
|
|
13
|
-
return TcpCommand.__super__.constructor.apply(this, arguments);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
TcpCommand.prototype.execute = function(port, host) {
|
|
17
|
-
this._send(("tcp:" + port) + (host ? ":" + host : ''));
|
|
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 TcpCommand;
|
|
33
|
-
|
|
34
|
-
})(Command);
|
|
35
|
-
|
|
36
|
-
module.exports = TcpCommand;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
var Command, Protocol, TcpIpCommand,
|
|
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
|
-
TcpIpCommand = (function(superClass) {
|
|
10
|
-
var RE_OK;
|
|
11
|
-
|
|
12
|
-
extend(TcpIpCommand, superClass);
|
|
13
|
-
|
|
14
|
-
function TcpIpCommand() {
|
|
15
|
-
return TcpIpCommand.__super__.constructor.apply(this, arguments);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
RE_OK = /restarting in/;
|
|
19
|
-
|
|
20
|
-
TcpIpCommand.prototype.execute = function(port) {
|
|
21
|
-
this._send("tcpip:" + port);
|
|
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(value) {
|
|
27
|
-
if (RE_OK.test(value)) {
|
|
28
|
-
return port;
|
|
29
|
-
} else {
|
|
30
|
-
throw new Error(value.toString().trim());
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
case Protocol.FAIL:
|
|
34
|
-
return _this.parser.readError();
|
|
35
|
-
default:
|
|
36
|
-
return _this.parser.unexpected(reply, 'OKAY or FAIL');
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
})(this));
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
return TcpIpCommand;
|
|
43
|
-
|
|
44
|
-
})(Command);
|
|
45
|
-
|
|
46
|
-
module.exports = TcpIpCommand;
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
var Command, EventEmitter, Parser, Promise, Protocol, TrackJdwpCommand,
|
|
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
|
-
EventEmitter = require('events').EventEmitter;
|
|
6
|
-
|
|
7
|
-
Promise = require('bluebird');
|
|
8
|
-
|
|
9
|
-
Command = require('../../command');
|
|
10
|
-
|
|
11
|
-
Protocol = require('../../protocol');
|
|
12
|
-
|
|
13
|
-
Parser = require('../../parser');
|
|
14
|
-
|
|
15
|
-
TrackJdwpCommand = (function(superClass) {
|
|
16
|
-
var Tracker;
|
|
17
|
-
|
|
18
|
-
extend(TrackJdwpCommand, superClass);
|
|
19
|
-
|
|
20
|
-
function TrackJdwpCommand() {
|
|
21
|
-
return TrackJdwpCommand.__super__.constructor.apply(this, arguments);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
TrackJdwpCommand.prototype.execute = function() {
|
|
25
|
-
this._send('track-jdwp');
|
|
26
|
-
return this.parser.readAscii(4).then((function(_this) {
|
|
27
|
-
return function(reply) {
|
|
28
|
-
switch (reply) {
|
|
29
|
-
case Protocol.OKAY:
|
|
30
|
-
return new Tracker(_this);
|
|
31
|
-
case Protocol.FAIL:
|
|
32
|
-
return _this.parser.readError();
|
|
33
|
-
default:
|
|
34
|
-
return _this.parser.unexpected(reply, 'OKAY or FAIL');
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
})(this));
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
Tracker = (function(superClass1) {
|
|
41
|
-
extend(Tracker, superClass1);
|
|
42
|
-
|
|
43
|
-
function Tracker(command) {
|
|
44
|
-
this.command = command;
|
|
45
|
-
this.pids = [];
|
|
46
|
-
this.pidMap = Object.create(null);
|
|
47
|
-
this.reader = this.read()["catch"](Parser.PrematureEOFError, (function(_this) {
|
|
48
|
-
return function(err) {
|
|
49
|
-
return _this.emit('end');
|
|
50
|
-
};
|
|
51
|
-
})(this))["catch"](Promise.CancellationError, (function(_this) {
|
|
52
|
-
return function(err) {
|
|
53
|
-
_this.command.connection.end();
|
|
54
|
-
return _this.emit('end');
|
|
55
|
-
};
|
|
56
|
-
})(this))["catch"]((function(_this) {
|
|
57
|
-
return function(err) {
|
|
58
|
-
_this.command.connection.end();
|
|
59
|
-
_this.emit('error', err);
|
|
60
|
-
return _this.emit('end');
|
|
61
|
-
};
|
|
62
|
-
})(this));
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
Tracker.prototype.read = function() {
|
|
66
|
-
return this.command.parser.readValue().cancellable().then((function(_this) {
|
|
67
|
-
return function(list) {
|
|
68
|
-
var maybeEmpty, pids;
|
|
69
|
-
pids = list.toString().split('\n');
|
|
70
|
-
if (maybeEmpty = pids.pop()) {
|
|
71
|
-
pids.push(maybeEmpty);
|
|
72
|
-
}
|
|
73
|
-
return _this.update(pids);
|
|
74
|
-
};
|
|
75
|
-
})(this));
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
Tracker.prototype.update = function(newList) {
|
|
79
|
-
var changeSet, i, j, len, len1, newMap, pid, ref;
|
|
80
|
-
changeSet = {
|
|
81
|
-
removed: [],
|
|
82
|
-
added: []
|
|
83
|
-
};
|
|
84
|
-
newMap = Object.create(null);
|
|
85
|
-
for (i = 0, len = newList.length; i < len; i++) {
|
|
86
|
-
pid = newList[i];
|
|
87
|
-
if (!this.pidMap[pid]) {
|
|
88
|
-
changeSet.added.push(pid);
|
|
89
|
-
this.emit('add', pid);
|
|
90
|
-
newMap[pid] = pid;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
ref = this.pids;
|
|
94
|
-
for (j = 0, len1 = ref.length; j < len1; j++) {
|
|
95
|
-
pid = ref[j];
|
|
96
|
-
if (!newMap[pid]) {
|
|
97
|
-
changeSet.removed.push(pid);
|
|
98
|
-
this.emit('remove', pid);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
this.pids = newList;
|
|
102
|
-
this.pidMap = newMap;
|
|
103
|
-
this.emit('changeSet', changeSet, newList);
|
|
104
|
-
return this;
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
Tracker.prototype.end = function() {
|
|
108
|
-
this.reader.cancel();
|
|
109
|
-
return this;
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
return Tracker;
|
|
113
|
-
|
|
114
|
-
})(EventEmitter);
|
|
115
|
-
|
|
116
|
-
return TrackJdwpCommand;
|
|
117
|
-
|
|
118
|
-
})(Command);
|
|
119
|
-
|
|
120
|
-
module.exports = TrackJdwpCommand;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
var Command, Protocol, UninstallCommand,
|
|
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
|
-
UninstallCommand = (function(superClass) {
|
|
10
|
-
extend(UninstallCommand, superClass);
|
|
11
|
-
|
|
12
|
-
function UninstallCommand() {
|
|
13
|
-
return UninstallCommand.__super__.constructor.apply(this, arguments);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
UninstallCommand.prototype.execute = function(pkg) {
|
|
17
|
-
this._send("shell:pm uninstall " + pkg);
|
|
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.*|.*Unknown package:.*)$/).then(function(match) {
|
|
23
|
-
if (match[1] === 'Success') {
|
|
24
|
-
return true;
|
|
25
|
-
} else {
|
|
26
|
-
return true;
|
|
27
|
-
}
|
|
28
|
-
})["finally"](function() {
|
|
29
|
-
return _this.parser.readAll();
|
|
30
|
-
});
|
|
31
|
-
case Protocol.FAIL:
|
|
32
|
-
return _this.parser.readError();
|
|
33
|
-
default:
|
|
34
|
-
return _this.parser.unexpected(reply, "OKAY or FAIL");
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
})(this));
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
return UninstallCommand;
|
|
41
|
-
|
|
42
|
-
})(Command);
|
|
43
|
-
|
|
44
|
-
module.exports = UninstallCommand;
|