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