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 <christian@paral.in>
  • Loading branch information
paralin committed Jul 11, 2022
1 parent a5fd957 commit 0d083d6
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 @@ -89,6 +89,11 @@ endif
ifeq ($(BR2_PACKAGE_ANDROID_TOOLS_ADBD),y)
ANDROID_TOOLS_TARGETS += adbd
ANDROID_TOOLS_DEPENDENCIES += zlib openssl

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 @@ -117,5 +122,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 0d083d6

Please sign in to comment.