diff --git a/addons/adb_server/Dockerfile b/addons/adb_server/Dockerfile index 08c5bb1..6f84879 100644 --- a/addons/adb_server/Dockerfile +++ b/addons/adb_server/Dockerfile @@ -4,10 +4,10 @@ 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 @@ -15,8 +15,31 @@ 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";; \ diff --git a/addons/adb_server/build.json b/addons/adb_server/build.json index f24372c..71179d0 100644 --- a/addons/adb_server/build.json +++ b/addons/adb_server/build.json @@ -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" } } diff --git a/addons/adb_server/config.json b/addons/adb_server/config.json index da1a861..aba2a38 100644 --- a/addons/adb_server/config.json +++ b/addons/adb_server/config.json @@ -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": [ diff --git a/addons/adb_server/previous_version.txt b/addons/adb_server/previous_version.txt index 45a1b3f..e9307ca 100644 --- a/addons/adb_server/previous_version.txt +++ b/addons/adb_server/previous_version.txt @@ -1 +1 @@ -1.1.2 +2.0.2 diff --git a/addons/adb_server/version.txt b/addons/adb_server/version.txt index e9307ca..4a36342 100644 --- a/addons/adb_server/version.txt +++ b/addons/adb_server/version.txt @@ -1 +1 @@ -2.0.2 +3.0.0