About what is adb

Although Android Studio has been used to connect advertisements and other things before, it is basically tested on a real machine. This time, due to some reasons, the person who connected with me proposed to use the adb shell to see and debug. What is adb? What is adb shell? He was immediately stunned by a stick. . .


1. What is adb?

Android Debug Bridge (Android Debug Bridge) referred to as "adb".

2. What is adb shell

After some searching, I found the relevant explanation .
Well, it turns out that the cmd I have been using is a shell, and the adb shell is used to connect to Android.
The simpler way to enter is adbto enter directly from cmd under windows.

3. Install adb

Usually, if you have installed Android Studio and downloaded Android SDK related content through the SDK manager, the adb.exe should already be there. If you have any questions, you can go to the developer website to have a look.
If you still cannot open adb through cmd at this time, one reason may be that the environment variables are not configured. You need to navigate to the following location:

My Computer -> Properties -> Advanced System Settings -> Advanced -> Environment Variables -> System Variables -> Path

Then add the full path of the folder where adb.exe is located to this Path.

例如: “F:\Android\SdkJdk\android-sdk-windows\platform-tools”。

After the addition is completed, you can confirm and save it all the way, and then enter adbor in cmd ADBto see if there is any response. If a large string of information appears, similar to the icon below, it means everything is OK.

Insert image description here
PS: One thing to note is that adb.exe will occupy port number 5037 , so if adb cannot be used normally, there may be other programs occupying this port number.

PS: Finally, after configuring the path, you can also use adb related commands in the Terminal in Android Studio. The usage method is the same as in cmd, but if Android Studio is open when configuring the path, you need to configure After completion, restart Android Studio, otherwise adb will still not be detected.

Guess you like

Origin blog.csdn.net/EverNess010/article/details/105274246