Files
openwrt/package/utils/adb/patches/001-create_Makefile.patch
Antti Seppälä c70f842da3 adb: Switch to mbedtls
Currently adb uses libopenssl for certain authentication tasks between
the host and the target device such as certificate generation, hashing,
base64 encoding and pki signatures.

Add a patch to use functionalities available in mbedtls instead.

Also switch package makefile and dependency to libmbedtls and drop
patches and references to lib{crypto,openssl} as they are no longer
required.

This conserves considerable amount of space on the device as openwrt
ships with libmbedtls by default.

Signed-off-by: Antti Seppälä <a.seppala@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18819
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-05-24 21:32:25 +02:00

46 lines
912 B
Diff

--- /dev/null
+++ b/adb/Makefile
@@ -0,0 +1,42 @@
+SRCS+= adb.c
+SRCS+= adb_auth_host.c
+SRCS+= adb_client.c
+SRCS+= commandline.c
+SRCS+= console.c
+SRCS+= fdevent.c
+SRCS+= file_sync_client.c
+SRCS+= get_my_path_linux.c
+SRCS+= services.c
+SRCS+= sockets.c
+SRCS+= transport.c
+SRCS+= transport_local.c
+SRCS+= transport_usb.c
+SRCS+= usb_linux.c
+
+VPATH+= ../libcutils
+SRCS+= load_file.c
+SRCS+= socket_inaddr_any_server.c
+SRCS+= socket_local_client.c
+SRCS+= socket_local_server.c
+SRCS+= socket_loopback_client.c
+SRCS+= socket_loopback_server.c
+SRCS+= socket_network_client.c
+
+VPATH+= ../libzipfile
+SRCS+= centraldir.c
+SRCS+= zipfile.c
+
+CPPFLAGS+= -DADB_HOST=1
+CPPFLAGS+= -DHAVE_FORKEXEC=1
+CPPFLAGS+= -I.
+CPPFLAGS+= -I../include
+CPPFLAGS+= -D_FILE_OFFSET_BITS=64
+
+LIBS+= -lmbedcrypto -lpthread -lz
+
+OBJS= $(SRCS:.c=.o)
+
+all: adb
+
+adb: $(OBJS)
+ $(CC) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)