@yume-chan/adb 2.6.2 → 3.0.0-beta.0
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/LICENSE +1 -1
- package/README.md +1 -1
- package/esm/adb.d.ts +18 -15
- package/esm/adb.d.ts.map +1 -1
- package/esm/adb.js +18 -11
- package/esm/adb.js.map +1 -1
- package/esm/banner.d.ts +1 -1
- package/esm/banner.d.ts.map +1 -1
- package/esm/banner.js.map +1 -1
- package/esm/daemon/auth/authenticator.d.ts +28 -0
- package/esm/daemon/auth/authenticator.d.ts.map +1 -0
- package/esm/daemon/auth/authenticator.js +108 -0
- package/esm/daemon/auth/authenticator.js.map +1 -0
- package/esm/daemon/auth/index.d.ts +5 -0
- package/esm/daemon/auth/index.d.ts.map +1 -0
- package/esm/daemon/auth/index.js +5 -0
- package/esm/daemon/auth/index.js.map +1 -0
- package/esm/daemon/auth/packet-processor.d.ts +42 -0
- package/esm/daemon/auth/packet-processor.d.ts.map +1 -0
- package/esm/daemon/auth/packet-processor.js +129 -0
- package/esm/daemon/auth/packet-processor.js.map +1 -0
- package/esm/daemon/auth/public-key.d.ts +8 -0
- package/esm/daemon/auth/public-key.d.ts.map +1 -0
- package/esm/daemon/auth/public-key.js +74 -0
- package/esm/daemon/auth/public-key.js.map +1 -0
- package/esm/daemon/auth/type.d.ts +5 -0
- package/esm/daemon/auth/type.d.ts.map +1 -0
- package/esm/daemon/auth/type.js +2 -0
- package/esm/daemon/auth/type.js.map +1 -0
- package/esm/daemon/crypto.d.ts +6 -5
- package/esm/daemon/crypto.d.ts.map +1 -1
- package/esm/daemon/crypto.js +23 -72
- package/esm/daemon/crypto.js.map +1 -1
- package/esm/daemon/dispatcher.d.ts +3 -3
- package/esm/daemon/dispatcher.d.ts.map +1 -1
- package/esm/daemon/dispatcher.js +11 -4
- package/esm/daemon/dispatcher.js.map +1 -1
- package/esm/daemon/index.d.ts +1 -1
- package/esm/daemon/index.d.ts.map +1 -1
- package/esm/daemon/index.js +1 -1
- package/esm/daemon/index.js.map +1 -1
- package/esm/daemon/socket.d.ts +3 -3
- package/esm/daemon/socket.d.ts.map +1 -1
- package/esm/daemon/transport.d.ts +13 -65
- package/esm/daemon/transport.d.ts.map +1 -1
- package/esm/daemon/transport.js +18 -140
- package/esm/daemon/transport.js.map +1 -1
- package/esm/device-observer.d.ts +2 -3
- package/esm/device-observer.d.ts.map +1 -1
- package/esm/features-value.d.ts +40 -0
- package/esm/features-value.d.ts.map +1 -0
- package/esm/features-value.js +46 -0
- package/esm/features-value.js.map +1 -0
- package/esm/features.d.ts +4 -12
- package/esm/features.d.ts.map +1 -1
- package/esm/features.js +27 -13
- package/esm/features.js.map +1 -1
- package/esm/index.d.ts +1 -1
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +1 -1
- package/esm/index.js.map +1 -1
- package/esm/server/client.d.ts +7 -7
- package/esm/server/client.d.ts.map +1 -1
- package/esm/server/client.js +69 -86
- package/esm/server/client.js.map +1 -1
- package/esm/server/commands/wireless.js +1 -1
- package/esm/server/commands/wireless.js.map +1 -1
- package/esm/server/{stream.d.ts → data-connection.d.ts} +5 -5
- package/esm/server/data-connection.d.ts.map +1 -0
- package/esm/server/{stream.js → data-connection.js} +4 -4
- package/esm/server/data-connection.js.map +1 -0
- package/esm/server/index.d.ts +1 -1
- package/esm/server/index.d.ts.map +1 -1
- package/esm/server/index.js +1 -1
- package/esm/server/index.js.map +1 -1
- package/esm/server/observer.d.ts.map +1 -1
- package/esm/server/observer.js +14 -13
- package/esm/server/observer.js.map +1 -1
- package/esm/server/transport.d.ts +4 -6
- package/esm/server/transport.d.ts.map +1 -1
- package/esm/server/transport.js +9 -24
- package/esm/server/transport.js.map +1 -1
- package/esm/service/framebuffer.d.ts.map +1 -0
- package/esm/service/framebuffer.js.map +1 -0
- package/esm/{commands → service}/index.d.ts +1 -2
- package/esm/service/index.d.ts.map +1 -0
- package/esm/{commands → service}/index.js +1 -2
- package/esm/service/index.js.map +1 -0
- package/esm/{commands → service}/power.d.ts +4 -2
- package/esm/service/power.d.ts.map +1 -0
- package/esm/{commands → service}/power.js +11 -5
- package/esm/service/power.js.map +1 -0
- package/esm/service/reverse/error.d.ts +14 -0
- package/esm/service/reverse/error.d.ts.map +1 -0
- package/esm/service/reverse/error.js +21 -0
- package/esm/service/reverse/error.js.map +1 -0
- package/esm/service/reverse/index.d.ts +3 -0
- package/esm/service/reverse/index.d.ts.map +1 -0
- package/esm/service/reverse/index.js +4 -0
- package/esm/service/reverse/index.js.map +1 -0
- package/esm/service/reverse/response.d.ts +2 -0
- package/esm/service/reverse/response.d.ts.map +1 -0
- package/esm/service/reverse/response.js +30 -0
- package/esm/service/reverse/response.js.map +1 -0
- package/esm/service/reverse/service.d.ts +59 -0
- package/esm/service/reverse/service.d.ts.map +1 -0
- package/esm/{commands/reverse.js → service/reverse/service.js} +16 -45
- package/esm/service/reverse/service.js.map +1 -0
- package/esm/{commands → service}/subprocess/index.d.ts +1 -0
- package/esm/service/subprocess/index.d.ts.map +1 -0
- package/esm/{commands → service}/subprocess/index.js +1 -0
- package/esm/service/subprocess/index.js.map +1 -0
- package/esm/service/subprocess/none/index.d.ts.map +1 -0
- package/esm/service/subprocess/none/index.js.map +1 -0
- package/esm/{commands → service}/subprocess/none/process.d.ts +2 -2
- package/esm/service/subprocess/none/process.d.ts.map +1 -0
- package/esm/service/subprocess/none/process.js.map +1 -0
- package/esm/{commands → service}/subprocess/none/pty.d.ts +4 -4
- package/esm/service/subprocess/none/pty.d.ts.map +1 -0
- package/esm/{commands → service}/subprocess/none/pty.js +1 -1
- package/esm/service/subprocess/none/pty.js.map +1 -0
- package/esm/service/subprocess/none/service.d.ts +10 -0
- package/esm/service/subprocess/none/service.d.ts.map +1 -0
- package/esm/service/subprocess/none/service.js +44 -0
- package/esm/service/subprocess/none/service.js.map +1 -0
- package/esm/service/subprocess/none/spawner.d.ts +15 -0
- package/esm/service/subprocess/none/spawner.d.ts.map +1 -0
- package/esm/service/subprocess/none/spawner.js +31 -0
- package/esm/service/subprocess/none/spawner.js.map +1 -0
- package/esm/{commands → service}/subprocess/pty.d.ts +1 -1
- package/esm/service/subprocess/pty.d.ts.map +1 -0
- package/esm/{commands → service}/subprocess/pty.js.map +1 -1
- package/esm/service/subprocess/service.d.ts.map +1 -0
- package/esm/{commands → service}/subprocess/service.js +1 -1
- package/esm/service/subprocess/service.js.map +1 -0
- package/esm/service/subprocess/shell/index.d.ts +5 -0
- package/esm/{commands/subprocess/none → service/subprocess/shell}/index.d.ts.map +1 -1
- package/esm/service/subprocess/shell/index.js +6 -0
- package/esm/{commands/subprocess/none → service/subprocess/shell}/index.js.map +1 -1
- package/esm/{commands → service}/subprocess/shell/process.d.ts +2 -2
- package/esm/service/subprocess/shell/process.d.ts.map +1 -0
- package/esm/{commands → service}/subprocess/shell/process.js +4 -6
- package/esm/service/subprocess/shell/process.js.map +1 -0
- package/esm/{commands → service}/subprocess/shell/pty.d.ts +4 -4
- package/esm/service/subprocess/shell/pty.d.ts.map +1 -0
- package/esm/{commands → service}/subprocess/shell/pty.js +11 -9
- package/esm/service/subprocess/shell/pty.js.map +1 -0
- package/esm/service/subprocess/shell/service.d.ts +34 -0
- package/esm/service/subprocess/shell/service.d.ts.map +1 -0
- package/esm/service/subprocess/shell/service.js +52 -0
- package/esm/service/subprocess/shell/service.js.map +1 -0
- package/esm/service/subprocess/shell/shared.d.ts +2 -0
- package/esm/service/subprocess/shell/shared.d.ts.map +1 -0
- package/esm/{commands → service}/subprocess/shell/shared.js +2 -0
- package/esm/service/subprocess/shell/shared.js.map +1 -0
- package/esm/{commands → service}/subprocess/shell/spawner.d.ts +3 -7
- package/esm/service/subprocess/shell/spawner.d.ts.map +1 -0
- package/esm/service/subprocess/shell/spawner.js +45 -0
- package/esm/service/subprocess/shell/spawner.js.map +1 -0
- package/esm/service/subprocess/types.d.ts +14 -0
- package/esm/service/subprocess/types.d.ts.map +1 -0
- package/esm/service/subprocess/types.js +2 -0
- package/esm/service/subprocess/types.js.map +1 -0
- package/esm/service/subprocess/utils.d.ts +39 -0
- package/esm/service/subprocess/utils.d.ts.map +1 -0
- package/esm/service/subprocess/utils.js +142 -0
- package/esm/service/subprocess/utils.js.map +1 -0
- package/esm/service/sync/android.d.ts +34 -0
- package/esm/service/sync/android.d.ts.map +1 -0
- package/esm/service/sync/android.js +34 -0
- package/esm/service/sync/android.js.map +1 -0
- package/esm/service/sync/compression/compression.d.ts +17 -0
- package/esm/service/sync/compression/compression.d.ts.map +1 -0
- package/esm/service/sync/compression/compression.js +92 -0
- package/esm/service/sync/compression/compression.js.map +1 -0
- package/esm/service/sync/compression/format-ns.d.ts +5 -0
- package/esm/service/sync/compression/format-ns.d.ts.map +1 -0
- package/esm/service/sync/compression/format-ns.js +5 -0
- package/esm/service/sync/compression/format-ns.js.map +1 -0
- package/esm/service/sync/compression/format.d.ts +4 -0
- package/esm/service/sync/compression/format.d.ts.map +1 -0
- package/esm/service/sync/compression/format.js +3 -0
- package/esm/service/sync/compression/format.js.map +1 -0
- package/esm/service/sync/compression/index.d.ts +2 -0
- package/esm/service/sync/compression/index.d.ts.map +1 -0
- package/esm/service/sync/compression/index.js +2 -0
- package/esm/service/sync/compression/index.js.map +1 -0
- package/esm/service/sync/id/common.d.ts +17 -0
- package/esm/service/sync/id/common.d.ts.map +1 -0
- package/esm/service/sync/id/common.js +29 -0
- package/esm/service/sync/id/common.js.map +1 -0
- package/esm/service/sync/id/index.d.ts +4 -0
- package/esm/service/sync/id/index.d.ts.map +1 -0
- package/esm/service/sync/id/index.js +6 -0
- package/esm/service/sync/id/index.js.map +1 -0
- package/esm/service/sync/id/request.d.ts +7 -0
- package/esm/service/sync/id/request.d.ts.map +1 -0
- package/esm/service/sync/id/request.js +9 -0
- package/esm/service/sync/id/request.js.map +1 -0
- package/esm/service/sync/id/response.d.ts +6 -0
- package/esm/service/sync/id/response.d.ts.map +1 -0
- package/esm/service/sync/id/response.js +8 -0
- package/esm/service/sync/id/response.js.map +1 -0
- package/esm/service/sync/index-ns.d.ts +7 -0
- package/esm/service/sync/index-ns.d.ts.map +1 -0
- package/esm/service/sync/index-ns.js +7 -0
- package/esm/service/sync/index-ns.js.map +1 -0
- package/esm/service/sync/index.d.ts +3 -0
- package/esm/service/sync/index.d.ts.map +1 -0
- package/esm/service/sync/index.js +3 -0
- package/esm/service/sync/index.js.map +1 -0
- package/esm/service/sync/request/index.d.ts +5 -0
- package/esm/service/sync/request/index.d.ts.map +1 -0
- package/esm/service/sync/request/index.js +5 -0
- package/esm/service/sync/request/index.js.map +1 -0
- package/esm/{commands/sync → service/sync/request}/list.d.ts +21 -19
- package/esm/service/sync/request/list.d.ts.map +1 -0
- package/esm/service/sync/request/list.js +77 -0
- package/esm/service/sync/request/list.js.map +1 -0
- package/esm/service/sync/request/pull.d.ts +12 -0
- package/esm/service/sync/request/pull.d.ts.map +1 -0
- package/esm/service/sync/request/pull.js +28 -0
- package/esm/service/sync/request/pull.js.map +1 -0
- package/esm/service/sync/request/push.d.ts +54 -0
- package/esm/service/sync/request/push.d.ts.map +1 -0
- package/esm/service/sync/request/push.js +95 -0
- package/esm/service/sync/request/push.js.map +1 -0
- package/esm/{commands/sync → service/sync/request}/stat.d.ts +40 -50
- package/esm/service/sync/request/stat.d.ts.map +1 -0
- package/esm/service/sync/request/stat.js +89 -0
- package/esm/service/sync/request/stat.js.map +1 -0
- package/esm/service/sync/service.d.ts +123 -0
- package/esm/service/sync/service.d.ts.map +1 -0
- package/esm/service/sync/service.js +170 -0
- package/esm/service/sync/service.js.map +1 -0
- package/esm/service/sync/socket-pool.d.ts +11 -0
- package/esm/service/sync/socket-pool.d.ts.map +1 -0
- package/esm/service/sync/socket-pool.js +80 -0
- package/esm/service/sync/socket-pool.js.map +1 -0
- package/esm/service/sync/socket.d.ts +40 -0
- package/esm/service/sync/socket.d.ts.map +1 -0
- package/esm/service/sync/socket.js +153 -0
- package/esm/service/sync/socket.js.map +1 -0
- package/esm/{commands → service}/tcpip.d.ts +4 -2
- package/esm/service/tcpip.d.ts.map +1 -0
- package/esm/{commands → service}/tcpip.js +10 -7
- package/esm/service/tcpip.js.map +1 -0
- package/esm/utils/array-buffer.d.ts.map +1 -1
- package/esm/utils/array-buffer.js +2 -3
- package/esm/utils/array-buffer.js.map +1 -1
- package/esm/utils/base64.d.ts.map +1 -1
- package/esm/utils/base64.js +22 -10
- package/esm/utils/base64.js.map +1 -1
- package/esm/utils/index.d.ts +1 -0
- package/esm/utils/index.d.ts.map +1 -1
- package/esm/utils/index.js +1 -0
- package/esm/utils/index.js.map +1 -1
- package/esm/utils/md5.d.ts +8 -0
- package/esm/utils/md5.d.ts.map +1 -0
- package/esm/utils/md5.js +149 -0
- package/esm/utils/md5.js.map +1 -0
- package/package.json +9 -9
- package/src/adb.ts +44 -35
- package/src/banner.ts +2 -1
- package/src/daemon/auth/authenticator.ts +186 -0
- package/src/daemon/auth/index.ts +4 -0
- package/src/daemon/auth/packet-processor.ts +212 -0
- package/src/daemon/auth/public-key.ts +112 -0
- package/src/daemon/auth/type.ts +5 -0
- package/src/daemon/crypto.ts +36 -101
- package/src/daemon/dispatcher.ts +15 -8
- package/src/daemon/index.ts +1 -1
- package/src/daemon/socket.ts +3 -3
- package/src/daemon/transport.ts +35 -253
- package/src/device-observer.ts +3 -3
- package/src/features-value.ts +47 -0
- package/src/features.ts +31 -14
- package/src/index.ts +1 -1
- package/src/server/client.ts +94 -93
- package/src/server/commands/wireless.ts +1 -1
- package/src/server/{stream.ts → data-connection.ts} +4 -4
- package/src/server/index.ts +1 -1
- package/src/server/observer.ts +21 -19
- package/src/server/transport.ts +13 -34
- package/src/{commands → service}/index.ts +1 -2
- package/src/{commands → service}/power.ts +14 -5
- package/src/service/reverse/error.ts +35 -0
- package/src/service/reverse/index.ts +3 -0
- package/src/service/reverse/response.ts +38 -0
- package/src/{commands/reverse.ts → service/reverse/service.ts} +32 -72
- package/src/{commands → service}/subprocess/index.ts +1 -0
- package/src/{commands → service}/subprocess/none/process.ts +3 -3
- package/src/{commands → service}/subprocess/none/pty.ts +5 -5
- package/src/service/subprocess/none/service.ts +57 -0
- package/src/service/subprocess/none/spawner.ts +81 -0
- package/src/{commands → service}/subprocess/pty.ts +1 -1
- package/src/{commands → service}/subprocess/service.ts +1 -1
- package/src/{commands → service}/subprocess/shell/index.ts +1 -1
- package/src/{commands → service}/subprocess/shell/process.ts +6 -7
- package/src/{commands → service}/subprocess/shell/pty.ts +15 -13
- package/src/service/subprocess/shell/service.ts +75 -0
- package/src/{commands → service}/subprocess/shell/shared.ts +5 -0
- package/src/service/subprocess/shell/spawner.ts +109 -0
- package/src/service/subprocess/types.ts +19 -0
- package/src/service/subprocess/utils.ts +166 -0
- package/src/service/sync/android.ts +43 -0
- package/src/service/sync/compression/compression.ts +126 -0
- package/src/service/sync/compression/format-ns.ts +4 -0
- package/src/service/sync/compression/format.ts +5 -0
- package/src/service/sync/compression/index.ts +1 -0
- package/src/service/sync/id/common.ts +33 -0
- package/src/service/sync/id/index.ts +7 -0
- package/src/service/sync/id/request.ts +12 -0
- package/src/service/sync/id/response.ts +11 -0
- package/src/service/sync/index-ns.ts +6 -0
- package/src/service/sync/index.ts +2 -0
- package/src/service/sync/request/index.ts +4 -0
- package/src/service/sync/request/list.ts +110 -0
- package/src/service/sync/request/pull.ts +49 -0
- package/src/service/sync/request/push.ts +184 -0
- package/src/service/sync/request/stat.ts +127 -0
- package/src/service/sync/service.ts +255 -0
- package/src/service/sync/socket-pool.ts +97 -0
- package/src/service/sync/socket.ts +201 -0
- package/src/{commands → service}/tcpip.ts +13 -7
- package/src/utils/array-buffer.ts +2 -3
- package/src/utils/base64.ts +24 -10
- package/src/utils/index.ts +1 -0
- package/src/utils/md5.ts +185 -0
- package/yume-chan-adb-3.0.0-beta.0.tgz +0 -0
- package/CHANGELOG.md +0 -257
- package/esm/commands/base.d.ts +0 -8
- package/esm/commands/base.d.ts.map +0 -1
- package/esm/commands/base.js +0 -12
- package/esm/commands/base.js.map +0 -1
- package/esm/commands/framebuffer.d.ts.map +0 -1
- package/esm/commands/framebuffer.js.map +0 -1
- package/esm/commands/index.d.ts.map +0 -1
- package/esm/commands/index.js.map +0 -1
- package/esm/commands/power.d.ts.map +0 -1
- package/esm/commands/power.js.map +0 -1
- package/esm/commands/reverse.d.ts +0 -48
- package/esm/commands/reverse.d.ts.map +0 -1
- package/esm/commands/reverse.js.map +0 -1
- package/esm/commands/subprocess/index.d.ts.map +0 -1
- package/esm/commands/subprocess/index.js.map +0 -1
- package/esm/commands/subprocess/none/process.d.ts.map +0 -1
- package/esm/commands/subprocess/none/process.js.map +0 -1
- package/esm/commands/subprocess/none/pty.d.ts.map +0 -1
- package/esm/commands/subprocess/none/pty.js.map +0 -1
- package/esm/commands/subprocess/none/service.d.ts +0 -10
- package/esm/commands/subprocess/none/service.d.ts.map +0 -1
- package/esm/commands/subprocess/none/service.js +0 -34
- package/esm/commands/subprocess/none/service.js.map +0 -1
- package/esm/commands/subprocess/none/spawner.d.ts +0 -19
- package/esm/commands/subprocess/none/spawner.d.ts.map +0 -1
- package/esm/commands/subprocess/none/spawner.js +0 -26
- package/esm/commands/subprocess/none/spawner.js.map +0 -1
- package/esm/commands/subprocess/pty.d.ts.map +0 -1
- package/esm/commands/subprocess/service.d.ts.map +0 -1
- package/esm/commands/subprocess/service.js.map +0 -1
- package/esm/commands/subprocess/shell/index.d.ts +0 -6
- package/esm/commands/subprocess/shell/index.d.ts.map +0 -1
- package/esm/commands/subprocess/shell/index.js +0 -6
- package/esm/commands/subprocess/shell/index.js.map +0 -1
- package/esm/commands/subprocess/shell/process.d.ts.map +0 -1
- package/esm/commands/subprocess/shell/process.js.map +0 -1
- package/esm/commands/subprocess/shell/pty.d.ts.map +0 -1
- package/esm/commands/subprocess/shell/pty.js.map +0 -1
- package/esm/commands/subprocess/shell/service.d.ts +0 -14
- package/esm/commands/subprocess/shell/service.d.ts.map +0 -1
- package/esm/commands/subprocess/shell/service.js +0 -41
- package/esm/commands/subprocess/shell/service.js.map +0 -1
- package/esm/commands/subprocess/shell/shared.d.ts +0 -19
- package/esm/commands/subprocess/shell/shared.d.ts.map +0 -1
- package/esm/commands/subprocess/shell/shared.js.map +0 -1
- package/esm/commands/subprocess/shell/spawner.d.ts.map +0 -1
- package/esm/commands/subprocess/shell/spawner.js +0 -38
- package/esm/commands/subprocess/shell/spawner.js.map +0 -1
- package/esm/commands/subprocess/utils.d.ts +0 -3
- package/esm/commands/subprocess/utils.d.ts.map +0 -1
- package/esm/commands/subprocess/utils.js +0 -56
- package/esm/commands/subprocess/utils.js.map +0 -1
- package/esm/commands/sync/index.d.ts +0 -9
- package/esm/commands/sync/index.d.ts.map +0 -1
- package/esm/commands/sync/index.js +0 -9
- package/esm/commands/sync/index.js.map +0 -1
- package/esm/commands/sync/list.d.ts.map +0 -1
- package/esm/commands/sync/list.js +0 -64
- package/esm/commands/sync/list.js.map +0 -1
- package/esm/commands/sync/pull.d.ts +0 -12
- package/esm/commands/sync/pull.d.ts.map +0 -1
- package/esm/commands/sync/pull.js +0 -33
- package/esm/commands/sync/pull.js.map +0 -1
- package/esm/commands/sync/push.d.ts +0 -61
- package/esm/commands/sync/push.d.ts.map +0 -1
- package/esm/commands/sync/push.js +0 -83
- package/esm/commands/sync/push.js.map +0 -1
- package/esm/commands/sync/request.d.ts +0 -24
- package/esm/commands/sync/request.d.ts.map +0 -1
- package/esm/commands/sync/request.js +0 -32
- package/esm/commands/sync/request.js.map +0 -1
- package/esm/commands/sync/response.d.ts +0 -28
- package/esm/commands/sync/response.d.ts.map +0 -1
- package/esm/commands/sync/response.js +0 -81
- package/esm/commands/sync/response.js.map +0 -1
- package/esm/commands/sync/socket.d.ts +0 -22
- package/esm/commands/sync/socket.d.ts.map +0 -1
- package/esm/commands/sync/socket.js +0 -78
- package/esm/commands/sync/socket.js.map +0 -1
- package/esm/commands/sync/stat.d.ts.map +0 -1
- package/esm/commands/sync/stat.js +0 -121
- package/esm/commands/sync/stat.js.map +0 -1
- package/esm/commands/sync/sync.d.ts +0 -82
- package/esm/commands/sync/sync.d.ts.map +0 -1
- package/esm/commands/sync/sync.js +0 -138
- package/esm/commands/sync/sync.js.map +0 -1
- package/esm/commands/tcpip.d.ts.map +0 -1
- package/esm/commands/tcpip.js.map +0 -1
- package/esm/daemon/auth.d.ts +0 -54
- package/esm/daemon/auth.d.ts.map +0 -1
- package/esm/daemon/auth.js +0 -104
- package/esm/daemon/auth.js.map +0 -1
- package/esm/server/stream.d.ts.map +0 -1
- package/esm/server/stream.js.map +0 -1
- package/src/commands/base.ts +0 -15
- package/src/commands/subprocess/none/service.ts +0 -45
- package/src/commands/subprocess/none/spawner.ts +0 -68
- package/src/commands/subprocess/shell/service.ts +0 -58
- package/src/commands/subprocess/shell/spawner.ts +0 -90
- package/src/commands/subprocess/utils.ts +0 -61
- package/src/commands/sync/index.ts +0 -8
- package/src/commands/sync/list.ts +0 -99
- package/src/commands/sync/pull.ts +0 -55
- package/src/commands/sync/push.ts +0 -172
- package/src/commands/sync/request.ts +0 -53
- package/src/commands/sync/response.ts +0 -105
- package/src/commands/sync/socket.ts +0 -109
- package/src/commands/sync/stat.ts +0 -177
- package/src/commands/sync/sync.ts +0 -175
- package/src/daemon/auth.ts +0 -203
- package/tsconfig.build.tsbuildinfo +0 -1
- /package/esm/{commands → service}/framebuffer.d.ts +0 -0
- /package/esm/{commands → service}/framebuffer.js +0 -0
- /package/esm/{commands → service}/subprocess/none/index.d.ts +0 -0
- /package/esm/{commands → service}/subprocess/none/index.js +0 -0
- /package/esm/{commands → service}/subprocess/none/process.js +0 -0
- /package/esm/{commands → service}/subprocess/pty.js +0 -0
- /package/esm/{commands → service}/subprocess/service.d.ts +0 -0
- /package/src/{commands → service}/framebuffer.ts +0 -0
- /package/src/{commands → service}/subprocess/none/index.ts +0 -0
package/src/daemon/transport.ts
CHANGED
|
@@ -1,55 +1,14 @@
|
|
|
1
1
|
import type { MaybePromiseLike } from "@yume-chan/async";
|
|
2
|
-
import {
|
|
3
|
-
import type { ReadableWritablePair } from "@yume-chan/stream-extra";
|
|
4
|
-
import {
|
|
5
|
-
AbortController,
|
|
6
|
-
Consumable,
|
|
7
|
-
WritableStream,
|
|
8
|
-
} from "@yume-chan/stream-extra";
|
|
9
|
-
import { decodeUtf8, encodeUtf8 } from "@yume-chan/struct";
|
|
2
|
+
import type { Consumable, ReadableWritablePair } from "@yume-chan/stream-extra";
|
|
10
3
|
|
|
11
|
-
import type {
|
|
12
|
-
AdbIncomingSocketHandler,
|
|
13
|
-
AdbSocket,
|
|
14
|
-
AdbTransport,
|
|
15
|
-
} from "../adb.js";
|
|
4
|
+
import type { Adb, AdbTransport } from "../adb.js";
|
|
16
5
|
import { AdbBanner } from "../banner.js";
|
|
17
|
-
import { AdbFeature } from "../features.js";
|
|
6
|
+
import { AdbDeviceFeatures, AdbFeature } from "../features.js";
|
|
18
7
|
|
|
19
|
-
import type { AdbAuthenticator, AdbCredentialStore } from "./auth.js";
|
|
20
|
-
import {
|
|
21
|
-
ADB_DEFAULT_AUTHENTICATORS,
|
|
22
|
-
AdbAuthenticationProcessor,
|
|
23
|
-
} from "./auth.js";
|
|
24
8
|
import { AdbPacketDispatcher } from "./dispatcher.js";
|
|
25
9
|
import type { AdbPacketData, AdbPacketInit } from "./packet.js";
|
|
26
|
-
import { AdbCommand, calculateChecksum } from "./packet.js";
|
|
27
10
|
|
|
28
11
|
export const ADB_DAEMON_VERSION_OMIT_CHECKSUM = 0x01000001;
|
|
29
|
-
// https://android.googlesource.com/platform/packages/modules/adb/+/79010dc6d5ca7490c493df800d4421730f5466ca/transport.cpp#1252
|
|
30
|
-
// There are some other feature constants, but some of them are only used by ADB server, not devices (daemons).
|
|
31
|
-
export const ADB_DAEMON_DEFAULT_FEATURES = /* #__PURE__ */ (() =>
|
|
32
|
-
[
|
|
33
|
-
AdbFeature.ShellV2,
|
|
34
|
-
AdbFeature.Cmd,
|
|
35
|
-
AdbFeature.StatV2,
|
|
36
|
-
AdbFeature.ListV2,
|
|
37
|
-
AdbFeature.FixedPushMkdir,
|
|
38
|
-
"apex",
|
|
39
|
-
AdbFeature.Abb,
|
|
40
|
-
// only tells the client the symlink timestamp issue in `adb push --sync` has been fixed.
|
|
41
|
-
// No special handling required.
|
|
42
|
-
"fixed_push_symlink_timestamp",
|
|
43
|
-
AdbFeature.AbbExec,
|
|
44
|
-
"remount_shell",
|
|
45
|
-
"track_app",
|
|
46
|
-
AdbFeature.SendReceiveV2,
|
|
47
|
-
"sendrecv_v2_brotli",
|
|
48
|
-
"sendrecv_v2_lz4",
|
|
49
|
-
"sendrecv_v2_zstd",
|
|
50
|
-
"sendrecv_v2_dry_run_send",
|
|
51
|
-
AdbFeature.DelayedAck,
|
|
52
|
-
] as readonly AdbFeature[])();
|
|
53
12
|
export const ADB_DAEMON_DEFAULT_INITIAL_PAYLOAD_SIZE = 32 * 1024 * 1024;
|
|
54
13
|
|
|
55
14
|
export type AdbDaemonConnection = ReadableWritablePair<
|
|
@@ -57,55 +16,7 @@ export type AdbDaemonConnection = ReadableWritablePair<
|
|
|
57
16
|
Consumable<AdbPacketInit>
|
|
58
17
|
>;
|
|
59
18
|
|
|
60
|
-
export interface
|
|
61
|
-
serial: string;
|
|
62
|
-
connection: AdbDaemonConnection;
|
|
63
|
-
credentialStore: AdbCredentialStore;
|
|
64
|
-
authenticators?: readonly AdbAuthenticator[];
|
|
65
|
-
features?: readonly AdbFeature[];
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* The number of bytes the device can send before receiving an ack packet.
|
|
69
|
-
* Using delayed ack can improve the throughput,
|
|
70
|
-
* especially when the device is connected over Wi-Fi (so the latency is higher).
|
|
71
|
-
*
|
|
72
|
-
* Set to 0 or any negative value to disable delayed ack in handshake.
|
|
73
|
-
* Otherwise the value must be in the range of unsigned 32-bit integer.
|
|
74
|
-
*
|
|
75
|
-
* Delayed ack was added in Android 14,
|
|
76
|
-
* this option will be ignored when the device doesn't support it.
|
|
77
|
-
*
|
|
78
|
-
* @default ADB_DAEMON_DEFAULT_INITIAL_PAYLOAD_SIZE
|
|
79
|
-
*/
|
|
80
|
-
initialDelayedAckBytes?: number;
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Whether to keep the `connection` open (don't call `writable.close` and `readable.cancel`)
|
|
84
|
-
* when `AdbDaemonTransport.close` is called.
|
|
85
|
-
*
|
|
86
|
-
* Note that when `authenticate` fails,
|
|
87
|
-
* no matter which value this option has,
|
|
88
|
-
* the `connection` is always kept open, so it can be used in another `authenticate` call.
|
|
89
|
-
*
|
|
90
|
-
* @default false
|
|
91
|
-
*/
|
|
92
|
-
preserveConnection?: boolean | undefined;
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* When set, the transport will throw an error when
|
|
96
|
-
* one of the socket readable stalls for this amount of milliseconds.
|
|
97
|
-
*
|
|
98
|
-
* Because ADB is a multiplexed protocol, blocking one socket will also block all other sockets.
|
|
99
|
-
* It's important to always read from all sockets to prevent stalling.
|
|
100
|
-
*
|
|
101
|
-
* This option is helpful to detect bugs in the client code.
|
|
102
|
-
*
|
|
103
|
-
* @default undefined
|
|
104
|
-
*/
|
|
105
|
-
readTimeLimit?: number | undefined;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
interface AdbDaemonSocketConnectorConstructionOptions {
|
|
19
|
+
export interface AdbDaemonTransportInit {
|
|
109
20
|
serial: string;
|
|
110
21
|
connection: AdbDaemonConnection;
|
|
111
22
|
version: number;
|
|
@@ -116,16 +27,16 @@ interface AdbDaemonSocketConnectorConstructionOptions {
|
|
|
116
27
|
/**
|
|
117
28
|
* The number of bytes the device can send before receiving an ack packet.
|
|
118
29
|
*
|
|
119
|
-
*
|
|
120
|
-
*
|
|
30
|
+
* Android 14 added the Delayed Acknowledgement feature to improve performance,
|
|
31
|
+
* especially for high-latency connections like ADB over Wi-Fi.
|
|
121
32
|
*
|
|
122
|
-
*
|
|
123
|
-
*
|
|
33
|
+
* Whether the feature is enabled is negotiated in the handshake process
|
|
34
|
+
* using the {@linkcode AdbFeature.DelayedAck} feature.
|
|
35
|
+
* If the feature is enabled, this parameter must be set to a positive integer.
|
|
124
36
|
*
|
|
125
|
-
* If
|
|
126
|
-
* when the client sends the first data packet. And vice versa.
|
|
37
|
+
* If not specified, the default value is {@linkcode ADB_DAEMON_DEFAULT_INITIAL_PAYLOAD_SIZE}.
|
|
127
38
|
*/
|
|
128
|
-
initialDelayedAckBytes
|
|
39
|
+
initialDelayedAckBytes?: number | undefined;
|
|
129
40
|
|
|
130
41
|
/**
|
|
131
42
|
* Whether to keep the `connection` open (don't call `writable.close` and `readable.cancel`)
|
|
@@ -153,135 +64,6 @@ interface AdbDaemonSocketConnectorConstructionOptions {
|
|
|
153
64
|
* An ADB Transport that connects to ADB Daemons directly.
|
|
154
65
|
*/
|
|
155
66
|
export class AdbDaemonTransport implements AdbTransport {
|
|
156
|
-
/**
|
|
157
|
-
* Authenticate with the ADB Daemon and create a new transport.
|
|
158
|
-
*/
|
|
159
|
-
static async authenticate({
|
|
160
|
-
serial,
|
|
161
|
-
connection,
|
|
162
|
-
credentialStore,
|
|
163
|
-
authenticators = ADB_DEFAULT_AUTHENTICATORS,
|
|
164
|
-
features = ADB_DAEMON_DEFAULT_FEATURES,
|
|
165
|
-
initialDelayedAckBytes = ADB_DAEMON_DEFAULT_INITIAL_PAYLOAD_SIZE,
|
|
166
|
-
...options
|
|
167
|
-
}: AdbDaemonAuthenticationOptions): Promise<AdbDaemonTransport> {
|
|
168
|
-
// Initially, set to highest-supported version and payload size.
|
|
169
|
-
let version = 0x01000001;
|
|
170
|
-
// Android 4: 4K, Android 7: 256K, Android 9: 1M
|
|
171
|
-
let maxPayloadSize = 1024 * 1024;
|
|
172
|
-
|
|
173
|
-
const resolver = new PromiseResolver<string>();
|
|
174
|
-
const authProcessor = new AdbAuthenticationProcessor(
|
|
175
|
-
authenticators,
|
|
176
|
-
credentialStore,
|
|
177
|
-
);
|
|
178
|
-
|
|
179
|
-
// Here is similar to `AdbPacketDispatcher`,
|
|
180
|
-
// But the received packet types and send packet processing are different.
|
|
181
|
-
const abortController = new AbortController();
|
|
182
|
-
const pipe = connection.readable
|
|
183
|
-
.pipeTo(
|
|
184
|
-
new WritableStream({
|
|
185
|
-
async write(packet) {
|
|
186
|
-
switch (packet.command) {
|
|
187
|
-
case AdbCommand.Connect:
|
|
188
|
-
version = Math.min(version, packet.arg0);
|
|
189
|
-
maxPayloadSize = Math.min(
|
|
190
|
-
maxPayloadSize,
|
|
191
|
-
packet.arg1,
|
|
192
|
-
);
|
|
193
|
-
resolver.resolve(decodeUtf8(packet.payload));
|
|
194
|
-
break;
|
|
195
|
-
case AdbCommand.Auth: {
|
|
196
|
-
const response =
|
|
197
|
-
await authProcessor.process(packet);
|
|
198
|
-
await sendPacket(response);
|
|
199
|
-
break;
|
|
200
|
-
}
|
|
201
|
-
default:
|
|
202
|
-
// Maybe the previous ADB client exited without reading all packets,
|
|
203
|
-
// so they are still waiting in OS internal buffer.
|
|
204
|
-
// Just ignore them.
|
|
205
|
-
// Because a `Connect` packet will reset the device,
|
|
206
|
-
// Eventually there will be `Connect` and `Auth` response packets.
|
|
207
|
-
break;
|
|
208
|
-
}
|
|
209
|
-
},
|
|
210
|
-
}),
|
|
211
|
-
{
|
|
212
|
-
// Don't cancel the source ReadableStream on AbortSignal abort.
|
|
213
|
-
preventCancel: true,
|
|
214
|
-
signal: abortController.signal,
|
|
215
|
-
},
|
|
216
|
-
)
|
|
217
|
-
.then(
|
|
218
|
-
() => {
|
|
219
|
-
// If `resolver` is already settled, call `reject` won't do anything.
|
|
220
|
-
resolver.reject(
|
|
221
|
-
new Error("Connection closed unexpectedly"),
|
|
222
|
-
);
|
|
223
|
-
},
|
|
224
|
-
(e) => {
|
|
225
|
-
resolver.reject(e);
|
|
226
|
-
},
|
|
227
|
-
);
|
|
228
|
-
|
|
229
|
-
const writer = connection.writable.getWriter();
|
|
230
|
-
async function sendPacket(init: AdbPacketData) {
|
|
231
|
-
// Always send checksum in auth steps
|
|
232
|
-
// Because we don't know if the device needs it or not.
|
|
233
|
-
(init as AdbPacketInit).checksum = calculateChecksum(init.payload);
|
|
234
|
-
(init as AdbPacketInit).magic = init.command ^ 0xffffffff;
|
|
235
|
-
await Consumable.WritableStream.write(
|
|
236
|
-
writer,
|
|
237
|
-
init as AdbPacketInit,
|
|
238
|
-
);
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
const actualFeatures = features.slice();
|
|
242
|
-
if (initialDelayedAckBytes <= 0) {
|
|
243
|
-
const index = features.indexOf(AdbFeature.DelayedAck);
|
|
244
|
-
if (index !== -1) {
|
|
245
|
-
actualFeatures.splice(index, 1);
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
let banner: string;
|
|
250
|
-
try {
|
|
251
|
-
await sendPacket({
|
|
252
|
-
command: AdbCommand.Connect,
|
|
253
|
-
arg0: version,
|
|
254
|
-
arg1: maxPayloadSize,
|
|
255
|
-
// The terminating `;` is required in formal definition
|
|
256
|
-
// But ADB daemon (all versions) can still work without it
|
|
257
|
-
payload: encodeUtf8(
|
|
258
|
-
`host::features=${actualFeatures.join(",")}`,
|
|
259
|
-
),
|
|
260
|
-
});
|
|
261
|
-
|
|
262
|
-
banner = await resolver.promise;
|
|
263
|
-
} finally {
|
|
264
|
-
// When failed, release locks on `connection` so the caller can try again.
|
|
265
|
-
// When success, also release locks so `AdbPacketDispatcher` can use them.
|
|
266
|
-
abortController.abort();
|
|
267
|
-
writer.releaseLock();
|
|
268
|
-
|
|
269
|
-
// Wait until pipe stops (`ReadableStream` lock released)
|
|
270
|
-
await pipe;
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
return new AdbDaemonTransport({
|
|
274
|
-
serial,
|
|
275
|
-
connection,
|
|
276
|
-
version,
|
|
277
|
-
maxPayloadSize,
|
|
278
|
-
banner,
|
|
279
|
-
features: actualFeatures,
|
|
280
|
-
initialDelayedAckBytes,
|
|
281
|
-
...options,
|
|
282
|
-
});
|
|
283
|
-
}
|
|
284
|
-
|
|
285
67
|
#connection: AdbDaemonConnection;
|
|
286
68
|
get connection() {
|
|
287
69
|
return this.#connection;
|
|
@@ -322,42 +104,42 @@ export class AdbDaemonTransport implements AdbTransport {
|
|
|
322
104
|
connection,
|
|
323
105
|
version,
|
|
324
106
|
banner,
|
|
325
|
-
features =
|
|
326
|
-
initialDelayedAckBytes,
|
|
107
|
+
features = AdbDeviceFeatures,
|
|
108
|
+
initialDelayedAckBytes = ADB_DAEMON_DEFAULT_INITIAL_PAYLOAD_SIZE,
|
|
327
109
|
...options
|
|
328
|
-
}:
|
|
110
|
+
}: AdbDaemonTransportInit) {
|
|
329
111
|
this.#serial = serial;
|
|
330
112
|
this.#connection = connection;
|
|
331
113
|
this.#banner = AdbBanner.parse(banner);
|
|
332
114
|
this.#clientFeatures = features;
|
|
333
115
|
|
|
334
|
-
if (
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
if (!this.#banner.features.includes(AdbFeature.DelayedAck)) {
|
|
342
|
-
initialDelayedAckBytes = 0;
|
|
343
|
-
}
|
|
344
|
-
} else {
|
|
116
|
+
if (
|
|
117
|
+
!this.#banner.features.includes(AdbFeature.DelayedAck) ||
|
|
118
|
+
!features.includes(AdbFeature.DelayedAck)
|
|
119
|
+
) {
|
|
120
|
+
// For `AdbPacketDispatcher`, 0 means disabled
|
|
345
121
|
initialDelayedAckBytes = 0;
|
|
122
|
+
} else if (initialDelayedAckBytes <= 0) {
|
|
123
|
+
// Delayed Ack is enabled in handshake process, we can't disable it here,
|
|
124
|
+
// so it must be a positive integer
|
|
125
|
+
throw new TypeError(
|
|
126
|
+
"`initialDelayedAckBytes` must be greater than 0 when DelayedAck feature is enabled.",
|
|
127
|
+
);
|
|
346
128
|
}
|
|
347
129
|
|
|
348
|
-
let
|
|
349
|
-
let
|
|
130
|
+
let shouldCalculateChecksum: boolean;
|
|
131
|
+
let shouldAppendNullToServiceString: boolean;
|
|
350
132
|
if (version >= ADB_DAEMON_VERSION_OMIT_CHECKSUM) {
|
|
351
|
-
|
|
352
|
-
|
|
133
|
+
shouldCalculateChecksum = false;
|
|
134
|
+
shouldAppendNullToServiceString = false;
|
|
353
135
|
} else {
|
|
354
|
-
|
|
355
|
-
|
|
136
|
+
shouldCalculateChecksum = true;
|
|
137
|
+
shouldAppendNullToServiceString = true;
|
|
356
138
|
}
|
|
357
139
|
|
|
358
140
|
this.#dispatcher = new AdbPacketDispatcher(connection, {
|
|
359
|
-
calculateChecksum,
|
|
360
|
-
appendNullToServiceString,
|
|
141
|
+
calculateChecksum: shouldCalculateChecksum,
|
|
142
|
+
appendNullToServiceString: shouldAppendNullToServiceString,
|
|
361
143
|
initialDelayedAckBytes,
|
|
362
144
|
...options,
|
|
363
145
|
});
|
|
@@ -365,12 +147,12 @@ export class AdbDaemonTransport implements AdbTransport {
|
|
|
365
147
|
this.#protocolVersion = version;
|
|
366
148
|
}
|
|
367
149
|
|
|
368
|
-
connect(service: string): MaybePromiseLike<
|
|
150
|
+
connect(service: string): MaybePromiseLike<Adb.Socket> {
|
|
369
151
|
return this.#dispatcher.createSocket(service);
|
|
370
152
|
}
|
|
371
153
|
|
|
372
154
|
addReverseTunnel(
|
|
373
|
-
handler:
|
|
155
|
+
handler: Adb.IncomingSocketHandler,
|
|
374
156
|
address?: string,
|
|
375
157
|
): string {
|
|
376
158
|
if (!address) {
|
package/src/device-observer.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { MaybePromiseLike } from "@yume-chan/async";
|
|
2
1
|
import type { Event } from "@yume-chan/event";
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
import type { Closeable } from "./adb.js";
|
|
4
|
+
|
|
5
|
+
export interface DeviceObserver<T> extends Closeable {
|
|
5
6
|
readonly onDeviceAdd: Event<readonly T[]>;
|
|
6
7
|
readonly onDeviceRemove: Event<readonly T[]>;
|
|
7
8
|
readonly onListChange: Event<readonly T[]>;
|
|
8
9
|
readonly current: readonly T[];
|
|
9
|
-
stop(): MaybePromiseLike<void>;
|
|
10
10
|
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// cspell: ignore Libusb
|
|
2
|
+
// cspell: ignore devraw
|
|
3
|
+
// cspell: ignore Openscreen
|
|
4
|
+
// cspell: ignore devicetracker
|
|
5
|
+
|
|
6
|
+
// The order follows
|
|
7
|
+
// https://cs.android.com/android/platform/superproject/main/+/main:packages/modules/adb/transport.cpp;l=81;drc=2d3e62c2af54a3e8f8803ea10492e63b8dfe709f
|
|
8
|
+
|
|
9
|
+
export const Shell2 = "shell_v2";
|
|
10
|
+
export const Cmd = "cmd";
|
|
11
|
+
export const Stat2 = "stat_v2";
|
|
12
|
+
export const Ls2 = "ls_v2";
|
|
13
|
+
/**
|
|
14
|
+
* server only
|
|
15
|
+
*/
|
|
16
|
+
export const Libusb = "libusb";
|
|
17
|
+
/**
|
|
18
|
+
* server only
|
|
19
|
+
*/
|
|
20
|
+
export const PushSync = "push_sync";
|
|
21
|
+
export const Apex = "apex";
|
|
22
|
+
export const FixedPushMkdir = "fixed_push_mkdir";
|
|
23
|
+
export const Abb = "abb";
|
|
24
|
+
export const FixedPushSymlinkTimestamp = "fixed_push_symlink_timestamp";
|
|
25
|
+
export const AbbExec = "abb_exec";
|
|
26
|
+
export const RemountShell = "remount_shell";
|
|
27
|
+
export const TrackApp = "track_app";
|
|
28
|
+
export const SendReceive2 = "sendrecv_v2";
|
|
29
|
+
export const SendReceive2Brotli = "sendrecv_v2_brotli";
|
|
30
|
+
export const SendReceive2Lz4 = "sendrecv_v2_lz4";
|
|
31
|
+
export const SendReceive2Zstd = "sendrecv_v2_zstd";
|
|
32
|
+
export const SendReceive2DryRunSend = "sendrecv_v2_dry_run_send";
|
|
33
|
+
export const DelayedAck = "delayed_ack";
|
|
34
|
+
/**
|
|
35
|
+
* server only
|
|
36
|
+
*/
|
|
37
|
+
export const OpenscreenMdns = "openscreen_mdns";
|
|
38
|
+
/**
|
|
39
|
+
* server only
|
|
40
|
+
*/
|
|
41
|
+
export const DeviceTrackerProtoFormat = "devicetracker_proto_format";
|
|
42
|
+
export const DevRaw = "devraw";
|
|
43
|
+
export const AppInfo = "app_info";
|
|
44
|
+
/**
|
|
45
|
+
* server only
|
|
46
|
+
*/
|
|
47
|
+
export const ServerStatus = "server_status";
|
package/src/features.ts
CHANGED
|
@@ -1,15 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
// https://cs.android.com/android/platform/superproject/+/master:packages/modules/adb/transport.cpp;l=77;drc=6d14d35d0241f6fee145f8e54ffd77252e8d29fd
|
|
3
|
-
export const AdbFeature = {
|
|
4
|
-
ShellV2: "shell_v2",
|
|
5
|
-
Cmd: "cmd",
|
|
6
|
-
StatV2: "stat_v2",
|
|
7
|
-
ListV2: "ls_v2",
|
|
8
|
-
FixedPushMkdir: "fixed_push_mkdir",
|
|
9
|
-
Abb: "abb",
|
|
10
|
-
AbbExec: "abb_exec",
|
|
11
|
-
SendReceiveV2: "sendrecv_v2",
|
|
12
|
-
DelayedAck: "delayed_ack",
|
|
13
|
-
} as const;
|
|
1
|
+
import * as AdbFeature from "./features-value.js";
|
|
14
2
|
|
|
15
|
-
|
|
3
|
+
// biome-ignore lint/suspicious/noRedeclare: TypeScript declaration merging for enum-like object
|
|
4
|
+
type AdbFeature = (typeof AdbFeature)[keyof typeof AdbFeature];
|
|
5
|
+
|
|
6
|
+
export { AdbFeature };
|
|
7
|
+
|
|
8
|
+
// https://android.googlesource.com/platform/packages/modules/adb/+/79010dc6d5ca7490c493df800d4421730f5466ca/transport.cpp#1252
|
|
9
|
+
// There are some other feature constants, but some of them are only used by ADB server, not devices (daemons).
|
|
10
|
+
export const AdbDeviceFeatures = [
|
|
11
|
+
AdbFeature.Shell2,
|
|
12
|
+
AdbFeature.Cmd,
|
|
13
|
+
AdbFeature.Stat2,
|
|
14
|
+
AdbFeature.Ls2,
|
|
15
|
+
AdbFeature.FixedPushMkdir,
|
|
16
|
+
AdbFeature.Apex,
|
|
17
|
+
AdbFeature.Abb,
|
|
18
|
+
// only tells the client the symlink timestamp issue in `adb push --sync` has been fixed.
|
|
19
|
+
// No special handling required.
|
|
20
|
+
AdbFeature.FixedPushSymlinkTimestamp,
|
|
21
|
+
AdbFeature.AbbExec,
|
|
22
|
+
AdbFeature.RemountShell,
|
|
23
|
+
AdbFeature.TrackApp,
|
|
24
|
+
AdbFeature.SendReceive2,
|
|
25
|
+
AdbFeature.SendReceive2Brotli,
|
|
26
|
+
AdbFeature.SendReceive2Lz4,
|
|
27
|
+
AdbFeature.SendReceive2Zstd,
|
|
28
|
+
AdbFeature.SendReceive2DryRunSend,
|
|
29
|
+
AdbFeature.DevRaw,
|
|
30
|
+
AdbFeature.AppInfo,
|
|
31
|
+
AdbFeature.DelayedAck,
|
|
32
|
+
] as readonly AdbFeature[];
|
package/src/index.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export * from "./adb.js";
|
|
2
2
|
export * from "./banner.js";
|
|
3
|
-
export * from "./commands/index.js";
|
|
4
3
|
export * from "./daemon/index.js";
|
|
5
4
|
export * from "./device-observer.js";
|
|
6
5
|
export * from "./features.js";
|
|
7
6
|
export * from "./server/index.js";
|
|
7
|
+
export * from "./service/index.js";
|
|
8
8
|
export * from "./utils/index.js";
|