Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'uet android keep-wireless-enabled' command #117

Merged
merged 3 commits into from
Jan 1, 2025

Conversation

hach-que
Copy link
Member

@hach-que hach-que commented Jan 1, 2025

This command should be run on a machine that has Android devices connected via USB. When run, it will switch any devices connected over USB to listen on TCP/IP 5555 so they can be used by the whole build cluster over Wi-Fi.

In addition, UET will now force the public/private key pair in the local user profile used for USB/Wi-Fi debugging to be the same well-known key (it's hard-coded in the UET source code). This is necessary to ensure that arbitrary build and developer machines can connect to Android devices without manual authorization. We'd prefer to put our key at a unique path for UET and pass the key path via an environment variable or adb connect, but ADB doesn't support this so we just have to override the key globally.

This command should be run on a machine that has Android devices connected via USB. When run, it will switch any devices connected over USB to listen on TCP/IP 5555 so they can be used by the whole build cluster over Wi-Fi. It also forces the public/private key pair for the local user profile to be a well-known key pair, so that USB connections always have the same RSA key for devices (thus avoiding re-authorization prompts).
@hach-que hach-que enabled auto-merge (squash) January 1, 2025 05:52
@hach-que hach-que disabled auto-merge January 1, 2025 06:06
It looks like running `adb connect ip:5555` from another machine still requires the `adbkey` to be set - i.e. the ADB key is not just used for USB debugging, but authorization over Wi-Fi as well. Just make all build and developer machines use the same key to avoid the authorization nonsense. We'd prefer to put our key at a unique path for UET and pass the key path via an environment variable or `adb connect`, but ADB doesn't support this so we just have to override the key globally.
@hach-que
Copy link
Member Author

hach-que commented Jan 1, 2025

FYI @JasperDeLaat94 this change may cause USB/Wi-Fi debugging authorization prompts to appear the next time UET runs tests against or deploys against an Android device (but only once more, as this will set all build and developer machines to have the same RSA key for USB/Wi-Fi debugging).

@hach-que hach-que merged commit 597a5b3 into main Jan 1, 2025
21 of 22 checks passed
@hach-que hach-que deleted the adb-keep-wifi-enabled branch January 1, 2025 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant