Skip to content

Instantly share code, notes, and snippets.

@manero6
Created September 21, 2023 13:29
Show Gist options
  • Save manero6/c896294bbf692aa4a1ae2284270ac4ba to your computer and use it in GitHub Desktop.
Save manero6/c896294bbf692aa4a1ae2284270ac4ba to your computer and use it in GitHub Desktop.

Revisions

  1. manero6 created this gist Sep 21, 2023.
    70 changes: 70 additions & 0 deletions sideload-magisk.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,70 @@
    # Install Magisk via Sideload

    πŸ’» => the device running `adb` (usually a PC)
    πŸ“± => the device where Magisk is going to be installed (usually a Phone or Tablet)

    - [πŸ“± Install Magisk App](#-install-magisk-app)
    - [πŸ’» Download Magisk](#-download-magisk)
    - [πŸ’» Rename .apk to .zip](#-rename-apk-to-zip)
    - [πŸ’» Reboot device in Sideload mode](#-reboot-device-in-sideload-mode)
    - [πŸ’» Sideload Magisk](#-sideload-magisk)
    - [πŸ“± Complete the Magisk installation (if needed)](#-complete-the-magisk-installation-if-needed)


    ## πŸ“± Install Magisk App

    The app can be found on F-Droid:

    - https://f-droid.org/en/packages/com.topjohnwu.magisk

    ### Notes

    - πŸ“± if an older version is installed, update it directly from the Magisk app

    ## πŸ’» Download Magisk

    Download the latest Magisk `.apk` from the official GitHub repo:

    - https://github.com/topjohnwu/Magisk

    ## πŸ’» Rename .apk to .zip

    ```bash
    mv Magisk.VERSION-NR.apk Magisk.VERSION-NR.apk.zip
    ```

    ## πŸ’» Reboot device in Sideload mode
    ```bash
    sudo adb reboot sideload
    ```

    ### Notes

    - πŸ“± USB debugging mode must be active (under Settings > Developer Options)
    - πŸ“± the device running `adb` (πŸ’») must be approved on the receiving device (πŸ“±), else no actions will be taken
    - πŸ’» in case something goes wrong, kill the running server and start over
    ```bash
    sudo adb kill-server
    ```

    ## πŸ’» Sideload Magisk

    ```bash
    sudo adb sideload /path/to/Magisk.VERSION-NR.apk.zip
    ```

    ### Notes

    - πŸ“± signature verification might fail, I bypass it to install Magisk anyway
    - πŸ’» `adb` might show something like `Total xfer: 0.90x`, this is fine
    - πŸ“± reboot to system once done

    ## πŸ“± Complete Magisk installation (if needed)
    Magisk might need to be re-installed "internally".
    This can be done directly from the app.

    ### Notes

    - πŸ“± a popup will appear
    - πŸ“± re-install Magisk using the recommended option
    - πŸ“± once done a reboot option will be shown, reboot