Android emulator doesn't start through xpra - android

I use xpra under linux to connect to a computer running android studio. The problem is that every time I try to run the emulator I get the following error
Xlib: extension "GLX" missing on display ":100".
My laptop has an AMDA6-6310 with Radeon r4. I've also tried to connect with ssh -X with no luck.

Android studio must be using opengl rendering, so you will need to be using Xdummy and VirtualGL

Related

Android auto DHU - Failed to read from transport - disconnect. Exiting

When I try to connect the android auto DHU, following error occurs.
before running the DHU, I have done following steps.
connected USB with mobile
android auto app is running
adb forward tcp:5277 tcp:5277
./../extras/google/auto/desktop-head-unit
4th step getting an error :-
desktop-head-unit[54345:3905939] 00:05:51.597 WARNING: 140: This application, or a library it uses, is using the deprecated Carbon Component Manager for hosting Audio Units. Support for this will be removed in a future release. Also, this makes the host incompatible with version 3 audio units. Please transition to the API's in AudioComponent.h.
Connecting over ADB to localhost:5277...connected.
Failed to read from transport - disconnect. Exiting...
Android Studio Version : 2.2.3
Mobile : nexus 5
Android Version : 6.0.1
Please suggest.
You should probably verify if you started the head unit server from your phone (Developer mode should be enabled on the Android Auto app)
then,
Open a terminal and type adb forward tcp:5277 tcp:5277.
Afterwards start the DHU :
cd <sdk>/extras/google/auto/
./desktop-head-unit (Windows : desktop-head-unit.exe)
The issue is need to start the Head Unit Server from android auto companion app. After that Im able to connect and see the DHU in mac.
./../extras/google/auto/desktop-head-unit
Connecting over ADB to localhost:5277...connected.
As pointed out in the documentation :
Warning: There is currently a known issue where the DHU can crash on
startup when connecting to Android Auto 4.7. To work around this
issue, we recommend that you temporarily downgrade to Android Auto 4.6
until a fix can be released in Android Auto 4.8.
Source : https://developer.android.com/training/cars/testing#running-dhu
Try to restart adb like the command "adb kill-server" and then set the tcp again.
Check if you started the head unit from the companion app
As mentioned in other replies, the head unit server needs to be running on your device. If you have multiple devices attached (for example, an emulator and a physical device) you may be attempting to connect to a device without the head unit server running. Try disconnecting all other devices and reconnecting.

How to set the default Android Emulator

I am building an app with NativeScript, where I run:
$ tns run android --emulator
to build the app and launch it in an emulator. When I do this, the default android emulator boots on my machine, which is unusably slow...
In all the demos, they are using the Genymotion Emulator. I have installed this, but the NativeScript command still launches the default emulator. How do I get this to launch on the genymotion emulator?
NB: I am using Windows 10
Update:
Even if I run the command with the Genymotion emulator running (and nothing else), I get the following log output and a new terminal window is opened running android-sdk/tools/emulator-arm.exe
BUILD SUCCESSFUL
Total time: 11.959 secs
Project successfully built.
Using C:\Users\George\Source\Repos\NativeScript-App\Bluetooth\platforms\android\build\outputs\apk\bluetoothdemo-debug.apk
Starting Android emulator with image Xamarin_Android_API_23
That looks as though it is referencing the emulator I had been using when I was developing with Xamarin. Any ideas where I can change that, or why that is being called?
start Genymotion, then start one of the devices that you have setup in Genymotion
then check that the device is seen:
$ tns device
then run nativescript like so
$tns run android --geny 192.111.222.33:555
(or whatever is the name that you get from the tns device command)
To my experience --emulator always tries to start the stock emulators. Try to start genymotion and then just tns run android (w/o the --emulator option).
I think it does that when there is no emulator running.
Try starting Genymotion first, launch the image you want, then run the "tns run adroid" command.
I had a similar issue.
To use GenyMotion by default, first delete all the Android emulators using
android avd
I then followed the solution on this thread:
React-Native, Android, Genymotion: ADB server didn't ACK
Edit the settings in GenyMotion to use the android SDK you downloaded. (path for Windows is Users/YOUR-SYSTEM/AppData/Local/Android/android-sdk)
You still have to run the device on GenyMotion before running the emulator
tns run android

Jenkins cannot connect to android emulator

I'm using Jenkins for continous integration on an android emulator to run instrumentation tests with the espresso framework. Unfortunately the server is not able to connect to the emulator. I have a master instance which delegates the push events from GitHub to the slave instance where the android sdk is installed. I installed the android-emulator-plugin and configured it like described. At first the Jenkins starts the emulator, but it cannot connect to it afterwards. This is the result:
I also cannot connect to the emulator when I'm on the slave machine. But if I use 127.0.0.1 instead of localhost the adb tool can connect to the emulator:
Is it possible to use 127.0.0.1 instead of localhost with the android-emulator-plugin? I already specified the enviorment variables $ANDROID_AVD_DEVICE and $ANDROID_SERIAL with no result. Any ideas?
I was fighting with it whole day. Just try to comment ipv6 in your /etc/hosts.
I fixed the problem by myself. I have checked out a fork on GitHub, which uses 127.0.0.1 instead of localhost. This did work for connecting to the emulator but not for running the instrumentation tests. I do not use Jenkins plugins for the connection anymore. I make the build with a shell script which contains all commands to start the AVD and the gradle tasks. Works fine for me. But thank you for the advice. Maybe I will try to comment ipv6 aswell, if I have the time to work on the Jenkins.

Can't start Genymotion Emulator from Android Studio Plugin

I've seen many posts with a similar problem and tried many solutions but so far none have helped. This all started after I upgraded Genymotion from 2.5.2 to 2.6.0.
I'm using Android Studio 1.5.1 on Ubuntu 15.10 64 bit. The Genymotion plugin is version 1.0.7. VirtualBox is 5.0.12 r104815
When I try to start a Genymotion Emulator I get:
I have several machines defined and all do this.
However, I can start them from the Genymotion app.
One other piece of information...if I have Android Studio and Genymotion running I get the following error when I try to issue any adb command from the command line:
adb server is out of date. killing...
cannot bind 'tcp:5037'
ADB server didn't ACK
* failed to start daemon *
error:
I've tried restarting the computer, restarting Android Studio, and removing and reloading the plugin. I've also set Genymotion to use the same adb that Android Studio uses.
Any ideas? Let me know if you need more info.
Thanks,
Rich
This is actually 2 separate problems and I've found the solution for one and a workaround for the other.
Can't start Genymotion Emulator from Android Studio Plugin - I resolved this for now by reverting to Genymotion 2.5.2. I'll still need to figure out why 2.6.0 causes a problem but for now I can start emulator machines from the Android Studio plugin.
adb server is out of date - This is caused by more than one instance of adb on the machine. In my case, Android Studio was using the one in ~/Android/Sdk/platform-tools, but when I tried issuing adb commands in terminal it was using the one in /usr/bin. I'll either try creating a symbolic link in /usr/bin to point to ~/Android/Sdk/platform-tools, or I'll add ~/Android/Sdk/platform-tools to my Path environment variable.
Rich

How to run Android emulator remotely

I have a android application that connects/send/receive to/from a server as part of its operation.
my final goal is to run this application on a number of android emulators on a remote machine(to save some computing resources on my laptop).
I SSHed to the remote machine and created the emulators remotely using android create avd -n AVD_xxx -t 1 .
I tried to run the emulators using emulator-arm -avd AVD_1 but it gave error that looks obvious : SDL init failure, reason is: No available video device
(if I run the command one the michine directly, it will run just fine)
I will appreciate if you help me solve this issue.
Note:
I don't need video provisions. is it possible to disable that by configuring AVD? this is just an example. you might have better solutions.
There are two options:
export $DISPLAY and show the emulator on some X display (tunneled or remotely existing)
run emulator -no-window [-no-audio] to start it without the need of a X display

Categories

Resources