1

If I understand the answers give here correctly, whenever I use an adb command on my computer connected to a smartphone, the reason it does anything is because there is a background process adbd, the adb daemon, running on the smartphone. Everything I see on the computer screen when I issue an adb command is the result returned by the adbd daemon. I have the following questions:

  1. Is my understanding of how adb works correct?
  2. If it is correct, is there any way to programmatically enable/disable/re-enable the adbd process? Can I programmatically interact with adbd at all (either through Java or NDK)?

This question is for a non-rooted device.

user13267
  • 6,871
  • 28
  • 80
  • 138

1 Answers1

0

You are using two adb daemons.

  1. There's one on the device, built as part of the Android OS installed on it. I think it runs all the time on devices that have developer mode enabled. It is updated as part of Android, and can be updated separately, although I don't know just how.

  2. The other is on your Linux, macOS or Windows development machine. It gets supplied with the "platform tools" and is updated when you install a new set, either yourself or with an update to Android Studio. On Linux, things work more reliably if the daemon is running as root.

When you use the adb client program on your development machine, it talks to the adbd daemon on that machine. That daemon talks to the adbd on the device, and that does the actual work.

John Dallman
  • 590
  • 4
  • 18