@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,46 +0,0 @@
|
|
|
1
|
-
var Command, Protocol, UsbCommand,
|
|
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
|
-
UsbCommand = (function(superClass) {
|
|
10
|
-
var RE_OK;
|
|
11
|
-
|
|
12
|
-
extend(UsbCommand, superClass);
|
|
13
|
-
|
|
14
|
-
function UsbCommand() {
|
|
15
|
-
return UsbCommand.__super__.constructor.apply(this, arguments);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
RE_OK = /restarting in/;
|
|
19
|
-
|
|
20
|
-
UsbCommand.prototype.execute = function() {
|
|
21
|
-
this._send('usb:');
|
|
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 UsbCommand;
|
|
43
|
-
|
|
44
|
-
})(Command);
|
|
45
|
-
|
|
46
|
-
module.exports = UsbCommand;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
var Command, Protocol, WaitBootCompleteCommand, debug,
|
|
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
|
-
debug = require('debug')('adb:command:waitboot');
|
|
6
|
-
|
|
7
|
-
Command = require('../../command');
|
|
8
|
-
|
|
9
|
-
Protocol = require('../../protocol');
|
|
10
|
-
|
|
11
|
-
WaitBootCompleteCommand = (function(superClass) {
|
|
12
|
-
extend(WaitBootCompleteCommand, superClass);
|
|
13
|
-
|
|
14
|
-
function WaitBootCompleteCommand() {
|
|
15
|
-
return WaitBootCompleteCommand.__super__.constructor.apply(this, arguments);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
WaitBootCompleteCommand.prototype.execute = function() {
|
|
19
|
-
this._send('shell:while getprop sys.boot_completed 2>/dev/null; do sleep 1; done');
|
|
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(/^1$/)["finally"](function() {
|
|
25
|
-
return _this.parser.end();
|
|
26
|
-
}).then(function() {
|
|
27
|
-
return true;
|
|
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 WaitBootCompleteCommand;
|
|
39
|
-
|
|
40
|
-
})(Command);
|
|
41
|
-
|
|
42
|
-
module.exports = WaitBootCompleteCommand;
|
package/lib/adb/command.js
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
var Command, Parser, Protocol, debug;
|
|
2
|
-
|
|
3
|
-
debug = require('debug')('adb:command');
|
|
4
|
-
|
|
5
|
-
Parser = require('./parser');
|
|
6
|
-
|
|
7
|
-
Protocol = require('./protocol');
|
|
8
|
-
|
|
9
|
-
Command = (function() {
|
|
10
|
-
var RE_ESCAPE, RE_SQUOT;
|
|
11
|
-
|
|
12
|
-
RE_SQUOT = /'/g;
|
|
13
|
-
|
|
14
|
-
RE_ESCAPE = /([$`\\!"])/g;
|
|
15
|
-
|
|
16
|
-
function Command(connection) {
|
|
17
|
-
this.connection = connection;
|
|
18
|
-
this.parser = this.connection.parser;
|
|
19
|
-
this.protocol = Protocol;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
Command.prototype.execute = function() {
|
|
23
|
-
throw new Exception('Missing implementation');
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
Command.prototype._send = function(data) {
|
|
27
|
-
var encoded;
|
|
28
|
-
encoded = Protocol.encodeData(data);
|
|
29
|
-
debug("Send '" + encoded + "'");
|
|
30
|
-
this.connection.write(encoded);
|
|
31
|
-
return this;
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
Command.prototype._escape = function(arg) {
|
|
35
|
-
switch (typeof arg) {
|
|
36
|
-
case 'number':
|
|
37
|
-
return arg;
|
|
38
|
-
default:
|
|
39
|
-
return "'" + arg.toString().replace(RE_SQUOT, "'\"'\"'") + "'";
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
Command.prototype._escapeCompat = function(arg) {
|
|
44
|
-
switch (typeof arg) {
|
|
45
|
-
case 'number':
|
|
46
|
-
return arg;
|
|
47
|
-
default:
|
|
48
|
-
return '"' + arg.toString().replace(RE_ESCAPE, '\\$1') + '"';
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
return Command;
|
|
53
|
-
|
|
54
|
-
})();
|
|
55
|
-
|
|
56
|
-
module.exports = Command;
|
package/lib/adb/connection.js
DELETED
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
var Connection, EventEmitter, Net, Parser, Promise, debug, dump, execFile,
|
|
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
|
-
Net = require('net');
|
|
6
|
-
|
|
7
|
-
Promise = require('bluebird');
|
|
8
|
-
|
|
9
|
-
debug = require('debug')('adb:connection');
|
|
10
|
-
|
|
11
|
-
EventEmitter = require('events').EventEmitter;
|
|
12
|
-
|
|
13
|
-
execFile = require('child_process').execFile;
|
|
14
|
-
|
|
15
|
-
Parser = require('./parser');
|
|
16
|
-
|
|
17
|
-
dump = require('./dump');
|
|
18
|
-
|
|
19
|
-
Connection = (function(superClass) {
|
|
20
|
-
extend(Connection, superClass);
|
|
21
|
-
|
|
22
|
-
function Connection(options1) {
|
|
23
|
-
this.options = options1;
|
|
24
|
-
this.socket = null;
|
|
25
|
-
this.parser = null;
|
|
26
|
-
this.triedStarting = false;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
Connection.prototype.connect = function() {
|
|
30
|
-
this.socket = Net.connect(this.options);
|
|
31
|
-
this.socket.setNoDelay(true);
|
|
32
|
-
this.parser = new Parser(this.socket);
|
|
33
|
-
this.socket.on('connect', (function(_this) {
|
|
34
|
-
return function() {
|
|
35
|
-
return _this.emit('connect');
|
|
36
|
-
};
|
|
37
|
-
})(this));
|
|
38
|
-
this.socket.on('end', (function(_this) {
|
|
39
|
-
return function() {
|
|
40
|
-
return _this.emit('end');
|
|
41
|
-
};
|
|
42
|
-
})(this));
|
|
43
|
-
this.socket.on('drain', (function(_this) {
|
|
44
|
-
return function() {
|
|
45
|
-
return _this.emit('drain');
|
|
46
|
-
};
|
|
47
|
-
})(this));
|
|
48
|
-
this.socket.on('timeout', (function(_this) {
|
|
49
|
-
return function() {
|
|
50
|
-
return _this.emit('timeout');
|
|
51
|
-
};
|
|
52
|
-
})(this));
|
|
53
|
-
this.socket.on('close', (function(_this) {
|
|
54
|
-
return function(hadError) {
|
|
55
|
-
return _this.emit('close', hadError);
|
|
56
|
-
};
|
|
57
|
-
})(this));
|
|
58
|
-
return new Promise((function(_this) {
|
|
59
|
-
return function(resolve, reject) {
|
|
60
|
-
_this.socket.once('connect', resolve);
|
|
61
|
-
return _this.socket.once('error', reject);
|
|
62
|
-
};
|
|
63
|
-
})(this))["catch"]((function(_this) {
|
|
64
|
-
return function(err) {
|
|
65
|
-
if (err.code === 'ECONNREFUSED' && !_this.triedStarting) {
|
|
66
|
-
debug("Connection was refused, let's try starting the server once");
|
|
67
|
-
_this.triedStarting = true;
|
|
68
|
-
return _this.startServer().then(function() {
|
|
69
|
-
return _this.connect();
|
|
70
|
-
});
|
|
71
|
-
} else {
|
|
72
|
-
_this.end();
|
|
73
|
-
throw err;
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
})(this)).then((function(_this) {
|
|
77
|
-
return function() {
|
|
78
|
-
_this.socket.on('error', function(err) {
|
|
79
|
-
if (_this.socket.listenerCount('error') === 1) {
|
|
80
|
-
return _this.emit('error', err);
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
return _this;
|
|
84
|
-
};
|
|
85
|
-
})(this));
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
Connection.prototype.end = function() {
|
|
89
|
-
this.socket.end();
|
|
90
|
-
return this;
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
Connection.prototype.write = function(data, callback) {
|
|
94
|
-
this.socket.write(dump(data), callback);
|
|
95
|
-
return this;
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
Connection.prototype.startServer = function() {
|
|
99
|
-
var args, port;
|
|
100
|
-
port = this.options.port;
|
|
101
|
-
args = port ? ['-P', port, 'start-server'] : ['start-server'];
|
|
102
|
-
debug("Starting ADB server via '" + this.options.bin + " " + (args.join(' ')) + "'");
|
|
103
|
-
return this._exec(args, {});
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
Connection.prototype._exec = function(args, options) {
|
|
107
|
-
debug("CLI: " + this.options.bin + " " + (args.join(' ')));
|
|
108
|
-
return Promise.promisify(execFile)(this.options.bin, args, options);
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
Connection.prototype._handleError = function(err) {};
|
|
112
|
-
|
|
113
|
-
return Connection;
|
|
114
|
-
|
|
115
|
-
})(EventEmitter);
|
|
116
|
-
|
|
117
|
-
module.exports = Connection;
|
package/lib/adb/dump.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
var fs, out;
|
|
2
|
-
|
|
3
|
-
fs = require('fs');
|
|
4
|
-
|
|
5
|
-
if (process.env.ADBKIT_DUMP) {
|
|
6
|
-
out = fs.createWriteStream('adbkit.dump');
|
|
7
|
-
module.exports = function(chunk) {
|
|
8
|
-
out.write(chunk);
|
|
9
|
-
return chunk;
|
|
10
|
-
};
|
|
11
|
-
} else {
|
|
12
|
-
module.exports = function(chunk) {
|
|
13
|
-
return chunk;
|
|
14
|
-
};
|
|
15
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
var Assert, RgbTransform, Stream,
|
|
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
|
-
Stream = require('stream');
|
|
8
|
-
|
|
9
|
-
RgbTransform = (function(superClass) {
|
|
10
|
-
extend(RgbTransform, superClass);
|
|
11
|
-
|
|
12
|
-
function RgbTransform(meta, options) {
|
|
13
|
-
this.meta = meta;
|
|
14
|
-
this._buffer = new Buffer('');
|
|
15
|
-
Assert.ok(this.meta.bpp === 24 || this.meta.bpp === 32, 'Only 24-bit and 32-bit raw images with 8-bits per color are supported');
|
|
16
|
-
this._r_pos = this.meta.red_offset / 8;
|
|
17
|
-
this._g_pos = this.meta.green_offset / 8;
|
|
18
|
-
this._b_pos = this.meta.blue_offset / 8;
|
|
19
|
-
this._a_pos = this.meta.alpha_offset / 8;
|
|
20
|
-
this._pixel_bytes = this.meta.bpp / 8;
|
|
21
|
-
RgbTransform.__super__.constructor.call(this, options);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
RgbTransform.prototype._transform = function(chunk, encoding, done) {
|
|
25
|
-
var b, g, r, sourceCursor, target, targetCursor;
|
|
26
|
-
if (this._buffer.length) {
|
|
27
|
-
this._buffer = Buffer.concat([this._buffer, chunk], this._buffer.length + chunk.length);
|
|
28
|
-
} else {
|
|
29
|
-
this._buffer = chunk;
|
|
30
|
-
}
|
|
31
|
-
sourceCursor = 0;
|
|
32
|
-
targetCursor = 0;
|
|
33
|
-
target = this._pixel_bytes === 3 ? this._buffer : new Buffer(Math.max(4, chunk.length / this._pixel_bytes * 3));
|
|
34
|
-
while (this._buffer.length - sourceCursor >= this._pixel_bytes) {
|
|
35
|
-
r = this._buffer[sourceCursor + this._r_pos];
|
|
36
|
-
g = this._buffer[sourceCursor + this._g_pos];
|
|
37
|
-
b = this._buffer[sourceCursor + this._b_pos];
|
|
38
|
-
target[targetCursor + 0] = r;
|
|
39
|
-
target[targetCursor + 1] = g;
|
|
40
|
-
target[targetCursor + 2] = b;
|
|
41
|
-
sourceCursor += this._pixel_bytes;
|
|
42
|
-
targetCursor += 3;
|
|
43
|
-
}
|
|
44
|
-
if (targetCursor) {
|
|
45
|
-
this.push(target.slice(0, targetCursor));
|
|
46
|
-
this._buffer = this._buffer.slice(sourceCursor);
|
|
47
|
-
}
|
|
48
|
-
done();
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
return RgbTransform;
|
|
52
|
-
|
|
53
|
-
})(Stream.Transform);
|
|
54
|
-
|
|
55
|
-
module.exports = RgbTransform;
|
package/lib/adb/keycode.js
DELETED
|
@@ -1,225 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
KEYCODE_UNKNOWN: 0,
|
|
3
|
-
KEYCODE_SOFT_LEFT: 1,
|
|
4
|
-
KEYCODE_SOFT_RIGHT: 2,
|
|
5
|
-
KEYCODE_HOME: 3,
|
|
6
|
-
KEYCODE_BACK: 4,
|
|
7
|
-
KEYCODE_CALL: 5,
|
|
8
|
-
KEYCODE_ENDCALL: 6,
|
|
9
|
-
KEYCODE_0: 7,
|
|
10
|
-
KEYCODE_1: 8,
|
|
11
|
-
KEYCODE_2: 9,
|
|
12
|
-
KEYCODE_3: 10,
|
|
13
|
-
KEYCODE_4: 11,
|
|
14
|
-
KEYCODE_5: 12,
|
|
15
|
-
KEYCODE_6: 13,
|
|
16
|
-
KEYCODE_7: 14,
|
|
17
|
-
KEYCODE_8: 15,
|
|
18
|
-
KEYCODE_9: 16,
|
|
19
|
-
KEYCODE_STAR: 17,
|
|
20
|
-
KEYCODE_POUND: 18,
|
|
21
|
-
KEYCODE_DPAD_UP: 19,
|
|
22
|
-
KEYCODE_DPAD_DOWN: 20,
|
|
23
|
-
KEYCODE_DPAD_LEFT: 21,
|
|
24
|
-
KEYCODE_DPAD_RIGHT: 22,
|
|
25
|
-
KEYCODE_DPAD_CENTER: 23,
|
|
26
|
-
KEYCODE_VOLUME_UP: 24,
|
|
27
|
-
KEYCODE_VOLUME_DOWN: 25,
|
|
28
|
-
KEYCODE_POWER: 26,
|
|
29
|
-
KEYCODE_CAMERA: 27,
|
|
30
|
-
KEYCODE_CLEAR: 28,
|
|
31
|
-
KEYCODE_A: 29,
|
|
32
|
-
KEYCODE_B: 30,
|
|
33
|
-
KEYCODE_C: 31,
|
|
34
|
-
KEYCODE_D: 32,
|
|
35
|
-
KEYCODE_E: 33,
|
|
36
|
-
KEYCODE_F: 34,
|
|
37
|
-
KEYCODE_G: 35,
|
|
38
|
-
KEYCODE_H: 36,
|
|
39
|
-
KEYCODE_I: 37,
|
|
40
|
-
KEYCODE_J: 38,
|
|
41
|
-
KEYCODE_K: 39,
|
|
42
|
-
KEYCODE_L: 40,
|
|
43
|
-
KEYCODE_M: 41,
|
|
44
|
-
KEYCODE_N: 42,
|
|
45
|
-
KEYCODE_O: 43,
|
|
46
|
-
KEYCODE_P: 44,
|
|
47
|
-
KEYCODE_Q: 45,
|
|
48
|
-
KEYCODE_R: 46,
|
|
49
|
-
KEYCODE_S: 47,
|
|
50
|
-
KEYCODE_T: 48,
|
|
51
|
-
KEYCODE_U: 49,
|
|
52
|
-
KEYCODE_V: 50,
|
|
53
|
-
KEYCODE_W: 51,
|
|
54
|
-
KEYCODE_X: 52,
|
|
55
|
-
KEYCODE_Y: 53,
|
|
56
|
-
KEYCODE_Z: 54,
|
|
57
|
-
KEYCODE_COMMA: 55,
|
|
58
|
-
KEYCODE_PERIOD: 56,
|
|
59
|
-
KEYCODE_ALT_LEFT: 57,
|
|
60
|
-
KEYCODE_ALT_RIGHT: 58,
|
|
61
|
-
KEYCODE_SHIFT_LEFT: 59,
|
|
62
|
-
KEYCODE_SHIFT_RIGHT: 60,
|
|
63
|
-
KEYCODE_TAB: 61,
|
|
64
|
-
KEYCODE_SPACE: 62,
|
|
65
|
-
KEYCODE_SYM: 63,
|
|
66
|
-
KEYCODE_EXPLORER: 64,
|
|
67
|
-
KEYCODE_ENVELOPE: 65,
|
|
68
|
-
KEYCODE_ENTER: 66,
|
|
69
|
-
KEYCODE_DEL: 67,
|
|
70
|
-
KEYCODE_GRAVE: 68,
|
|
71
|
-
KEYCODE_MINUS: 69,
|
|
72
|
-
KEYCODE_EQUALS: 70,
|
|
73
|
-
KEYCODE_LEFT_BRACKET: 71,
|
|
74
|
-
KEYCODE_RIGHT_BRACKET: 72,
|
|
75
|
-
KEYCODE_BACKSLASH: 73,
|
|
76
|
-
KEYCODE_SEMICOLON: 74,
|
|
77
|
-
KEYCODE_APOSTROPHE: 75,
|
|
78
|
-
KEYCODE_SLASH: 76,
|
|
79
|
-
KEYCODE_AT: 77,
|
|
80
|
-
KEYCODE_NUM: 78,
|
|
81
|
-
KEYCODE_HEADSETHOOK: 79,
|
|
82
|
-
KEYCODE_FOCUS: 80,
|
|
83
|
-
KEYCODE_PLUS: 81,
|
|
84
|
-
KEYCODE_MENU: 82,
|
|
85
|
-
KEYCODE_NOTIFICATION: 83,
|
|
86
|
-
KEYCODE_SEARCH: 84,
|
|
87
|
-
KEYCODE_MEDIA_PLAY_PAUSE: 85,
|
|
88
|
-
KEYCODE_MEDIA_STOP: 86,
|
|
89
|
-
KEYCODE_MEDIA_NEXT: 87,
|
|
90
|
-
KEYCODE_MEDIA_PREVIOUS: 88,
|
|
91
|
-
KEYCODE_MEDIA_REWIND: 89,
|
|
92
|
-
KEYCODE_MEDIA_FAST_FORWARD: 90,
|
|
93
|
-
KEYCODE_MUTE: 91,
|
|
94
|
-
KEYCODE_PAGE_UP: 92,
|
|
95
|
-
KEYCODE_PAGE_DOWN: 93,
|
|
96
|
-
KEYCODE_PICTSYMBOLS: 94,
|
|
97
|
-
KEYCODE_SWITCH_CHARSET: 95,
|
|
98
|
-
KEYCODE_BUTTON_A: 96,
|
|
99
|
-
KEYCODE_BUTTON_B: 97,
|
|
100
|
-
KEYCODE_BUTTON_C: 98,
|
|
101
|
-
KEYCODE_BUTTON_X: 99,
|
|
102
|
-
KEYCODE_BUTTON_Y: 100,
|
|
103
|
-
KEYCODE_BUTTON_Z: 101,
|
|
104
|
-
KEYCODE_BUTTON_L1: 102,
|
|
105
|
-
KEYCODE_BUTTON_R1: 103,
|
|
106
|
-
KEYCODE_BUTTON_L2: 104,
|
|
107
|
-
KEYCODE_BUTTON_R2: 105,
|
|
108
|
-
KEYCODE_BUTTON_THUMBL: 106,
|
|
109
|
-
KEYCODE_BUTTON_THUMBR: 107,
|
|
110
|
-
KEYCODE_BUTTON_START: 108,
|
|
111
|
-
KEYCODE_BUTTON_SELECT: 109,
|
|
112
|
-
KEYCODE_BUTTON_MODE: 110,
|
|
113
|
-
KEYCODE_ESCAPE: 111,
|
|
114
|
-
KEYCODE_FORWARD_DEL: 112,
|
|
115
|
-
KEYCODE_CTRL_LEFT: 113,
|
|
116
|
-
KEYCODE_CTRL_RIGHT: 114,
|
|
117
|
-
KEYCODE_CAPS_LOCK: 115,
|
|
118
|
-
KEYCODE_SCROLL_LOCK: 116,
|
|
119
|
-
KEYCODE_META_LEFT: 117,
|
|
120
|
-
KEYCODE_META_RIGHT: 118,
|
|
121
|
-
KEYCODE_FUNCTION: 119,
|
|
122
|
-
KEYCODE_SYSRQ: 120,
|
|
123
|
-
KEYCODE_BREAK: 121,
|
|
124
|
-
KEYCODE_MOVE_HOME: 122,
|
|
125
|
-
KEYCODE_MOVE_END: 123,
|
|
126
|
-
KEYCODE_INSERT: 124,
|
|
127
|
-
KEYCODE_FORWARD: 125,
|
|
128
|
-
KEYCODE_MEDIA_PLAY: 126,
|
|
129
|
-
KEYCODE_MEDIA_PAUSE: 127,
|
|
130
|
-
KEYCODE_MEDIA_CLOSE: 128,
|
|
131
|
-
KEYCODE_MEDIA_EJECT: 129,
|
|
132
|
-
KEYCODE_MEDIA_RECORD: 130,
|
|
133
|
-
KEYCODE_F1: 131,
|
|
134
|
-
KEYCODE_F2: 132,
|
|
135
|
-
KEYCODE_F3: 133,
|
|
136
|
-
KEYCODE_F4: 134,
|
|
137
|
-
KEYCODE_F5: 135,
|
|
138
|
-
KEYCODE_F6: 136,
|
|
139
|
-
KEYCODE_F7: 137,
|
|
140
|
-
KEYCODE_F8: 138,
|
|
141
|
-
KEYCODE_F9: 139,
|
|
142
|
-
KEYCODE_F10: 140,
|
|
143
|
-
KEYCODE_F11: 141,
|
|
144
|
-
KEYCODE_F12: 142,
|
|
145
|
-
KEYCODE_NUM_LOCK: 143,
|
|
146
|
-
KEYCODE_NUMPAD_0: 144,
|
|
147
|
-
KEYCODE_NUMPAD_1: 145,
|
|
148
|
-
KEYCODE_NUMPAD_2: 146,
|
|
149
|
-
KEYCODE_NUMPAD_3: 147,
|
|
150
|
-
KEYCODE_NUMPAD_4: 148,
|
|
151
|
-
KEYCODE_NUMPAD_5: 149,
|
|
152
|
-
KEYCODE_NUMPAD_6: 150,
|
|
153
|
-
KEYCODE_NUMPAD_7: 151,
|
|
154
|
-
KEYCODE_NUMPAD_8: 152,
|
|
155
|
-
KEYCODE_NUMPAD_9: 153,
|
|
156
|
-
KEYCODE_NUMPAD_DIVIDE: 154,
|
|
157
|
-
KEYCODE_NUMPAD_MULTIPLY: 155,
|
|
158
|
-
KEYCODE_NUMPAD_SUBTRACT: 156,
|
|
159
|
-
KEYCODE_NUMPAD_ADD: 157,
|
|
160
|
-
KEYCODE_NUMPAD_DOT: 158,
|
|
161
|
-
KEYCODE_NUMPAD_COMMA: 159,
|
|
162
|
-
KEYCODE_NUMPAD_ENTER: 160,
|
|
163
|
-
KEYCODE_NUMPAD_EQUALS: 161,
|
|
164
|
-
KEYCODE_NUMPAD_LEFT_PAREN: 162,
|
|
165
|
-
KEYCODE_NUMPAD_RIGHT_PAREN: 163,
|
|
166
|
-
KEYCODE_VOLUME_MUTE: 164,
|
|
167
|
-
KEYCODE_INFO: 165,
|
|
168
|
-
KEYCODE_CHANNEL_UP: 166,
|
|
169
|
-
KEYCODE_CHANNEL_DOWN: 167,
|
|
170
|
-
KEYCODE_ZOOM_IN: 168,
|
|
171
|
-
KEYCODE_ZOOM_OUT: 169,
|
|
172
|
-
KEYCODE_TV: 170,
|
|
173
|
-
KEYCODE_WINDOW: 171,
|
|
174
|
-
KEYCODE_GUIDE: 172,
|
|
175
|
-
KEYCODE_DVR: 173,
|
|
176
|
-
KEYCODE_BOOKMARK: 174,
|
|
177
|
-
KEYCODE_CAPTIONS: 175,
|
|
178
|
-
KEYCODE_SETTINGS: 176,
|
|
179
|
-
KEYCODE_TV_POWER: 177,
|
|
180
|
-
KEYCODE_TV_INPUT: 178,
|
|
181
|
-
KEYCODE_STB_POWER: 179,
|
|
182
|
-
KEYCODE_STB_INPUT: 180,
|
|
183
|
-
KEYCODE_AVR_POWER: 181,
|
|
184
|
-
KEYCODE_AVR_INPUT: 182,
|
|
185
|
-
KEYCODE_PROG_RED: 183,
|
|
186
|
-
KEYCODE_PROG_GREEN: 184,
|
|
187
|
-
KEYCODE_PROG_YELLOW: 185,
|
|
188
|
-
KEYCODE_PROG_BLUE: 186,
|
|
189
|
-
KEYCODE_APP_SWITCH: 187,
|
|
190
|
-
KEYCODE_BUTTON_1: 188,
|
|
191
|
-
KEYCODE_BUTTON_2: 189,
|
|
192
|
-
KEYCODE_BUTTON_3: 190,
|
|
193
|
-
KEYCODE_BUTTON_4: 191,
|
|
194
|
-
KEYCODE_BUTTON_5: 192,
|
|
195
|
-
KEYCODE_BUTTON_6: 193,
|
|
196
|
-
KEYCODE_BUTTON_7: 194,
|
|
197
|
-
KEYCODE_BUTTON_8: 195,
|
|
198
|
-
KEYCODE_BUTTON_9: 196,
|
|
199
|
-
KEYCODE_BUTTON_10: 197,
|
|
200
|
-
KEYCODE_BUTTON_11: 198,
|
|
201
|
-
KEYCODE_BUTTON_12: 199,
|
|
202
|
-
KEYCODE_BUTTON_13: 200,
|
|
203
|
-
KEYCODE_BUTTON_14: 201,
|
|
204
|
-
KEYCODE_BUTTON_15: 202,
|
|
205
|
-
KEYCODE_BUTTON_16: 203,
|
|
206
|
-
KEYCODE_LANGUAGE_SWITCH: 204,
|
|
207
|
-
KEYCODE_MANNER_MODE: 205,
|
|
208
|
-
KEYCODE_3D_MODE: 206,
|
|
209
|
-
KEYCODE_CONTACTS: 207,
|
|
210
|
-
KEYCODE_CALENDAR: 208,
|
|
211
|
-
KEYCODE_MUSIC: 209,
|
|
212
|
-
KEYCODE_CALCULATOR: 210,
|
|
213
|
-
KEYCODE_ZENKAKU_HANKAKU: 211,
|
|
214
|
-
KEYCODE_EISU: 212,
|
|
215
|
-
KEYCODE_MUHENKAN: 213,
|
|
216
|
-
KEYCODE_HENKAN: 214,
|
|
217
|
-
KEYCODE_KATAKANA_HIRAGANA: 215,
|
|
218
|
-
KEYCODE_YEN: 216,
|
|
219
|
-
KEYCODE_RO: 217,
|
|
220
|
-
KEYCODE_KANA: 218,
|
|
221
|
-
KEYCODE_ASSIST: 219,
|
|
222
|
-
KEYCODE_BRIGHTNESS_DOWN: 220,
|
|
223
|
-
KEYCODE_BRIGHTNESS_UP: 221,
|
|
224
|
-
KEYCODE_MEDIA_AUDIO_TRACK: 222
|
|
225
|
-
};
|
package/lib/adb/linetransform.js
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
var LineTransform, Stream,
|
|
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
|
-
Stream = require('stream');
|
|
6
|
-
|
|
7
|
-
LineTransform = (function(superClass) {
|
|
8
|
-
extend(LineTransform, superClass);
|
|
9
|
-
|
|
10
|
-
function LineTransform(options) {
|
|
11
|
-
if (options == null) {
|
|
12
|
-
options = {};
|
|
13
|
-
}
|
|
14
|
-
this.savedR = null;
|
|
15
|
-
this.autoDetect = options.autoDetect || false;
|
|
16
|
-
this.transformNeeded = true;
|
|
17
|
-
this.skipBytes = 0;
|
|
18
|
-
delete options.autoDetect;
|
|
19
|
-
LineTransform.__super__.constructor.call(this, options);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
LineTransform.prototype._nullTransform = function(chunk, encoding, done) {
|
|
23
|
-
this.push(chunk);
|
|
24
|
-
done();
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
LineTransform.prototype._transform = function(chunk, encoding, done) {
|
|
28
|
-
var hi, last, lo, skip;
|
|
29
|
-
if (this.autoDetect) {
|
|
30
|
-
if (chunk[0] === 0x0a) {
|
|
31
|
-
this.transformNeeded = false;
|
|
32
|
-
this.skipBytes = 1;
|
|
33
|
-
} else {
|
|
34
|
-
this.skipBytes = 2;
|
|
35
|
-
}
|
|
36
|
-
this.autoDetect = false;
|
|
37
|
-
}
|
|
38
|
-
if (this.skipBytes) {
|
|
39
|
-
skip = Math.min(chunk.length, this.skipBytes);
|
|
40
|
-
chunk = chunk.slice(skip);
|
|
41
|
-
this.skipBytes -= skip;
|
|
42
|
-
}
|
|
43
|
-
if (!chunk.length) {
|
|
44
|
-
return done();
|
|
45
|
-
}
|
|
46
|
-
if (!this.transformNeeded) {
|
|
47
|
-
return this._nullTransform(chunk, encoding, done);
|
|
48
|
-
}
|
|
49
|
-
lo = 0;
|
|
50
|
-
hi = 0;
|
|
51
|
-
if (this.savedR) {
|
|
52
|
-
if (chunk[0] !== 0x0a) {
|
|
53
|
-
this.push(this.savedR);
|
|
54
|
-
}
|
|
55
|
-
this.savedR = null;
|
|
56
|
-
}
|
|
57
|
-
last = chunk.length - 1;
|
|
58
|
-
while (hi <= last) {
|
|
59
|
-
if (chunk[hi] === 0x0d) {
|
|
60
|
-
if (hi === last) {
|
|
61
|
-
this.savedR = chunk.slice(last);
|
|
62
|
-
break;
|
|
63
|
-
} else if (chunk[hi + 1] === 0x0a) {
|
|
64
|
-
this.push(chunk.slice(lo, hi));
|
|
65
|
-
lo = hi + 1;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
hi += 1;
|
|
69
|
-
}
|
|
70
|
-
if (hi !== lo) {
|
|
71
|
-
this.push(chunk.slice(lo, hi));
|
|
72
|
-
}
|
|
73
|
-
done();
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
LineTransform.prototype._flush = function(done) {
|
|
77
|
-
if (this.savedR) {
|
|
78
|
-
this.push(this.savedR);
|
|
79
|
-
}
|
|
80
|
-
return done();
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
return LineTransform;
|
|
84
|
-
|
|
85
|
-
})(Stream.Transform);
|
|
86
|
-
|
|
87
|
-
module.exports = LineTransform;
|