The biggest obstacle to rooting is that it usually requires a computer. It gets complicated when you try to use a desktop operating system to operate a mobile operating system, and the connection is not always reliable. But with the help of Magisk you can now use one Android phone to root another one.
To realize this, you have to use ADB and Fastboot commands, tools that were removed in an earlier version of Android. The good news, though: there is now a Magisk module that brings back that functionality that had been taken away so long ago. Developers osm0sis and Surge1223 made this possible through their work on the module, so a big thank you to them.
What you need
Using the already rooted Android device, go to Magisk Manager, tap the menu on the left and then go to "Downloads" . Press the search icon and type "adb" to open the ADB & Fastboot module you need for this guide. Press the download arrow, go to "Install", then it will start installing on your device. When that is done, tap "Restart" to restart and activate the module.
To install Magisk without a computer or TWRP access, rely on the manual method of getting the boot image file from a factory image package. Make sure to download the factory images specific to the version of Android on your secondary device. It is also wise to do this from the device on which Magisk Manager is already installed.
Once you have the factory images package, you just want to extract the file boot.img and then discard the rest. For Google and Motorola phones, you can do this with any file browser app that supports ZIP extraction. For OnePlus phones, you need to use a PC tool to extract the boot.img file from the payload.bin file that you can download.
Step 3: Patch the boot image with Magisk
Now it's time to take the factory image file you downloaded for your secondary device and extract its contents. Again, make sure to perform this step on your already rooted device so you can patch the file to gain root access. Follow the few quick instructions below and you'll have your patched boot image file in no time.
- Locate the "boot.img" file you extracted in step 2 and move it to the "Download" folder.
- In Magisk Manager, tap "Install" next to "Magisk is up to date".
- Tap "Install" in the popup.
- Choose "Select a file and patch it."
- Use the file selector to select the boot.img file in the "Download" folder.
- Tap the back arrow and exit Magisk Manager when done.
To use ADB and Fastboot commands on Android, you need a terminal app on your rooted device so that you can transfer the Magisk file to your secondary device send. Easily one of the best terminal apps on Android, Termux has everything you need and more. Click the link below on your rooted device to get Termux.
- Play Store Link: Termux (Free)
Step 5: Enable USB Debugging  Go for this Step to your secondary device to enable developer options and enable USB debugging. Doing so will allow your two Android devices to communicate with each other via a USB connection. This process is generally the same regardless of which version of Android you have, but you can refer to the guide below if you need more help with this part.
Step 6: Connect the 2 Android Devices
With all different manufacturers and versions of Android it can sometimes be confusing which accessories you need in certain situations. To help you with this, you can quickly determine which cables or adapters you will need based on what your secondary device uses. That makes it very simple. If you need any of these accessories, you can get them from the Amazon links below.
Now that your two devices are connected via USB, you need the USB debugging permission to allow access to your secondary device. Once you plug in the devices, a pop-up should immediately appear, but if not, unplug the secondary device's USB cable and plug it in again to try again. Now tap "Always allow this computer", followed by "OK" to confirm the selection.
Step 8: Grant Root Access  This part is fast, but it is crucial nonetheless. You must grant root access to Termux so that you can send the commands needed to install Magisk on your secondary device. On the already rooted device, open the Termux app, type the following command, then hit enter.
This will trigger a Magisk superuser request and is always required when executing higher level system commands. You must type the "su" command every time, but you do not need to grant access to the superuser request again.
Once you grant Superuser access to Termux, you must ensure that the two devices are actually communicating correctly. To double check this before proceeding with the guide, type the following command on the rooted device via Termux and hit enter.
If everything checks out after you enter the above command, the "Device List" attached "line should generate a unique ID specific to your connected device.
Now you need to put the device in Fastboot mode before you can do anything else after this point.You should always put the device in this mode when you want to run Fastboot commands of any kind.
adb reboot bootloader
The command here the secondary device will tell to reboot into its boot loader menu, which is often called “Fastboot Mode.”
From here you need to tell Termux where it Magisk-b is exactly located so that you can send it to your secondary device. Using the same terminal window on your rooted device, type the following command and then hit enter.
cd / sdcard / Download
The command will redirect Termux to point to the "Download" folder, where we chose to save the required "magisk_patched.img" file. So make sure you type the folder location exactly as it appears; otherwise the next step will not work correctly.
Finally on the best part of this entire guide – it's time to install Magisk on your secondary device. On your rooted device with the terminal, type the following command and then hit enter.
fastboot flash boot magisk_patched.img
The command will immediately send and install the magisk_patched.img file to your device, which gives you root
When that's done, type the following command and then hit enter.
fastboot reboot  Your device automatically reboots to Android, which means that installing Magisk was a success. At this point, you can safely disconnect the USB cable or OTG adapter and install Magisk Manager as usual. Now you know how to install Magisk without using a computer or having TWRP access anyway. This method is certainly useful for different situations. Have fun with modding!
Want to Help Support Gadget Hacks and Get a Great Deal on Some Great New Technology? View all deals for the new Gadget Hacks Shop .