@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
package/dist/src/cli.js
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
const fs_1 = __importDefault(require("fs"));
|
|
30
|
+
const commander_1 = require("commander");
|
|
31
|
+
const node_forge_1 = __importDefault(require("node-forge"));
|
|
32
|
+
const pkg = __importStar(require("../package.json"));
|
|
33
|
+
const adb_1 = __importDefault(require("./adb"));
|
|
34
|
+
const auth_1 = __importDefault(require("./adb/auth"));
|
|
35
|
+
const packetreader_1 = __importDefault(require("./adb/tcpusb/packetreader"));
|
|
36
|
+
const bluebird_1 = __importDefault(require("bluebird"));
|
|
37
|
+
const program = new commander_1.Command();
|
|
38
|
+
program.version(pkg.version);
|
|
39
|
+
program
|
|
40
|
+
.command('pubkey-convert <file>')
|
|
41
|
+
.option('-f, --format <format>', 'format (pem or openssh)', String, 'pem')
|
|
42
|
+
.description('Converts an ADB-generated public key into PEM format.')
|
|
43
|
+
.action(function (file, options) {
|
|
44
|
+
return auth_1.default.parsePublicKey(fs_1.default.readFileSync(file).toString('utf8')).then((key) => {
|
|
45
|
+
switch (options.format.toLowerCase()) {
|
|
46
|
+
case 'pem':
|
|
47
|
+
return console.log(node_forge_1.default.pki.publicKeyToPem(key).trim());
|
|
48
|
+
case 'openssh':
|
|
49
|
+
return console.log(node_forge_1.default.ssh.publicKeyToOpenSSH(key, 'adbkey').trim());
|
|
50
|
+
default:
|
|
51
|
+
console.error("Unsupported format '" + options.format + "'");
|
|
52
|
+
return process.exit(1);
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
program
|
|
57
|
+
.command('pubkey-fingerprint <file>')
|
|
58
|
+
.description('Outputs the fingerprint of an ADB-generated public key.')
|
|
59
|
+
.action(function (file) {
|
|
60
|
+
return auth_1.default.parsePublicKey(fs_1.default.readFileSync(file).toString('utf8')).then((key) => {
|
|
61
|
+
return console.log('%s %s', key.fingerprint, key.comment);
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
program
|
|
65
|
+
.command('usb-device-to-tcp <serial>')
|
|
66
|
+
.option('-p, --port <port>', 'port number', (value) => String(value), '6174')
|
|
67
|
+
.description('Provides an USB device over TCP using a translating proxy.')
|
|
68
|
+
.action((serial, options) => {
|
|
69
|
+
const adb = adb_1.default.createClient();
|
|
70
|
+
const server = adb
|
|
71
|
+
.createTcpUsbBridge(serial, {
|
|
72
|
+
auth: () => bluebird_1.default.resolve(),
|
|
73
|
+
})
|
|
74
|
+
.on('listening', () => console.info('Connect with `adb connect localhost:%d`', options.port))
|
|
75
|
+
.on('error', (err) => console.error('An error occured: ' + err.message));
|
|
76
|
+
server.listen(options.port);
|
|
77
|
+
});
|
|
78
|
+
program
|
|
79
|
+
.command('parse-tcp-packets <file>')
|
|
80
|
+
.description('Parses ADB TCP packets from the given file.')
|
|
81
|
+
.action((file) => {
|
|
82
|
+
const reader = new packetreader_1.default(fs_1.default.createReadStream(file));
|
|
83
|
+
reader.on('packet', (packet) => console.log(packet.toString()));
|
|
84
|
+
});
|
|
85
|
+
program.parse(process.argv);
|
|
86
|
+
//# sourceMappingURL=cli.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export { default as Adb } from './adb';
|
|
2
|
+
export { Callback } from './Callback';
|
|
3
|
+
export { ClientOptions } from './ClientOptions';
|
|
4
|
+
export { CpuStats, Loads } from './CpuStats';
|
|
5
|
+
export { default as Device } from './Device';
|
|
6
|
+
export { default as DeviceWithPath } from './DeviceWithPath';
|
|
7
|
+
export { default as ExtendedPublicKey } from './ExtendedPublicKey';
|
|
8
|
+
export { Features } from './Features';
|
|
9
|
+
export { default as Forward } from './Forward';
|
|
10
|
+
export { default as FramebufferMeta } from './FramebufferMeta';
|
|
11
|
+
export { default as FramebufferStreamWithMeta } from './FramebufferStreamWithMeta';
|
|
12
|
+
export { Properties } from './Properties';
|
|
13
|
+
export { default as Reverse } from './Reverse';
|
|
14
|
+
export { default as SocketOptions } from './SocketOptions';
|
|
15
|
+
export { default as StartActivityOptions } from './StartActivityOptions';
|
|
16
|
+
export { default as StartServiceOptions, ExtraValue, ExtraObject, Extra } from './StartServiceOptions';
|
|
17
|
+
export { default as TrackerChangeSet } from './TrackerChangeSet';
|
|
18
|
+
export { default as WithToString } from './WithToString';
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACnF,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,UAAU,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AACvG,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// export { default } from './adb';
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.Adb = void 0;
|
|
8
|
+
var adb_1 = require("./adb");
|
|
9
|
+
Object.defineProperty(exports, "Adb", { enumerable: true, get: function () { return __importDefault(adb_1).default; } });
|
|
10
|
+
// export { default as Client } from './adb/client';
|
|
11
|
+
// export { default as ShellCommand } from './adb/command/host-transport/shell';
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,mCAAmC;;;;;;AAEnC,6BAAuC;AAA9B,2GAAA,OAAO,OAAO;AAmBvB,oDAAoD;AACpD,gFAAgF"}
|
package/package.json
CHANGED
|
@@ -1,62 +1,82 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devicefarmer/adbkit",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"description": "A
|
|
3
|
+
"version": "3.2.2",
|
|
4
|
+
"description": "A Typescript client for the Android Debug Bridge.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"adb",
|
|
7
7
|
"adbkit",
|
|
8
8
|
"android",
|
|
9
9
|
"logcat",
|
|
10
|
+
"typescript",
|
|
10
11
|
"monkey"
|
|
11
12
|
],
|
|
12
13
|
"bin": {
|
|
13
14
|
"adbkit": "./bin/adbkit"
|
|
14
15
|
},
|
|
15
16
|
"bugs": {
|
|
16
|
-
"url": "https://github.com/
|
|
17
|
+
"url": "https://github.com/devicefarmer/adbkit/issues"
|
|
17
18
|
},
|
|
18
19
|
"license": "Apache-2.0",
|
|
19
20
|
"author": {
|
|
20
21
|
"name": "Device Farmer",
|
|
21
|
-
"email": "contact@
|
|
22
|
-
"url": "https://devicefarmer.
|
|
22
|
+
"email": "contact@devicefarmer.com",
|
|
23
|
+
"url": "https://devicefarmer.com/"
|
|
23
24
|
},
|
|
24
|
-
"
|
|
25
|
+
"contributors": [
|
|
26
|
+
{
|
|
27
|
+
"name": "uriel chemouni",
|
|
28
|
+
"email": "uchemouni@gmail.com",
|
|
29
|
+
"url": "https://urielch.github.io/urielch/"
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"main": "./dist/index.js",
|
|
33
|
+
"types": "./dist/index.d.ts",
|
|
25
34
|
"repository": {
|
|
26
35
|
"type": "git",
|
|
27
|
-
"url": "https://github.com/
|
|
36
|
+
"url": "https://github.com/devicefarmer/adbkit.git"
|
|
28
37
|
},
|
|
29
38
|
"scripts": {
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
39
|
+
"clean": "rimraf dist index.d.ts index.js",
|
|
40
|
+
"keycode": "node tasks/keycode.js",
|
|
41
|
+
"prepublish": "npm run clean && npm run compile && npm run test",
|
|
42
|
+
"compile": "tsc -p .",
|
|
43
|
+
"compile2": "tsc -p tsconfig-dist.json",
|
|
44
|
+
"lint": "eslint ./ --ext .ts",
|
|
45
|
+
"format": "eslint ./ --ext .ts --fix",
|
|
46
|
+
"testJS": "mocha --reporter spec --colors dist/test/**/*.js",
|
|
47
|
+
"test": "mocha -r ts-node/register --reporter spec --colors test/**/*.ts"
|
|
33
48
|
},
|
|
34
49
|
"dependencies": {
|
|
35
|
-
"@devicefarmer/adbkit-logcat": "^
|
|
36
|
-
"@devicefarmer/adbkit-monkey": "~1.0
|
|
37
|
-
"bluebird": "~
|
|
38
|
-
"commander": "^
|
|
39
|
-
"debug": "~
|
|
40
|
-
"node-forge": "^
|
|
41
|
-
"split": "~0.
|
|
50
|
+
"@devicefarmer/adbkit-logcat": "^2.1.2",
|
|
51
|
+
"@devicefarmer/adbkit-monkey": "~1.2.0",
|
|
52
|
+
"bluebird": "~3.7",
|
|
53
|
+
"commander": "^9.1.0",
|
|
54
|
+
"debug": "~4.3.1",
|
|
55
|
+
"node-forge": "^1.3.1",
|
|
56
|
+
"split": "~1.0.1"
|
|
42
57
|
},
|
|
43
58
|
"devDependencies": {
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
59
|
+
"@types/debug": "^4.1.5",
|
|
60
|
+
"@types/mocha": "^9.0.0",
|
|
61
|
+
"@types/node": "^14.14.10",
|
|
62
|
+
"@types/sinon-chai": "^3.2.5",
|
|
63
|
+
"@types/bluebird": "^3.5.33",
|
|
64
|
+
"@types/node-forge": "^1.0.1",
|
|
65
|
+
"@typescript-eslint/eslint-plugin": "^4.9.1",
|
|
66
|
+
"@typescript-eslint/parser": "^4.9.1",
|
|
67
|
+
"bench": "~0.3.6",
|
|
68
|
+
"chai": "~4.3.0",
|
|
69
|
+
"eslint": "^8.12.0",
|
|
70
|
+
"eslint-config-prettier": "^8.0.0",
|
|
71
|
+
"eslint-plugin-prettier": "^4.0.0",
|
|
72
|
+
"eslint-plugin-progress": "0.0.1",
|
|
73
|
+
"mocha": "~8.3.1",
|
|
74
|
+
"prettier": "^2.2.1",
|
|
75
|
+
"rimraf": "^3.0.2",
|
|
76
|
+
"sinon": "~13.0.1",
|
|
77
|
+
"sinon-chai": "~3.7.0",
|
|
78
|
+
"ts-node": "^10.4.0",
|
|
79
|
+
"typescript": "^4.1.3"
|
|
60
80
|
},
|
|
61
81
|
"engines": {
|
|
62
82
|
"node": ">= 0.10.4"
|
package/.semaphore/publish.yml
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
version: v1.0
|
|
2
|
-
name: Publish
|
|
3
|
-
blocks:
|
|
4
|
-
- name: Publish
|
|
5
|
-
task:
|
|
6
|
-
jobs:
|
|
7
|
-
- name: NPM publish
|
|
8
|
-
commands:
|
|
9
|
-
- checkout
|
|
10
|
-
- sem-version node 12
|
|
11
|
-
- cache restore
|
|
12
|
-
- npm install
|
|
13
|
-
- npm publish --access public
|
|
14
|
-
secrets:
|
|
15
|
-
- name: npmjs
|
|
16
|
-
agent:
|
|
17
|
-
machine:
|
|
18
|
-
type: e1-standard-2
|
|
19
|
-
os_image: ubuntu1804
|
package/.semaphore/semaphore.yml
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
version: v1.0
|
|
2
|
-
name: NPM Test
|
|
3
|
-
agent:
|
|
4
|
-
machine:
|
|
5
|
-
type: e1-standard-2
|
|
6
|
-
os_image: ubuntu1804
|
|
7
|
-
blocks:
|
|
8
|
-
- name: Test
|
|
9
|
-
task:
|
|
10
|
-
jobs:
|
|
11
|
-
- name: Test
|
|
12
|
-
commands:
|
|
13
|
-
- checkout
|
|
14
|
-
- 'wget https://dl.google.com/android/repository/platform-tools-latest-linux.zip -O ~/platform-tools-latest-linux.zip'
|
|
15
|
-
- unzip ~/platform-tools-latest-linux.zip -d ~
|
|
16
|
-
- 'export PATH=$PATH:~/platform-tools'
|
|
17
|
-
- sem-version node 12
|
|
18
|
-
- cache restore
|
|
19
|
-
- npm install
|
|
20
|
-
- cache store
|
|
21
|
-
- npm run build --if-present
|
|
22
|
-
- npm test
|
|
23
|
-
promotions:
|
|
24
|
-
- name: NPM publish
|
|
25
|
-
pipeline_file: publish.yml
|
|
26
|
-
auto_promote:
|
|
27
|
-
when: (branch = 'master' OR tag =~ '.*') AND result = 'passed'
|
package/index.js
DELETED
package/lib/adb/auth.js
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
var Auth, BigInteger, Promise, forge;
|
|
2
|
-
|
|
3
|
-
Promise = require('bluebird');
|
|
4
|
-
|
|
5
|
-
forge = require('node-forge');
|
|
6
|
-
|
|
7
|
-
BigInteger = forge.jsbn.BigInteger;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
/*
|
|
11
|
-
The stucture of an ADB RSAPublicKey is as follows:
|
|
12
|
-
|
|
13
|
-
#define RSANUMBYTES 256 // 2048 bit key length
|
|
14
|
-
#define RSANUMWORDS (RSANUMBYTES / sizeof(uint32_t))
|
|
15
|
-
|
|
16
|
-
typedef struct RSAPublicKey {
|
|
17
|
-
int len; // Length of n[] in number of uint32_t
|
|
18
|
-
uint32_t n0inv; // -1 / n[0] mod 2^32
|
|
19
|
-
uint32_t n[RSANUMWORDS]; // modulus as little endian array
|
|
20
|
-
uint32_t rr[RSANUMWORDS]; // R^2 as little endian array
|
|
21
|
-
int exponent; // 3 or 65537
|
|
22
|
-
} RSAPublicKey;
|
|
23
|
-
*/
|
|
24
|
-
|
|
25
|
-
Auth = (function() {
|
|
26
|
-
var RE, readPublicKeyFromStruct;
|
|
27
|
-
|
|
28
|
-
function Auth() {}
|
|
29
|
-
|
|
30
|
-
RE = /^((?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?)\0?( .*|)\s*$/;
|
|
31
|
-
|
|
32
|
-
readPublicKeyFromStruct = function(struct, comment) {
|
|
33
|
-
var e, key, len, md, n, offset;
|
|
34
|
-
if (!struct.length) {
|
|
35
|
-
throw new Error("Invalid public key");
|
|
36
|
-
}
|
|
37
|
-
offset = 0;
|
|
38
|
-
len = struct.readUInt32LE(offset) * 4;
|
|
39
|
-
offset += 4;
|
|
40
|
-
if (struct.length !== 4 + 4 + len + len + 4) {
|
|
41
|
-
throw new Error("Invalid public key");
|
|
42
|
-
}
|
|
43
|
-
offset += 4;
|
|
44
|
-
n = new Buffer(len);
|
|
45
|
-
struct.copy(n, 0, offset, offset + len);
|
|
46
|
-
[].reverse.call(n);
|
|
47
|
-
offset += len;
|
|
48
|
-
offset += len;
|
|
49
|
-
e = struct.readUInt32LE(offset);
|
|
50
|
-
if (!(e === 3 || e === 65537)) {
|
|
51
|
-
throw new Error("Invalid exponent " + e + ", only 3 and 65537 are supported");
|
|
52
|
-
}
|
|
53
|
-
key = forge.pki.setRsaPublicKey(new BigInteger(n.toString('hex'), 16), new BigInteger(e.toString(), 10));
|
|
54
|
-
md = forge.md.md5.create();
|
|
55
|
-
md.update(struct.toString('binary'));
|
|
56
|
-
key.fingerprint = md.digest().toHex().match(/../g).join(':');
|
|
57
|
-
key.comment = comment;
|
|
58
|
-
return key;
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
Auth.parsePublicKey = function(buffer) {
|
|
62
|
-
return new Promise(function(resolve, reject) {
|
|
63
|
-
var comment, match, struct;
|
|
64
|
-
if (match = RE.exec(buffer)) {
|
|
65
|
-
struct = new Buffer(match[1], 'base64');
|
|
66
|
-
comment = match[2].trim();
|
|
67
|
-
return resolve(readPublicKeyFromStruct(struct, comment));
|
|
68
|
-
} else {
|
|
69
|
-
return reject(new Error("Unrecognizable public key format"));
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
return Auth;
|
|
75
|
-
|
|
76
|
-
})();
|
|
77
|
-
|
|
78
|
-
module.exports = Auth;
|