ADB not working anymore - android

$ adb kill-server
$ adb start-server
None of the above commands give any response the command gets stucked and give no response. It used to work before but dont know why it stopped working.
Android studio also gives a popup saying error initializing adb.
$ adb devices
List of devices attached
It gets stuck here
Please Help
My os Ubuntu 16.4.

Related

adb logcat - no output, adb shell works though

I have a strange problem after Oreo update - 'adb logcat' stopped working.
Note that device is properly connected - I can debug, I can view logs in Android Studio, even I can start adb shell and do logcat but no direct logcat out from the adb command.
So in short,
# adb logcat
Absolutely no output. However, following works (logcat from the adb shell)
# adb shell
logcat
Any idea?
try these steps (even though your logcat is open)
in android studio go to
View->Tool Windows->Logcat
see if it works

How to restart android adb using terminal on macOS?

I keep having an issue with the Android Studio ADB not recognizing my devices. So far, the only solution I've found is to do a complete reboot of my entire computer, which isn't practical. I'd like to be able to restart the ADB from terminal, because I have seen other posts on here that claim it will fix the issue. However, I can't figure out where to use the commands "adb kill-server", because doing it at the base directory returns a "command not recognized". Can somebody help me figure out how to navigate into Android from terminal and use the command? Or, does anybody have another solution to the original problem of Android Studio not recognizing my devices?
Thanks in advance! Sorry for the wordiness.
blackbelt:~ blackbelt$ adb kill-server
blackbelt:~ blackbelt$ adb start-server
works on Linux as well as on Mac. In my machine, adb is in PATH
"command not recognized". Can somebody help me figure out how to
navigate into Android from terminal and use the command? Or, does
anybody have another solution to the original problem of Android
Studio not recognizing my devices?
In your case adb is not declared in PATH. You can either export the PATH, or specify the full qualified path to adb in the command line. E.g.
blackbelt:~ blackbelt$ /path/to/platform-tools/adb kill-server
blackbelt:~ blackbelt$ /path/to/platform-tools/adb start-server
or
blackbelt:~ blackbelt$ ./adb kill-server
blackbelt:~ blackbelt$ ./adb start-server
if you are inside platform-tools
Well instead of doing it through command line, if you find that hard you can also do the same from android studio.
Go to tools -> Android -> Android device monitor . Then it will open the separate window where you can see all the devices or emulator attached to the process. On the left hand side below the Devices tab there will be and menu bar, you need to click on the drop down arrow which will give you the option to reset the adb. Here is the image for reference
If you are using windows try to update the device driver for your device make sure the adb is correctly installed. When you connect your device to system see if it is allowed to be used at the system.
if adb kill-server not responding. Find the process id (PID) by typing top in terminal and finding PID next to adb. Then type kill <PID>
For example, for me PID for adb was 70163. Then i typed kill 70163
Simply stop adb:
adb kill-server
Then you can start it again any time:
adb start-server

Cannot run adb command in ubuntu adb server is out of date

when i run adb devices
adb server is out of date. killing...
cannot bind 'tcp:5037'
ADB server didn't ACK
* failed to start daemon *
error:
its the same as this error here
. some of the comments say that try to adb kill-server then start adb again but it does not work in my ubuntu machine.
I have also tried killall -9 adb which is the correct answer of this question. It is also stated in the correct answer is the best solution is to change genymotion settings and point to sdk but in my case i already did it.
can someone help me get rid of this error.
any way in case if someone will see this post i want to point how really simple the solution by closing all the genymotion devices then running the command
killall adb. By killing all the adb does kill it all then i did start-server maybe i have another adb running some times before and i forgot about it.

adb install doesn't stop when adb klill-server has been started

This is my first post here, so first of all, hello everybody!
I am not sure if it is bug or a feature:) but I have noticed that when you will run adb install with no device connected, it firstly starts adb daemon (if was not currently running), and then wait for the device. After that, when you open new window and run adb kill-server, adb install command will not stop, but shows protocol fault and then restart adb daemon again.
There is no other way of stopping this, than killing the process (for example using ctrl+c).
Screenshot
I have also noticed that other commands like adb shell, adb devices, adb wait-for-device doesn't act like adb install - stop when adb kill-server will be lunched.
My version of ADB is 1.0.31
I have tested this issue on Linux and Windows, and both works the same.
Please let me know, what do you think about it.
Best Regards,
Pawel

emulator in commandline do not have always the property "dev.bootcomplete"

I'm using the emulator by command-line for our continuous integration server for our android application. With that approach we can test all Android Versions automatically. For the automatic installation and testing we are using the property "dev.bootcomplete", which is provided by the android emulator. Unfortunately we don't get it always. After a newly created emulator we are retrieving it, but when the emulator is several times used it do'nt throw it again...
Has Anybody an idea?
Commands/ results:
[user#mob_ci ~]$ adb shell getprop dev.bootcomplete
error: device offline
[user#mob_ci ~]$ adb shell getprop dev.bootcomplete
1
I use hudson as a ci server, for hudson there is a android plugin which manages the emulator, it even creates the emulator for you if you want.
I would either check if "error: device offline" happens and then run
adb kill-server
adb start-server
or
shutdown the emulator after each build, as it's not necessary that the emulator runs all the time or do the tests run all the time ?
hope this helps :)

Categories

Resources