QEMU/KVM USB tablet issue (and a fix)
(too old to reply)
Alexander E. Patrakov
2018-11-22 06:48:20 UTC

I have tried to run Android-x86 in "KVM" virtual machine software. It
worked OK, until I decided to add a USB tablet, so that I could avoid mouse
pointer grab, and, ideally, use my touchscreen. The problem is - it works
only for older versions, the latest working one is 4.4. Later versions of
Android (unlike any other OS) think that the USB tablet presented by QEMU
is a touchpad (relative input device), and not touchscreen (which is
absolute). Fortunately, it is easy to fix, and I want it to be fixed in the
next build, and ideally propagated to all affected stable releases.

More details:

I installed Android-x86 in QEMU like this:

mkdir android
cd android
dd if=/dev/null of=hda.dsk bs=1G seek=4
qemu-system-x86_64 -m 2048 -enable-kvm -smp 4 -hda hda.dsk -cdrom
/tmp/android-x86_64-8.1-rc2.iso -vga std

Then I tried to add a USB tablet:

qemu-system-x86_64 -show-cursor -m 2048 -enable-kvm -smp 4 -hda hda.dsk
-display sdl -vga std -device qemu-xhci -device usb-tablet

This resulted in a weird mouse (not moving at all unless a button is
pressed), until I added this override:

mkdir -p /data/system/devices/idc
echo 'touch.deviceType = touchScreen' >
chown -R system:system /data/system/devices

Obviously, in the released images, this should go to /system/devices/idc
Alexander E. Patrakov
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.
Continue reading on narkive: