what is a adb daemon?

自闭症网瘾萝莉.ら 提交于 2021-01-22 03:35:16

问题


While running an application .apk file is formed and that apk file is installed in the emulator. for installing the apk file in the emulator we need Android Debug Bridge(ADB) service. Daemon is a part of this service. My question is what is the work of the daemon? What does it do?


回答1:


My question is what is the work of the daemon? What does it do?

Daemons are like a service providers for other threads or objects running in the same process as the daemon thread. Daemon threads are used for background supporting tasks and are only needed while normal threads are executing. If normal threads are not running and remaining threads are daemon threads then the interpreter exits.




回答2:


From Android Debug Bridge documentation:

Android Debug Bridge (adb) is a versatile command line tool that lets you communicate with an emulator instance or connected Android-powered device. It is a client-server program that includes three components:

  • A client, which runs on your development machine. You can invoke a client from a shell by issuing an adb command. Other Android tools such as the ADT plugin and DDMS also create adb clients.
  • A server, which runs as a background process on your development machine. The server manages communication between the client and the adb daemon running on an emulator or device.
  • A daemon, which runs as a background process on each emulator or device instance.

So, the daemon is the ADB component that runs on the device (or emulator) which accepts commands from the ADB server and executes them.




回答3:


Basically, ADB is this thing, that sits between you and the system. The Android system basically needs a point of control, so that you can send it commands, such as:

  • Install this app.
  • Attach a debugger to app X on port Y.
  • Open a shell so the user can talk to the device.

If you had a standard Android system, without ADB, there would be no way to control the device.

ADB is not an OS, it is a program which runs on the device. This program (running on the device) listens for commands from the computer (or a port, etc...) and then executes them on the device on behalf of the user.



来源:https://stackoverflow.com/questions/12634280/what-is-a-adb-daemon

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!