@yume-chan/adb 0.0.15 → 0.0.16
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/CHANGELOG.json +21 -0
- package/CHANGELOG.md +11 -1
- package/LICENSE +21 -21
- package/README.md +247 -247
- package/esm/adb.d.ts +7 -0
- package/esm/adb.d.ts.map +1 -1
- package/esm/adb.js +7 -0
- package/esm/adb.js.map +1 -1
- package/esm/commands/subprocess/protocols/none.d.ts +1 -0
- package/esm/commands/subprocess/protocols/none.d.ts.map +1 -1
- package/esm/commands/subprocess/protocols/none.js +6 -5
- package/esm/commands/subprocess/protocols/none.js.map +1 -1
- package/esm/commands/sync/stat.d.ts.map +1 -1
- package/esm/commands/sync/stat.js.map +1 -1
- package/esm/socket/dispatcher.d.ts +4 -1
- package/esm/socket/dispatcher.d.ts.map +1 -1
- package/esm/socket/dispatcher.js +11 -8
- package/esm/socket/dispatcher.js.map +1 -1
- package/esm/socket/socket.d.ts +6 -1
- package/esm/socket/socket.d.ts.map +1 -1
- package/esm/socket/socket.js +17 -7
- package/esm/socket/socket.js.map +1 -1
- package/esm/stream/buffered.d.ts +6 -2
- package/esm/stream/buffered.d.ts.map +1 -1
- package/esm/stream/buffered.js +67 -47
- package/esm/stream/buffered.js.map +1 -1
- package/esm/stream/detect.js +1 -0
- package/esm/stream/detect.js.map +1 -1
- package/esm/stream/detect.polyfill.d.ts.map +1 -1
- package/esm/stream/detect.polyfill.js +0 -5
- package/esm/stream/detect.polyfill.js.map +1 -1
- package/esm/stream/transform.d.ts +20 -0
- package/esm/stream/transform.d.ts.map +1 -1
- package/esm/stream/transform.js +7 -1
- package/esm/stream/transform.js.map +1 -1
- package/package.json +10 -10
- package/src/adb.ts +280 -273
- package/src/auth.ts +173 -173
- package/src/backend.ts +11 -11
- package/src/commands/base.ts +11 -11
- package/src/commands/framebuffer.ts +73 -73
- package/src/commands/index.ts +8 -8
- package/src/commands/install.ts +30 -30
- package/src/commands/power.ts +54 -54
- package/src/commands/reverse.ts +140 -140
- package/src/commands/subprocess/index.ts +139 -139
- package/src/commands/subprocess/protocols/none.ts +70 -68
- package/src/commands/subprocess/protocols/shell.ts +190 -190
- package/src/commands/subprocess/protocols/types.ts +59 -59
- package/src/commands/subprocess/utils.ts +20 -20
- package/src/commands/sync/index.ts +7 -7
- package/src/commands/sync/list.ts +86 -86
- package/src/commands/sync/pull.ts +46 -46
- package/src/commands/sync/push.ts +41 -41
- package/src/commands/sync/request.ts +50 -50
- package/src/commands/sync/response.ts +64 -64
- package/src/commands/sync/stat.ts +151 -150
- package/src/commands/sync/sync.ts +181 -181
- package/src/commands/tcpip.ts +21 -21
- package/src/crypto.ts +296 -296
- package/src/features.ts +9 -9
- package/src/index.ts +11 -11
- package/src/packet.ts +80 -80
- package/src/socket/dispatcher.ts +305 -304
- package/src/socket/index.ts +2 -2
- package/src/socket/socket.ts +155 -144
- package/src/stream/buffered.ts +168 -147
- package/src/stream/detect.native.ts +362 -362
- package/src/stream/detect.polyfill.ts +22 -28
- package/src/stream/detect.ts +7 -5
- package/src/stream/index.ts +3 -3
- package/src/stream/transform.ts +474 -447
- package/src/utils/auto-reset-event.ts +41 -41
- package/src/utils/base64.ts +306 -306
- package/src/utils/index.ts +3 -3
- package/tsconfig.build.json +3 -3
- package/tsconfig.build.tsbuildinfo +1 -1
- package/tsconfig.test.json +9 -10
- package/web-streams-polyfill-4.0.0-beta.2.tgz +0 -0
- package/esm/commands/subprocess/legacy.d.ts +0 -35
- package/esm/commands/subprocess/legacy.d.ts.map +0 -1
- package/esm/commands/subprocess/legacy.js +0 -53
- package/esm/commands/subprocess/legacy.js.map +0 -1
- package/esm/commands/subprocess/protocol.d.ts +0 -39
- package/esm/commands/subprocess/protocol.d.ts.map +0 -1
- package/esm/commands/subprocess/protocol.js +0 -157
- package/esm/commands/subprocess/protocol.js.map +0 -1
- package/esm/commands/subprocess/types.d.ts +0 -50
- package/esm/commands/subprocess/types.d.ts.map +0 -1
- package/esm/commands/subprocess/types.js +0 -2
- package/esm/commands/subprocess/types.js.map +0 -1
- package/esm/socket/controller.d.ts +0 -37
- package/esm/socket/controller.d.ts.map +0 -1
- package/esm/socket/controller.js +0 -66
- package/esm/socket/controller.js.map +0 -1
- package/esm/stream/detect.bak.d.ts +0 -240
- package/esm/stream/detect.bak.d.ts.map +0 -1
- package/esm/stream/detect.bak.js +0 -60
- package/esm/stream/detect.bak.js.map +0 -1
- package/esm/utils/encoding.d.ts +0 -3
- package/esm/utils/encoding.d.ts.map +0 -1
- package/esm/utils/encoding.js +0 -11
- package/esm/utils/encoding.js.map +0 -1
package/CHANGELOG.json
CHANGED
|
@@ -1,6 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yume-chan/adb",
|
|
3
3
|
"entries": [
|
|
4
|
+
{
|
|
5
|
+
"version": "0.0.16",
|
|
6
|
+
"tag": "@yume-chan/adb_v0.0.16",
|
|
7
|
+
"date": "Sat, 28 May 2022 03:56:37 GMT",
|
|
8
|
+
"comments": {
|
|
9
|
+
"none": [
|
|
10
|
+
{
|
|
11
|
+
"comment": "Upgrade TypeScript to 4.7.2 to enable Node.js ESM"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"comment": "Upgrade web-streams-polyfill to 4.0.0-beta.3, fix an issue where `Adb#close()` doesn't release the connection."
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"comment": "Fix an issue where `AdbSocket#readable#cancel()` stalls the connection."
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"comment": "Improve performance of `BufferedStream` by up to 100%."
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
},
|
|
4
25
|
{
|
|
5
26
|
"version": "0.0.15",
|
|
6
27
|
"tag": "@yume-chan/adb_v0.0.15",
|
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
# Change Log - @yume-chan/adb
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Sat, 28 May 2022 03:56:37 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 0.0.16
|
|
6
|
+
Sat, 28 May 2022 03:56:37 GMT
|
|
7
|
+
|
|
8
|
+
### Updates
|
|
9
|
+
|
|
10
|
+
- Upgrade TypeScript to 4.7.2 to enable Node.js ESM
|
|
11
|
+
- Upgrade web-streams-polyfill to 4.0.0-beta.3, fix an issue where `Adb#close()` doesn't release the connection.
|
|
12
|
+
- Fix an issue where `AdbSocket#readable#cancel()` stalls the connection.
|
|
13
|
+
- Improve performance of `BufferedStream` by up to 100%.
|
|
4
14
|
|
|
5
15
|
## 0.0.15
|
|
6
16
|
Mon, 02 May 2022 04:18:01 GMT
|
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2020-2022 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-2022 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,247 +1,247 @@
|
|
|
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
|
-
- [Basic usage](#basic-usage)
|
|
9
|
-
- [Use without bundlers](#use-without-bundlers)
|
|
10
|
-
- [Connection](#connection)
|
|
11
|
-
- [Backend](#backend)
|
|
12
|
-
- [`connect`](#connect)
|
|
13
|
-
- [Authentication](#authentication)
|
|
14
|
-
- [AdbCredentialStore](#adbcredentialstore)
|
|
15
|
-
- [`generateKey`](#generatekey)
|
|
16
|
-
- [`iterateKeys`](#iteratekeys)
|
|
17
|
-
- [Implementations](#implementations)
|
|
18
|
-
- [AdbAuthenticator](#adbauthenticator)
|
|
19
|
-
- [`authenticate`](#authenticate)
|
|
20
|
-
- [Stream multiplex](#stream-multiplex)
|
|
21
|
-
- [Commands](#commands)
|
|
22
|
-
- [subprocess](#subprocess)
|
|
23
|
-
- [raw mode](#raw-mode)
|
|
24
|
-
- [pty mode](#pty-mode)
|
|
25
|
-
- [usb](#usb)
|
|
26
|
-
- [tcpip](#tcpip)
|
|
27
|
-
- [sync](#sync)
|
|
28
|
-
- [LIST](#list)
|
|
29
|
-
- [LIS2](#lis2)
|
|
30
|
-
- [STAT](#stat)
|
|
31
|
-
- [LST2](#lst2)
|
|
32
|
-
- [STA2](#sta2)
|
|
33
|
-
- [RECV](#recv)
|
|
34
|
-
- [RCV2](#rcv2)
|
|
35
|
-
- [SEND](#send)
|
|
36
|
-
- [SND2](#snd2)
|
|
37
|
-
- [Useful links](#useful-links)
|
|
38
|
-
|
|
39
|
-
## Compatibility
|
|
40
|
-
|
|
41
|
-
Here is a list of features, their used APIs, and their compatibilities. If an optional feature is not actually used, its requirements can be ignored.
|
|
42
|
-
|
|
43
|
-
Some features can be polyfilled to support older runtimes, but this library doesn't ship with any polyfills.
|
|
44
|
-
|
|
45
|
-
Each backend may have different requirements.
|
|
46
|
-
|
|
47
|
-
### Basic usage
|
|
48
|
-
|
|
49
|
-
| | Chrome | Edge | Firefox | Internet Explorer | Safari | Node.js |
|
|
50
|
-
| ------------------------------- | ------ | ---- | ------- | ----------------- | ------ | ------------------- |
|
|
51
|
-
| `@yume-chan/struct`<sup>1</sup> | 67 | 79 | 68 | No | 14 | 8.3<sup>2</sup>, 11 |
|
|
52
|
-
| *Overall* | 67 | 79 | No | No | 14.1 | 16.5 |
|
|
53
|
-
|
|
54
|
-
<sup>1</sup> `uint64` and `string` are used.
|
|
55
|
-
|
|
56
|
-
<sup>2</sup> `TextEncoder` and `TextDecoder` are only available in `util` module. Need to be assigned to `globalThis`.
|
|
57
|
-
|
|
58
|
-
### Use without bundlers
|
|
59
|
-
|
|
60
|
-
| | Chrome | Edge | Firefox | Internet Explorer | Safari | Node.js |
|
|
61
|
-
| --------------- | ------ | ---- | ------- | ----------------- | ------ | ------- |
|
|
62
|
-
| Top-level await | 89 | 89 | 89 | No | 15 | 14.8 |
|
|
63
|
-
|
|
64
|
-
## Connection
|
|
65
|
-
|
|
66
|
-
This library doesn't tie to a specific transportation method.
|
|
67
|
-
|
|
68
|
-
Instead, a `Backend` is responsible for transferring data in its own way (USB, WebSocket, TCP, etc).
|
|
69
|
-
|
|
70
|
-
### Backend
|
|
71
|
-
|
|
72
|
-
#### `connect`
|
|
73
|
-
|
|
74
|
-
```ts
|
|
75
|
-
connect(): ValueOrPromise<ReadableWritablePair<AdbPacketCore, AdbPacketInit>>
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
Connect to a device and create a pair of `AdbPacket` streams.
|
|
79
|
-
|
|
80
|
-
The backend, instead of the core library, is responsible for serializing and deserializing the packets. Because it's extreme slow for WebUSB backend (`@yume-chan/adb-backend-webusb`) to read packets with unknown size.
|
|
81
|
-
|
|
82
|
-
## Authentication
|
|
83
|
-
|
|
84
|
-
For how does ADB authentication work, see https://chensi.moe/blog/2020/09/30/webadb-part2-connection/#auth.
|
|
85
|
-
|
|
86
|
-
In this library, authentication comes in two parts:
|
|
87
|
-
|
|
88
|
-
#### AdbCredentialStore
|
|
89
|
-
|
|
90
|
-
An interface to generate, store and iterate ADB private keys on each runtime. (Because Node.js and Browsers have different APIs to do this)
|
|
91
|
-
|
|
92
|
-
##### `generateKey`
|
|
93
|
-
|
|
94
|
-
```ts
|
|
95
|
-
generateKey(): ValueOrPromise<Uint8Array>
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
Generate and store a RSA private key with modulus length `2048` and public exponent `65537`.
|
|
99
|
-
|
|
100
|
-
The returned `Uint8Array` is the private key in PKCS #8 format.
|
|
101
|
-
|
|
102
|
-
##### `iterateKeys`
|
|
103
|
-
|
|
104
|
-
```ts
|
|
105
|
-
iterateKeys(): Iterator<ArrayBuffer> | AsyncIterator<ArrayBuffer>
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
Synchronously or asynchronously iterate through all stored RSA private keys.
|
|
109
|
-
|
|
110
|
-
Each call to `iterateKeys` must return a different iterator that iterate through all stored keys.
|
|
111
|
-
|
|
112
|
-
##### Implementations
|
|
113
|
-
|
|
114
|
-
The `@yume-chan/adb-credential-web` package contains a `AdbWebCredentialStore` implementation using Web Crypto API for generating keys and Web Storage API for storing keys.
|
|
115
|
-
|
|
116
|
-
#### AdbAuthenticator
|
|
117
|
-
|
|
118
|
-
An `AdbAuthenticator` generates `AUTH` responses for each `AUTH` request from server.
|
|
119
|
-
|
|
120
|
-
This package contains `AdbSignatureAuthenticator` and `AdbPublicKeyAuthenticator`, the two basic modes.
|
|
121
|
-
|
|
122
|
-
#### `authenticate`
|
|
123
|
-
|
|
124
|
-
```ts
|
|
125
|
-
static async authenticate(
|
|
126
|
-
connection: ReadableWritablePair<AdbPacketCore, AdbPacketCore>,
|
|
127
|
-
credentialStore: AdbCredentialStore,
|
|
128
|
-
authenticators = AdbDefaultAuthenticators,
|
|
129
|
-
): Promise<Adb>
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
Call this method to authenticate the connection and create an `Adb` instance.
|
|
133
|
-
|
|
134
|
-
If an authentication process failed, it's possible to call `authenticate` again on the same connection (`AdbPacket` stream pair). Every time the device receives a `CNXN` packet, it resets all internal state, and starts a new authentication process.
|
|
135
|
-
|
|
136
|
-
## Stream multiplex
|
|
137
|
-
|
|
138
|
-
ADB commands are all based on streams. Multiple streams can send and receive at the same time in one connection.
|
|
139
|
-
|
|
140
|
-
1. Client sends an `OPEN` packet to create a stream.
|
|
141
|
-
2. Server responds with `OKAY` or `FAIL`.
|
|
142
|
-
3. Client and server read/write on the stream.
|
|
143
|
-
4. Client/server sends a `CLSE` to close the stream.
|
|
144
|
-
|
|
145
|
-
## Commands
|
|
146
|
-
|
|
147
|
-
### subprocess
|
|
148
|
-
|
|
149
|
-
ADB has two subprocess invocation modes and two data protocols (4 combinations).
|
|
150
|
-
|
|
151
|
-
#### raw mode
|
|
152
|
-
|
|
153
|
-
In raw mode, Shell protocol transfers `stdout` and `stderr` separately. It also supports returning exit code.
|
|
154
|
-
|
|
155
|
-
| | Legacy protocol | Shell Protocol |
|
|
156
|
-
| --------------------------- | --------------------------- | ---------------------------- |
|
|
157
|
-
| Feature flag | - | `shell_v2` |
|
|
158
|
-
| Implementation | `AdbNoneSubprocessProtocol` | `AdbShellSubprocessProtocol` |
|
|
159
|
-
| Splitting stdout and stderr | No | Yes |
|
|
160
|
-
| Returning exit code | No | Yes |
|
|
161
|
-
|
|
162
|
-
Use `spawn` method to create a subprocess in raw mode.
|
|
163
|
-
|
|
164
|
-
#### pty mode
|
|
165
|
-
|
|
166
|
-
In PTY mode, the subprocess has a pseudo-terminal, so it can send special control sequences like clear screen and set cursor position. The two protocols both send data in `stdout`, but Shell Protocol also supports resizing the terminal from client.
|
|
167
|
-
|
|
168
|
-
| | Legacy protocol | Shell Protocol |
|
|
169
|
-
| --------------------------- | --------------------------- | ---------------------------- |
|
|
170
|
-
| Feature flag | - | `shell_v2` |
|
|
171
|
-
| Implementation | `AdbNoneSubprocessProtocol` | `AdbShellSubprocessProtocol` |
|
|
172
|
-
| Resizing window | No | Yes |
|
|
173
|
-
|
|
174
|
-
Use `shell` method to create a subprocess in PTY mode.
|
|
175
|
-
|
|
176
|
-
### usb
|
|
177
|
-
|
|
178
|
-
Disable ADB over WiFi.
|
|
179
|
-
|
|
180
|
-
### tcpip
|
|
181
|
-
|
|
182
|
-
Enable ADB over WiFi.
|
|
183
|
-
|
|
184
|
-
### sync
|
|
185
|
-
|
|
186
|
-
Client and server will communicate with another protocol on the opened stream.
|
|
187
|
-
|
|
188
|
-
#### LIST
|
|
189
|
-
|
|
190
|
-
Request server to list the content of a folder.
|
|
191
|
-
|
|
192
|
-
#### LIS2
|
|
193
|
-
|
|
194
|
-
Version 2 of the LIST command, contains more information.
|
|
195
|
-
|
|
196
|
-
Supported on devices with `ls_v2` feature.
|
|
197
|
-
|
|
198
|
-
#### STAT
|
|
199
|
-
|
|
200
|
-
Request server to return the information of a file.
|
|
201
|
-
|
|
202
|
-
If path is a symbolic link, the returned information is about the link itself.
|
|
203
|
-
|
|
204
|
-
So it's actually the [`lstat`](https://linux.die.net/man/2/lstat) system call.
|
|
205
|
-
|
|
206
|
-
#### LST2
|
|
207
|
-
|
|
208
|
-
Version 2 of the STAT command, contains more information.
|
|
209
|
-
|
|
210
|
-
Supported on devices with `stat_v2` feature.
|
|
211
|
-
|
|
212
|
-
#### STA2
|
|
213
|
-
|
|
214
|
-
Basically identical to LST2, but if path is a symbolic link, the information is about the file it refers to.
|
|
215
|
-
|
|
216
|
-
Supported on devices with `stat_v2` feature.
|
|
217
|
-
|
|
218
|
-
#### RECV
|
|
219
|
-
|
|
220
|
-
Request server to send the content of a file.
|
|
221
|
-
|
|
222
|
-
#### RCV2
|
|
223
|
-
|
|
224
|
-
*(Not Implemented)*
|
|
225
|
-
|
|
226
|
-
Version 2 of the RECV command.
|
|
227
|
-
|
|
228
|
-
Supported on devices with `sendrecv_v2` feature.
|
|
229
|
-
|
|
230
|
-
#### SEND
|
|
231
|
-
|
|
232
|
-
*(Not Implemented)*
|
|
233
|
-
|
|
234
|
-
Send a file onto server's file system.
|
|
235
|
-
|
|
236
|
-
#### SND2
|
|
237
|
-
|
|
238
|
-
*(Not Implemented)*
|
|
239
|
-
|
|
240
|
-
Version 2 of the SEND command.
|
|
241
|
-
|
|
242
|
-
Supported on devices with `sendrecv_v2` feature.
|
|
243
|
-
|
|
244
|
-
## Useful links
|
|
245
|
-
|
|
246
|
-
* [ADB protocol overview](https://android.googlesource.com/platform/packages/modules/adb/+/2fd69306184634c6d90db3ed3be5349e71dcc471/OVERVIEW.TXT)
|
|
247
|
-
* [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
|
+
- [Basic usage](#basic-usage)
|
|
9
|
+
- [Use without bundlers](#use-without-bundlers)
|
|
10
|
+
- [Connection](#connection)
|
|
11
|
+
- [Backend](#backend)
|
|
12
|
+
- [`connect`](#connect)
|
|
13
|
+
- [Authentication](#authentication)
|
|
14
|
+
- [AdbCredentialStore](#adbcredentialstore)
|
|
15
|
+
- [`generateKey`](#generatekey)
|
|
16
|
+
- [`iterateKeys`](#iteratekeys)
|
|
17
|
+
- [Implementations](#implementations)
|
|
18
|
+
- [AdbAuthenticator](#adbauthenticator)
|
|
19
|
+
- [`authenticate`](#authenticate)
|
|
20
|
+
- [Stream multiplex](#stream-multiplex)
|
|
21
|
+
- [Commands](#commands)
|
|
22
|
+
- [subprocess](#subprocess)
|
|
23
|
+
- [raw mode](#raw-mode)
|
|
24
|
+
- [pty mode](#pty-mode)
|
|
25
|
+
- [usb](#usb)
|
|
26
|
+
- [tcpip](#tcpip)
|
|
27
|
+
- [sync](#sync)
|
|
28
|
+
- [LIST](#list)
|
|
29
|
+
- [LIS2](#lis2)
|
|
30
|
+
- [STAT](#stat)
|
|
31
|
+
- [LST2](#lst2)
|
|
32
|
+
- [STA2](#sta2)
|
|
33
|
+
- [RECV](#recv)
|
|
34
|
+
- [RCV2](#rcv2)
|
|
35
|
+
- [SEND](#send)
|
|
36
|
+
- [SND2](#snd2)
|
|
37
|
+
- [Useful links](#useful-links)
|
|
38
|
+
|
|
39
|
+
## Compatibility
|
|
40
|
+
|
|
41
|
+
Here is a list of features, their used APIs, and their compatibilities. If an optional feature is not actually used, its requirements can be ignored.
|
|
42
|
+
|
|
43
|
+
Some features can be polyfilled to support older runtimes, but this library doesn't ship with any polyfills.
|
|
44
|
+
|
|
45
|
+
Each backend may have different requirements.
|
|
46
|
+
|
|
47
|
+
### Basic usage
|
|
48
|
+
|
|
49
|
+
| | Chrome | Edge | Firefox | Internet Explorer | Safari | Node.js |
|
|
50
|
+
| ------------------------------- | ------ | ---- | ------- | ----------------- | ------ | ------------------- |
|
|
51
|
+
| `@yume-chan/struct`<sup>1</sup> | 67 | 79 | 68 | No | 14 | 8.3<sup>2</sup>, 11 |
|
|
52
|
+
| *Overall* | 67 | 79 | No | No | 14.1 | 16.5 |
|
|
53
|
+
|
|
54
|
+
<sup>1</sup> `uint64` and `string` are used.
|
|
55
|
+
|
|
56
|
+
<sup>2</sup> `TextEncoder` and `TextDecoder` are only available in `util` module. Need to be assigned to `globalThis`.
|
|
57
|
+
|
|
58
|
+
### Use without bundlers
|
|
59
|
+
|
|
60
|
+
| | Chrome | Edge | Firefox | Internet Explorer | Safari | Node.js |
|
|
61
|
+
| --------------- | ------ | ---- | ------- | ----------------- | ------ | ------- |
|
|
62
|
+
| Top-level await | 89 | 89 | 89 | No | 15 | 14.8 |
|
|
63
|
+
|
|
64
|
+
## Connection
|
|
65
|
+
|
|
66
|
+
This library doesn't tie to a specific transportation method.
|
|
67
|
+
|
|
68
|
+
Instead, a `Backend` is responsible for transferring data in its own way (USB, WebSocket, TCP, etc).
|
|
69
|
+
|
|
70
|
+
### Backend
|
|
71
|
+
|
|
72
|
+
#### `connect`
|
|
73
|
+
|
|
74
|
+
```ts
|
|
75
|
+
connect(): ValueOrPromise<ReadableWritablePair<AdbPacketCore, AdbPacketInit>>
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Connect to a device and create a pair of `AdbPacket` streams.
|
|
79
|
+
|
|
80
|
+
The backend, instead of the core library, is responsible for serializing and deserializing the packets. Because it's extreme slow for WebUSB backend (`@yume-chan/adb-backend-webusb`) to read packets with unknown size.
|
|
81
|
+
|
|
82
|
+
## Authentication
|
|
83
|
+
|
|
84
|
+
For how does ADB authentication work, see https://chensi.moe/blog/2020/09/30/webadb-part2-connection/#auth.
|
|
85
|
+
|
|
86
|
+
In this library, authentication comes in two parts:
|
|
87
|
+
|
|
88
|
+
#### AdbCredentialStore
|
|
89
|
+
|
|
90
|
+
An interface to generate, store and iterate ADB private keys on each runtime. (Because Node.js and Browsers have different APIs to do this)
|
|
91
|
+
|
|
92
|
+
##### `generateKey`
|
|
93
|
+
|
|
94
|
+
```ts
|
|
95
|
+
generateKey(): ValueOrPromise<Uint8Array>
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Generate and store a RSA private key with modulus length `2048` and public exponent `65537`.
|
|
99
|
+
|
|
100
|
+
The returned `Uint8Array` is the private key in PKCS #8 format.
|
|
101
|
+
|
|
102
|
+
##### `iterateKeys`
|
|
103
|
+
|
|
104
|
+
```ts
|
|
105
|
+
iterateKeys(): Iterator<ArrayBuffer> | AsyncIterator<ArrayBuffer>
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Synchronously or asynchronously iterate through all stored RSA private keys.
|
|
109
|
+
|
|
110
|
+
Each call to `iterateKeys` must return a different iterator that iterate through all stored keys.
|
|
111
|
+
|
|
112
|
+
##### Implementations
|
|
113
|
+
|
|
114
|
+
The `@yume-chan/adb-credential-web` package contains a `AdbWebCredentialStore` implementation using Web Crypto API for generating keys and Web Storage API for storing keys.
|
|
115
|
+
|
|
116
|
+
#### AdbAuthenticator
|
|
117
|
+
|
|
118
|
+
An `AdbAuthenticator` generates `AUTH` responses for each `AUTH` request from server.
|
|
119
|
+
|
|
120
|
+
This package contains `AdbSignatureAuthenticator` and `AdbPublicKeyAuthenticator`, the two basic modes.
|
|
121
|
+
|
|
122
|
+
#### `authenticate`
|
|
123
|
+
|
|
124
|
+
```ts
|
|
125
|
+
static async authenticate(
|
|
126
|
+
connection: ReadableWritablePair<AdbPacketCore, AdbPacketCore>,
|
|
127
|
+
credentialStore: AdbCredentialStore,
|
|
128
|
+
authenticators = AdbDefaultAuthenticators,
|
|
129
|
+
): Promise<Adb>
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Call this method to authenticate the connection and create an `Adb` instance.
|
|
133
|
+
|
|
134
|
+
If an authentication process failed, it's possible to call `authenticate` again on the same connection (`AdbPacket` stream pair). Every time the device receives a `CNXN` packet, it resets all internal state, and starts a new authentication process.
|
|
135
|
+
|
|
136
|
+
## Stream multiplex
|
|
137
|
+
|
|
138
|
+
ADB commands are all based on streams. Multiple streams can send and receive at the same time in one connection.
|
|
139
|
+
|
|
140
|
+
1. Client sends an `OPEN` packet to create a stream.
|
|
141
|
+
2. Server responds with `OKAY` or `FAIL`.
|
|
142
|
+
3. Client and server read/write on the stream.
|
|
143
|
+
4. Client/server sends a `CLSE` to close the stream.
|
|
144
|
+
|
|
145
|
+
## Commands
|
|
146
|
+
|
|
147
|
+
### subprocess
|
|
148
|
+
|
|
149
|
+
ADB has two subprocess invocation modes and two data protocols (4 combinations).
|
|
150
|
+
|
|
151
|
+
#### raw mode
|
|
152
|
+
|
|
153
|
+
In raw mode, Shell protocol transfers `stdout` and `stderr` separately. It also supports returning exit code.
|
|
154
|
+
|
|
155
|
+
| | Legacy protocol | Shell Protocol |
|
|
156
|
+
| --------------------------- | --------------------------- | ---------------------------- |
|
|
157
|
+
| Feature flag | - | `shell_v2` |
|
|
158
|
+
| Implementation | `AdbNoneSubprocessProtocol` | `AdbShellSubprocessProtocol` |
|
|
159
|
+
| Splitting stdout and stderr | No | Yes |
|
|
160
|
+
| Returning exit code | No | Yes |
|
|
161
|
+
|
|
162
|
+
Use `spawn` method to create a subprocess in raw mode.
|
|
163
|
+
|
|
164
|
+
#### pty mode
|
|
165
|
+
|
|
166
|
+
In PTY mode, the subprocess has a pseudo-terminal, so it can send special control sequences like clear screen and set cursor position. The two protocols both send data in `stdout`, but Shell Protocol also supports resizing the terminal from client.
|
|
167
|
+
|
|
168
|
+
| | Legacy protocol | Shell Protocol |
|
|
169
|
+
| --------------------------- | --------------------------- | ---------------------------- |
|
|
170
|
+
| Feature flag | - | `shell_v2` |
|
|
171
|
+
| Implementation | `AdbNoneSubprocessProtocol` | `AdbShellSubprocessProtocol` |
|
|
172
|
+
| Resizing window | No | Yes |
|
|
173
|
+
|
|
174
|
+
Use `shell` method to create a subprocess in PTY mode.
|
|
175
|
+
|
|
176
|
+
### usb
|
|
177
|
+
|
|
178
|
+
Disable ADB over WiFi.
|
|
179
|
+
|
|
180
|
+
### tcpip
|
|
181
|
+
|
|
182
|
+
Enable ADB over WiFi.
|
|
183
|
+
|
|
184
|
+
### sync
|
|
185
|
+
|
|
186
|
+
Client and server will communicate with another protocol on the opened stream.
|
|
187
|
+
|
|
188
|
+
#### LIST
|
|
189
|
+
|
|
190
|
+
Request server to list the content of a folder.
|
|
191
|
+
|
|
192
|
+
#### LIS2
|
|
193
|
+
|
|
194
|
+
Version 2 of the LIST command, contains more information.
|
|
195
|
+
|
|
196
|
+
Supported on devices with `ls_v2` feature.
|
|
197
|
+
|
|
198
|
+
#### STAT
|
|
199
|
+
|
|
200
|
+
Request server to return the information of a file.
|
|
201
|
+
|
|
202
|
+
If path is a symbolic link, the returned information is about the link itself.
|
|
203
|
+
|
|
204
|
+
So it's actually the [`lstat`](https://linux.die.net/man/2/lstat) system call.
|
|
205
|
+
|
|
206
|
+
#### LST2
|
|
207
|
+
|
|
208
|
+
Version 2 of the STAT command, contains more information.
|
|
209
|
+
|
|
210
|
+
Supported on devices with `stat_v2` feature.
|
|
211
|
+
|
|
212
|
+
#### STA2
|
|
213
|
+
|
|
214
|
+
Basically identical to LST2, but if path is a symbolic link, the information is about the file it refers to.
|
|
215
|
+
|
|
216
|
+
Supported on devices with `stat_v2` feature.
|
|
217
|
+
|
|
218
|
+
#### RECV
|
|
219
|
+
|
|
220
|
+
Request server to send the content of a file.
|
|
221
|
+
|
|
222
|
+
#### RCV2
|
|
223
|
+
|
|
224
|
+
*(Not Implemented)*
|
|
225
|
+
|
|
226
|
+
Version 2 of the RECV command.
|
|
227
|
+
|
|
228
|
+
Supported on devices with `sendrecv_v2` feature.
|
|
229
|
+
|
|
230
|
+
#### SEND
|
|
231
|
+
|
|
232
|
+
*(Not Implemented)*
|
|
233
|
+
|
|
234
|
+
Send a file onto server's file system.
|
|
235
|
+
|
|
236
|
+
#### SND2
|
|
237
|
+
|
|
238
|
+
*(Not Implemented)*
|
|
239
|
+
|
|
240
|
+
Version 2 of the SEND command.
|
|
241
|
+
|
|
242
|
+
Supported on devices with `sendrecv_v2` feature.
|
|
243
|
+
|
|
244
|
+
## Useful links
|
|
245
|
+
|
|
246
|
+
* [ADB protocol overview](https://android.googlesource.com/platform/packages/modules/adb/+/2fd69306184634c6d90db3ed3be5349e71dcc471/OVERVIEW.TXT)
|
|
247
|
+
* [ADB commands](https://android.googlesource.com/platform/packages/modules/adb/+/2fd69306184634c6d90db3ed3be5349e71dcc471/SERVICES.TXT#145)
|
package/esm/adb.d.ts
CHANGED
|
@@ -44,6 +44,13 @@ export declare class Adb implements Closeable {
|
|
|
44
44
|
install(): WritableStream<Uint8Array>;
|
|
45
45
|
sync(): Promise<AdbSync>;
|
|
46
46
|
framebuffer(): Promise<AdbFrameBuffer>;
|
|
47
|
+
/**
|
|
48
|
+
* Close the ADB connection.
|
|
49
|
+
*
|
|
50
|
+
* Note that it won't close the streams from backends.
|
|
51
|
+
* The streams are both physically and logically intact,
|
|
52
|
+
* and can be reused.
|
|
53
|
+
*/
|
|
47
54
|
close(): Promise<void>;
|
|
48
55
|
}
|
|
49
56
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,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;IAIjD,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IASrD,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAOrC,EAAE,CAAC,GAAG,SAAS,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;IAOjD,OAAO;IAID,IAAI,IAAI,OAAO,CAAC,OAAO,CAAC;IAKxB,WAAW,IAAI,OAAO,CAAC,cAAc,CAAC;IAInD;;;;;;OAMG;IACU,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAGtC"}
|
package/esm/adb.js
CHANGED
|
@@ -211,6 +211,13 @@ export class Adb {
|
|
|
211
211
|
async framebuffer() {
|
|
212
212
|
return framebuffer(this);
|
|
213
213
|
}
|
|
214
|
+
/**
|
|
215
|
+
* Close the ADB connection.
|
|
216
|
+
*
|
|
217
|
+
* Note that it won't close the streams from backends.
|
|
218
|
+
* The streams are both physically and logically intact,
|
|
219
|
+
* and can be reused.
|
|
220
|
+
*/
|
|
214
221
|
async close() {
|
|
215
222
|
await this.dispatcher.close();
|
|
216
223
|
}
|
package/esm/adb.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adb.js","sourceRoot":"","sources":["../src/adb.ts"],"names":[],"mappings":"AAAA,wBAAwB;AAExB,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,0BAA0B,EAAE,0BAA0B,EAA2B,MAAM,WAAW,CAAC;AAC5G,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,aAAa,EAAE,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAuB,MAAM,qBAAqB,CAAC;AACjK,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,UAAU,E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