Skip to content
31 changes: 27 additions & 4 deletions addons/adb_server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,42 @@ FROM ${BUILD_FROM}

# Install necessary packages and wget for downloading tini
RUN apt-get update && \
apt-get install -y android-sdk-platform-tools wget bash build-essential cmake git libjson-c-dev libwebsockets-dev dos2unix && \
rm -rf /var/lib/apt/lists/* && \
git clone https://github.com/tsl0922/ttyd.git
apt-get install -y --no-install-recommends wget unzip bash build-essential cmake git libjson-c-dev libwebsockets-dev dos2unix && \
rm -rf /var/lib/apt/lists/*

RUN git clone https://github.com/tsl0922/ttyd.git

WORKDIR /ttyd
RUN mkdir build
WORKDIR /ttyd/build
RUN cmake .. && \
make && make install

# Download and install tini based on the target architecture

ARG TARGETARCH
RUN case "$TARGETARCH" in \
"amd64") \
echo "Fetching latest amd64 platform-tools from Google" && \
wget -q https://dl.google.com/android/repository/platform-tools-latest-linux.zip -O /tmp/platform-tools.zip && \
unzip -q /tmp/platform-tools.zip -d /opt && \
rm /tmp/platform-tools.zip \
;; \
"arm64" | "arm" | "386") \
echo "Fetching platform-tools for $TARGETARCH from apt" && \
apt-get update && \
apt-get install -y --no-install-recommends android-sdk-platform-tools && \
rm -rf /var/lib/apt/lists/* \
;; \
*) \
echo "Unsupported architecture for adb installation: $TARGETARCH" && \
exit 1 \
;; \
esac


ENV PATH="/opt/platform-tools:${PATH}"

# Download and install tini based on the target architecture
RUN case "$TARGETARCH" in \
"amd64") TINI_URL="https://github.com/krallin/tini/releases/download/v0.19.0/tini";; \
"arm64") TINI_URL="https://github.com/krallin/tini/releases/download/v0.19.0/tini-arm64";; \
Expand Down
4 changes: 2 additions & 2 deletions addons/adb_server/build.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"BUILD_NAME": "ADB Server",
"BUILD_REF": "main",
"BUILD_REPOSITORY": "github.com/Amateur-God/Hassio-Addons",
"BUILD_VERSION": "2.0.2",
"DEV_BUILD_DATE": "2024-09-27T17:03:33Z"
"BUILD_VERSION": "3.0.0",
"DEV_BUILD_DATE": "2025-07-28T12:37:28Z"
}
}
2 changes: 1 addition & 1 deletion addons/adb_server/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ADB Server",
"version": "2.0.2",
"version": "dev-3.0.0",
"slug": "adb_server",
"description": "A Home Assistant add-on for ADB Server with restricted shell access.",
"arch": [
Expand Down
2 changes: 1 addition & 1 deletion addons/adb_server/previous_version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.2
2.0.2
2 changes: 1 addition & 1 deletion addons/adb_server/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.2
3.0.0
Loading