Skip to content
This repository has been archived by the owner on Jul 27, 2024. It is now read-only.

Commit

Permalink
Update Docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
ClaudiuGeorgiu committed Jan 6, 2022
1 parent b2a39bb commit 90156cd
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 16 deletions.
4 changes: 2 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ NOTE:

### Description

<!-- Please include relevant motivation and context. If this PR fixes a bug or resolves a feature request, be sure to include a link to that issue (insert text below this line) -->
<!-- Please include relevant motivation and context. If this PR fixes a bug or implements a feature request, be sure to include a link to that issue (insert text below this line) -->



Expand All @@ -29,7 +29,7 @@ NOTE:
* [ ] Bug fix (non-breaking change which fixes an issue)
* [ ] New feature (non-breaking change which adds functionality)
* [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
* [ ] Other (e.g., refactoring, documentation, etc.)
* [ ] Other (e.g., refactoring, documentation etc.)



Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,36 @@ jobs:
uses: codecov/codecov-action@v1
with:
fail_ci_if_error: false

publish:
# Run only if the previous job succeeds (only master branch or new tags, no pull requests).
if: (endsWith(github.ref, '/master') || startsWith(github.ref, 'refs/tags/v')) && contains(github.event_name, 'pull_request') == false
needs: test
name: Push updated version to Docker Hub
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: claudiugeorgiu
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
images: claudiugeorgiu/obfuscapk
tags: |
type=raw,value=latest
type=semver,pattern={{version}}
- name: Build and push
uses: docker/build-push-action@v2
with:
context: ./src/
push: true
tags: ${{ steps.meta.outputs.tags }}
3 changes: 2 additions & 1 deletion .idea/Obfuscapk.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
[![Ubuntu Build Status](https://github.com/ClaudiuGeorgiu/Obfuscapk/workflows/Ubuntu/badge.svg)](https://github.com/ClaudiuGeorgiu/Obfuscapk/actions?query=workflow%3AUbuntu)
[![Windows Build Status](https://github.com/ClaudiuGeorgiu/Obfuscapk/workflows/Windows/badge.svg)](https://github.com/ClaudiuGeorgiu/Obfuscapk/actions?query=workflow%3AWindows)
[![MacOS Build Status](https://github.com/ClaudiuGeorgiu/Obfuscapk/workflows/MacOS/badge.svg)](https://github.com/ClaudiuGeorgiu/Obfuscapk/actions?query=workflow%3AMacOS)
[![Docker Hub](https://img.shields.io/docker/cloud/build/claudiugeorgiu/obfuscapk)](https://hub.docker.com/r/claudiugeorgiu/obfuscapk)
[![Python Version](https://img.shields.io/badge/Python-3.7%2B-green.svg?logo=python&logoColor=white)](https://www.python.org/downloads/)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/ClaudiuGeorgiu/Obfuscapk/blob/master/LICENSE)

Expand Down Expand Up @@ -119,13 +118,13 @@ have a recent version of Docker installed:

```Shell
$ docker --version
Docker version 19.03.0, build aeac949
Docker version 20.10.7, build f0df350
```

#### Official Docker Hub image

The [official Obfuscapk Docker image](https://hub.docker.com/r/claudiugeorgiu/obfuscapk)
is available on Docker Hub:
is available on Docker Hub (automatically built from this repository):

```Shell
$ # Download the Docker image.
Expand Down Expand Up @@ -500,8 +499,8 @@ functionality.
> This technique analyzes the existing code looking for method invocations of the app,
> ignoring the calls to the Android framework (see `AdvancedReflection`). If it finds
> an instruction with a suitable method invocation (i.e., no constructor methods,
> public visibility, enough free registers, etc.) such invocation is redirected to
> a custom method that will invoke the original method using the Reflection APIs.
> public visibility, enough free registers etc.) such invocation is redirected to a
> custom method that will invoke the original method using the Reflection APIs.
### [Reorder](https://github.com/ClaudiuGeorgiu/Obfuscapk/tree/master/src/obfuscapk/obfuscators/reorder) \[Code]

Expand Down
17 changes: 10 additions & 7 deletions src/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
FROM python:3.9.0-slim-buster
FROM python:3.10.1-slim-bullseye

ENV APKTOOL_VERSION="2.5.0"
ENV APKTOOL_VERSION="2.6.0"
ENV ANDROID_HOME="/android-sdk-linux"
ENV BUILD_TOOLS_VERSION="30.0.3"
ENV PATH="${PATH}:${ANDROID_HOME}/tools/bin:${ANDROID_HOME}/build-tools/${BUILD_TOOLS_VERSION}"
ENV BUILD_TOOLS_VERSION="32.0.0"
ENV PATH="${PATH}:${ANDROID_HOME}/tools/bin:${ANDROID_HOME}/cmdline-tools/bin:${ANDROID_HOME}/build-tools/${BUILD_TOOLS_VERSION}"

# Install the needed tools.
RUN bash -c 'for i in {1..8}; do mkdir -p "/usr/share/man/man$i"; done' && \
RUN apt update && \
# Java JDK (needed for apktool).
apt update && apt install --no-install-recommends -y openjdk-11-jdk-headless wget unzip && \
apt install --no-install-recommends -y openjdk-11-jdk-headless wget unzip && \
# Android SDK (needed for zipalign and apksigner).
mkdir -p "${ANDROID_HOME}" && \
wget -q "https://dl.google.com/android/repository/commandlinetools-linux-6200805_latest.zip" -O android-sdk.zip && \
wget -q "https://dl.google.com/android/repository/commandlinetools-linux-7583922_latest.zip" -O android-sdk.zip && \
unzip -q android-sdk.zip -d "${ANDROID_HOME}" && rm android-sdk.zip && \
yes | sdkmanager --sdk_root="${ANDROID_HOME}" "build-tools;${BUILD_TOOLS_VERSION}" && \
# Apktool.
wget -q "https://raw.githubusercontent.com/iBotPeaches/Apktool/master/scripts/linux/apktool" \
-O /usr/local/bin/apktool && chmod a+x /usr/local/bin/apktool && \
wget -q "https://bitbucket.org/iBotPeaches/apktool/downloads/apktool_${APKTOOL_VERSION}.jar" \
-O /usr/local/bin/apktool.jar && chmod a+x /usr/local/bin/apktool.jar && \
# BundleDecompiler.
wget -q "https://raw.githubusercontent.com/TamilanPeriyasamy/BundleDecompiler/master/build/libs/BundleDecompiler-0.0.2.jar" \
-O /usr/local/bin/BundleDecompiler.jar && chmod a+x /usr/local/bin/BundleDecompiler.jar && \
# Clean.
apt remove --purge -y wget unzip && \
apt autoremove --purge -y && apt clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
Expand Down

0 comments on commit 90156cd

Please sign in to comment.