LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 12-01-2017, 07:02 PM   #1
Rod3775
Member
 
Registered: May 2008
Location: Washington State
Distribution: Slackware-current
Posts: 94
Blog Entries: 10

Rep: Reputation: 18
Smile VirtualBox Android-x86 mouse integration invisible cursor solution


It takes a patch to VirtualBox and a file added to Android-x86 guest to make mouse integration work properly.

This note describes issues associated with running Android-x86 in an Oracle VirtualBox virtual machine which is hosted on an x86_64 physical machine running Slackware 14.2.

VirtualBox is available at SlackBuilds.org. The most current version at this time is 5.0.40. Later versions require Qt5.

The virtualbox SlackBuild and the virtualbox-kernel SlackBuild are needed for the host (physical) machine running VirtualBox. virtualbox-kernel requires a reboot, since it adds a module to the 14.2 kernel.

The Android-x86 version used was android-x86_64-6.0-r3.iso("marshmallow"), obtained from the Android-x86 website.

There are YouTube videos out there about installing Android in VirtualBox. This involves configuring the virtual machine to be big enough to run Android. I found that a 512Mb memory with 128Mb of display memory and an 8Gb virtual hard drive worked fine.

With all this done, Android comes up, but there are issues with the emulation of the touchscreen. Oracle provides an extension ("Guest Additions") for the guest system that provides "mouse integration", but only for Linux and Microsoft Windows guests. Oracle does not supply Guest Additions for Android. Without Guest Additions, the basic way to emulate the touchscreen is to turn off "mouse integration" and have VirtualBox capture the mouse when it is clicked in the Android screen, then have the user manually uncapture it (with the right ctrl key) when you want to click elsewhere (including VirtualBox menus). This is cumbersome.

The default VirtualBox input configuration is "USB Tablet", which provides "mouse integration", but does not work correctly. In the default version of 5.0.40, it must be turned off to use the manual method. There was a change in Android-x86 between version 4.4 ("kit-kat") and 6.0 ("marshmallow"). 4.4 had a file called "GenericTouch.idc"(available on the web) which has been omitted in subsequent versions. The effect of this file was to tell Android-x86 that the pointing device was a touchscreen, not an external pointer device. The essentials of it are:

touch.deviceType = touchScreen
touch.touchSize.calibration = default
touch.toolSize.calibration = default
touch.pressure.calibration = default
touch.size.calibration = default
touch.orientation.calibration = none
device.internal = 1

If a file with this content is placed in the Android virtual filesystem at

/system/usr/idc/VirtualBox_USB_Tablet.idc

then mouse integration will work and "capture" and "manual release" will no longer be required. However, the cursor will be invisible inside the Android window, making it difficult to position the pointer.

An easy workaround is to press the mouse on the host desktop, then drag to the place in the Android window that you want to press. The cursor will be handled by the host until you release the button, and will remain visible. When you release the button, the cursor will disappear, but the pointer will remain in the same location. Clicking the button will perform a finger press.

A cleaner fix is to have the host display the cursor, even inside the Android window. The attached patch checks an environment variable to force the host to display the cursor. When VirtualBox is built with this patch, and started with

env VBOX_SHOW_HOST_CURSOR= virtualbox

the presence of the environment variable will be detected and the cursor will remain visible in the Android window. NOTE: this will affect ALL virtual machines run by this invocation of VirtualBox, not just Android.
Attached Files
File Type: txt patch.txt (504 Bytes, 416 views)
 
  


Reply

Tags
android-x86, mouse cursor, slackware, virtual box



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
My mouse's cursor has started going invisible in X RandomTroll Linux - General 8 05-18-2016 03:07 PM
[SOLVED] Invisible touchpad/mouse cursor kel_en Gentoo 15 02-23-2014 08:55 PM
invisible mouse cursor sharapchi Linux - General 2 12-13-2006 02:26 PM
Invisible cursor - but mouse works fine mouldy_punk SUSE / openSUSE 3 10-18-2006 04:36 PM
Invisible Mouse Cursor roie Linux - Newbie 1 12-06-2001 12:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 10:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration