Package Details: qemu-android-x86 9.0.r2-2

Git Clone URL: (read-only, click to copy)
Package Base: qemu-android-x86
Description: Android-x86 environment via QEMU and VirGL
Upstream URL:
Licenses: GPL2, Apache, custom:Creative Commons 3.0 Attribution Unported
Submitter: Refutationalist
Maintainer: Refutationalist
Last Packager: Refutationalist
Votes: 8
Popularity: 0.085038
First Submitted: 2019-04-26 23:52 (UTC)
Last Updated: 2020-05-18 18:26 (UTC)

Latest Comments

nxij commented on 2021-09-01 15:29 (UTC) (edited on 2021-09-04 07:13 (UTC) by nxij)

Graphics output not working anymore with qemu 6.1.0-1. (virtio and gl=on)

Looked through the list of deprecations in qemu but did not find anything related...

Edit: Had to change it to use -device virtio-vga-gl instead of -vga virtio

T2hhbmEK commented on 2021-08-23 11:37 (UTC)

Merged viperML's changes & gesh's patches. 7fcc63e

9.0 does not work for me. I've create a qemu-android-x86-nougat alternative. qemu-android-x86-nougat conflicts with qemu-android-x86 as for now. 10c936e

gesh commented on 2021-07-08 22:35 (UTC) (edited on 2021-07-08 22:37 (UTC) by gesh)

Hi, thanks for the package! Have some patches to contribute, most notably:

  • GUI deps should be optdeps
  • SVG icons are good enough, no need to convert to PNG
  • Removed privilege escalation code -- qemu docs explicitly recommend using mapped-xattr security model
  • Made qemu-android shellcheck-clean
From 719313210e219536b1fa3521af025a675fbcd9ee Mon Sep 17 00:00:00 2001
From: gesh <>
Date: Thu, 8 Jul 2021 18:00:00 +0000
Subject: [PATCH 1/3] Clean up PKGBUILD (elim deps)

* Make gui depends optional
* Use raw svg icon instea of creating pngs
* Combine mkdir+install invocations into install
 PKGBUILD | 27 +++++++++++----------------
 1 file changed, 11 insertions(+), 16 deletions(-)

diff --git a/PKGBUILD b/PKGBUILD
index 71eb367..7399fa1 100644
@@ -2,13 +2,15 @@
 pkgdesc="Android-x86 environment via QEMU and VirGL"
 license=('Apache' 'GPL2' 'custom:Creative Commons 3.0 Attribution Unported')
-depends=('rxvt-unicode' 'zenity' 'qemu' 'hicolor-icon-theme')
+depends=('qemu' 'hicolor-icon-theme')
+    'rxvt-unicode: for GUI support'
+    'zenity: for GUI support')
@@ -21,21 +23,14 @@ sha256sums=('6e54e25d945e050cf6a6ad2ac3e0775add04b1d586989e29276499c8d11e629f'

 package() {

-   mkdir -p $pkgdir/usr/share/android-x86 $pkgdir/usr/bin $pkgdir/usr/share/applications
-   install -m0644 $srcdir/android-${_pkgver}/* $pkgdir/usr/share/android-x86
-   install -m0644 $srcdir/usr/bin/qemu-android $pkgdir/usr/share/android-x86/original.qemu-android
-   install -m0644 $srcdir/config $pkgdir/usr/share/android-x86
-   install -m0644 $srcdir/qemu-android.desktop $pkgdir/usr/share/applications
-   install -m0755 $srcdir/qemu-android $pkgdir/usr/bin/qemu-android
+    install -Dm0644 "$srcdir/config" "$srcdir/android-${_pkgver}"/* -t "$pkgdir/usr/share/android-x86"
+    install -Dm0644 "$srcdir/usr/bin/qemu-android" "$pkgdir/usr/share/android-x86/original.qemu-android"
+    install -Dm0644 "$srcdir/qemu-android.desktop" "$pkgdir/usr/share/applications/qemu-android.desktop"
+    install -Dm0755 "$srcdir/qemu-android" "$pkgdir/usr/bin/qemu-android"

-   iconsizes=(16 32 64 128 256 512)
-   for size in "${iconsizes[@]}"; do
-       mkdir -p $pkgdir/usr/share/icons/hicolor/${size}x${size}/apps
-       inkscape -o $pkgdir/usr/share/icons/hicolor/${size}x${size}/apps/qemu-android.png -w $size -h $size $srcdir/Android_robot.svg
-   done
+    install -Dm0644 "$srcdir/Android_robot.svg" \
+        "$pkgdir/usr/share/icons/hicolor/scalable/apps/qemu-android.svg"

From 35b12931dd8744e0db070ee751769e4d8ab5ece5 Mon Sep 17 00:00:00 2001
From: gesh <>
Date: Thu, 8 Jul 2021 18:00:00 +0000
Subject: [PATCH 2/3] Remove need for sudo

Use security_model=mapped-xattr for 9p virtfs, as recommended by docs
Model used before this (passthrough) would use same UID/GID as in guest,
potentially clashing with host UID/GID
 PKGBUILD     | 2 +-
 qemu-android | 5 +----
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/PKGBUILD b/PKGBUILD
index 7399fa1..4f65755 100644
@@ -19,7 +19,7 @@ source=("android-x86-${_pkgver}.${arch}.rpm::
-            'e53911e378a6048d88d4fbaeb870c58f57c44142450527ee99b3c12baa15099a'
+            '9d856c33ed81529b2a07230e8a2e9586d4fa515eea713941259f6ae46274065d'

diff --git a/qemu-android b/qemu-android
index 3ae16d3..5ae2885 100644
--- a/qemu-android
+++ b/qemu-android
@@ -39,7 +39,6 @@ else

 # Set meaningful defaults
@@ -73,8 +72,7 @@ if [ $DATA == "none" ]; then
 elif [ -d $DATA ]; then
    echo "9p mode selected."
-   IN_SUDO=1
-   DATA_QEMULINE="-virtfs local,id=data,path=${DATA},security_model=passthrough,mount_tag=data"
+   DATA_QEMULINE="-virtfs local,id=data,path=${DATA},security_model=mapped-xattr,mount_tag=data"
    # sudo should only be needed for 9p, if KVM is set up right
@@ -135,7 +133,6 @@ do_qemu() {

    [ $IN_TERMINAL -eq 1 ] && [ $GUI -eq 1 ] && DO_CMD+="$URXVT -title Android-x86_Console -e "
-   [ $IN_SUDO -eq 1 ] && DO_CMD+="/usr/bin/sudo "

From b61ae8e472952146d231f7871fda731b5b0c94e7 Mon Sep 17 00:00:00 2001
From: gesh <>
Date: Thu, 8 Jul 2021 18:00:00 +0000
Subject: [PATCH 3/3] XDGify, clean up logic

 PKGBUILD                 |  2 +-
 qemu-android             | 19 ++++++++++++-------
 qemu-android-x86.install |  4 ++--
 3 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/PKGBUILD b/PKGBUILD
index 4f65755..c693ac0 100644
@@ -19,7 +19,7 @@ source=("android-x86-${_pkgver}.${arch}.rpm::
-            '9d856c33ed81529b2a07230e8a2e9586d4fa515eea713941259f6ae46274065d'
+            'e000cae3acd841686e8765c32bc203e8764f556e8a2bb32892d437bf3cad11b3'

diff --git a/qemu-android b/qemu-android
index 5ae2885..ca85763 100644
--- a/qemu-android
+++ b/qemu-android
@@ -30,19 +30,22 @@ nope() {
    exit 1


 # Check for config file, source
-if [ -e $HOME/.config/android-x86/config ]; then
-   . $HOME/.config/android-x86/config
+if [ -r "$CONFIG" ]; then
+   . "$CONFIG"
-   nope "Copy /usr/share/android-x86/config to ${HOME}/.config/android-x86 and modify.  It explains things."
+   nope "Copy $SYSCONFIG to $CONFIGDIR and modify. It explains things."

 # Set meaningful defaults
@@ -56,9 +59,11 @@ INITRD=${INITRD:-"/usr/share/android-x86/initrd.img"}

-if [ ! -e $SYSTEMIMG ] || [ ! -e $INITRD ] || [ ! -e $RAMDISK ] || [ ! -e $KERNEL ]; then
-   nope "System images aren't installed.  Check your android-x86 package."
+for i in "$SYSTEMIMG" "$INITRD" "$RAMDISK" "$KERNEL"; do
+   if [ ! -e "$i" ]; then
+       nope "System image $i isn't installed.  Check your android-x86 package."
+   fi

 # Archlinux is x86_64 only
diff --git a/qemu-android-x86.install b/qemu-android-x86.install
index 9d44659..1a4def8 100644
--- a/qemu-android-x86.install
+++ b/qemu-android-x86.install
@@ -2,8 +2,8 @@ post_install() {
   gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
   update-desktop-database -q
   echo "To use, per user:"
-  echo "   mkdir ~/.config/android-x86 &&"
-  echo "       cp /usr/share/android-x86/config ~/.config/android-x86"
+  echo "$ mkdir ~/.config/android-x86 && \\"
+  echo "  cp /usr/share/android-x86/config \$XDG_CONFIG_HOME/android-x86"
   echo "And then edit the config file to taste."


viperML commented on 2021-05-28 08:34 (UTC)

I integrated the changes to the script to unsquash the system.sfs into a system.img, which is copied into the user's directory, as in the comment by jwty. And changed the ports to enable ADB support out of the box:

Khaithang commented on 2021-05-17 20:05 (UTC) (edited on 2021-05-17 20:08 (UTC) by Khaithang)

the links in /system/bin/enable_nativebridge

aren't working except urls[3]= which happens to be for houdini9_y (32 bit ARM support). Links:


seems to be some chinese servers and aren't working.





tells that the files are not there!. kindly check if the links are proper or not. Thanks

jwty commented on 2021-05-10 14:33 (UTC)

Workaround for getting read-write access to /system, without having to mess with initrd –

First, unsquashfs the system.sfs file provided by this package, move resulting .img file somewhere safe and then set SYSTEMIMG path in qemu-android config file to its path, for example SYSTEMIMG="$HOME/.config/android-x86/system.img".

Then you will need to modify qemu-android script from this package, by removing readonly option from line 150.

Then boot android and remount system as read-write with mount -o rw,remount /system command and create two files (for example with vi provided by Android-x86):

console:/ # cat /system/etc/init/remount-system.rc                             
on property:sys.boot_completed=1
    start remount-system
service remount-system /system/bin/remount-system
    user root
console:/ # cat /system/bin/remount-system                                     
mount -o rw,remount /system

Lastly chmod +x /system/bin/remount-system and reboot, now /system should be read-writeable. If you need to use arm native bridge add /system/bin/enable_nativebridge to /system/bin/remount-system since from my observations it has to be re-enabled on each reboot. Note that in my case enable_nativebridge failed to download houdini library and I had to download it manually.

Janhouse commented on 2020-12-18 23:57 (UTC)

Could you please add option to remove ",format=raw,readonly" from system image line? It is handy to convert the image to qcow2 format and make it writable if necessary.

cosarara97 commented on 2020-12-09 20:22 (UTC)

How does one cleanly shut down the emulator? That is, is there any way to simulate the power button long press and access the shutdown menu?

Zeioth commented on 2020-09-05 01:29 (UTC)

It's been so easy to configure! Thank you for making this package!!

archmanjaro commented on 2020-09-03 17:36 (UTC)

I have installed the package in "Manjaro-KDE", everything is working fine but the audio/sound is crackling. It is horrible! please help me!

candybar commented on 2020-09-03 00:44 (UTC) (edited on 2020-09-05 20:27 (UTC) by candybar)

Is there a way to use a different resolution? If it's not 1280x720x32 then all I get is a black screen. I don't see anything useful from console :( Thanks. Version : 9.0.r2-2 Update/Edit: I am able to get normal display using VIDEO="768x1280". The mouse/cursor is offset incorrectly, however full screening the window fixes the mouse.

Popolon commented on 2020-05-17 15:43 (UTC)

inkscape 1.0 doesn't support -z anymore, I don't know what this option was for. -e is replaced by -o to export file name, so the line to build the icons in PKGBUILD, should be now : inkscape -o $pkgdir/usr/share/icons/hicolor/${size}x${size}/apps/qemu-android.png -w $size -h $size $srcdir/Android_robot.svg

romjan1412 commented on 2020-05-04 13:27 (UTC)

I'm having a problem with playing games. When I entered the game my keyboard and mouse don't work. It's workes fine when I'm not in any application. I'm confused. Do I need to set manually a hardware-keyboard to play games? if so, how do I do that? or any help would be appreciated.

Refutationalist commented on 2020-04-01 21:13 (UTC) (edited on 2020-04-01 21:14 (UTC) by Refutationalist)

@greyltc I figured I might need to do this at some point. What you'd need to do is break /usr/share/android-x86/system.sfs out of it's SquashFS filesystem, and set SYSTEMIMG to the new filesystem you created in the config file.

It might also require some changes to the initrd, but if I recall it already had hooks for a rw root in it. Next chance I'll have to take a real crack at it is next week, I'll give it a shot if I don't hear anything.

greyltc commented on 2020-04-01 14:32 (UTC) (edited on 2020-04-01 15:48 (UTC) by greyltc)

Hey, thanks very much for putting this together! Generally it's working great, but I'm having some trouble with input and I think I can solve it by editing some input device configuration files1 that I see in the image in /system/usr/idc/

Do you know how I can run this with /system mounted as writeable?

Or maybe you can directly help solve my input problem: Some apps do not seem to be coded to respond to mouse clicks and only respond to screen taps. They are unusable here (they're actually even unusable on my pixel 2 phone with a mouse connected via USB OTG). For example, from the app store "Tap Titans 2". For testing, you can deliver the app a tap at x=50, y=50 by running input tap 50 50 in the andorid root shell and the app registers that. Any help would be appreciated!

Refutationalist commented on 2020-03-23 11:55 (UTC)

I tried 9.0-r1 and it works, let me know if you find anything.

Refutationalist commented on 2019-11-01 05:55 (UTC)

8.1-r3 has been released, but it is currently not booting properly on QEMU. Graphics do not seem to initialize. Still working on it, but help would be appreciated.

Refutationalist commented on 2019-10-30 07:42 (UTC)

@alicavus --- sorry, I've been incommunicado for a bit. Fixed, and thank you.

alicavus commented on 2019-09-28 21:12 (UTC)

@Refutationalist I checked out PKGBUILD file and find out that you actually uploaded version bump to r2. You forget to push .SRCINFO after makepkg --printsrcinfo > .SRCINFO

frankyboy commented on 2019-05-15 17:50 (UTC)

@Refutationalist, there is already in /usr/bin/qemu-android user,id=anet0,hostfwd=tcp::$NETPORT-:5000, so one can connect through command adb connect localhost:"net_port_here", but i couldn't found which value to enter to be able to connect

Refutationalist commented on 2019-05-11 22:49 (UTC)

I haven't set up ADB yet, as that wasn't my use case. It's going to have to be ADB over the network of course, but I imagine that'd need to be configured inside the android instance. I'll play with it this week and add documentation if necessary.

frankyboy commented on 2019-04-28 08:26 (UTC)

hello :) can you please help with what command should i connect to emulator? i used adb connect localhost:4444 5555 47000 48000, but list of adb devices is empty. while boot emulator i am getting device offline, but then it disappears/