10

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?

Searock
6,63811 gold badges65 silver badges99 bronze badges
asked Sep 28, 2012 at 5:49

3 Answers 3

14

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.

answered Sep 28, 2012 at 6:26
Sign up to request clarification or add additional context in comments.

1 Comment

No, it's just a program that accepts commands and executes them on the device. You say adb shell, the daemon runs sh on the device and routes the stdout/stdin/stderr to your adb. The android emulator runs its own OS independently of the ADB daemon.
1

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.

answered Sep 28, 2012 at 6:31

Comments

0

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.

answered Sep 28, 2012 at 6:42

1 Comment

Nice description of a generic daemon, but that doesn't answer what adb daemon is.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.