Compare commits

...

1 Commits

Author SHA1 Message Date
f8acd46914 adb: pair/connect support 2025-10-13 19:21:06 +02:00

13
adb.go
View File

@@ -6,6 +6,19 @@ import (
"strings"
)
// Pair a device using the 6 digit code
func PairDevice(endpoint string, code string) error {
_, err := ExecuteCommand(fmt.Sprintf("pair %s %s", endpoint, code))
return err
}
// Connect to a device
func ConnectDevice(endpoint string) error {
//todo: check if the device is paired before connecting
_, err := ExecuteCommand("connect " + endpoint)
return err
}
// Get the already connected adb devices
func GetConnectedDevices() ([]Device, error) {
var devices []Device