Skip to content

Commit

Permalink
package/android-tools: install adbd systemd unit
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Stewart <[email protected]>
  • Loading branch information
paralin committed Jul 11, 2022
1 parent db17ac4 commit 99d3e37
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions package/android-tools/adbd.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[Unit]
Description=ADB Daemon

[Service]
Restart=always
ExecStart=adbd

[Install]
WantedBy=multi-user.target
9 changes: 9 additions & 0 deletions package/android-tools/android-tools.mk
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ endif

ifeq ($(BR2_PACKAGE_ANDROID_TOOLS_ADBD),y)
ANDROID_TOOLS_TARGETS += adbd

define ANDROID_TOOLS_INSTALL_SYSTEMD_ADBD
$(INSTALL) -D -m 644 $(ANDROID_TOOLS_PKGDIR)/adbd.service \
$(TARGET_DIR)/usr/lib/systemd/system/adbd.service
endef
endif

# Build each tool in its own directory not to share object files
Expand Down Expand Up @@ -114,5 +119,9 @@ define ANDROID_TOOLS_INSTALL_TARGET_CMDS
$(INSTALL) -D -m 0755 $(@D)/build-$(t)/$(t) $(TARGET_DIR)/usr/bin/$(t)$(sep))
endef

define ANDROID_TOOLS_INSTALL_INIT_SYSTEMD
$(ANDROID_TOOLS_INSTALL_SYSTEMD_ADBD)
endef

$(eval $(generic-package))
$(eval $(host-generic-package))

0 comments on commit 99d3e37

Please sign in to comment.