forked from kdrag0n/safetynet-fix
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(docker): Docker container for build Magisk module
- Loading branch information
Showing
8 changed files
with
85 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
FROM ubuntu:latest | ||
|
||
WORKDIR / | ||
|
||
SHELL ["/bin/bash", "-c"] | ||
|
||
# To avoid "tzdata" asking for geographic area | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
|
||
# Version of tools: | ||
# In Code | ||
ARG GRADLE_VERSION=7.0.2 | ||
ARG ANDROID_API_LEVEL=32 | ||
# https://developer.android.com/studio/releases/build-tools | ||
ARG ANDROID_BUILD_TOOLS_LEVEL=32.0.0 | ||
# https://developer.android.com/ndk/downloads | ||
ARG ANDROID_NDK_VERSION=21.4.7075529 | ||
# https://developer.android.com/studio/ | ||
ARG ANNDROID_CMD_LINE_TOOLS=linux-8512546_latest | ||
|
||
# Dependencies and needed tools | ||
RUN apt update -qq && apt install -qq -y cmake zip file openjdk-11-jdk vim git unzip libglu1 libpulse-dev libasound2 libc6 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxi6 libxtst6 libnss3 wget | ||
|
||
# Download gradle, install gradle and gradlew | ||
RUN wget -q https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-bin.zip -P /tmp | ||
RUN unzip -q -d /opt/gradle /tmp/gradle-${GRADLE_VERSION}-bin.zip | ||
RUN mkdir /opt/gradlew | ||
RUN touch /opt/gradlew/settings.gradle | ||
RUN /opt/gradle/gradle-${GRADLE_VERSION}/bin/gradle wrapper --gradle-version ${GRADLE_VERSION} --distribution-type all -p /opt/gradlew | ||
RUN /opt/gradle/gradle-${GRADLE_VERSION}/bin/gradle wrapper -p /opt/gradlew | ||
|
||
# Download commandlinetools | ||
RUN mkdir /opt/android | ||
RUN mkdir /opt/android/cmdline-tools | ||
RUN wget -q https://dl.google.com/android/repository/commandlinetools-${ANNDROID_CMD_LINE_TOOLS}.zip -P /tmp | ||
RUN unzip -q -d /opt/android/cmdline-tools /tmp/commandlinetools-${ANNDROID_CMD_LINE_TOOLS}.zip | ||
|
||
# install packages and accept all licenses | ||
# cmdline-tools/cmdline-tools - the second "cmdline-tools" is the folder in the zip file | ||
RUN yes Y | /opt/android/cmdline-tools/cmdline-tools/bin/sdkmanager --install "build-tools;${ANDROID_BUILD_TOOLS_LEVEL}" "platforms;android-${ANDROID_API_LEVEL}" "platform-tools" "ndk;${ANDROID_NDK_VERSION}" \ | ||
&& yes Y | /opt/android/cmdline-tools/cmdline-tools/bin/sdkmanager --licenses | ||
|
||
# Environment variables to be used for build | ||
ENV GRADLE_HOME=/opt/gradle/gradle-$GRADLE_VERSION | ||
ENV ANDROID_HOME=/opt/android | ||
ENV ANDROID_NDK_HOME=${ANDROID_HOME}/ndk/${ANDROID_NDK_VERSION} | ||
ENV PATH "$PATH:$GRADLE_HOME/bin:/opt/gradlew:$ANDROID_HOME/emulator:$ANDROID_HOME/cmdline-tools/tools/bin:$ANDROID_HOME/platform-tools:${ANDROID_NDK_HOME}" | ||
ENV LD_LIBRARY_PATH "$ANDROID_HOME/emulator/lib64:$ANDROID_HOME/emulator/lib64/qt/lib" | ||
|
||
# Clean up | ||
RUN rm /tmp/gradle-${GRADLE_VERSION}-bin.zip \ | ||
&& rm /tmp/commandlinetools-${ANNDROID_CMD_LINE_TOOLS}.zip | ||
|
||
# Create folder work | ||
RUN mkdir /opt/safetynet-fix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
version: "3.9" | ||
|
||
services: | ||
android-build: | ||
build: | ||
context: . | ||
dockerfile: ./Dockerfile | ||
|
||
working_dir: /opt/safetynet-fix | ||
command: ['bash', 'build.sh'] | ||
# debug | ||
# command: ['bash', '-c', 'while sleep 1000; do :; done'] | ||
volumes: | ||
- ./:/opt/safetynet-fix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/env sh | ||
#!/usr/bin/env bash | ||
|
||
# | ||
# Copyright 2015 the original author or authors. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
id=safetynet-fix | ||
name=Universal SafetyNet Fix | ||
version=v2.2.1 | ||
versionCode=20201 | ||
version=v2.3.0 | ||
versionCode=20300 | ||
author=kdrag0n, frnode | ||
description=A universal fix for SafetyNet on Android 8–12 devices with hardware attestation and unlocked bootloaders. | ||
updateJson=https://raw.githubusercontent.com/frnode/safetynet-fix/master/update.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"version": "v2.2.1", | ||
"versionCode": 20201, | ||
"zipUrl": "https://github.com/frnode/safetynet-fix/releases/download/v2.2.1/safetynet-fix-v2.2.1.zip", | ||
"version": "v2.3.0", | ||
"versionCode": 20300, | ||
"zipUrl": "https://github.com/frnode/safetynet-fix/releases/download/v2.3.0/safetynet-fix-v2.3.0.zip", | ||
"changelog": "https://raw.githubusercontent.com/frnode/safetynet-fix/master/CHANGELOG.md" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/env sh | ||
#!/usr/bin/env bash | ||
|
||
# | ||
# Copyright 2015 the original author or authors. | ||
|