Linux qemu android x86

Arch Linux User Repository

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

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:

-device intel-hda -device hda-duplex

I had this problem when I switched to PipeWire.

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.

Читайте также:  Сервер администрирования ras 1c linux

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 --- 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-$.$.rpm::https://osdn.net/frs/redir.php?m=constant&f=android-x86%2F71931%2Fandroid-x86-$.$.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-$/* $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-$"/* -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 "$"; do - mkdir -p $pkgdir/usr/share/icons/hicolor/$x$/apps - inkscape -o $pkgdir/usr/share/icons/hicolor/$x$/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 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-$.$.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=$ CORES=$ @@ -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=$,security_model=passthrough,mount_tag=data" + DATA_QEMULINE="-virtfs local,id=data,path=$,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 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-$.$.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="$"/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 $/.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=$ CORES=$ -DATA=$ +DATA=$ DATASIZE=$ CPU=$ NETPORT=$ @@ -56,9 +59,11 @@ INITRD=$ RAMDISK=$ 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-$ # 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 

Copyright © 2004-2023 aurweb Development Team.

Источник

Android-x86

This article describes how to run eeepc.iso inside Qemu, a generic and open source machine emulator and virtualizer.
The tested version is 0.10.5 on Fedora 11, and 0.9.1 on Debian 5.0.

Workable features:
• Internet access (DHCP mode).
• Audio, playing music.

Details

Create a script qemu-android like

The script configures the qemu machine to have a sound card es1370, and a network card rtl8139 (the default one), and use the user mode network stack.

Note the script runs qemu in KVM mode.
You must have kvm module (kvm-intel or kvm-amd) installed for your kernel, and the permission of /dev/kvm is set to allow your user to access it.
Otherwise the KVM support will be disabled and it may run very slow.
If you don't have qemu-kvm in your distribution, use qemu.

Advanced

Like Virtual Box, you can save data to a qemu virtual disk.
First, create a qemu virtual disk (size 1GB) by

Then follow the VirtualBoxHowTo for how to mount user data and sdcard on the virtual disk.
You can also follow that article to upload music files and play them.
(Use wget to pull file from the host. Adb push may not work)

Known bugs

If the Android inside Qemu enters suspend mode, it cannot wake up. So it is better to set the Screen timeout to be Never (Setting -> Sound & display -> Screen timeout).

Источник

Оцените статью
Adblock
detector