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.
Step-by-step guide on how I install Magisk using adb

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

The app can be found on F-Droid:

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:

πŸ’» Rename .apk to .zip

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

πŸ’» Reboot device in Sideload mode

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
    sudo adb kill-server

πŸ’» Sideload Magisk

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
@bege10
Copy link

bege10 commented Dec 8, 2024

Thank you very much! This saved me after installing (not yet rebooting!) an OTA-update of /e/OS custom ROM killed the running system. So I could not patch the inactive slot with the Magisk App. Your description worked perfect. ❀️
The phone was still reachable via adb. (At the second time I used this procedure I had to lock and unlock the phone to have it reachable with adb.) I first rebooted to sideload mode and installed Magisk as described and afterwards rebooted to the new system.

@miguelzinn0132
Copy link

how to disable signature verification without a custom recovery?

@bege10
Copy link

bege10 commented Jan 2, 2025

how to disable signature verification without a custom recovery?

Here this was not necessary. I just accepted the verification failure during installation and everything worked well.

@manero6
Copy link
Author

manero6 commented Jan 12, 2025

you welcome @bege10 I'm glad this was helpful :)

@bege10
Copy link

bege10 commented Jan 12, 2025

you welcome @bege10 I'm glad this was helpful :)

πŸ‘
BTW, I forgot to rename the apk to zip and it still worked. It seems not to be necessary.

@YTKusho
Copy link

YTKusho commented Feb 16, 2025

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment