├── .github └── workflows │ └── mmar-patcher.yml └── README.md /.github/workflows/mmar-patcher.yml: -------------------------------------------------------------------------------- 1 | name: Magisk Manager APK Patcher 2 | on: 3 | schedule: 4 | - cron: '0 */12 * * *' 5 | workflow_dispatch: 6 | inputs: 7 | version: 8 | description: 'Version (blank for latest)' 9 | url: 10 | description: 'URL (blank for stable)' 11 | jobs: 12 | build: 13 | runs-on: ubuntu-latest 14 | steps: 15 | - uses: actions/checkout@v2 16 | 17 | - uses: actions/setup-java@v1 18 | with: 19 | java-version: '14' 20 | architecture: x64 21 | 22 | - name: Setup Environment 23 | id: setup_environment 24 | run: | 25 | wget https://raw.githubusercontent.com/iBotPeaches/Apktool/master/scripts/linux/apktool 26 | wget -O apktool.jar https://bitbucket.org/iBotPeaches/apktool/downloads/apktool_2.4.1.jar 27 | chmod +x apktool 28 | 29 | - name: Setup mmpatch 30 | id: setup_mmpatch 31 | run: git clone https://github.com/Magisk-Modules-Alt-Repo/mmpatch 32 | 33 | - name: Identify Target Tag 34 | id: identify_target_tag 35 | run: | 36 | if [[ ! -z "${{ github.event.inputs.version }}" ]] 37 | then 38 | echo "::set-env name=VERSION::${{ github.event.inputs.version }}" 39 | else 40 | if [[ ! -z "${{ github.event.inputs.url }}" ]] 41 | then 42 | echo "::set-env name=VERSION::url-provided" 43 | else 44 | echo "::set-env name=VERSION::`git ls-remote --tags https://github.com/topjohnwu/Magisk | grep manager- | awk -F / '{print $NF}' | tail -n 1 | awk -F '-' '{print $2}'`" 45 | fi 46 | fi 47 | 48 | - name: Fetch APK 49 | id: fetch_apk 50 | run: | 51 | URL="https://github.com/topjohnwu/Magisk/releases/download/manager-${{ env.VERSION }}/MagiskManager-${{ env.VERSION }}.apk" 52 | [[ ! -z "${{ github.event.inputs.url }}" ]] && URL="${{ github.event.inputs.url }}" 53 | wget -O ./mmpatch/MagiskManager.apk "$URL" 54 | 55 | - name: Patch APK 56 | id: patch_apk 57 | run: | 58 | export PATH="$PATH:`pwd`" 59 | cd mmpatch 60 | ./mmpatch Magisk-Modules-Alt-Repo 61 | 62 | - name: Create Release 63 | id: create_release 64 | uses: actions/create-release@v1 65 | env: 66 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 67 | with: 68 | tag_name: manager-alt-${{ env.VERSION }} 69 | release_name: Magisk Manager (Alt Patched) ${{ env.VERSION }} 70 | 71 | - name: Upload Release Asset 72 | id: upload-release-asset 73 | uses: actions/upload-release-asset@v1 74 | env: 75 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 76 | with: 77 | upload_url: ${{ steps.create_release.outputs.upload_url }} 78 | asset_path: ./mmpatch/mmpatch-signed.apk 79 | asset_name: MagiskManager-Alt-Repo-${{ env.VERSION }}.apk 80 | asset_content_type: application/apk 81 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Patching 2 | Patch your own Magisk Module APK for third-party repo support. 3 | 4 | # Tutorial 5 | 1. Clone [mmpatch](https://github.com/Magisk-Modules-Alt-Repo/mmpatch) to your computer. 6 | 2. Install [Apktool](https://github.com/iBotPeaches/Apktool) and Java JDK. 7 | 3. Add Apktool and Java SDK bin to your path. 8 | 4. `./mmpatch Magisk-Modules-Alt-Repo` 9 | 5. Delete any existing Magisk Manager from your Android device. 10 | 6. Install `mmpatch-signed.apk` to your Android Device. 11 | 12 | # Missing Modules 13 | If you notice that your Magisk Manager is lacking newly added modules, go to Magisk Manager --> Setting --> Clear Repo Cache, then refresh your repo list. This ensures that your repo feed is up-to-date. 14 | 15 | # Using Alongside Official Manager 16 | To use the Alt-Repo manager alongside the official manager, change the official manager's package id in Settings. Then, install the Alt-Repo manager afterwards. 17 | 18 | # Play Protect 19 | Since we are using an unofficial keystore to sign the patched APK, Google Play Protect will warn you that the developer is not know to Google and that it was signed unofficially. If you are uncomfortable with this, sign the APK manually with a trusted keystore. 20 | 21 | # Disclaimer 22 | Please note that the modules that you install from the Alt-Repo come with zero required support and is entirely under your responsibility. We cannot guarantee that all modules are safe and functional, although we try to. Be careful with what you choose to install and ensure that your device is compatible with any modules that you install. 23 | 24 | # Releases 25 | We have prepatched the Magisk Manager (stable releases) for you for convenience. We have setup a GitHub Workflow that patches the Magisk Manager APK directly from topjohnwu's official releases page. The Workflow will check for Magisk Manager updates once every 12 hours at exactly 00:00 UTC and 12:00 UTC. 26 | --------------------------------------------------------------------------------