Why do I often need to restart Android Debug Bridge (adb)?

This is what happens about half a dozen times a day:

Android emulator (e.g. CPU / API: Intel Atom (x86), Target: API level 15) has been working fine for some time, and then Eclipse shows the following error when installing the application

[2013-07-01 15:15:47 - Myapp] Failed to install myapp.apk on device 'emulator-5554': Connection refused: connect [2013-07-01 15:15:47 - Myapp] java.net.ConnectException: Connection refused: connect [2013-07-01 15:15:47 - Myapp] Launch canceled! 

Sometimes closing and restarting the emulator will fix this. However, most of the time, starting with the emulator, the following is generated:

 [2013-07-01 15:16:43 - Emulator] HAX is working and emulator runs in fast virt mode [2013-07-01 15:16:43 - Emulator] emulator: warning: opening audio input failed 

When this happens, the emulator will appear, but it will not work (i.e. applications cannot be installed). Reset adb (DDMS> Device> Reset adb) will not work. I need to go to windows task manager to kill adb.exe. Adb.exe will restart automatically in less than 20 seconds and everything will be fine.

I'm a little tired of doing this many times every day, so I'm looking for a way to avoid adb corruption.

Computer OS: Windows 8 Pro

Processor: Intel i5

Eclipse: Build id: 20121004-1855

Posted on 2013-07-26: As an answer, I chose IronBlossom's answer, although he did not specifically answer this question, but solved the problem of restarting ADB. In fact, he solved many problems, including very significant ones - they failed to simultaneously launch Intel Android emulators in fast mode and Windows Emulators. There is a trick to run Genymotion emulators and Windows Phone emulators side by side.

+6
source share
3 answers

Try using Genymotion . It runs on Oracle VM.

It even has GPS and battery level features, comes with a preinstalled Superuser app.

+2
source

I usually work with 2 computers, one of them is a high-end computer that plays in Windows 8, which has never had an adb crash, or the emulator is slow, but it crashed badly on my macmini with i5 2415m and 2GB ram, but after I upgraded it to 5GB ram adb rarely gets crashed, I can run 2 eclipses and 4 emulators, and it rarely crashes.

So what I mean is that maybe adb is not finished and it has some problems that might be related to memory leaks or thread synchronization. But (again, but) it's just a shot from my experience, in fact it never bothered me much.

+1
source

When you click on the runtime error on the device, instead of ctrl + c'ing from adb, first click on the prompt on the device to confirm that a failure has occurred. After that ctrl + c from adb. If this works, it should print something happy.

adb devices

0
source

Source: https://habr.com/ru/post/948538/


All Articles