ReactiveCircus / android-emulator-runner

A GitHub Action for installing, configuring and running hardware-accelerated Android Emulators on macOS virtual machines.
Apache License 2.0
977 stars 193 forks source link

Only overwrite ANDROID_AVD_HOME if not set #405

Open tmpsantos opened 1 month ago

tmpsantos commented 1 month ago

The path might point to a different path than what android-emulator-runner expects, like when XDG_CONFIG_HOME is set.

tmpsantos commented 1 month ago

What I'm seeing here is because XDG_CONFIG_HOME is set, it is being used as base path for where the emulator is being created and it breaks when the script tries to append the hardware configuration because it is hardcoded to the home directory.

mikehardy commented 1 month ago

@ychescale9 this (XDG_CONFIG_HOME) is probably the root cause of what I saw with the weird pathing issues for AVD home - since XDG_CONFIG_HOME is $HOME/.config and that was the root path the avdmanager was installing in to on Ubuntu 24

In #410 I specify even more variables, which ... works, but this solution might be more respectful of the system, and setting the other AVD related env vars (ANDROID_EMULATOR_HOME, ANDROID_USER_HOME) based on the existing ANDROID_AVD_HOME might be a better idea