From 738224c414b68a9398e24a79429175b67745d518 Mon Sep 17 00:00:00 2001 From: Akihiro Suda Date: Fri, 17 Apr 2020 10:26:24 +0900 Subject: [PATCH] support running adb directly on the host Fix #29 Signed-off-by: Akihiro Suda --- Dockerfile | 2 +- README.md | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 50ddd1a..f7e5130 100644 --- a/Dockerfile +++ b/Dockerfile @@ -79,7 +79,7 @@ ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && \ apt-get install -qq -y --no-install-recommends \ # base system - ca-certificates curl iproute2 jq kmod \ + ca-certificates curl iproute2 jq kmod socat \ # lxc deps iptables libcap2 libseccomp2 libselinux1 \ # anbox deps diff --git a/README.md b/README.md index db15b61..841faf1 100644 --- a/README.md +++ b/README.md @@ -98,6 +98,22 @@ The manifest is known to work on: - Kubernetes 1.17.0, Ubuntu 19.10, Kernel 5.3.0-46-generic, containerd 1.3.2 - **NOTE**: Requires `docker exec kind-control-plane mount -o remount,rw /sys` +## Tips + +### adb + +```bash +docker exec -it aind adb shell +``` + +To run adb on the host: + +``` +socat TCP-LISTEN:5037,reuseaddr,fork 'EXEC:docker exec -i aind "socat STDIO TCP-CONNECT:localhost:5037"' & +adb connect localhost:5037 +adb shell +``` + ## Apps ### Pre-installed Apps