Skip to content

Changes to fix Android emulators boot issues on Linux #28882

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

Merged
merged 6 commits into from
Apr 16, 2025

Conversation

jsuarezruiz
Copy link
Contributor

@jsuarezruiz jsuarezruiz commented Apr 9, 2025

Description of Change

Changes to try to fix android emulators boot issues on Linux.

Sometimes, when trying to launch the Android emulator on Linux to run UITests we are getting the following error:

Executing: /usr/local/lib/android/sdk/platform-tools/adb shell getprop sys.boot_completed
adb: device unauthorized.
This adb server's $ADB_VENDOR_KEYS is not set
Try 'adb kill-server' if that seems wrong.
Otherwise check for a confirmation dialog on your device.

This PR include changes to:

  • Added code to ensure that adbkey and adbkey.pub files in the ~/.android directory exists.
  • Sets appropriate file permissions to ensure secure and proper access to ADB keys (chmod).
  • Adds shell commands via AdbShell to ensure proper emulator configuration: ensure ADB debugging enabled

@Copilot Copilot AI review requested due to automatic review settings April 9, 2025 11:42
@jsuarezruiz jsuarezruiz requested a review from a team as a code owner April 9, 2025 11:42
@jsuarezruiz jsuarezruiz requested review from rmarinho and PureWeen April 9, 2025 11:42
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

eng/devices/android.cake:597

  • Consider adding automated tests in TestCases.HostApp and TestCases.Shared.Tests to verify that the adb key regeneration process runs correctly in CI builds.
if (IsCIBuild())

@rmarinho rmarinho enabled auto-merge (squash) April 16, 2025 12:54
@rmarinho rmarinho merged commit 5f986dd into main Apr 16, 2025
128 checks passed
@rmarinho rmarinho deleted the fix-android-emu-linux branch April 16, 2025 15:12
@github-actions github-actions bot locked and limited conversation to collaborators May 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants