How to restart adroid app using terminal on macOS?

I have a problem with Android ADB that does not recognize my devices. Until now, the only solution I have found is to completely restart my entire computer, which is impractical. I would like to be able to restart ADB from the terminal because I saw other messages here that claim that this will fix the problem. However, I cannot figure out where to use the "adb kill-server" commands, because doing this in the base directory returns "command not recognized". Can someone help me figure out how to switch to Android from the terminal and use the command? Or does anyone have another solution to the original Android Studio problem not recognizing my devices?

Thanks in advance! Sorry for the verbosity.

+4
source share
2 answers
blackbelt:~ blackbelt$ adb kill-server
blackbelt:~ blackbelt$ adb start-server

works on Linuxas well as on Mac. In my car adbis in PATH

"command not recognized." Can someone help me figure out how to go to Android from the terminal and use the command? Or, does anyone have another solution to the original problem Android Studio does not recognize my devices?

In your case is adbnot declared in PATH. You can either export PATHor specify the full path to adbthe command line. For example.

 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

+8
source

, , , , , android. → Android → Android-. , , . "" , , reset adb. enter image description here

Windows, , , adb . , , .

+3

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


All Articles