QEMU/KVM USB tablet issue (and a fix)

1,684 views
Skip to first unread message

Alexander E. Patrakov

unread,
Nov 22, 2018, 1:48:20 AM11/22/18
to Android-x86
Hello.

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' > /data/system/devices/idc/Vendor_0627_Product_0001.idc
chown -R system:system /data/system/devices

Obviously, in the released images, this should go to /system/devices/idc instead.

-- 
Alexander E. Patrakov

Chih-Wei Huang

unread,
Nov 22, 2018, 3:33:46 AM11/22/18
to Android-x86
Thank you for the report.
I've added the idc file.
Alexander E. Patrakov <patr...@gmail.com> 於 2018年11月22日 週四 下午2:48寫道:
> --
> 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 andro...@googlegroups.com.
> Visit this group at https://groups.google.com/group/android-x86.
> For more options, visit https://groups.google.com/d/optout.



--
Chih-Wei
Android-x86 project
http://www.android-x86.org

Frederik Carlier

unread,
Dec 11, 2018, 1:29:31 PM12/11/18
to andro...@googlegroups.com, patr...@gmail.com, lota...@gmx.net

Hello,

 

I have the same issue – android-x86 not detecting the qemu USB tablets as an actual tablet.

 

I’m trying your approach on Android 7.1-r2 but this doesn’t seem to work.

On which version of android-x86 did you get this working?

 

Based on https://source.android.com/devices/input/input-device-configuration-files, it also seems like the .idc file should go to /system/usr/idc rather than /system/devices/idc, is that correct?

 

Thanks,

 

Frederik.

 

--

Alexander E. Patrakov

unread,
Dec 12, 2018, 1:59:20 AM12/12/18
to frederik...@quamotion.mobi, andro...@googlegroups.com, lota...@gmx.net
I have tried this on release 8.1-rc2. Note: I have not actually tried
to put it into /system, as that requires rebuilding the image, and I
don't want to rebuild. I.e., tested only with
/data/system/devices/idc. So yes, you are right, I indicated the
incorrect /system path in the initial email.
вт, 11 дек. 2018 г. в 23:29, Frederik Carlier <frederik...@quamotion.mobi>:
--
Alexander E. Patrakov
Reply all
Reply to author
Forward
0 new messages