I am running macOS Catalina, and have one Android emulator set up in the Android Virtual Device Manager.
Before starting the emulator, on a freshly rebooted system, if I run adb devices I get:
List of devices attached
emulator-5562 offline
After starting the emulator, adb devices returns:
List of devices attached
emulator-5554 device
emulator-5562 offline
If I fire up Expo and try to run on the Android emulator, I get this error:
Couldn't start project on Android: Error running adb: more than one device/emulator
It looks like the offline emulator-5562 is the problem here? But it's still there even after rebooting my computer. All the advice I've read (i.e. adb kill-server and adb restart-server) makes no difference. There are no Android devices connected via USB.
How can I delete the "offline" device? Or alternatively, how can I point Expo to the one actual Android emulator I have running?
Try this:adb -s emulator-5554 <command>
Related
The virtual device seems to be running but its status is stuck on booting so I can't install GApps (which I need to test some app) also it doesn't appear in the list of devices in Android studio.
I found this workaround to manually connect adb to Genymotion, but I still have an issue with GApps how can I install them?
I have had this same issue previously. However, what I did was that I closed Genymotion, reopen it and restarted the device.Then went to Android Studio and run the app. You should then see the device under 'Connected Devices'. You should be able to see your design on the emulated device.
I was having the same problem, what worked for me was running:
adb devices
If that doesn't work, try running
adb kill-server
adb start-server
I am having some trouble interacting with the android emulator. My goal is to overwrite the hosts file on the emulated device but I am stuck.
I have used the adb command line tool as suggested in most places. Symptoms:
$ adb root
$ adb remount
> Not running as root. Try "adb root" first.
There is no output from the adb root command, and it seems to have no effect.
$ adb shell
emu$ su
emu> su: not found
I have found no way to push files to the device. Not even using the -writable-system when launching the emulator or restarting the adbd server... I have also tried running the script mentioned in this other so answer, but with no success.
Further information:
Host machine OS: Windows
Android versions on emulator: Android 8.0 and 7.1.1
Emulated device: Nexus 5
I leave this here, in case anybody else encounters the same problem.
After playing around, adb finally works correctly with the emulator. My issue was resolved when I changed the emulated device for another model (in my case Nexus 6).
After I have updated my Nexus 5X to Android 7.1.2, Android Studio is unable to see my device. I should mention that the device works fine (also for transfering files).
I should mention that this is happening only with Nexus 5x. I have also a Samsung S4 and there is no problem with it.
Running in terminal the following command:
>adb devices
I obtain the following message.
List of devices attached
???????????? no permissions
I have to mention that everything went fine and the phone was recognized by adb when I used the previous version (Android 7.1.1) (also now the debug mode is activated on the phone).
I am using Android Studio 2.3.1.
I should mention that my operating system is Ubuntu 16.04
You can just change USB connection to PTP or MTP. Works with my Nexus 5x device
After several unsuccessful attempts, I have decided to give it one more try (from Linux terminal and not from the terminal window of Android Studio).
Switch to root and then run the following commands:
>adb kill-server
and then
>adb start-server
Which gave the following output:
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
Afterwards I wrote:
adb devices
which gave as response:
List of devices attached
01e0fbbdcccf32c9 unauthorized
And the screen of permission appeared on the Nexus 5X device, asking if I want to allow to debug.
Problem solved!
The accepted solution works only when you are connecting to adb as a root.
When I'm not a root I get 01e0fbbdcccf32c9 no permissions instead of 01e0fbbdcccf32c9 unauthorized
So I need to connect to 'adb' as a root, the solution for me was
$ sudo adb kill-server
$ sudo adb start-server
$ sudo adb devices
After doing these commands on the terminal, I get
List of devices attached
01e0fbbdcccf32c9 unauthorized
and a window of permissions will be opened on the phone.
I am currently trying to figure out why my mobile device will not show up in android studios.I have installed the google usb drivers for android studios, and enabled usb debugging. I just have no idea why I can't see the device in android studios.
Make sure to install the device driver. Go to the Device Manager and check it.
'cd' to your sdk platform-tools folder
Check if adb finds your device
./adb devices
If you do not see your device, restart adb :
./adb kill-server
./adb start-server
then re-run ./adb devices and see if it finds your device. Example :
List of devices attached
3a2b522 device
I have a helloworld android application. But it can't run.
(Same code ran well yesterday. I don't know what configuration I changed..)
When I pressed "run as android application" in eclipse, nothing happened.
I used command line to run it:
$adb install -rv HelloAndroid.apk
But nothing happened, either.
I can see my emulator from $adb devices
List of devices attached
emulator-5554 device
How can I find the problem?
try running these commands:
$adb kill-server
$adb start-server
and then retry. For some reason Eclipse has a hard time running the apks if the server is started before the emulator.