Linux - Virtualization and CloudThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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:
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.