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

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

Latest Comments

1 2 3 4 Next › Last »

ruestique commented on 2023-06-13 21:10 (UTC)

qemu-system-x86_64: -soundhw: invalid option

in config file there is no such thing as -soundhw

elppans commented on 2023-02-24 14:43 (UTC)

Hi @Refutationalist, how are you?

I came to let you know that I downloaded your PKGBUILD, made some modifications to run LineageOS (CM-x86-14.1-r5) and reuploaded the package to qemu-android-cm-x86.

I was also able to get BlissOS to work using the same code, however, I haven't packaged it with its code yet.

If not, sorry, I should have asked earlier.

Ps.: My English is very bad, sorry

Refutationalist commented on 2022-11-16 04:00 (UTC)

Hello! Sorry I've been unavailable. Getting back on top of my packages.

So, it looks like people have taken this package and run with it, which is great as my use case has changed somewhat and I'm not using it at the moment. Would someone be willing to co-maintain or pick up this package entirely?

I'm trying to bring in the patches and changes here, but it seems like other folks have made some significant changes that might be worthwhile. In the meantime, all the PKGBUILDs I maintain are in my personal repo, so if someone want to submit a PR as well, you can check out: https://github.com/refutationalist/saur

Thanks!

rooty commented on 2022-10-04 10:33 (UTC) (edited on 2022-10-04 10:35 (UTC) by rooty)

Guys, if you encounter the soundhw invalid option error while running qemu-android-x86, you should edit /usr/bin/qemu-android-x86 and replace:

-soundhw hda

with

-device intel-hda -device hda-duplex

and it'll work perfectly.

I had this problem when I switched to PipeWire.

Reference: https://patchwork.kernel.org/project/qemu-devel/patch/20200622112914.30454-11-kraxel@redhat.com/

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 <gesh@gesh.uni.cx>
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
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,13 +2,15 @@
 pkgname=qemu-android-x86
 _pkgver="9.0-r2"
 pkgver=9.0.r2
-pkgrel=2
+pkgrel=3
 pkgdesc="Android-x86 environment via QEMU and VirGL"
 arch=("x86_64")
 url="http://www.android-x86.org/"
 license=('Apache' 'GPL2' 'custom:Creative Commons 3.0 Attribution Unported')
-depends=('rxvt-unicode' 'zenity' 'qemu' 'hicolor-icon-theme')
-makedepends=('inkscape')
+depends=('qemu' 'hicolor-icon-theme')
+optdepends=(
+    'rxvt-unicode: for GUI support'
+    'zenity: for GUI support')
 install="qemu-android-x86.install"
 source=("android-x86-${_pkgver}.${arch}.rpm::https://osdn.net/frs/redir.php?m=constant&f=android-x86%2F71931%2Fandroid-x86-${_pkgver}.${arch}.rpm"
        "https://upload.wikimedia.org/wikipedia/commons/d/d7/Android_robot.svg"
@@ -21,21 +23,14 @@ sha256sums=('6e54e25d945e050cf6a6ad2ac3e0775add04b1d586989e29276499c8d11e629f'
             'e9524cdb27c57e6650af763b2231d67ff3e2beb12f52133e7e95eda4f16b0881'
             '8a5ed6a6c1a4dfd1c8af0ff5de48965ec2dc6b50f87e5f990d33c7025f63c8ec')

-#PKGEXT=".pkg.tar"
-
 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"

 }
-- 
2.32.0
From 35b12931dd8744e0db070ee751769e4d8ab5ece5 Mon Sep 17 00:00:00 2001
From: gesh <gesh@gesh.uni.cx>
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
https://wiki.qemu.org/Documentation/9psetup
---
 PKGBUILD     | 2 +-
 qemu-android | 5 +----
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/PKGBUILD b/PKGBUILD
index 7399fa1..4f65755 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -19,7 +19,7 @@ source=("android-x86-${_pkgver}.${arch}.rpm::https://osdn.net/frs/redir.php?m=co
        "qemu-android.desktop")
 sha256sums=('6e54e25d945e050cf6a6ad2ac3e0775add04b1d586989e29276499c8d11e629f'
             '8c80b881727efc8831c8ef53806e7c1d0427607e145aae09061c4870b6cd402f'
-            'e53911e378a6048d88d4fbaeb870c58f57c44142450527ee99b3c12baa15099a'
+            '9d856c33ed81529b2a07230e8a2e9586d4fa515eea713941259f6ae46274065d'
             'e9524cdb27c57e6650af763b2231d67ff3e2beb12f52133e7e95eda4f16b0881'
             '8a5ed6a6c1a4dfd1c8af0ff5de48965ec2dc6b50f87e5f990d33c7025f63c8ec')

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

 # Set meaningful defaults
-IN_SUDO=0
 IN_TERMINAL=0
 RAM=${RAM:-2048}
 CORES=${CORES:-2}
@@ -73,8 +72,7 @@ if [ $DATA == "none" ]; then
    DATA_CMDLINE=""
 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"
    DATA_CMDLINE="DATA=9p"
 else
    # sudo should only be needed for 9p, if KVM is set up right
@@ -135,7 +133,6 @@ do_qemu() {
    DO_CMD=""

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


-- 
2.32.0
From b61ae8e472952146d231f7871fda731b5b0c94e7 Mon Sep 17 00:00:00 2001
From: gesh <gesh@gesh.uni.cx>
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
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -19,7 +19,7 @@ source=("android-x86-${_pkgver}.${arch}.rpm::https://osdn.net/frs/redir.php?m=co
        "qemu-android.desktop")
 sha256sums=('6e54e25d945e050cf6a6ad2ac3e0775add04b1d586989e29276499c8d11e629f'
             '8c80b881727efc8831c8ef53806e7c1d0427607e145aae09061c4870b6cd402f'
-            '9d856c33ed81529b2a07230e8a2e9586d4fa515eea713941259f6ae46274065d'
+            'e000cae3acd841686e8765c32bc203e8764f556e8a2bb32892d437bf3cad11b3'
             'e9524cdb27c57e6650af763b2231d67ff3e2beb12f52133e7e95eda4f16b0881'
             '8a5ed6a6c1a4dfd1c8af0ff5de48965ec2dc6b50f87e5f990d33c7025f63c8ec')

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
 }

+SYSCONFIG=/usr/share/android-x86/config
+CONFIGDIR="${XDG_CONFIG_HOME:-$HOME/.config}"/android-x86
+CONFIG="$CONFIGDIR"/config

 # Check for config file, source
-if [ -e $HOME/.config/android-x86/config ]; then
-   . $HOME/.config/android-x86/config
+if [ -r "$CONFIG" ]; then
+   . "$CONFIG"
 else
-   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."
 fi

 # Set meaningful defaults
 IN_TERMINAL=0
 RAM=${RAM:-2048}
 CORES=${CORES:-2}
-DATA=${DATA:-"${HOME}/.config/android-x86/data.img"}
+DATA=${DATA:-"$CONFIGDIR/data.img"}
 DATASIZE=${DATASIZE:-2048}
 CPU=${CPU:-"host"}
 NETPORT=${NETPORT:-47000}
@@ -56,9 +59,11 @@ INITRD=${INITRD:-"/usr/share/android-x86/initrd.img"}
 RAMDISK=${RAMDISK:-"/usr/share/android-x86/ramdisk.img"}
 KERNEL=${KERNEL:-"/usr/share/android-x86/kernel"}

-if [ ! -e $SYSTEMIMG ] || [ ! -e $INITRD ] || [ ! -e $RAMDISK ] || [ ! -e $KERNEL ]; then
-   nope "System images aren't installed.  Check your android-x86 package."
-fi
+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
+done

 #QEMU=qemu-system-${QEMU_ARCH}
 # 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."
 }

-- 
2.32.0