I use Fedora. I want to run Android emulator via Android Studio and AVD.
But I don’t trust Google’s AVD or IDE. I don’t know what it will sent to their servers. When I start Android-studio and AVD they have all permissions to read my file which are inside $HOME.
I was thinking if is it better for privacy to run only Android-studio and AVD on a different new OS user? I will use portable version of Android-Studio and I will put it only on new user’s $HOME.
-
Note-1:
I will not develop an app. I just want to run many Android devices by resetting them in few seconds and try anything I want inside Android)
-
Note-2
Please do not recommend me Qubes OS which is the solution exactly for my question. But Its advance for me. I really need simple solutions for myself as possible as.
1 Like
Run it in a container with limited access to your files in home.
1 Like
Waydroid is a thing… You can limit what the flatpak can access.
1 Like
It has GUI. It will be difficult to redirect the guest’s wayland to host’s wayland
I run many native Wayland GUI apps in a rootless container without having to redirect anything, be it web browsers, Steam client and games, Blender, other graphic editors/creators, IDEs, etc.
I am using Distrobox, by the way. It’s a helper script for Podman (recommended) or Docker. If you prefer to use Podman or Docker directly, the end result should be the same, but with more flexible configurations.
Just make sure you install drivers correctly in the container. If the app requires the kernel module to be loaded on the host system, do it. It’ll work fine with zero configuration in the container.
For Android emulator specifically, I’m using it in Android Studio installed in a rootless container running Xwayland (since it doesn’t work natively in Wayland yet), GPU acceleration works in the container (mine is Podman) if you launch from the terminal with -gpu host
option. For ex:
./emulator -avd AVD_ID -gpu host
Check the hardware acceleration support with:
./emulator -accel-check
For some reason, my Android Studio checks its AVD directory at ~/.android/avd
, but it’s in fact installed at ~/.config/.android/avd
. So, you can’t launch the emulator from terminal by default. You can simply soft link to the correct directory like this:
ln -s ~/.config/.android/avd ~/.android/
Or if you want to do it the hard way, Waydroid is a good starting point: