From 4b93067c3a70d6f3ebfb8a114a57bf968b42cac5 Mon Sep 17 00:00:00 2001 From: Vadim Date: Wed, 27 Nov 2024 22:35:17 +0400 Subject: [PATCH] Add Dockerfile and usage README for Apktool framework --- apktool/Dockerfile | 16 ++++++++++++++++ apktool/README.md | 27 +++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 apktool/Dockerfile create mode 100644 apktool/README.md diff --git a/apktool/Dockerfile b/apktool/Dockerfile new file mode 100644 index 0000000..d4bbb4b --- /dev/null +++ b/apktool/Dockerfile @@ -0,0 +1,16 @@ +FROM gradle:8.11.1-jdk17-alpine AS build + +WORKDIR /src + +COPY . . + +RUN gradle build shadowJar proguard + + +FROM openjdk:11 + +WORKDIR /data + +COPY --from=build /src/brut.apktool/apktool-cli/build/libs/apktool-cli.jar / + +ENTRYPOINT ["java", "-Xmx1024M", "-Dfile.encoding=utf-8", "-Djdk.util.zip.disableZip64ExtraFieldValidation=true", "-Djdk.nio.zipfs.allowDotZipEntry=true", "-jar", "/apktool-cli.jar"] diff --git a/apktool/README.md b/apktool/README.md new file mode 100644 index 0000000..ae7eafa --- /dev/null +++ b/apktool/README.md @@ -0,0 +1,27 @@ +# Apktool + +A tool for reverse engineering Android apk files + +Official project [link](https://github.com/iBotPeaches/Apktool) + +## Usage + +Build image + +```bash +docker build --platform=linux/amd64 -t apktool -f Dockerfile . +``` + +Decompile APK that's named `test.apk` + +```bash +docker run --rm --name apktool-temp --platform=linux/amd64 -v $(pwd):/data/ -it apktool d test.apk +``` + +Pack it back + +```bash +docker run --rm --name apktool-temp --platform=linux/amd64 -v $(pwd):/data/ -it apktool b test -o patched_test.apk +``` + +Or use prebuilt image `vadimbelous/apktool`: https://hub.docker.com/r/vadimbelous/apktool