Skip to content

Commit e170ea0

Browse files
jo-bitschjefferyto
andcommitted
aoa-proxy: add new package
aoa-proxy is a tool to interact with Android devices using the Android Open Accessory Protocol. Co-authored-by: Jeffery To <jeffery.to@gmail.com> Signed-off-by: Jó Ágila Bitsch <jgilab@gmail.com>
1 parent 24dc517 commit e170ea0

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed

utils/aoa-proxy/Makefile

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
#
2+
# Copyright (C) 2023 Jó Ágila Bitsch
3+
#
4+
# SPDX-License-Identifier: GPL-2.0-only
5+
6+
include $(TOPDIR)/rules.mk
7+
8+
PKG_NAME:=aoa-proxy
9+
PKG_VERSION:=0.2
10+
PKG_RELEASE:=1
11+
12+
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
13+
PKG_SOURCE_URL:=https://github.com/jo-bitsch/aoa-proxy/archive/refs/tags/v$(PKG_VERSION).tar.gz?
14+
PKG_HASH:=3a9dc94a3cd1b0cba1ae80396b21a6a63289f20dc426be7836834e5a3fc23a68
15+
16+
PKG_BUILD_DEPENDS:=!USE_GLIBC:argp-standalone
17+
18+
PKG_MAINTAINER:=Jó Ágila Bitsch <jgilab@gmail.com>
19+
PKG_LICENSE:=BSD-3-Clause
20+
PKG_LICENSE_FILES:=LICENSE
21+
22+
include $(INCLUDE_DIR)/package.mk
23+
24+
TARGET_CFLAGS += -DNO_HID=1
25+
26+
define Package/aoa-proxy
27+
SECTION:=utils
28+
CATEGORY:=Utilities
29+
TITLE:=Interact with Android devices using AOA
30+
URL:=https://github.com/jo-bitsch/aoa-proxy
31+
DEPENDS:=+libusb-1.0
32+
endef
33+
34+
define Package/aoa-proxy/description
35+
This program aims to make working with Android Open Accessory (in
36+
particular v1) as easy as possible.
37+
It has 2 modes, depending on the state of the attached Android device.
38+
(1) Announce mode: When the Android device is not yet in AOA mode, this
39+
program announces its identity to the Android device and tries to
40+
put it into AOA mode.
41+
(2) Forwarding mode: Forward all input from stdin to the AOA device and
42+
all output from AOA to stdout.
43+
For OpenWrt, it includes a hotplug script and a service to automatically
44+
announce itself and forward AOA traffic to SSH/dropbear.
45+
endef
46+
47+
define Build/Compile
48+
$(call Build/Compile/Default,aoa-proxy OPENWRT=1)
49+
endef
50+
51+
define Package/aoa-proxy/install
52+
$(INSTALL_DIR) $(1)/usr/sbin
53+
$(INSTALL_BIN) $(PKG_BUILD_DIR)/aoa-proxy $(1)/usr/sbin
54+
$(INSTALL_DIR) $(1)/etc/hotplug.d/usb
55+
$(INSTALL_BIN) $(PKG_BUILD_DIR)/openwrt/etc/hotplug.d/usb/99-aoa-proxy $(1)/etc/hotplug.d/usb
56+
$(INSTALL_DIR) $(1)/etc/init.d
57+
$(INSTALL_BIN) $(PKG_BUILD_DIR)/openwrt/etc/init.d/aoa-proxy-forward $(1)/etc/init.d
58+
endef
59+
60+
$(eval $(call BuildPackage,aoa-proxy))

0 commit comments

Comments
 (0)