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

Can Xharness.CLI boot Android emulators? #201

Open
EgorBo opened this issue May 14, 2020 · 5 comments
Open

Can Xharness.CLI boot Android emulators? #201

EgorBo opened this issue May 14, 2020 · 5 comments
Assignees
Labels
android Android area enhancement New feature or request question

Comments

@EgorBo
Copy link
Member

EgorBo commented May 14, 2020

XHarness.CLI for iOS is able to boot iOS simulators without help, is it possible to do it for Android as well?

@MattGal
Copy link
Member

MattGal commented May 18, 2020

Possibly (I'm fighting an issue with them being offline already), but what's the goal here? Currently for the emulator setup we have, they're booted as services by systemd.

The tricky part we'd have to solve for this is that the location of the executable would not be known so resolution of the path becomes a challenge.

@EgorBo
Copy link
Member Author

EgorBo commented May 18, 2020

@MattGal

but what's the goal here?

To be consistent with iOS where Xharness does boot them

solve for this is that the location of the executable

what executable?

@MattGal
Copy link
Member

MattGal commented May 18, 2020

what executable?

The emulator. On linux and on how we've set up our machines, it's $ANDROID_SDK_ROOT/emulator/emulator , but this could be anywhere.

@MattGal
Copy link
Member

MattGal commented May 18, 2020

@EgorBo , after discussing with the other XHarness team members I think this is a non-starter for Android. When using iOS simulator, one always knows the OS (it's always MacOS) and the simulator is always in a static location relative to XCode. On Android, we support running from Windows, Linux, and MacOS, there can be any number of emulators and devices attached to the machine, and the location of these emulators can be anywhere.

XHarness will always print error messages ( I can try to make them extra-explicit) when no usable devices are found, but as I can conceive of no reliable way to find the emulators and start them (and since finding and starting random processes on the user's machine might be unwanted ) I am closing this.

If you have a reliable strategy for finding and starting emulators that works on all three OSes we can certainly discuss it at a later juncture.

@MattGal MattGal closed this as completed May 18, 2020
@premun premun added the android Android area label May 19, 2020
@mattleibow mattleibow reopened this Oct 16, 2023
@mattleibow
Copy link
Member

mattleibow commented Oct 16, 2023

We could use adb shell getprop sys.boot_completed (or dev.bootcomplete) and see if it is done.

https://github.com/cake-contrib/Cake.Android.Adb/blob/85c37d0026ec9e924ccd5950827cfaf07fe9d7d8/src/Cake.Android.Adb/Aliases/AdbAliases.cs#L337

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android Android area enhancement New feature or request question
Projects
None yet
Development

No branches or pull requests

5 participants