What is ADB?

I continue to read tutorials where I have to type something in the ADB command line, and that is in my sdk / platform Android tools. Thus, I find it, click on it, and a black screen appears for about 2 seconds, but for now it scrolls through a bunch of text. So how should I use this "adb"?

+4
source share
2 answers

It's called Android Debug Bridge, and the documentation on the Android developer site does a better job of this than I can:

http://developer.android.com/guide/developing/tools/adb.html

If you are looking for the adb command line, go to <sdk>/platform-tools/ and run

 adb.exe shell 

from the command line.

+5
source

Pretty sure this is well documented from day one on Android Debug Bridge

Android Debug Bridge (adb) is a universal command line tool that allows you to communicate with an emulator instance or connected to an Android-powered device. This is a client-server program, which includes three components:

A client that runs on your development machine. You can call the client from the shell by issuing the adb command. Other Android tools, such as the ADT plugin and DDMS, are also created by adb clients. A server that runs as a background process on your development machine. the server manages the communication between the client and the adb daemon running on an emulator or device. A daemon that works as a background process on every instance of an emulator or device.

So plain old English, ADB can be found at% ANDROID_HOME% / platform-toos /, and it's a magic command line that allows you to talk to your mobile device, whether it be a physical or virtual device (AVD), so whenever you deploy, you transfer the application through the device via ADB on the specific client port of your computer to the daemon port on the device.

Interesting things you can do with it?

  • Logcat: ./ adb logcat allows you to see the log trace for each process.
  • Install: ./ adb install allows you to install apk on the device.
  • Kill: ./ adb kill-sever
  • Run: ./ adb stat-server
  • Enter SQLite3: adb -s your_device shell
  • Use the monkey: monkey adb -v -p your.app.package 500 to generate random events

And much more! Read the documentation, which will be beautiful and understandable.

+2
source

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


All Articles