- # Virtual Devices
- # Managing virtual devices
- # Start a virtual device
- # Configure a virtual device
- # Delete/Clone/Reset a virtual device
- # Interacting with virtual devices
- # Multi-touch
- # Touchscreen 3.2
- # With mouse and keyboard
- # Copy and Paste
- # Drag’n Drop
- # Display tips
- # Generating logs
- # Virtual device shortcuts
- Android-x86
- Run Android on your PC
- VirtualBox How To
- Downloading
- Create a new VM
- Settings
- Install
- Partition
- Advanced
- Custom partitions, SDCard
- Playing music
- Upload files by adb
- Upload files by wget
- Debug with adb
# Virtual Devices
Virtual devices are Android devices pre-configured and deployed by Genymotion Desktop. They allow you to deploy and test your own application with the sensors and features provided by Genymotion Desktop. This section explains how to manage and run virtual devices, deploy an application, emulate sensors and features, interact with virtual devices and generate their logs. It also lists the keyboard shortcuts available in virtual devices.
# Managing virtual devices
Your installed Android virtual devices are displayed in the My installed devices section of the Genymotion DesktopВ main window:
# Start a virtual device
Double-click on the virtual device, click в†’ Start or right-click on the device and select Start.
# Configure a virtual device
ClickВ в†’ Edit or right-click on the device and select Edit.
The Edit virtual device window opens:
From this window, you can configure the following parameters:
Name: Sets the name of your virtual device.
Display: Change the virtual device display size and density.
About Display settings
- Predefined: Sets the screen size and density from a predefined list.
- Custom: Sets a custom screen size and density. You may experience display or performance issues when using custom screen size and density values.
- Start in full-screen mode: Displays the virtual device in full-screen mode, adjusted to your screen size.
System: Set the number CPUs, Android version and memory size.
About System settings
- Android version: Displays the Android API (version). This setting can only be changed at device creation (see Basic Steps).
- Processor(s): Sets the number of processors used by the virtual device. Default value is the recommended one for an optimal use. When defining more processors than default, we advise setting one less than the total amount of processors to leave one dedicated to the host and avoid performance issues.
- Memory size: Sets the memory space allocated to the virtual device. The value must be below the memory of your computer and take into account the memory space used by your computer. We advise that you set the values recommended for the real devices (512MB to 2048MB).
Android system options: Show/Hide Android navigation bar and enable virtual keyboard for text input.
Network mode: Set Network mode (NAT or Bridge)
About NAT Network mode
Network Address Translation (NAT) is the simplest way of accessing an external network from a virtual device. It does not require any configuration on the host network. For this reason, it is the default networking mode.
About Bridge Network mode
In Bridged mode, the virtual device is a full participant in the physical network. It can contact other machines on the network and can be contacted by other machines as if it were a physical computer on the network. But the network needs to have a DHCP server that provides a valid IP address to the virtual device.
You must select the interface on which you want to apply the bridge.
For more information, please refer to the official VirtualBox documentation
# Delete/Clone/Reset a virtual device
Click , or right-click the device, and select:
- Delete to delete a device
- Clone to copy a device
- Factory reset to reset a device to factory settings
# Interacting with virtual devices
This chapter describes features that help you easily interact with your virtual devices.
# Multi-touch
# Touchscreen 3.2
Genymotion Desktop supports touchscreens from 3.2.0 onwards. Touch and multi-touch can now be performed on your touchscreen, as on a real mobile or tablet device.
# With mouse and keyboard
If you don’t use or have a touchscreen, multi-touch is also simulated with the mouse and keyboard. See Multi-touch shortcuts.
# Copy and Paste
The clipboard is shared between your computer and Genymotion Desktop. Thus, you can easily copy and paste text from your computer to Genymotion Desktop, and vice versa.
Clipboard sharing can be disabled in Genymotion global settings. See Clipboard sharing.
# Drag’n Drop
Drag and drop a file to the virtual device display to install or upload it. The behavior of dragged and dropped files is different according to the file type:
File type | Result |
---|---|
.apk files (AndroidВ applications) | APK files are installed on the virtual device. If the same application already exists but with another signature, you can decide to override the existing application. For more details, see Deploy an application. |
.zip archives (flashableВ archives) | Zip archives detected as flashable (containing a /system folder) are flashed on the device. Flashable archives may damage your virtual device. We recommend making a backup of the device (cloning) before flashing it. |
Other (regular files) | Regular files will be uploaded to /sdcard/Download . They can be accessed via the Amaze or File Explorer applications provided in the virtual device. |
# Display tips
When navigating within a virtual device, you can at any time change its display:
Full-screen mode: You can switch to full-screen mode by pressing F11. Pressing a second time reverts to the original screen size.
On macOS, you may have to use the key combination ctrl + fn + F11.
Custom size: You can resize the virtual device window by selecting and dragging an edge or a corner of the window.
Fit to content: When the virtual device window is resized, black areas appear on the borders. Double-click in one of those areas to fit the virtual device window size to its content.
# Generating logs
In some cases, notably for assistance purposes, you may need to generate a log archive, either for a specific virtual device or for all virtual devices. Follow either of the procedures below:
- Select Help в†’ Generate logs from the main window (launcher).
- Select the path to save the generated archive.
- Wait until the archive is generated and click Close.
Generate logs for a single virtual device
- Right-click or click
on the virtual device in the main window (launcher).
- Select Generate logs.
- Select the path to save the generated archive.
- Wait until the archive is generated and click Close.
# Virtual device shortcuts
The table below lists all shortcuts that can be used in virtual devices. For shortcuts related to the use of the application, please refer to section Genymotion Desktop shortcuts.
Источник
Android-x86
Run Android on your PC
VirtualBox How To
The following are instructions on how to run Android-x86 inside VirtualBox.
Note: For optimal performance, make sure you have enabled either VT-x or AMD-V in your host operating system’s BIOS.
Android-x86 versions tested against Virtualbox versions.
Date Tested | Virtualbox | Host OS | Android-x86 | Result |
---|---|---|---|---|
?? | 2.2.4 | Windows XP | ?? | Good |
?? | 3.0.2 | Fedora 11 | ?? | Good |
Nov. 2 2017 | 5.2.0 | Windows 10 | 6.0-r3 32/64 bit | Good |
Downloading
Download an ISO of Android-x86 from here.
Caution
Create a new VM
If you have not already created a VirtualBox virtual machine for Android-x86 yet, do so as follows:
- Click the «New» button, and name your new virtual machine however you like. Set Type to Linux, and Version to Linux 2.6 / 3.x / 4.x. Note that you should choose the appropriate bit type for the version of Android-x86 that you downloaded.
- Specify how much RAM will be allocated to your virtual machine when you run it. Android doesn’t specify a bare-minimum requirement for memory, just keep in mind what apps you plan on running. 2GB (2048MB) is a good place to start, and you can change this later if you need to.
- Create a new Hard disk image which will act as your machine’s storage. The recommended starting size of 8GB is enough. Click through the rest of the options for creating your Hard disk.
Your virtual machine has now been created. It still needs to be initially installed at this point.
Settings
Tested on VirtualBox 64-bit for Windows, version 5.2.0. Android-x86 version 6.0-r3, both 32-bit and 64-bit.
Select your machine, then click the Settings button and refer to the below recommended configuration to make sure your settings match.
- [System] Recommended: Processor(s) should be set above 1 if you have more than one virtual processor in your host system. Failure to do so means every single app (like Google Chrome) might crush if you try to use it.
- [Display] :
- Optional: Video Memory may be increased beyond the minimum selected automatically. The affects of this are unknown.
- Mandatory: Unless guest additions are installed [1] , change the default VMSVGA to VBoxVGA .
- Optional: Enable 3D Acceleration may be checked. The Linux Guest Additions must (VirtualBox v6.1+) / may (VirtualBox v6.0 and below) need to be installed [2][1] to get any benefit from this. Failure to do so means you won’t even be able to launch Android-X86 in the first place. [3]
- [Storage] Find the first «Empty» item (this should have an icon of a CD). In the Attributes, click on the CD icon with a small down arrow, and pick «Choose Optical Virtual Disk File. «. Specify the Android-x86 ISO that you downloaded.
- [Audio] Intel HD Audio seems to be natively supported in Android-x86.
- [Network] By default, your installation of Android-x86 will be able to automatically connect to the internet. If not, you can try to enable WiFi in Settings/Network & Internet, and connect to showing VirtWifi. If you do not want to connect to the internet in VirtualBox, uncheck Enable Network Adapter under the Adapter 1 tab.
Install
Click the green Start arrow to power-on your virtual machine. You’ll be presented with a list of options. Use the arrow keys to pick which one you want, then press Enter once the one you want is selected.
- If you don’t want to install Android-x86 yet and just want to test it, pick one of the Live CD options (except for Debug mode).
- Pick the Installation option if you want your system to be installed to the virtual hard drive.
If you want to use higher resolution, you can edit the boot option by pressing TAB, change vga=788 (800×600) to vga=791 (1024×768) or vga=794 (1280×1024), and press Enter. You can also use vga=ask to see all available modes. But please note Android will only work under 16-bit mode.
Partition
When you are prompted to Choose a partition:
- If you upgrade Android-x86 from a previous version, just select the existing partition. Agree to overwrite it when prompted.
- If this is a new VM, choose to Create/Modify partitions. Use Bootable but not GPT! This will cause the GRUB installation to fail later.
You may partition your disk however you see fit. If you just want a simple installation, create one partition taking up the entire disk and format it as ext4 .
Continue through the installation. You should install GRUB when it prompts you to. You may also leave /system as read and write when prompted.
Once the installation is complete, force close/shut down the virtual machine and remove the ISO from the virtual CD drive.
Finaly, start Android-x86. If it’s a new machine, once loaded you can perform the Android setup to begin using your machine.
Advanced
Custom partitions, SDCard
When booting Android-x86, you may specify which partitions represent the data and sdcard. On the boot menu, select an entry you would like to boot from, press TAB, then add the following as it suits your needs:
DATA=sda1 SDCARD=sda2 Press Enter to boot. These options specify user data (your setting, your uploaded applications, . ) go into /dev/sda1, and data saved in sdcard go into /dev/sda2.
If you build the ISO from source, you can add these options to bootable/newinstaller/boot/isolinux/isolinux.cfg.
Here is a note from David when using fdisk:
- Create a new virtual machine with a hard disk.
- Launch the Live ISO in Debug mode (I used android-x86-2.2-generic.iso) to get the commend prompt.
- «fdisk /dev/sda», then type:
- «n» (new partition)
- «p» (primary partition)
- «1» (1st partition)
- «1» (first cylinder)
- «xx» (choose the last cylinder, leaving room for a 2nd partition)
- «w» (write the partition)
- Repeat #3, but call it partition 2, and use the remaining cylinders.
- «mdev -s»
- «mke2fs -j -L DATA /dev/sda1»
- «mke2fs -j -L SDCARD /dev/sda2»
- Reboot («reboot -f»)
- At the boot menu, choose VESA, then hit TAB and type so that the end of the line reads: «DATA=sda1 SDCARD=sda2». (Only need for the generic target images, for VM target images, this is not needed)
- After booting (and of course disabling mouse integration via the machine menu), the SD card is read as unformatted, but you can format it by going to Settings > SD card & phone settings > Format SD Card, then Mount SD card.
- The SD card should now work!
Note: for the step 7, if you want to format to vfat only, then you can do :
Also remember the partition type has to be fat32 (b or c). By using vfat, the step 10 is not needed.
DevTools application has a MediaScanner which (re)indexes your SD card for cases where you manually copied media over. This ensures that you see new images and/or music in the apps without having to reboot.
If you downloaded it from within android, the application asks the relevant service to index new files.
Playing music
This section describes two ways to upload music files into Android running on a vbox so you can play them by the Music app. Of course, you can save the files to the virtual disk mounted at /sdcard, as described above.
Upload files by adb
Adb is Android Debug Bridge, a tool to debug Android system. If you compile from source, it is located in out/host/linux-x86/bin/adb. Otherwise you can get it from Android SDK. Suppose the network of your vbox is OK, you can upload a file from your host by
You need to know the ip of your vbox. You can get it by Alt-F1 and netcfg. You may also need to reboot Android to see the uploaded files. Of course in this way you have to mount /sdcard to a virtual disk partion.
For complex network settings of the VirtualBox VM, you should refer to Debug How To on how to connect adb to the VM.
Upload files by wget
You can also upload files by wget in the debug mode. In the debug mode shell, before entering Android,
Debug with adb
This section describes the way to debug Android with adb via network.
If we want to debug with adb via network, we should ensure the ip of vbox can be accessed by host machine. So we should change the Network Adapter type of vbox to Bridged Adapter. After starting the android-x86, we should follow the above Settings/[Network] section to ensure the network of android-x86 is enabled, and enable USB debugging in Settings/System/Developer Options. Then we can get the device ip from Settings/System/About tablet/IP address. For example, if we see the ip address is 192.168.0.116, then we can use following command to connect android-x86 in vbox from host machine.
Источник