pyadb-client 3.1.2__tar.gz → 3.2.0__tar.gz
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.
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/Cargo.lock +61 -85
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/Cargo.toml +2 -2
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/PKG-INFO +1 -1
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/message_devices/adb_message_device.rs +1 -1
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/message_devices/commands/list.rs +1 -10
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/message_devices/usb/adb_usb_device.rs +19 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/message_devices/usb/usb_transport.rs +18 -9
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/message_devices/usb/utils.rs +3 -2
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/models/adb_local_command.rs +8 -6
- pyadb_client-3.2.0/adb_client/src/models/list_info.rs +76 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/server_device/adb_server_device_commands.rs +122 -92
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/server_device/commands/list.rs +2 -10
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/pyadb_client/src/adb_server_device.rs +7 -3
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/pyadb_client/src/adb_tcp_device.rs +7 -3
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/pyadb_client/src/adb_usb_device.rs +19 -3
- pyadb_client-3.1.2/adb_client/src/models/list_info.rs +0 -45
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/Cargo.toml +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/README.md +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/adb_device_ext.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/adb_transport.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/emulator/adb_emulator_device.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/emulator/commands/avd.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/emulator/commands/mod.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/emulator/commands/raw.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/emulator/commands/rotate.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/emulator/commands/sms.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/emulator/mod.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/emulator/models/adb_emulator_command.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/emulator/models/mod.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/emulator/tcp_emulator_transport.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/error.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/lib.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/mdns/mdns_device.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/mdns/mdns_discovery.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/mdns/mod.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/message_devices/adb_message_device_commands.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/message_devices/adb_message_transport.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/message_devices/adb_session.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/message_devices/adb_transport_message.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/message_devices/commands/framebuffer.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/message_devices/commands/install.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/message_devices/commands/mod.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/message_devices/commands/pull.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/message_devices/commands/push.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/message_devices/commands/reboot.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/message_devices/commands/remount.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/message_devices/commands/root.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/message_devices/commands/shell.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/message_devices/commands/stat.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/message_devices/commands/uninstall.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/message_devices/commands/utils/message_writer.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/message_devices/commands/utils/mod.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/message_devices/commands/utils/shell_message_writer.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/message_devices/commands/verity.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/message_devices/message_commands.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/message_devices/mod.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/message_devices/models/adb_rsa_key.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/message_devices/models/mod.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/message_devices/tcp/README.md +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/message_devices/tcp/adb_tcp_device.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/message_devices/tcp/mod.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/message_devices/tcp/tcp_transport.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/message_devices/usb/README.md +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/message_devices/usb/mod.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/message_devices/utils.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/models/adb_command.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/models/adb_host_command.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/models/adb_request_status.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/models/adb_stat_response.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/models/framebuffer_info.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/models/host_features.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/models/mod.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/models/reboot_type.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/models/remount_info.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/models/sync_command.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/server/README.md +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/server/adb_server.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/server/commands/connect.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/server/commands/devices.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/server/commands/disconnect.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/server/commands/kill.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/server/commands/mdns.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/server/commands/mod.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/server/commands/pair.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/server/commands/reconnect.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/server/commands/server_status.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/server/commands/version.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/server/commands/wait_for_device.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/server/mod.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/server/models/adb_version.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/server/models/device_long.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/server/models/device_short.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/server/models/device_state.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/server/models/mdns_services.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/server/models/mod.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/server/models/server_status.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/server/models/wait_for_device.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/server/tcp_server_transport.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/server_device/README.md +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/server_device/adb_server_device.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/server_device/commands/forward.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/server_device/commands/framebuffer.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/server_device/commands/host_features.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/server_device/commands/install.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/server_device/commands/logcat.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/server_device/commands/mod.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/server_device/commands/reboot.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/server_device/commands/reconnect.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/server_device/commands/recv.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/server_device/commands/remount.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/server_device/commands/reverse.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/server_device/commands/root.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/server_device/commands/send.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/server_device/commands/stat.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/server_device/commands/tcpip.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/server_device/commands/transport.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/server_device/commands/uninstall.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/server_device/commands/usb.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/server_device/commands/verity.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/server_device/mod.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/utils.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/pyadb_client/Cargo.toml +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/pyadb_client/README.md +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/pyadb_client/src/adb_server.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/pyadb_client/src/bin/stub_gen.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/pyadb_client/src/lib.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/pyadb_client/src/models/devices.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/pyadb_client/src/models/mod.rs +0 -0
- {pyadb_client-3.1.2 → pyadb_client-3.2.0}/pyproject.toml +0 -0
|
@@ -4,7 +4,7 @@ version = 4
|
|
|
4
4
|
|
|
5
5
|
[[package]]
|
|
6
6
|
name = "adb_cli"
|
|
7
|
-
version = "3.
|
|
7
|
+
version = "3.2.0"
|
|
8
8
|
dependencies = [
|
|
9
9
|
"adb_client",
|
|
10
10
|
"clap",
|
|
@@ -16,7 +16,7 @@ dependencies = [
|
|
|
16
16
|
|
|
17
17
|
[[package]]
|
|
18
18
|
name = "adb_client"
|
|
19
|
-
version = "3.
|
|
19
|
+
version = "3.2.0"
|
|
20
20
|
dependencies = [
|
|
21
21
|
"anyhow",
|
|
22
22
|
"base64",
|
|
@@ -80,21 +80,6 @@ version = "0.1.6"
|
|
|
80
80
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
81
81
|
checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299"
|
|
82
82
|
|
|
83
|
-
[[package]]
|
|
84
|
-
name = "anstream"
|
|
85
|
-
version = "0.6.21"
|
|
86
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
87
|
-
checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a"
|
|
88
|
-
dependencies = [
|
|
89
|
-
"anstyle",
|
|
90
|
-
"anstyle-parse 0.2.7",
|
|
91
|
-
"anstyle-query",
|
|
92
|
-
"anstyle-wincon",
|
|
93
|
-
"colorchoice",
|
|
94
|
-
"is_terminal_polyfill",
|
|
95
|
-
"utf8parse",
|
|
96
|
-
]
|
|
97
|
-
|
|
98
83
|
[[package]]
|
|
99
84
|
name = "anstream"
|
|
100
85
|
version = "1.0.0"
|
|
@@ -102,7 +87,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
102
87
|
checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d"
|
|
103
88
|
dependencies = [
|
|
104
89
|
"anstyle",
|
|
105
|
-
"anstyle-parse
|
|
90
|
+
"anstyle-parse",
|
|
106
91
|
"anstyle-query",
|
|
107
92
|
"anstyle-wincon",
|
|
108
93
|
"colorchoice",
|
|
@@ -116,15 +101,6 @@ version = "1.0.14"
|
|
|
116
101
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
117
102
|
checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000"
|
|
118
103
|
|
|
119
|
-
[[package]]
|
|
120
|
-
name = "anstyle-parse"
|
|
121
|
-
version = "0.2.7"
|
|
122
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
123
|
-
checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2"
|
|
124
|
-
dependencies = [
|
|
125
|
-
"utf8parse",
|
|
126
|
-
]
|
|
127
|
-
|
|
128
104
|
[[package]]
|
|
129
105
|
name = "anstyle-parse"
|
|
130
106
|
version = "1.0.0"
|
|
@@ -264,9 +240,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5"
|
|
|
264
240
|
|
|
265
241
|
[[package]]
|
|
266
242
|
name = "cc"
|
|
267
|
-
version = "1.2.
|
|
243
|
+
version = "1.2.58"
|
|
268
244
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
269
|
-
checksum = "
|
|
245
|
+
checksum = "e1e928d4b69e3077709075a938a05ffbedfa53a84c8f766efbf8220bb1ff60e1"
|
|
270
246
|
dependencies = [
|
|
271
247
|
"find-msvc-tools",
|
|
272
248
|
"shlex",
|
|
@@ -345,7 +321,7 @@ version = "4.6.0"
|
|
|
345
321
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
346
322
|
checksum = "714a53001bf66416adb0e2ef5ac857140e7dc3a0c48fb28b2f10762fc4b5069f"
|
|
347
323
|
dependencies = [
|
|
348
|
-
"anstream
|
|
324
|
+
"anstream",
|
|
349
325
|
"anstyle",
|
|
350
326
|
"clap_lex",
|
|
351
327
|
"strsim",
|
|
@@ -560,9 +536,9 @@ checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719"
|
|
|
560
536
|
|
|
561
537
|
[[package]]
|
|
562
538
|
name = "env_filter"
|
|
563
|
-
version = "1.0.
|
|
539
|
+
version = "1.0.1"
|
|
564
540
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
565
|
-
checksum = "
|
|
541
|
+
checksum = "32e90c2accc4b07a8456ea0debdc2e7587bdd890680d71173a15d4ae604f6eef"
|
|
566
542
|
dependencies = [
|
|
567
543
|
"log",
|
|
568
544
|
"regex",
|
|
@@ -570,11 +546,11 @@ dependencies = [
|
|
|
570
546
|
|
|
571
547
|
[[package]]
|
|
572
548
|
name = "env_logger"
|
|
573
|
-
version = "0.11.
|
|
549
|
+
version = "0.11.10"
|
|
574
550
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
575
|
-
checksum = "
|
|
551
|
+
checksum = "0621c04f2196ac3f488dd583365b9c09be011a4ab8b9f37248ffcc8f6198b56a"
|
|
576
552
|
dependencies = [
|
|
577
|
-
"anstream
|
|
553
|
+
"anstream",
|
|
578
554
|
"anstyle",
|
|
579
555
|
"env_filter",
|
|
580
556
|
"jiff",
|
|
@@ -785,9 +761,9 @@ dependencies = [
|
|
|
785
761
|
|
|
786
762
|
[[package]]
|
|
787
763
|
name = "inventory"
|
|
788
|
-
version = "0.3.
|
|
764
|
+
version = "0.3.23"
|
|
789
765
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
790
|
-
checksum = "
|
|
766
|
+
checksum = "8062b737e5389949f477d4760a2ebbff0c366f97798f2419b8d8f366363d3342"
|
|
791
767
|
dependencies = [
|
|
792
768
|
"rustversion",
|
|
793
769
|
]
|
|
@@ -839,9 +815,9 @@ dependencies = [
|
|
|
839
815
|
|
|
840
816
|
[[package]]
|
|
841
817
|
name = "itoa"
|
|
842
|
-
version = "1.0.
|
|
818
|
+
version = "1.0.18"
|
|
843
819
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
844
|
-
checksum = "
|
|
820
|
+
checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
|
|
845
821
|
|
|
846
822
|
[[package]]
|
|
847
823
|
name = "jiff"
|
|
@@ -869,9 +845,9 @@ dependencies = [
|
|
|
869
845
|
|
|
870
846
|
[[package]]
|
|
871
847
|
name = "js-sys"
|
|
872
|
-
version = "0.3.
|
|
848
|
+
version = "0.3.92"
|
|
873
849
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
874
|
-
checksum = "
|
|
850
|
+
checksum = "cc4c90f45aa2e6eacbe8645f77fdea542ac97a494bcd117a67df9ff4d611f995"
|
|
875
851
|
dependencies = [
|
|
876
852
|
"once_cell",
|
|
877
853
|
"wasm-bindgen",
|
|
@@ -955,7 +931,7 @@ dependencies = [
|
|
|
955
931
|
|
|
956
932
|
[[package]]
|
|
957
933
|
name = "mdns"
|
|
958
|
-
version = "3.
|
|
934
|
+
version = "3.2.0"
|
|
959
935
|
dependencies = [
|
|
960
936
|
"adb_client",
|
|
961
937
|
]
|
|
@@ -1008,9 +984,9 @@ dependencies = [
|
|
|
1008
984
|
|
|
1009
985
|
[[package]]
|
|
1010
986
|
name = "mio"
|
|
1011
|
-
version = "1.
|
|
987
|
+
version = "1.2.0"
|
|
1012
988
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1013
|
-
checksum = "
|
|
989
|
+
checksum = "50b7e5b27aa02a74bac8c3f23f448f8d87ff11f92d3aac1a6ed369ee08cc56c1"
|
|
1014
990
|
dependencies = [
|
|
1015
991
|
"libc",
|
|
1016
992
|
"log",
|
|
@@ -1091,9 +1067,9 @@ dependencies = [
|
|
|
1091
1067
|
|
|
1092
1068
|
[[package]]
|
|
1093
1069
|
name = "num-conv"
|
|
1094
|
-
version = "0.2.
|
|
1070
|
+
version = "0.2.1"
|
|
1095
1071
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1096
|
-
checksum = "
|
|
1072
|
+
checksum = "c6673768db2d862beb9b39a78fdcb1a69439615d5794a1be50caa9bc92c81967"
|
|
1097
1073
|
|
|
1098
1074
|
[[package]]
|
|
1099
1075
|
name = "num-integer"
|
|
@@ -1160,7 +1136,7 @@ dependencies = [
|
|
|
1160
1136
|
"num-traits",
|
|
1161
1137
|
"pyo3",
|
|
1162
1138
|
"pyo3-build-config",
|
|
1163
|
-
"rustc-hash 2.1.
|
|
1139
|
+
"rustc-hash 2.1.2",
|
|
1164
1140
|
]
|
|
1165
1141
|
|
|
1166
1142
|
[[package]]
|
|
@@ -1192,9 +1168,9 @@ checksum = "d6790f58c7ff633d8771f42965289203411a5e5c68388703c06e14f24770b41e"
|
|
|
1192
1168
|
|
|
1193
1169
|
[[package]]
|
|
1194
1170
|
name = "ordered-float"
|
|
1195
|
-
version = "5.
|
|
1171
|
+
version = "5.3.0"
|
|
1196
1172
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1197
|
-
checksum = "
|
|
1173
|
+
checksum = "b7d950ca161dc355eaf28f82b11345ed76c6e1f6eb1f4f4479e0323b9e2fbd0e"
|
|
1198
1174
|
dependencies = [
|
|
1199
1175
|
"num-traits",
|
|
1200
1176
|
]
|
|
@@ -1400,7 +1376,7 @@ checksum = "b5a041e753da8b807c9255f28de81879c78c876392ff2469cde94799b2896b9d"
|
|
|
1400
1376
|
|
|
1401
1377
|
[[package]]
|
|
1402
1378
|
name = "pyadb_client"
|
|
1403
|
-
version = "3.
|
|
1379
|
+
version = "3.2.0"
|
|
1404
1380
|
dependencies = [
|
|
1405
1381
|
"adb_client",
|
|
1406
1382
|
"anyhow",
|
|
@@ -1700,9 +1676,9 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
|
|
|
1700
1676
|
|
|
1701
1677
|
[[package]]
|
|
1702
1678
|
name = "rustc-hash"
|
|
1703
|
-
version = "2.1.
|
|
1679
|
+
version = "2.1.2"
|
|
1704
1680
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1705
|
-
checksum = "
|
|
1681
|
+
checksum = "94300abf3f1ae2e2b8ffb7b58043de3d399c73fa6f4b73826402a5c457614dbe"
|
|
1706
1682
|
|
|
1707
1683
|
[[package]]
|
|
1708
1684
|
name = "rusticata-macros"
|
|
@@ -1739,9 +1715,9 @@ dependencies = [
|
|
|
1739
1715
|
|
|
1740
1716
|
[[package]]
|
|
1741
1717
|
name = "rustls-webpki"
|
|
1742
|
-
version = "0.103.
|
|
1718
|
+
version = "0.103.10"
|
|
1743
1719
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1744
|
-
checksum = "
|
|
1720
|
+
checksum = "df33b2b81ac578cabaf06b89b0631153a3f416b0a886e8a7a1707fb51abbd1ef"
|
|
1745
1721
|
dependencies = [
|
|
1746
1722
|
"ring",
|
|
1747
1723
|
"rustls-pki-types",
|
|
@@ -1877,9 +1853,9 @@ dependencies = [
|
|
|
1877
1853
|
|
|
1878
1854
|
[[package]]
|
|
1879
1855
|
name = "serde_spanned"
|
|
1880
|
-
version = "1.0
|
|
1856
|
+
version = "1.1.0"
|
|
1881
1857
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1882
|
-
checksum = "
|
|
1858
|
+
checksum = "876ac351060d4f882bb1032b6369eb0aef79ad9df1ea8bc404874d8cc3d0cd98"
|
|
1883
1859
|
dependencies = [
|
|
1884
1860
|
"serde_core",
|
|
1885
1861
|
]
|
|
@@ -1913,9 +1889,9 @@ dependencies = [
|
|
|
1913
1889
|
|
|
1914
1890
|
[[package]]
|
|
1915
1891
|
name = "simd-adler32"
|
|
1916
|
-
version = "0.3.
|
|
1892
|
+
version = "0.3.9"
|
|
1917
1893
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1918
|
-
checksum = "
|
|
1894
|
+
checksum = "703d5c7ef118737c72f1af64ad2f6f8c5e1921f818cdcb97b8fe6fc69bf66214"
|
|
1919
1895
|
|
|
1920
1896
|
[[package]]
|
|
1921
1897
|
name = "siphasher"
|
|
@@ -2129,39 +2105,39 @@ dependencies = [
|
|
|
2129
2105
|
|
|
2130
2106
|
[[package]]
|
|
2131
2107
|
name = "toml_datetime"
|
|
2132
|
-
version = "1.0
|
|
2108
|
+
version = "1.1.0+spec-1.1.0"
|
|
2133
2109
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2134
|
-
checksum = "
|
|
2110
|
+
checksum = "97251a7c317e03ad83774a8752a7e81fb6067740609f75ea2b585b569a59198f"
|
|
2135
2111
|
dependencies = [
|
|
2136
2112
|
"serde_core",
|
|
2137
2113
|
]
|
|
2138
2114
|
|
|
2139
2115
|
[[package]]
|
|
2140
2116
|
name = "toml_edit"
|
|
2141
|
-
version = "0.25.
|
|
2117
|
+
version = "0.25.8+spec-1.1.0"
|
|
2142
2118
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2143
|
-
checksum = "
|
|
2119
|
+
checksum = "16bff38f1d86c47f9ff0647e6838d7bb362522bdf44006c7068c2b1e606f1f3c"
|
|
2144
2120
|
dependencies = [
|
|
2145
2121
|
"indexmap",
|
|
2146
|
-
"toml_datetime 1.0
|
|
2122
|
+
"toml_datetime 1.1.0+spec-1.1.0",
|
|
2147
2123
|
"toml_parser",
|
|
2148
|
-
"winnow 1.0.
|
|
2124
|
+
"winnow 1.0.1",
|
|
2149
2125
|
]
|
|
2150
2126
|
|
|
2151
2127
|
[[package]]
|
|
2152
2128
|
name = "toml_parser"
|
|
2153
|
-
version = "1.0
|
|
2129
|
+
version = "1.1.0+spec-1.1.0"
|
|
2154
2130
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2155
|
-
checksum = "
|
|
2131
|
+
checksum = "2334f11ee363607eb04df9b8fc8a13ca1715a72ba8662a26ac285c98aabb4011"
|
|
2156
2132
|
dependencies = [
|
|
2157
|
-
"winnow 1.0.
|
|
2133
|
+
"winnow 1.0.1",
|
|
2158
2134
|
]
|
|
2159
2135
|
|
|
2160
2136
|
[[package]]
|
|
2161
2137
|
name = "toml_writer"
|
|
2162
|
-
version = "1.0
|
|
2138
|
+
version = "1.1.0+spec-1.1.0"
|
|
2163
2139
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2164
|
-
checksum = "
|
|
2140
|
+
checksum = "d282ade6016312faf3e41e57ebbba0c073e4056dab1232ab1cb624199648f8ed"
|
|
2165
2141
|
|
|
2166
2142
|
[[package]]
|
|
2167
2143
|
name = "typenum"
|
|
@@ -2327,9 +2303,9 @@ dependencies = [
|
|
|
2327
2303
|
|
|
2328
2304
|
[[package]]
|
|
2329
2305
|
name = "wasm-bindgen"
|
|
2330
|
-
version = "0.2.
|
|
2306
|
+
version = "0.2.115"
|
|
2331
2307
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2332
|
-
checksum = "
|
|
2308
|
+
checksum = "6523d69017b7633e396a89c5efab138161ed5aafcbc8d3e5c5a42ae38f50495a"
|
|
2333
2309
|
dependencies = [
|
|
2334
2310
|
"cfg-if",
|
|
2335
2311
|
"once_cell",
|
|
@@ -2340,9 +2316,9 @@ dependencies = [
|
|
|
2340
2316
|
|
|
2341
2317
|
[[package]]
|
|
2342
2318
|
name = "wasm-bindgen-macro"
|
|
2343
|
-
version = "0.2.
|
|
2319
|
+
version = "0.2.115"
|
|
2344
2320
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2345
|
-
checksum = "
|
|
2321
|
+
checksum = "4e3a6c758eb2f701ed3d052ff5737f5bfe6614326ea7f3bbac7156192dc32e67"
|
|
2346
2322
|
dependencies = [
|
|
2347
2323
|
"quote",
|
|
2348
2324
|
"wasm-bindgen-macro-support",
|
|
@@ -2350,9 +2326,9 @@ dependencies = [
|
|
|
2350
2326
|
|
|
2351
2327
|
[[package]]
|
|
2352
2328
|
name = "wasm-bindgen-macro-support"
|
|
2353
|
-
version = "0.2.
|
|
2329
|
+
version = "0.2.115"
|
|
2354
2330
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2355
|
-
checksum = "
|
|
2331
|
+
checksum = "921de2737904886b52bcbb237301552d05969a6f9c40d261eb0533c8b055fedf"
|
|
2356
2332
|
dependencies = [
|
|
2357
2333
|
"bumpalo",
|
|
2358
2334
|
"proc-macro2",
|
|
@@ -2363,9 +2339,9 @@ dependencies = [
|
|
|
2363
2339
|
|
|
2364
2340
|
[[package]]
|
|
2365
2341
|
name = "wasm-bindgen-shared"
|
|
2366
|
-
version = "0.2.
|
|
2342
|
+
version = "0.2.115"
|
|
2367
2343
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2368
|
-
checksum = "
|
|
2344
|
+
checksum = "a93e946af942b58934c604527337bad9ae33ba1d5c6900bbb41c2c07c2364a93"
|
|
2369
2345
|
dependencies = [
|
|
2370
2346
|
"unicode-ident",
|
|
2371
2347
|
]
|
|
@@ -2406,9 +2382,9 @@ dependencies = [
|
|
|
2406
2382
|
|
|
2407
2383
|
[[package]]
|
|
2408
2384
|
name = "web-sys"
|
|
2409
|
-
version = "0.3.
|
|
2385
|
+
version = "0.3.92"
|
|
2410
2386
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2411
|
-
checksum = "
|
|
2387
|
+
checksum = "84cde8507f4d7cfcb1185b8cb5890c494ffea65edbe1ba82cfd63661c805ed94"
|
|
2412
2388
|
dependencies = [
|
|
2413
2389
|
"js-sys",
|
|
2414
2390
|
"wasm-bindgen",
|
|
@@ -2668,9 +2644,9 @@ checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945"
|
|
|
2668
2644
|
|
|
2669
2645
|
[[package]]
|
|
2670
2646
|
name = "winnow"
|
|
2671
|
-
version = "1.0.
|
|
2647
|
+
version = "1.0.1"
|
|
2672
2648
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2673
|
-
checksum = "
|
|
2649
|
+
checksum = "09dac053f1cd375980747450bfc7250c264eaae0583872e845c0c7cd578872b5"
|
|
2674
2650
|
dependencies = [
|
|
2675
2651
|
"memchr",
|
|
2676
2652
|
]
|
|
@@ -2792,18 +2768,18 @@ dependencies = [
|
|
|
2792
2768
|
|
|
2793
2769
|
[[package]]
|
|
2794
2770
|
name = "zerocopy"
|
|
2795
|
-
version = "0.8.
|
|
2771
|
+
version = "0.8.48"
|
|
2796
2772
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2797
|
-
checksum = "
|
|
2773
|
+
checksum = "eed437bf9d6692032087e337407a86f04cd8d6a16a37199ed57949d415bd68e9"
|
|
2798
2774
|
dependencies = [
|
|
2799
2775
|
"zerocopy-derive",
|
|
2800
2776
|
]
|
|
2801
2777
|
|
|
2802
2778
|
[[package]]
|
|
2803
2779
|
name = "zerocopy-derive"
|
|
2804
|
-
version = "0.8.
|
|
2780
|
+
version = "0.8.48"
|
|
2805
2781
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2806
|
-
checksum = "
|
|
2782
|
+
checksum = "70e3cd084b1788766f53af483dd21f93881ff30d7320490ec3ef7526d203bad4"
|
|
2807
2783
|
dependencies = [
|
|
2808
2784
|
"proc-macro2",
|
|
2809
2785
|
"quote",
|
|
@@ -9,8 +9,8 @@ homepage = "https://github.com/cocool97/adb_client"
|
|
|
9
9
|
keywords = ["adb", "android", "tcp", "usb"]
|
|
10
10
|
license = "MIT"
|
|
11
11
|
repository = "https://github.com/cocool97/adb_client"
|
|
12
|
-
version = "3.
|
|
13
|
-
rust-version = "1.
|
|
12
|
+
version = "3.2.0"
|
|
13
|
+
rust-version = "1.88.0"
|
|
14
14
|
|
|
15
15
|
# To build locally when working on a new release
|
|
16
16
|
[patch.crates-io]
|
{pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/message_devices/adb_message_device.rs
RENAMED
|
@@ -19,7 +19,7 @@ use crate::{
|
|
|
19
19
|
/// Generic structure representing an ADB device reachable over an [`ADBMessageTransport`].
|
|
20
20
|
/// Structure is totally agnostic over which transport is truly used.
|
|
21
21
|
#[derive(Debug)]
|
|
22
|
-
pub
|
|
22
|
+
pub struct ADBMessageDevice<T: ADBMessageTransport> {
|
|
23
23
|
transport: T,
|
|
24
24
|
}
|
|
25
25
|
|
|
@@ -3,7 +3,6 @@ use byteorder::LittleEndian;
|
|
|
3
3
|
use std::str;
|
|
4
4
|
|
|
5
5
|
use crate::Result;
|
|
6
|
-
use crate::RustADBError;
|
|
7
6
|
use crate::message_devices::adb_message_device::ADBMessageDevice;
|
|
8
7
|
use crate::message_devices::adb_message_transport::ADBMessageTransport;
|
|
9
8
|
use crate::message_devices::adb_session::ADBSession;
|
|
@@ -161,15 +160,7 @@ impl<T: ADBMessageTransport> ADBMessageDevice<T> {
|
|
|
161
160
|
size,
|
|
162
161
|
};
|
|
163
162
|
|
|
164
|
-
|
|
165
|
-
let item_type = match (mode >> 13) & 0b111 {
|
|
166
|
-
0b010 => ADBListItemType::Directory(entry),
|
|
167
|
-
0b100 => ADBListItemType::File(entry),
|
|
168
|
-
0b101 => ADBListItemType::Symlink(entry),
|
|
169
|
-
type_code => return Err(RustADBError::UnknownFileMode(type_code)),
|
|
170
|
-
};
|
|
171
|
-
|
|
172
|
-
list_items.push(item_type);
|
|
163
|
+
list_items.push(ADBListItemType::from_mode_and_entry(mode, entry));
|
|
173
164
|
}
|
|
174
165
|
"DONE" => {
|
|
175
166
|
return Ok(list_items);
|
{pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/message_devices/usb/adb_usb_device.rs
RENAMED
|
@@ -17,6 +17,8 @@ use crate::utils::get_default_adb_key_path;
|
|
|
17
17
|
#[derive(Debug)]
|
|
18
18
|
pub struct ADBUSBDevice {
|
|
19
19
|
inner: ADBMessageDevice<USBTransport>,
|
|
20
|
+
vendor_id: u16,
|
|
21
|
+
product_id: u16,
|
|
20
22
|
}
|
|
21
23
|
|
|
22
24
|
impl ADBUSBDevice {
|
|
@@ -51,11 +53,28 @@ impl ADBUSBDevice {
|
|
|
51
53
|
transport: USBTransport,
|
|
52
54
|
private_key_path: P,
|
|
53
55
|
) -> Result<Self> {
|
|
56
|
+
let vendor_id = transport.vendor_id()?;
|
|
57
|
+
let product_id = transport.product_id()?;
|
|
58
|
+
|
|
54
59
|
Ok(Self {
|
|
55
60
|
inner: ADBMessageDevice::new(transport, private_key_path)?,
|
|
61
|
+
vendor_id,
|
|
62
|
+
product_id,
|
|
56
63
|
})
|
|
57
64
|
}
|
|
58
65
|
|
|
66
|
+
/// Returns the vendor ID of the device
|
|
67
|
+
#[must_use]
|
|
68
|
+
pub const fn vendor_id(&self) -> u16 {
|
|
69
|
+
self.vendor_id
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/// Returns the product ID of the device
|
|
73
|
+
#[must_use]
|
|
74
|
+
pub const fn product_id(&self) -> u16 {
|
|
75
|
+
self.product_id
|
|
76
|
+
}
|
|
77
|
+
|
|
59
78
|
/// autodetect connected ADB devices and establish a connection with the first device found
|
|
60
79
|
pub fn autodetect() -> Result<Self> {
|
|
61
80
|
Self::autodetect_with_custom_private_key(get_default_adb_key_path()?)
|
{pyadb_client-3.1.2 → pyadb_client-3.2.0}/adb_client/src/message_devices/usb/usb_transport.rs
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
use std::{sync::Arc, time::Duration};
|
|
2
2
|
|
|
3
3
|
use rusb::{
|
|
4
|
-
Device, DeviceHandle, Direction,
|
|
4
|
+
Context, Device, DeviceHandle, Direction, TransferType, UsbContext,
|
|
5
5
|
constants::LIBUSB_CLASS_VENDOR_SPEC,
|
|
6
6
|
};
|
|
7
7
|
|
|
@@ -25,8 +25,8 @@ struct Endpoint {
|
|
|
25
25
|
/// Transport running on USB
|
|
26
26
|
#[derive(Debug, Clone)]
|
|
27
27
|
pub struct USBTransport {
|
|
28
|
-
device: Device<
|
|
29
|
-
handle: Option<Arc<DeviceHandle<
|
|
28
|
+
device: Device<Context>,
|
|
29
|
+
handle: Option<Arc<DeviceHandle<Context>>>,
|
|
30
30
|
read_endpoint: Option<Endpoint>,
|
|
31
31
|
write_endpoint: Option<Endpoint>,
|
|
32
32
|
}
|
|
@@ -35,7 +35,8 @@ impl USBTransport {
|
|
|
35
35
|
/// Instantiate a new [`USBTransport`].
|
|
36
36
|
/// Only the first device with given `vendor_id` and `product_id` is returned.
|
|
37
37
|
pub fn new(vendor_id: u16, product_id: u16) -> Result<Self> {
|
|
38
|
-
|
|
38
|
+
let context = Context::new()?;
|
|
39
|
+
for device in context.devices()?.iter() {
|
|
39
40
|
if let Ok(descriptor) = device.device_descriptor()
|
|
40
41
|
&& descriptor.vendor_id() == vendor_id
|
|
41
42
|
&& descriptor.product_id() == product_id
|
|
@@ -51,9 +52,9 @@ impl USBTransport {
|
|
|
51
52
|
|
|
52
53
|
/// Instantiate a new [`USBTransport`] from a [`rusb::Device`].
|
|
53
54
|
///
|
|
54
|
-
/// Devices can be enumerated using [`rusb::devices()`] and then filtered out to get desired device.
|
|
55
|
+
/// Devices can be enumerated using [`rusb::Context::devices()`] and then filtered out to get desired device.
|
|
55
56
|
#[must_use]
|
|
56
|
-
pub const fn new_from_device(rusb_device: rusb::Device<
|
|
57
|
+
pub const fn new_from_device(rusb_device: rusb::Device<Context>) -> Self {
|
|
57
58
|
Self {
|
|
58
59
|
device: rusb_device,
|
|
59
60
|
handle: None,
|
|
@@ -62,7 +63,15 @@ impl USBTransport {
|
|
|
62
63
|
}
|
|
63
64
|
}
|
|
64
65
|
|
|
65
|
-
pub(crate) fn
|
|
66
|
+
pub(crate) fn vendor_id(&self) -> Result<u16> {
|
|
67
|
+
Ok(self.device.device_descriptor().map(|d| d.vendor_id())?)
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
pub(crate) fn product_id(&self) -> Result<u16> {
|
|
71
|
+
Ok(self.device.device_descriptor().map(|d| d.product_id())?)
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
pub(crate) fn get_raw_connection(&self) -> Result<Arc<DeviceHandle<Context>>> {
|
|
66
75
|
self.handle
|
|
67
76
|
.as_ref()
|
|
68
77
|
.ok_or(RustADBError::IOError(std::io::Error::new(
|
|
@@ -91,7 +100,7 @@ impl USBTransport {
|
|
|
91
100
|
)))
|
|
92
101
|
}
|
|
93
102
|
|
|
94
|
-
fn configure_endpoint(handle: &DeviceHandle<
|
|
103
|
+
fn configure_endpoint(handle: &DeviceHandle<Context>, endpoint: &Endpoint) -> Result<()> {
|
|
95
104
|
match handle.claim_interface(endpoint.iface) {
|
|
96
105
|
Ok(()) => Ok(()),
|
|
97
106
|
// busy state likely indicates an ADB server is running and has taken the lock over the device
|
|
@@ -100,7 +109,7 @@ impl USBTransport {
|
|
|
100
109
|
}
|
|
101
110
|
}
|
|
102
111
|
|
|
103
|
-
fn find_endpoints(handle: &DeviceHandle<
|
|
112
|
+
fn find_endpoints(handle: &DeviceHandle<Context>) -> Result<(Endpoint, Endpoint)> {
|
|
104
113
|
let mut read_endpoint: Option<Endpoint> = None;
|
|
105
114
|
let mut write_endpoint: Option<Endpoint> = None;
|
|
106
115
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
use rusb::{Device, DeviceDescriptor, UsbContext, constants::LIBUSB_CLASS_VENDOR_SPEC};
|
|
1
|
+
use rusb::{Context, Device, DeviceDescriptor, UsbContext, constants::LIBUSB_CLASS_VENDOR_SPEC};
|
|
2
2
|
|
|
3
3
|
use crate::{Result, RustADBError};
|
|
4
4
|
|
|
@@ -17,7 +17,8 @@ pub struct ADBDeviceInfo {
|
|
|
17
17
|
pub fn find_all_connected_adb_devices() -> Result<Vec<ADBDeviceInfo>> {
|
|
18
18
|
let mut found_devices = vec![];
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
let context = Context::new()?;
|
|
21
|
+
for device in context.devices()?.iter() {
|
|
21
22
|
let Ok(des) = device.device_descriptor() else {
|
|
22
23
|
continue;
|
|
23
24
|
};
|
|
@@ -30,12 +30,14 @@ impl Display for ADBLocalCommand {
|
|
|
30
30
|
match self {
|
|
31
31
|
Self::Sync => write!(f, "sync:"),
|
|
32
32
|
Self::ShellCommand(command, shell_args) => {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
f,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
if shell_args.is_empty() {
|
|
34
|
+
// Shell v1: simple format for older ADB versions
|
|
35
|
+
write!(f, "shell:{command}")
|
|
36
|
+
} else {
|
|
37
|
+
// Shell v2: with arguments
|
|
38
|
+
let args_s = shell_args.join(",");
|
|
39
|
+
write!(f, "shell,{args_s},raw:{command}")
|
|
40
|
+
}
|
|
39
41
|
}
|
|
40
42
|
Self::Shell => match std::env::var("TERM") {
|
|
41
43
|
Ok(term) => write!(f, "shell,TERM={term},raw:"),
|