- # Genymotion Plugins
- # Genymotion plugin for Android Studio
- # Pre-requisite
- # Installing the plugin
- # Using the plugin
- # Running Android applications
- # Connect to ADB
- # Pre-requisites
- # Enable or disable ADB
- # Use an SSH tunnel
- # 1. Create an ssh tunnel
- # Configuration and Controls
- # Configuring Genymotion Desktop
- # Account and license settings
- # Use Genymotion Desktop behind a proxy
- # VirtualBox settings
- # Use third party ADB/SDK
- # Clipboard sharing 3.2
- # Screen capture folder
- # Genymotion Desktop shortcuts
- Genymotion Android-эмулятор – доступ adb?
# Genymotion Plugins
This section gives you information about Genymotion plugins for Android Studio.
Genymotion plugin for Eclipse
The Genymotion plugin for Eclipse is no longer maintained and we no longer support nor distribute it.
# Genymotion plugin for Android Studio
The Genymotion plugin for Android Studio allows you to test your application developed with the Android Studio IDE. It uses ADB to connect to any active virtual device and push your application.
This section explains how to install, use the plugin and run Android applications.
# Pre-requisite
You need to set Genymotion Desktop to use the same Android SDK tool (adb) as Android Studio.
Please see ADB chapter for instructions.
# Installing the plugin
You can install Genymotion plugin for Android Studio from AS marketplace:
- Start Android Studio.
- Go to:
- Windows and Linux: File/Settings
- macOS: Android Studio/Preferences
- Select Plugins and go to Marketplace.
- Type Genymotion in the search box.
- Click Install, then Apply and OK.
# Using the plugin
The toolbar, where Genymotion plugin icon is displayed, is hidden by default. To display it, click View в†’ Appearance and select Toolbar (View в†’ Toolbar for older versions).
To start using the plugin:
- Click
from the Android Studio toolbar. The following window opens:
- Browse for the [Genymotion]В application installation directory:
- Windows: C:\Program Files\Genymobile\Genymotion
- macOS: /Applications/Genymotion.app
- Linux: /home/ /genymotion or /opt/genymotion
- Click OK.
- ClickВ
to open the Genymotion Device Manager window:
From this window, you can perform the following actions:- Create a new virtual device using New This automatically starts the Genymotion creation wizard.
- Start a virtual device using Start
- Refresh the list of virtual devices using Refresh.
The virtual device activation status is displayed in the Status column. Values can be:
- Off: the virtual device is deactivated.
- Paused: the virtual device has been started and paused. The Restart action gets back to the exact same state.
- On: the virtual device is activated, but not connected to ADB. It means that you cannot select this virtual device in the Choose Device window of the ADB plugin.
# Running Android applications
- ClickВ
from the Android Studio toolbar.
- Select the virtual device you want to use and click Start.
- Close the Genymotion window.
- In your application project, click . The Choose Device window opens.
- Click on the virtual device you started or created.
After a reboot or an unexpected halt of a virtual device, its name in the Choose Device window may become irrelevant. Close and reopen the plugin to solve this.
While GenymotionВ plugin window is open, errors are displayed in the Android Studio console.
Источник
# Connect to ADB
ADB is a communication protocol specific to Android that allows to connect or control an Android device from a computer.
It can be used with a Genymotion Device image instance for:
- controlling an instance Android OS
- connecting an instance to a developer’s tool (IDE), such as Android Studio, VS Code, JetBrains Rider, etc.
- accessing an instance shell
- uploading files to an instance
# Pre-requisites
The Android SDK platform-tools are included with Android Studio. By default, they are located in the following folders:
- Linux: /home/your_username/Android/Sdk
- macos: /Users/your_username/Library/Android/sdk
- Windows: %AppData%\Local\Android\Sdk
# Enable or disable ADB
When enabling ADB, your instance becomes accessible using the standard 5555 TCP port. Since the ADB connection is neither secured nor authenticated, we strongly recommend to only open TCP port 5555 to specific hosts in your Security Group and/or EC2 Firewall.
Alternatively, you can use an SSH tunnel to secure the connection.
Since Genymotion Device image ver. 7.0.0, ADB can be enabled or disabled from the Web UI:
Go to the Configuration panel:
In the ADB section, click on the toggle button to enable or disable ADB access:
It is also possible to do it by command line with SSH, or with our HTTP API:
Command Line (ssh)
- Log in with SSH or PuTTY. Please refer to Accessing a virtual device from SSH
- Enable or Disable ADB:
You can use the POST method and call the /configuration/adb API to set the following variables:
- Set active:true to enable ABD at run-time, and/or active_on_reboot:true to enable after reboot.
- Set active:false to disable ADB at run-time, and/or active_on_reboot:false to disable after reboot.
For detailed usage, please refer to Genymotion HTTP API.
You can then connect the instance to ADB:
# Use an SSH tunnel
It is assumed that you are familiar with Accessing a virtual device from SSH section.
# 1. Create an ssh tunnel
- key.pem is your private key and
is the public IP of your virtual device instance. - shell is a specific user for SSH operations — do not use a different username.
From a new terminal/shell create an SSH tunnel:
Do not close this terminal/shell or this will close the tunnel as well.
To create a tunnel for other virtual devices, make sure you increment the port number for every new virtual device (5556, 5557, 5558, etc.) For example:
If you use PuTTy, you can refer to the instructions below:
With PuTTy
OpenSSH is now included with Windows 10 by default (see this article
(opens new window) ). PuTTy is no longer necessary nor recommended with Windows 10.
- Set PuTTy to connect to your instance.
- Go to Connection > SSH > Tunnels and set Source port to 5555 and Destination to localhost:5555.
- Click on Add.
- Click on Open to start the connection.
The PuTTy terminal has to remain open during your operations. If PuTTY is closed, it will close the tunnel as well.
To create a tunnel for other virtual devices, make sure you increment the port number for every new virtual device (5556, 5557, 5558, etc.)
Источник
# Configuration and Controls
This section introduces Genymotion Desktop user interface and actions you can perform from the different windows. It also lists the user interface keyboard shortcuts.
# Configuring Genymotion Desktop
Genymotion Desktop settings can be reached by clicking on Genymotion в†’ Settings.
# Account and license settings
In the Account section, you can SIGNOUT, register a License or connect to a company license server.
# Use Genymotion Desktop behind a proxy
This setting allows Genymotion to connect to our servers behing a global proxy — it does not apply to virtual devices.
To connect a virtual device to a proxy, please refer to this article: How to connect a virtual device to a proxy?
From the Settings window, click on the Network tab. There, you can modify the network settings to set a HTTP proxy.
To define your proxy settings, check the corresponding boxes:
- Use HTTP Proxy: enables Genymotion DesktopВ to use a proxy when connecting to the GenymotionВ website.
You must set your HTTP proxy address and port in the corresponding fields. - Use authentication: enables proxy authentication.
You must enter your proxy username and password in the corresponding fields.
# VirtualBox settings
It is not recommended to change this setting, unless you are familiar with VirtualBox.
In the VirtualBox section, you can change the folder where the virtual device image files are stored:
# Use third party ADB/SDK
Genymotion built-in ADB is located in:
- Windows: C:\Program Files\Genymobile\Genymotion\tools
- macOS: /Applications/Genymotion.app/Contents/MacOS/tools/
- Linux: $HOME/genymotion/tools or /opt/genymotion/tools
By default, Genymotion DesktopВ uses its own Android tools. In Settings > ADB, you can configure Genymotion DesktopВ to use specific Android tools (from Android Studio, for example). Use Genymotion Android tools (default) is the option enabled by default.
The easiest way to get the Android SDK tools is to install Android Studio
(opens new window) . By default, Android Studio installs the SDK tools in the following folders:
- Windows: %AppData%\Local\Android\Sdk
- macOS: $HOME/Library/Android/sdk
- Linux: $HOME/Android/Sdk
After installing Android Studio:
- Select Use custom Android SDK tools.
- In the Android SDK field, set the path to Android Studio SDK tools folder by clicking Browse. You must set the path to the SDK tools root, such as Android\SDK , not the platform-tool sub-folder. For example, %AppData%\Local\Android\Sdk is a valid value whereas %AppData%\Local\Android\Sdk\platform-tools is not valid.
- Close the Window.
It is also possible to install the Android SDK tools without Android Studio, with the sdkmanager tool from the Android stand-alone command-line tools package:
Installing the Android SDK tools without Android Studio
You will need to use sdkmanager from the Android stand-alone command-line tools.
Android command-line tools require Java(TM) SE Runtime Environment.
We recommend using the androidsdk snap package. See https://snapcraft.io/androidsdk
Extract the archive files in the folder of your choice and go to the tools/bin/ sub-folder.
In a terminal or command shell, use the following commands:
This will install the platform-tools and build-tools in the current folder. You can use the —sdk_root=
Check Use custom Android SDK tools.
In the Android SDK field, set the path to the Android SDK folder by clicking Browse. You must set the path to the SDK tools root, not the platform-tool or build-tools sub-folders. For example, if you installed the tools in C:\adt-bundle, C:\adt-bundle\ is a valid value whereas C:\adt-bundle\platform-tools is not valid.
Close the Window.
# Clipboard sharing 3.2
Clipboard sharing between the OS and the VD is enabled by default, but it can be disabled in the Device section:
# Screen capture folder
The folder where screen captures and screencasts are saved can be changed in the Device section. Default value is your home folder.
In the Misc section, you can control whether Genymotion collects usage statistics or not, and clear Genymotion cache:
# Genymotion Desktop shortcuts
The table below lists all shortcuts that can be used in Genymotion Desktop. For shortcuts related to the use of virtual devices, please refer to section Virtual device shortcuts.
Источник
Genymotion Android-эмулятор – доступ adb?
Я загрузил эмуляторы Android Genymotion для Oracle VirtualBox ( http://www.genymotion.com/ ) на своем ПК под управлением Windows 7, создал виртуальный Jelly Bean с устройством Google Apps. Как включить доступ АБР к нему? В системных настройках / вариантах разработчика я уже включил «USB-отладку», но при вводе «устройств adb» отображается пустой список подключенных устройств. Попробовал добавить USB-порт для этой виртуальной машины и перезагрузить VM, но это не поможет.
Если вы запустите виртуальную машину с помощью пусковой панели (genymotion binary, где вы загружаете виртуальные машины), и вы установили путь Android SDK в параметры приложения, соединение будет автоматически, и вам не нужно будет запускать adb connect
Вы можете найти информацию в Документах Genymotion .
Хорошо, невзирая, нашел ответ на: http://www.thinkdigit.com/forum/tutorials/171043-tutorial-genymotion-android-pc-formerly-known-androvm.html . Нам нужно подключиться с IP-адресом к эмулятору, поэтому мне нужно узнать IP-адрес работающего эмулятора и использовать что-то вроде:
Впоследствии adb работает нормально. Genymotion player теперь показывает IP-адрес в заголовке окна. Вы также можете узнать IP-адрес работающего эмулятора, запустив «Genymotion Shell» и набрав «список устройств»,
Я также узнаю, что иногда я должен делать это, когда эмулятор работает в течение более длительного времени, и каким-то образом АБР отключается от него.
Просто сделайте это, с запущенным устройством genymotion вы можете открыть Virtual Box и увидеть, что для вашего устройства есть виртуальная машина, затем перейдите в сеть Настройки виртуальной машины, NAT и выполните переадресацию портов локального 5555 на удаленный экран 5555, прикрепленный к Virtual Box Nat Переадресация сетевого порта
Вы можете получить диспетчер виртуальных устройств IP Genymotion , затем используйте команду, подобную этой
Я знаю, что слишком поздно ответить на этот вопрос, но я просто опубликую решение, которое сработало для меня, если кто-то снова столкнется с проблемой в будущем.
Я пробовал использовать собственные инструменты adim для genymotion и оригинальные SDK для Android, и даже чистку и переустановку adb из моей системы, но ничего не получилось. Я продолжал получать ошибку:
adb server is out of date. killing. cannot bind ‘tcp:5037’ ADB server didn’t ACK *failed to start daemon* error:
Поэтому я попробовал adb connect [ip] как было предложено здесь, но я тоже не работал, эта же ошибка возникла.
В конечном итоге для меня работала загрузка ADT и запуск adb непосредственно из загруженной папки вместо общесистемной команды. Поэтому adb devices дадут мне ошибку выше, но / yourdownloadpath /adb devices работают отлично для меня.
Надеюсь, это помогло.
Connect не работал для меня. Проблема заключалась в том, что Genymotion использует свои собственные dk-инструменты, и вам нужно изменить его на пользовательские инструменты SDK.
Источник