Skip to content

Run magisk in a Docker container in order to patch a bootimage on any device able to run Docker.

Notifications You must be signed in to change notification settings

SunGodRamen/docker_magisk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Flask-based Boot Image Patching Tool

This project is a Flask-based boot image patching tool that allows users to upload a boot image file and patch it with the latest version of Magisk. The patched boot image file can then be used to root Android devices.

The tool has two endpoints:

  • / : A basic endpoint that returns "Hello, World!" to verify that the server is up and running.

  • /patch: A POST endpoint that accepts a boot image file in the request and patches it with Magisk.

How it Works

The tool downloads the Magisk APK and extracts the Magisk binary from it. When a boot image file is uploaded to the /patch endpoint, the tool saves the file as boot.img. It then uses the Magisk binary to patch the boot.img file and save the output as patched_boot.img. The boot.img file is deleted after the patching is complete. The user can then download the patched boot image file and use it to root their Android device.

Requirements

The tool requires Python 3.9 and the following dependencies:

  • Flask
  • apktool

It also requires the following tools to be installed:

  • wget
  • unzip
  • openjdk-11-jdk-headless

Usage

To use the tool, follow these steps:

  1. Clone the repository
  2. Install the required tools and dependencies
  3. Run the Flask application using python app.py
  4. Access the tool via a web browser at http://localhost:80
  5. Upload a boot image file to the /patch endpoint
  6. Download the patched boot image file from the response

Docker Image

The project includes a Dockerfile that can be used to build a Docker image of the tool. The Docker image includes all the required dependencies and tools.

To build the Docker image, run the following command from the root of the project:

arduinoCopy code
docker build -t boot-image-patcher .

To run the Docker container, use the following command:

arduinoCopy code
docker run -p 80:80 boot-image-patcher

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

Run magisk in a Docker container in order to patch a bootimage on any device able to run Docker.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published