I'm using Linux Mint and I have an annoying problem with my adb:
I can use adb either from Android Studio (Android Monitor) or in terminal, but not both at the same time. Even the Android Studio Terminal found no devices if Android Monitor in Android Studio was running.
The workaround is to exit Android Studio and type 'adb kill-server' in terminal. After that I can use adb in terminal, and when I'm ready with my custom commands I have to restart Android Studio.
I have activated Tools -> Android -> Enable ADB Integration.
Any ideas to use adb through terminal even when Android Studio is running?
Make sure that you are using single instance of adb.
You are, most probably, using two instances of adb. With a single instance of adb, I can use it from external terminal, Android Studio terminal, and build/run projects from Android Studio simultaneously without restarting anything.
To verify if you are using single instance of adb run
$ which adb
or
$ type adb
from external terminal and one from Android Studio, and make sure they both are pointing to the same adb.
Hope this helps.
Related
I was working in Android Studio and after I closed my laptop to eat and opened it again Android Studio claims it cannot find ADB anymore.
Unable to find ADB
I have restarted my PC, Android Studio and my phone multiple times.
I have reinstalled ADB multiple times.
I have reinstalled the Android SDK.
I have addded adb.exe to my path variables
All had no effect and I'm still stuck on this error.
Does somebody have any other ideas?
Run following commands
adb kill-server
then
adb start-server
It resolves your issue with ADB
I can't run Genymotion on my PC. I've already changed the path of the ADB location to my local ADB.
In Android Studio all SDK packages are up to date and I've got the path to the local SDK from Android Studio so it is using the same.
If I am trying to show all devices I get the error:
My environment:
Windows 10
Genymotion Version 2.12.0
This happens when the adb binary used by Genymotion is incompatible with the one from Android Studio.
The setting you set should avoid the problem, but you must "reset" your setup to make sure all the softs use the exact same adb binary. I suggest you to close all the Genymotion devices, then close Android Studio and restart all.
Also, check that the adb you are using on your terminal is the one from the Android SDK.
I am starting my first android project using nativescript.
I want to run my project with genymotion.
In genymotion GUI settings/ADB I am using custom Android SDK tools and genymotion tells me the android SDK tools are found. Also the VirtualBox path is valid, and when I renamed the device the VirtualBox name and Genymotion name both changed. The Virtualbox VM is powered down.
I start genymotion and get the emulator open with a black screen. I then run:
tns run android
per the nativescript docs
I get as output:
Cannot find connected devices. Reconnect any connected devices, verify that your system recognizes them, and run this command again.
I then tried running:
adb devices
and got an empty list so it seems my device is not being recognized, I just don't know why.
I have also tried running:
tns run android --emulator --geny nameOfDevice
This starts the emulator but again just a blank screen. So I guess nativescript knows about the device but adb doesnt?
Any help would be greatly appreciated and apologies in advance if I am missing some obvious android issue.
You should also make sure that your GenyMotion is using the right SDK.
Go to: >> Settings >> ADB
And choose Use custom Android SDK Tools
If the SDk path is found it will be marked with
Android SDK Tools successfully found!
Do not open genymotion before adb initialisation.
Start adb server first
by adb start-server
and then open genymotion to initialise emulator.
After that you should be able to see emulator in list of running devices through adb command. I ran into the same scenario where adb does not list emulators if genymotion is opened before adb initialisation. I hope it helps.
My working solution is:
cd /opt/genymobile/genymotion/tools
./adb devices
You have to use its own adb tool.
I am using Ubuntu operating system.
I installed Android Studio and Genymotion. I installed Genymotion plugin from Androis Studio. I created virtual device. When I click the Run button to run my program, I see the following message :
ADB not responding, if you would like to retry, then plase manually kill "adb, and click "Restart"
Because adb was not installed at my pc, I first installed adb.
I searched how to kill adb and tried following commands:
adb stop-server
adb start-server
But nothing changed. I saw lots of messages about this issue but non of them worked for me.
adb installation path: /usr/bin/adb
genymotion installation path: /home/myname/genymotion
Android studio does not display my println and Log.d calls as well as errors when I run my application with Genymotion. I have changed the emulator settings so that it uses the same sdk as android studio does. I also made sure to select logcat with my device as target and log level verbose. This problem only occurs with Genymotion, not with the default AVD emulators. I have already tried abd kill-server and adb start-server commands without any success. How could I display the logs from the emulator? Thanks
You have to use the same adb for android studio and genymotion.
In other to do that, use the same Android sdk in both.
Genymotion: Settings > ADB > Browse (to the folder).
With Android Studio 1.3, selecting Tools->Android->Enable ADB Integration did the job