@yume-chan/adb 0.0.9 → 0.0.10

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.
Files changed (205) hide show
  1. package/CHANGELOG.json +23 -0
  2. package/CHANGELOG.md +16 -0
  3. package/LICENSE +21 -21
  4. package/README.md +227 -257
  5. package/dts/adb.d.ts.map +1 -1
  6. package/dts/auth.d.ts +11 -1
  7. package/dts/auth.d.ts.map +1 -1
  8. package/dts/backend.d.ts +3 -5
  9. package/dts/backend.d.ts.map +1 -1
  10. package/dts/commands/demo-mode.d.ts +3 -3
  11. package/dts/commands/demo-mode.d.ts.map +1 -1
  12. package/dts/commands/reverse.d.ts +2 -2
  13. package/dts/commands/reverse.d.ts.map +1 -1
  14. package/dts/commands/shell/index.d.ts +31 -5
  15. package/dts/commands/shell/index.d.ts.map +1 -1
  16. package/dts/commands/shell/legacy.d.ts +13 -2
  17. package/dts/commands/shell/legacy.d.ts.map +1 -1
  18. package/dts/commands/shell/protocol.d.ts +11 -3
  19. package/dts/commands/shell/protocol.d.ts.map +1 -1
  20. package/dts/commands/shell/types.d.ts +35 -3
  21. package/dts/commands/shell/types.d.ts.map +1 -1
  22. package/dts/commands/sync/request.d.ts +1 -1
  23. package/dts/commands/sync/request.d.ts.map +1 -1
  24. package/dts/commands/sync/response.d.ts +2 -2
  25. package/dts/commands/sync/response.d.ts.map +1 -1
  26. package/dts/commands/sync/sync.d.ts.map +1 -1
  27. package/dts/crypto.d.ts +7 -0
  28. package/dts/crypto.d.ts.map +1 -1
  29. package/dts/packet.d.ts.map +1 -1
  30. package/dts/socket/close-event-emitter.d.ts.map +1 -1
  31. package/dts/socket/controller.d.ts.map +1 -1
  32. package/dts/socket/data-event-emitter.d.ts.map +1 -1
  33. package/dts/socket/dispatcher.d.ts.map +1 -1
  34. package/dts/stream/buffered-stream.d.ts +2 -4
  35. package/dts/stream/buffered-stream.d.ts.map +1 -1
  36. package/dts/utils/encoding.d.ts +3 -0
  37. package/dts/utils/encoding.d.ts.map +1 -0
  38. package/dts/utils/index.d.ts +1 -0
  39. package/dts/utils/index.d.ts.map +1 -1
  40. package/esm/adb.js +3 -2
  41. package/esm/adb.js.map +1 -1
  42. package/esm/auth.js +2 -2
  43. package/esm/auth.js.map +1 -1
  44. package/esm/commands/demo-mode.js +9 -9
  45. package/esm/commands/demo-mode.js.map +1 -1
  46. package/esm/commands/reverse.js +3 -2
  47. package/esm/commands/reverse.js.map +1 -1
  48. package/esm/commands/shell/index.js +28 -18
  49. package/esm/commands/shell/index.js.map +1 -1
  50. package/esm/commands/shell/legacy.js +16 -0
  51. package/esm/commands/shell/legacy.js.map +1 -1
  52. package/esm/commands/shell/protocol.js +36 -9
  53. package/esm/commands/shell/protocol.js.map +1 -1
  54. package/esm/commands/sync/request.js +5 -4
  55. package/esm/commands/sync/request.js.map +1 -1
  56. package/esm/commands/sync/response.js +4 -3
  57. package/esm/commands/sync/response.js.map +1 -1
  58. package/esm/commands/sync/sync.js.map +1 -1
  59. package/esm/crypto.js +7 -2
  60. package/esm/crypto.js.map +1 -1
  61. package/esm/packet.js +12 -14
  62. package/esm/packet.js.map +1 -1
  63. package/esm/socket/close-event-emitter.js.map +1 -1
  64. package/esm/socket/controller.js.map +1 -1
  65. package/esm/socket/data-event-emitter.js.map +1 -1
  66. package/esm/socket/dispatcher.js +7 -7
  67. package/esm/socket/dispatcher.js.map +1 -1
  68. package/esm/stream/buffered-stream.js +0 -6
  69. package/esm/stream/buffered-stream.js.map +1 -1
  70. package/esm/utils/encoding.js +11 -0
  71. package/esm/utils/encoding.js.map +1 -0
  72. package/esm/utils/index.js +1 -0
  73. package/esm/utils/index.js.map +1 -1
  74. package/package.json +44 -51
  75. package/src/adb.ts +243 -242
  76. package/src/auth.ts +166 -156
  77. package/src/backend.ts +20 -24
  78. package/src/commands/base.ts +11 -11
  79. package/src/commands/demo-mode.ts +160 -160
  80. package/src/commands/framebuffer.ts +73 -73
  81. package/src/commands/index.ts +8 -8
  82. package/src/commands/install.ts +21 -21
  83. package/src/commands/reverse.ts +134 -133
  84. package/src/commands/shell/index.ts +87 -68
  85. package/src/commands/shell/legacy.ts +59 -42
  86. package/src/commands/shell/protocol.ts +121 -94
  87. package/src/commands/shell/types.ts +55 -21
  88. package/src/commands/shell/utils.ts +20 -20
  89. package/src/commands/sync/index.ts +7 -7
  90. package/src/commands/sync/list.ts +39 -39
  91. package/src/commands/sync/pull.ts +34 -34
  92. package/src/commands/sync/push.ts +46 -46
  93. package/src/commands/sync/request.ts +49 -48
  94. package/src/commands/sync/response.ts +58 -57
  95. package/src/commands/sync/stat.ts +121 -121
  96. package/src/commands/sync/sync.ts +113 -113
  97. package/src/commands/tcpip.ts +21 -21
  98. package/src/crypto.ts +285 -280
  99. package/src/features.ts +5 -5
  100. package/src/index.ts +10 -10
  101. package/src/packet.ts +84 -89
  102. package/src/socket/close-event-emitter.ts +28 -28
  103. package/src/socket/controller.ts +105 -105
  104. package/src/socket/data-event-emitter.ts +27 -27
  105. package/src/socket/dispatcher.ts +269 -269
  106. package/src/socket/index.ts +6 -6
  107. package/src/socket/logger.ts +12 -12
  108. package/src/socket/socket.ts +28 -28
  109. package/src/stream/buffered-stream.ts +92 -100
  110. package/src/stream/index.ts +2 -2
  111. package/src/stream/stream.ts +50 -50
  112. package/src/utils/auto-reset-event.ts +41 -41
  113. package/src/utils/base64.ts +274 -274
  114. package/src/utils/chunk.ts +70 -70
  115. package/src/utils/encoding.ts +13 -0
  116. package/src/utils/event-queue.ts +145 -145
  117. package/src/utils/index.ts +5 -4
  118. package/cjs/adb.js +0 -205
  119. package/cjs/adb.js.map +0 -1
  120. package/cjs/auth.js +0 -141
  121. package/cjs/auth.js.map +0 -1
  122. package/cjs/backend.js +0 -3
  123. package/cjs/backend.js.map +0 -1
  124. package/cjs/commands/base.js +0 -12
  125. package/cjs/commands/base.js.map +0 -1
  126. package/cjs/commands/demo-mode.js +0 -174
  127. package/cjs/commands/demo-mode.js.map +0 -1
  128. package/cjs/commands/framebuffer.js +0 -66
  129. package/cjs/commands/framebuffer.js.map +0 -1
  130. package/cjs/commands/index.js +0 -12
  131. package/cjs/commands/index.js.map +0 -1
  132. package/cjs/commands/install.js +0 -20
  133. package/cjs/commands/install.js.map +0 -1
  134. package/cjs/commands/reverse.js +0 -105
  135. package/cjs/commands/reverse.js.map +0 -1
  136. package/cjs/commands/shell/index.js +0 -56
  137. package/cjs/commands/shell/index.js.map +0 -1
  138. package/cjs/commands/shell/legacy.js +0 -37
  139. package/cjs/commands/shell/legacy.js.map +0 -1
  140. package/cjs/commands/shell/protocol.js +0 -83
  141. package/cjs/commands/shell/protocol.js.map +0 -1
  142. package/cjs/commands/shell/types.js +0 -3
  143. package/cjs/commands/shell/types.js.map +0 -1
  144. package/cjs/commands/shell/utils.js +0 -23
  145. package/cjs/commands/shell/utils.js.map +0 -1
  146. package/cjs/commands/sync/index.js +0 -11
  147. package/cjs/commands/sync/index.js.map +0 -1
  148. package/cjs/commands/sync/list.js +0 -36
  149. package/cjs/commands/sync/list.js.map +0 -1
  150. package/cjs/commands/sync/pull.js +0 -34
  151. package/cjs/commands/sync/pull.js.map +0 -1
  152. package/cjs/commands/sync/push.js +0 -49
  153. package/cjs/commands/sync/push.js.map +0 -1
  154. package/cjs/commands/sync/request.js +0 -48
  155. package/cjs/commands/sync/request.js.map +0 -1
  156. package/cjs/commands/sync/response.js +0 -53
  157. package/cjs/commands/sync/response.js.map +0 -1
  158. package/cjs/commands/sync/stat.js +0 -109
  159. package/cjs/commands/sync/stat.js.map +0 -1
  160. package/cjs/commands/sync/sync.js +0 -118
  161. package/cjs/commands/sync/sync.js.map +0 -1
  162. package/cjs/commands/tcpip.js +0 -28
  163. package/cjs/commands/tcpip.js.map +0 -1
  164. package/cjs/crypto.js +0 -231
  165. package/cjs/crypto.js.map +0 -1
  166. package/cjs/features.js +0 -10
  167. package/cjs/features.js.map +0 -1
  168. package/cjs/index.js +0 -14
  169. package/cjs/index.js.map +0 -1
  170. package/cjs/packet.js +0 -77
  171. package/cjs/packet.js.map +0 -1
  172. package/cjs/socket/close-event-emitter.js +0 -32
  173. package/cjs/socket/close-event-emitter.js.map +0 -1
  174. package/cjs/socket/controller.js +0 -84
  175. package/cjs/socket/controller.js.map +0 -1
  176. package/cjs/socket/data-event-emitter.js +0 -29
  177. package/cjs/socket/data-event-emitter.js.map +0 -1
  178. package/cjs/socket/dispatcher.js +0 -219
  179. package/cjs/socket/dispatcher.js.map +0 -1
  180. package/cjs/socket/index.js +0 -10
  181. package/cjs/socket/index.js.map +0 -1
  182. package/cjs/socket/logger.js +0 -3
  183. package/cjs/socket/logger.js.map +0 -1
  184. package/cjs/socket/socket.js +0 -24
  185. package/cjs/socket/socket.js.map +0 -1
  186. package/cjs/stream/buffered-stream.js +0 -78
  187. package/cjs/stream/buffered-stream.js.map +0 -1
  188. package/cjs/stream/index.js +0 -6
  189. package/cjs/stream/index.js.map +0 -1
  190. package/cjs/stream/stream.js +0 -45
  191. package/cjs/stream/stream.js.map +0 -1
  192. package/cjs/utils/auto-reset-event.js +0 -37
  193. package/cjs/utils/auto-reset-event.js.map +0 -1
  194. package/cjs/utils/base64.js +0 -210
  195. package/cjs/utils/base64.js.map +0 -1
  196. package/cjs/utils/chunk.js +0 -75
  197. package/cjs/utils/chunk.js.map +0 -1
  198. package/cjs/utils/event-queue.js +0 -108
  199. package/cjs/utils/event-queue.js.map +0 -1
  200. package/cjs/utils/index.js +0 -8
  201. package/cjs/utils/index.js.map +0 -1
  202. package/tsconfig.cjs.json +0 -11
  203. package/tsconfig.esm.json +0 -28
  204. package/tsconfig.esm.tsbuildinfo +0 -1305
  205. package/tsconfig.json +0 -18
package/CHANGELOG.json ADDED
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "@yume-chan/adb",
3
+ "entries": [
4
+ {
5
+ "version": "0.0.10",
6
+ "tag": "@yume-chan/adb_v0.0.10",
7
+ "date": "Sun, 09 Jan 2022 15:52:20 GMT",
8
+ "comments": {
9
+ "none": [
10
+ {
11
+ "comment": "Remove `encodeUtf8()` and `decodeUtf8()` from `AdbBackend`"
12
+ }
13
+ ]
14
+ }
15
+ },
16
+ {
17
+ "version": "0.0.9",
18
+ "tag": "@yume-chan/adb_v0.0.9",
19
+ "date": "Sun, 09 Jan 2022 15:50:20 GMT",
20
+ "comments": {}
21
+ }
22
+ ]
23
+ }
package/CHANGELOG.md ADDED
@@ -0,0 +1,16 @@
1
+ # Change Log - @yume-chan/adb
2
+
3
+ This log was last generated on Sun, 09 Jan 2022 15:52:20 GMT and should not be manually modified.
4
+
5
+ ## 0.0.10
6
+ Sun, 09 Jan 2022 15:52:20 GMT
7
+
8
+ ### Updates
9
+
10
+ - Remove `encodeUtf8()` and `decodeUtf8()` from `AdbBackend`
11
+
12
+ ## 0.0.9
13
+ Sun, 09 Jan 2022 15:50:20 GMT
14
+
15
+ _Initial release_
16
+
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2020 Simon Chan
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2020 Simon Chan
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,257 +1,227 @@
1
- # @yume-chan/adb
2
-
3
- TypeScript implementation of Android Debug Bridge (ADB) protocol.
4
-
5
- - [Compatibility](#compatibility)
6
- - [Connection](#connection)
7
- - [Backend](#backend)
8
- - [`read`](#read)
9
- - [`write`](#write)
10
- - [Authenticate](#authenticate)
11
- - [Public key authentication](#public-key-authentication)
12
- - [Backend](#backend-1)
13
- - [`generateKey`](#generatekey)
14
- - [Token authentication](#token-authentication)
15
- - [Backend](#backend-2)
16
- - [`iterateKeys`](#iteratekeys)
17
- - [Stream multiplex](#stream-multiplex)
18
- - [Backend](#backend-3)
19
- - [`encodeUtf8`](#encodeutf8)
20
- - [`decodeUtf8`](#decodeutf8)
21
- - [Commands](#commands)
22
- - [shell](#shell)
23
- - [PTY mode](#pty-mode)
24
- - [ADB shell protocol](#adb-shell-protocol)
25
- - [Raw mode](#raw-mode)
26
- - [usb](#usb)
27
- - [tcpip](#tcpip)
28
- - [sync](#sync)
29
- - [LIST](#list)
30
- - [LIS2](#lis2)
31
- - [STAT](#stat)
32
- - [LST2](#lst2)
33
- - [STA2](#sta2)
34
- - [RECV](#recv)
35
- - [RCV2](#rcv2)
36
- - [SEND](#send)
37
- - [SND2](#snd2)
38
- - [Useful links](#useful-links)
39
-
40
- ## Compatibility
41
-
42
- The main limiting factor of compatibility is [@yume-chan/struct](https://www.npmjs.com/package/@yume-chan/struct).
43
-
44
- This library doesn't use any DOM or Node.js API.
45
-
46
- | | Chrome | Edge | Firefox | Internet Explorer | Safari | Node.js |
47
- | --------------- | ------ | ---- | ------- | ----------------- | -------------- | ------- |
48
- | **Basic usage** | 68 | 79 | 68 | No | 14<sup>1</sup> | 10.4 |
49
-
50
- <sup>1</sup> Requires a polyfill for [`DataView#getBigUint64`][MDN_DataView_getBigUint64] and [`DataView#setBigUint64`][MDN_DataView_setBigUint64]
51
-
52
- [MDN_DataView_getBigUint64]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView/getBigUint64
53
- [MDN_DataView_setBigUint64]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView/setBigUint64
54
-
55
- ## Connection
56
-
57
- This library doesn't tie with a specific transportation method.
58
-
59
- Instead, a `Backend` is responsible for transferring packets in its own way (USB, WebSocket, etc).
60
-
61
- ### Backend
62
-
63
- #### `read`
64
-
65
- ```ts
66
- read(length: number): ArrayBuffer | Promise<ArrayBuffer>
67
- ```
68
-
69
- Read the specified amount of data from the underlying connection.
70
-
71
- The backend should return only the data written by another endpoint in a single operation. That meas, it should never concatenate multiple write operations to fulfill the requested `length`. Here is the reason:
72
-
73
- In normal working condition the client always knows how much data it should read and the server will always send exactly such amount of data in a single operation.
74
-
75
- One exception is that for stateless connections (including USB and TCP), if one client sent a request and died without reading the response, the data will sit in an operating system's internal buffer. When the next client, reusing the connection, want to read a response to its request, it may get that buffered response instead.
76
-
77
- The native ADB implementation tries to detect such a situation by checking length and content of the response data, so do this library. So the backend should not return such a response if possible, or follow this behavior if it can't distinguish.
78
-
79
- #### `write`
80
-
81
- ```ts
82
- write(buffer: ArrayBuffer): void | Promise<void>
83
- ```
84
-
85
- Write data to the underlying connection.
86
-
87
- ## Authenticate
88
-
89
- ADB supports two authentication methods:
90
-
91
- ### Public key authentication
92
-
93
- 1. Client (this library) generates a RSA private key and save it.
94
- 2. Client generates an ADB public key (not RSA public key) based on the RSA private key.
95
- 3. Client transfers the ADB public key to server (device).
96
- 4. Server may ask its user to accept the public key, it will save the public key if accepted.
97
-
98
- #### Backend
99
-
100
- ##### `generateKey`
101
-
102
- ```ts
103
- generateKey(): ArrayBuffer | Promise<ArrayBuffer>
104
- ```
105
-
106
- Generate and store a RSA private key with modulus length 2048 and public exponent 65537.
107
-
108
- The returned `ArrayBuffer` is the private key in PKCS #8 format.
109
-
110
- ### Token authentication
111
-
112
- 1. Server transfers a 20 bytes token to client.
113
- 2. Client RSA encrypts the token with its RSA private key.
114
- 3. Client transfers the encrypted token to server.
115
- 4. Server tries to decrypt the received data with all saved public keys. If any decryption succeed, the authentication succeed.
116
-
117
- #### Backend
118
-
119
- ##### `iterateKeys`
120
-
121
- ```ts
122
- generateKey(): Iterator<ArrayBuffer> | AsyncIterator<ArrayBuffer>
123
- ```
124
-
125
- Synchronously or asynchronously iterate through all stored RSA private keys.
126
-
127
- Each call to `iterateKeys` must returns a different iterator that iterate through all stored keys.
128
-
129
- ## Stream multiplex
130
-
131
- ADB commands are all based on streams. Multiple streams can send and receive at the same time in one connection.
132
-
133
- 1. Client sends an `OPEN` packet to create a stream.
134
- 2. Server responds with `OKAY` or `FAIL`.
135
- 3. Client and server read/write on the stream.
136
- 4. Client/server sends a `CLSE` to close the stream.
137
-
138
- The `Backend` is responsible for encoding and decoding UTF-8 strings.
139
-
140
- ### Backend
141
-
142
- #### `encodeUtf8`
143
-
144
- ```ts
145
- encodeUtf8(input: string): ArrayBuffer
146
- ```
147
-
148
- Encode `input` into an `ArrayBuffer` with UTF-8 encoding.
149
-
150
- #### `decodeUtf8`
151
-
152
- ```ts
153
- decodeUtf8(buffer: ArrayBuffer): string
154
- ```
155
-
156
- Decode `buffer` into a string with UTF-8 encoding.
157
-
158
- ## Commands
159
-
160
- ### shell
161
-
162
- #### PTY mode
163
-
164
- Basic mode, supported on all devices.
165
-
166
- #### ADB shell protocol
167
-
168
- *(Not Implemented)*
169
-
170
- Supported on devices with `shell_v2` feature.
171
-
172
- Supports window size changing event.
173
-
174
- Supports returning process exit code.
175
-
176
- #### Raw mode
177
-
178
- *(Not Implemented)*
179
-
180
- Must be used with ADB shell protocol.
181
-
182
- Supports splitting stdout and stderr.
183
-
184
- ### usb
185
-
186
- Disable ADB over WiFi.
187
-
188
- ### tcpip
189
-
190
- Enable ADB over WiFi.
191
-
192
- ### sync
193
-
194
- Client and server will communicate with another protocol on the opened stream.
195
-
196
- #### LIST
197
-
198
- Request server to list the content of a folder.
199
-
200
- #### LIS2
201
-
202
- *(Not Implemented)*
203
-
204
- Version 2 of the LIST command, contains more information.
205
-
206
- Supported on devices with `ls_v2` feature.
207
-
208
- #### STAT
209
-
210
- Request server to return the information of a file.
211
-
212
- If path is a symbolic link, the returned information is about the link itself.
213
-
214
- So it's actually the [`lstat`](https://linux.die.net/man/2/lstat) system call.
215
-
216
- #### LST2
217
-
218
- Version 2 of the STAT command, contains more information.
219
-
220
- Supported on devices with `stat_v2` feature.
221
-
222
- #### STA2
223
-
224
- Basically identical to LST2, but if path is a symbolic link, the information is about the file it refers to.
225
-
226
- Supported on devices with `stat_v2` feature.
227
-
228
- #### RECV
229
-
230
- Request server to send the content of a file.
231
-
232
- #### RCV2
233
-
234
- *(Not Implemented)*
235
-
236
- Version 2 of the RECV command.
237
-
238
- Supported on devices with `sendrecv_v2` feature.
239
-
240
- #### SEND
241
-
242
- *(Not Implemented)*
243
-
244
- Send a file onto server's file system.
245
-
246
- #### SND2
247
-
248
- *(Not Implemented)*
249
-
250
- Version 2 of the SEND command.
251
-
252
- Supported on devices with `sendrecv_v2` feature.
253
-
254
- ## Useful links
255
-
256
- * [ADB protocol overview](https://android.googlesource.com/platform/packages/modules/adb/+/2fd69306184634c6d90db3ed3be5349e71dcc471/OVERVIEW.TXT)
257
- * [ADB commands](https://android.googlesource.com/platform/packages/modules/adb/+/2fd69306184634c6d90db3ed3be5349e71dcc471/SERVICES.TXT#145)
1
+ # @yume-chan/adb
2
+
3
+ TypeScript implementation of Android Debug Bridge (ADB) protocol.
4
+
5
+ **WARNING:** The public API is UNSTABLE. If you have any questions, please open an issue.
6
+
7
+ - [Compatibility](#compatibility)
8
+ - [Connection](#connection)
9
+ - [Backend](#backend)
10
+ - [`connect`](#connect)
11
+ - [`read`](#read)
12
+ - [`write`](#write)
13
+ - [Authentication](#authentication)
14
+ - [AdbCredentialStore](#adbcredentialstore)
15
+ - [`generateKey`](#generatekey)
16
+ - [`iterateKeys`](#iteratekeys)
17
+ - [Implementations](#implementations)
18
+ - [AdbAuthenticator](#adbauthenticator)
19
+ - [Stream multiplex](#stream-multiplex)
20
+ - [Backend](#backend-1)
21
+ - [Commands](#commands)
22
+ - [childProcess](#childprocess)
23
+ - [usb](#usb)
24
+ - [tcpip](#tcpip)
25
+ - [sync](#sync)
26
+ - [LIST](#list)
27
+ - [LIS2](#lis2)
28
+ - [STAT](#stat)
29
+ - [LST2](#lst2)
30
+ - [STA2](#sta2)
31
+ - [RECV](#recv)
32
+ - [RCV2](#rcv2)
33
+ - [SEND](#send)
34
+ - [SND2](#snd2)
35
+ - [Useful links](#useful-links)
36
+
37
+ ## Compatibility
38
+
39
+ The main limiting factor of compatibility is [@yume-chan/struct](https://www.npmjs.com/package/@yume-chan/struct).
40
+
41
+ This library doesn't use any DOM or Node.js API.
42
+
43
+ | | Chrome | Edge | Firefox | Internet Explorer | Safari | Node.js |
44
+ | --------------- | ------ | ---- | ------- | ----------------- | -------------- | ------- |
45
+ | **Basic usage** | 68 | 79 | 68 | No | 14<sup>1</sup> | 10.4 |
46
+
47
+ <sup>1</sup> Requires a polyfill for [`DataView#getBigUint64`][MDN_DataView_getBigUint64] and [`DataView#setBigUint64`][MDN_DataView_setBigUint64]
48
+
49
+ [MDN_DataView_getBigUint64]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView/getBigUint64
50
+ [MDN_DataView_setBigUint64]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView/setBigUint64
51
+
52
+ ## Connection
53
+
54
+ This library doesn't tie to a specific transportation method.
55
+
56
+ Instead, a `Backend` is responsible for transferring data in its own way (USB, WebSocket, etc).
57
+
58
+ ### Backend
59
+
60
+ #### `connect`
61
+
62
+ Establishes a connection with the device.
63
+
64
+ If a backend doesn't have extra steps to establish the connection, it can omit the `connect` method implementation.
65
+
66
+ #### `read`
67
+
68
+ ```ts
69
+ read(length: number): ArrayBuffer | Promise<ArrayBuffer>
70
+ ```
71
+
72
+ Reads the specified amount of data from the underlying connection.
73
+
74
+ The returned `ArrayBuffer` may have more or less data than the `length` parameter specified, if there is some residual data in the connection buffer. The client will automatically call `read` again with the same `length`.
75
+
76
+ #### `write`
77
+
78
+ ```ts
79
+ write(buffer: ArrayBuffer): void | Promise<void>
80
+ ```
81
+
82
+ Writes data to the underlying connection.
83
+
84
+ ## Authentication
85
+
86
+ For how does ADB authentication work, see https://chensi.moe/blog/2020/09/30/webadb-part2-connection/#auth.
87
+
88
+ In this library, authentication comes in two parts:
89
+
90
+ * `AdbCredentialStore`: because JavaScript has no unified method to generate, store and iterate crypto keys, an implementation of `AdbCredentialStore` is required for the two built-in authenticators.
91
+ * `AdbAuthenticator`: can be used to implement custom authentication modes.
92
+
93
+ Custom `AdbCredentialStore`s and `AdbAuthenticator`s can be specified in the `Adb#connect` method.
94
+
95
+ #### AdbCredentialStore
96
+
97
+ ##### `generateKey`
98
+
99
+ ```ts
100
+ generateKey(): ArrayBuffer | Promise<ArrayBuffer>
101
+ ```
102
+
103
+ Generate and store a RSA private key with modulus length `2048` and public exponent `65537`.
104
+
105
+ The returned `ArrayBuffer` is the private key in PKCS #8 format.
106
+
107
+ ##### `iterateKeys`
108
+
109
+ ```ts
110
+ iterateKeys(): Iterator<ArrayBuffer> | AsyncIterator<ArrayBuffer>
111
+ ```
112
+
113
+ Synchronously or asynchronously iterate through all stored RSA private keys.
114
+
115
+ Each call to `iterateKeys` must return a different iterator that iterate through all stored keys.
116
+
117
+ ##### Implementations
118
+
119
+ The `@yume-chan/adb-backend-webusb` package contains a `AdbWebCredentialStore` implementation using Web Crypto API to generating keys and Web Storage API to storing keys.
120
+
121
+ #### AdbAuthenticator
122
+
123
+ An `AdbAuthenticator` generates `AUTH` responses for each `AUTH` request from server.
124
+
125
+ This package contains `AdbSignatureAuthenticator` and `AdbPublicKeyAuthenticator`, the two basic modes.
126
+
127
+ ## Stream multiplex
128
+
129
+ ADB commands are all based on streams. Multiple streams can send and receive at the same time in one connection.
130
+
131
+ 1. Client sends an `OPEN` packet to create a stream.
132
+ 2. Server responds with `OKAY` or `FAIL`.
133
+ 3. Client and server read/write on the stream.
134
+ 4. Client/server sends a `CLSE` to close the stream.
135
+
136
+ The `Backend` is responsible for reading and writing data from underlying source.
137
+
138
+ ### Backend
139
+
140
+ ## Commands
141
+
142
+ ### childProcess
143
+
144
+ Spawns child process on server. ADB has two shell modes:
145
+
146
+ | | Legacy mode | Shell Protocol |
147
+ | --------------------------- | ---------------- | ------------------ |
148
+ | Feature flag | - | `shell_v2` |
149
+ | Implementation | `AdbLegacyShell` | `AdbShellProtocol` |
150
+ | Splitting stdout and stderr | No | Yes |
151
+ | Returning exit code | No | Yes |
152
+ | Resizing window | No | Yes |
153
+
154
+ The `Adb#childProcess#shell` and `Adb#childProcess#spawn` methods accepts a list of implementations, and will use the first supported one.
155
+
156
+ ### usb
157
+
158
+ Disable ADB over WiFi.
159
+
160
+ ### tcpip
161
+
162
+ Enable ADB over WiFi.
163
+
164
+ ### sync
165
+
166
+ Client and server will communicate with another protocol on the opened stream.
167
+
168
+ #### LIST
169
+
170
+ Request server to list the content of a folder.
171
+
172
+ #### LIS2
173
+
174
+ Version 2 of the LIST command, contains more information.
175
+
176
+ Supported on devices with `ls_v2` feature.
177
+
178
+ #### STAT
179
+
180
+ Request server to return the information of a file.
181
+
182
+ If path is a symbolic link, the returned information is about the link itself.
183
+
184
+ So it's actually the [`lstat`](https://linux.die.net/man/2/lstat) system call.
185
+
186
+ #### LST2
187
+
188
+ Version 2 of the STAT command, contains more information.
189
+
190
+ Supported on devices with `stat_v2` feature.
191
+
192
+ #### STA2
193
+
194
+ Basically identical to LST2, but if path is a symbolic link, the information is about the file it refers to.
195
+
196
+ Supported on devices with `stat_v2` feature.
197
+
198
+ #### RECV
199
+
200
+ Request server to send the content of a file.
201
+
202
+ #### RCV2
203
+
204
+ *(Not Implemented)*
205
+
206
+ Version 2 of the RECV command.
207
+
208
+ Supported on devices with `sendrecv_v2` feature.
209
+
210
+ #### SEND
211
+
212
+ *(Not Implemented)*
213
+
214
+ Send a file onto server's file system.
215
+
216
+ #### SND2
217
+
218
+ *(Not Implemented)*
219
+
220
+ Version 2 of the SEND command.
221
+
222
+ Supported on devices with `sendrecv_v2` feature.
223
+
224
+ ## Useful links
225
+
226
+ * [ADB protocol overview](https://android.googlesource.com/platform/packages/modules/adb/+/2fd69306184634c6d90db3ed3be5349e71dcc471/OVERVIEW.TXT)
227
+ * [ADB commands](https://android.googlesource.com/platform/packages/modules/adb/+/2fd69306184634c6d90db3ed3be5349e71dcc471/SERVICES.TXT#145)
package/dts/adb.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"adb.d.ts","sourceRoot":"","sources":["../src/adb.ts"],"names":[],"mappings":"AAEA,OAAO,EAA4B,kBAAkB,EAA4B,MAAM,QAAQ,CAAC;AAChG,OAAO,EAAE,UAAU,E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AC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;IAIjD,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAWxD,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAIxC"}
package/dts/auth.d.ts CHANGED
@@ -3,8 +3,18 @@ import { ValueOrPromise } from '@yume-chan/struct';
3
3
  import { AdbPacket, AdbPacketInit } from './packet';
4
4
  export declare type AdbKeyIterable = Iterable<ArrayBuffer> | AsyncIterable<ArrayBuffer>;
5
5
  export interface AdbCredentialStore {
6
- iterateKeys(): AdbKeyIterable;
6
+ /**
7
+ * Generate and store a RSA private key with modulus length `2048` and public exponent `65537`.
8
+ *
9
+ * The returned `ArrayBuffer` is the private key in PKCS #8 format.
10
+ */
7
11
  generateKey(): ValueOrPromise<ArrayBuffer>;
12
+ /**
13
+ * Synchronously or asynchronously iterate through all stored RSA private keys.
14
+ *
15
+ * Each call to `iterateKeys` must return a different iterator that iterate through all stored keys.
16
+ */
17
+ iterateKeys(): AdbKeyIterable;
8
18
  }
9
19
  export declare enum AdbAuthType {
10
20
  Token = 1,
package/dts/auth.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,OAAO,EAAc,SAAS,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGhE,oBAAY,cAAc,GAAG,QAAQ,CAAC,WAAW,CAAC,GAAG,aAAa,CAAC,WAAW,CAAC,CAAC;AAEhF,MAAM,WAAW,kBAAkB;IAC/B,WAAW,IAAI,cAAc,CAAC;IAE9B,WAAW,IAAI,cAAc,CAAC,WAAW,CAAC,CAAC;CAC9C;AAED,oBAAY,WAAW;IACnB,KAAK,IAAI;IACT,SAAS,IA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,KAAK,IAAI;IACT,SAAS,IAAI;IACb,SAAS,IAAI;CAChB;AAED,MAAM,WAAW,gBAAgB;IAC7B;;;;;;;;;;OAUG;IACH,CACI,eAAe,EAAE,kBAAkB,EACnC,cAAc,EAAE,MAAM,OAAO,CAAC,SAAS,CAAC,GACzC,aAAa,CAAC,aAAa,CAAC,CAAC;CACnC;AAED,eAAO,MAAM,yBAAyB,EAAE,gBAmBvC,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,gBAoCvC,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,gBAAgB,EAGtD,CAAC;AAEF,qBAAa,wBAAyB,YAAW,UAAU;IACvD,SAAgB,cAAc,EAAE,SAAS,gBAAgB,EAAE,CAAC;IAE5D,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAqB;IAErD,OAAO,CAAC,cAAc,CAAoC;IAE1D,OAAO,CAAC,QAAQ,CAA2C;gBAGvD,cAAc,EAAE,SAAS,gBAAgB,EAAE,EAC3C,eAAe,EAAE,kBAAkB;IAMvC,OAAO,CAAC,cAAc,CAEpB;YAEa,gBAAgB;IAkBlB,MAAM,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC;IAUvD,OAAO;CAGjB"}
package/dts/backend.d.ts CHANGED
@@ -1,15 +1,13 @@
1
- import { Event } from '@yume-chan/event';
2
- import { ValueOrPromise } from '@yume-chan/struct';
1
+ import type { Event } from '@yume-chan/event';
2
+ import type { ValueOrPromise } from '@yume-chan/struct';
3
3
  export interface AdbBackend {
4
4
  readonly serial: string;
5
5
  readonly name: string | undefined;
6
6
  readonly connected: boolean;
7
7
  readonly onDisconnected: Event<void>;
8
8
  connect?(): ValueOrPromise<void>;
9
- encodeUtf8(input: string): ArrayBuffer;
10
- decodeUtf8(buffer: ArrayBuffer): string;
11
- write(buffer: ArrayBuffer): ValueOrPromise<void>;
12
9
  read(length: number): ValueOrPromise<ArrayBuffer>;
10
+ write(buffer: ArrayBuffer): ValueOrPromise<void>;
13
11
  dispose(): ValueOrPromise<void>;
14
12
  }
15
13
  //# sourceMappingURL=backend.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"backend.d.ts","sourceRoot":"","sources":["../src/backend.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,MAAM,WAAW,UAAU;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IAElC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAE5B,QAAQ,CAAC,cAAc,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IAErC,OAAO,CAAC,IAAI,cAAc,CAAC,IAAI,CAAC,CAAC;IAEjC,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW,CAAC;IAEvC,UAAU,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAAC;IAExC,KAAK,CAAC,MAAM,EAAE,WAAW,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;IAEjD,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,cAAc,CAAC,WAAW,CAAC,CAAC;IAElD,OAAO,IAAI,cAAc,CAAC,IAAI,CAAC,CAAC;CACnC"}
1
+ {"version":3,"file":"backend.d.ts","sourceRoot":"","sources":["../src/backend.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD,MAAM,WAAW,UAAU;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IAElC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAE5B,QAAQ,CAAC,cAAc,EAAE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