How to Root Your Android Phone with Magisk

853
How to Root Your Android Phone with Magisk

Here we can see “How to Root Your Android Phone with Magisk”

What Exactly Is Magisk?

Magisk is a tool created by topjohnwu that allows you to root your Android device easily. It’s a Systemless root method that makes changes to the Android system without actually changing it. It’s a clever way to deceive Google’s SafetyNet, in layman’s terms.

Consider Magisk to be that one kid in school who pretends to be absent even though he is always present. Magisk exploits Google’s SafetyNet, an API that can detect whether or not your phone is rooted. As a result, it disables specific apps to prevent malicious attacks on your device.

Magisk APK download or Magisk root APK are not available, unlike Kingo root APK, a one-tap rooting solution for Android 5.0 or lower. You’ll need to use a custom recovery to flash the Magisk zip.

Modules for Magisk

Communities are enthralled by more than just rooting. Magisk Modules for specific devices can be installed in a matter of minutes to add new features.

FOR EXAMPLE, when I bought a Redmi K20 Pro, I was disappointed that stereo speakers (dual-speakers) were not included. Coming from a Pixel 2 XL, I was always frustrated by the lack of stereo speakers; as a result, I went to the XDA-Developers forums and discovered a module that enabled stereo speakers.

It’s not just limited to stereo speakers, either. If your device has good developer support, you can install a lot of other modules.

Also See:  Error 97 SMS Origination Denied

How Do I Use Magisk To Root?

Is installing Magisk risky? Yes, absolutely. You should be fine if you know exactly what you’re doing.

Everything appears to be simple until you look at the installation section. Don’t get me wrong: installing Magisk isn’t rocket science. However, if you’re a beginner who’s trying it out for the first time, you might end up with bricked/dead devices if you make a mistake.

The rooting process may vary depending on various factors, including your phone’s SoC, the device’s manufacturer, and developer support. This article will show you how to root a device with a Qualcomm Snapdragon processor, Official Custom Recovery support (TWRP, Orangefox, or SHRP), and A-partition only (no A/B partitions) using TWRP, Orangefox, or SHRP. Please let us know if you’d like an article on the subject).

Installing Magisk is simple.

Step 1: Identifying the boot image type

The Magisk app is available for download from the project’s GitHub repository. Because Magisk’s APK is not hosted on the Google Play Store, you may need to first allow sideloading apps from unknown sources before manually installing the downloaded package.

Open the Magisk app after it has been installed.

The values of the following parameters must now be written down:

  • Ramdisk
  • Ramdisk A/B
  • SAR

Step 2: find the boot image.

You must extract the boot image for your device from the official firmware packages to patch it. If you’re running a custom ROM like LineageOS, the boot image is contained in the flashable ZIP file.

Case 1: You have access to the ZIP file that can be flashed for recovery.

If your device still uses the A-only partition scheme, you can find the ‘boot.img’ right inside the recovery-flashable ZIP file. Use a suitable archiver program to extract it.

If your device uses the A/B partition scheme, the boot image and other partition images are combined into a single file called payload.bin.

This fork, dubbed ‘payload-dumper-go,’ even allows end-users to extract a single partition image without unpacking the entire payload.bin, which is especially useful in this scenario.

  • First, use the -l parameter to display a list of the partition images contained within the payload. bin.
payload-dumper-go -l payload.bin
  • Then, to extract the boot image, use the -p parameter with the name of the boot image (commonly stored as “boot”).
payload-dumper-go -p boot payload.bin

Case 2: You have the Fastboot-flashable image.

A few manufacturers, such as Google and Xiaomi, provide factory images that can be flashed using Fastboot. If you could obtain such a package, you can easily extract the raw ‘boot.img’ from the archive.

Step 3: Applying a patch to the boot image

Now that we have the boot image, we can begin the patching process.

Case 1: The “Ramdisk” parameter is set to “Yes.”

  • To install the boot image, copy it to your device. You can patch it on a different Android device than the target one, but you’ll need to install the Magisk app on both.
  • On the Magisk card, press the Install button.
  • Select the stock boot image under method and select Select and Patch a File.
  • The image will be patched and saved to [Internal Storage]/Download/magisk patched [random strings].img by the Magisk app.
  • Using ADB, copy the patched image to your PC:
adb pull /sdcard/Download/magisk_patched_[random_strings].img
  • Your device will need to be flashed with the patched boot image. Reboot into Fastboot mode and flash with the following command for most devices:
fastboot flash boot /path/to/magisk_patched.img
  • Restart your computer and enjoy Magisk!
Also See:  Samsung smartwatches rise to third spot in global market in Q2 2021

Keep in mind that on legacy devices with boot ramdisk, you can patch the boot image on the fly using a custom recovery like TWRP, but this method is no longer recommended on modern devices. Having said that, if you have an old phone and want to use the custom recovery method, follow these steps:

  • The Magisk APK can be downloaded here.
  • Change the extension of the.APK file to.ZIP (e.g., Magisk-v23.0.APK to Magisk-v23.0.ZIP).
  • Flash the ZIP file in the same way you would any other flashable ZIP.
  • It’s worth noting that the sepolicy.rule file for modules may be saved in the cache partition, so don’t delete it.
  • Check to see if the Magisk application is installed. Install the APK manually if it isn’t installed automatically.

Case 2: The “Ramdisk” parameter is set to “No.”

In this case, instead of boot.img, you must locate the recovery.img file from your device’s factory image. This is because Magisk must be installed in the recovery partition, which means you’ll have to boot into recovery mode every time you want to use Magisk.

  • Obtain the recovery image and save it to your device (or a secondary device with the Magisk app installed).
  • On the Magisk card, press the Install button.
  • Select the stock recovery image from the Select and Patch a File menu.
  • The image will be patched using the Magisk app.
  • [Internal Storage]/Download/magisk_patched_[random_strings].img.
  • Using ADB, copy the patched image to your PC:
adb pull /sdcard/Download/magisk_patched_[random_strings].img
  • Download and install the patched recovery image on your device. Reboot into Fastboot mode and flash with the command: 
fastboot flash recovery /path/to/magisk_patched.img
  • Reboot.

There are three possible scenarios at this point:

  • If you power up normally, you won’t get any Magisk.
  • Recovery Key Combo → Splash screen → Release all buttons: The system should boot with Magisk.
  • Recovery Key Combo → Splash screen → Keep pressing volume up: To access the stock recovery mode.

Samsung is an exceptional case.

  • To your device, copy the extracted AP tar file.
  • On the Magisk card, press the Install button.
  • If your device lacks a boot ram disk, check Recovery Mode in the options menu.
  • Select the AP tar file under method and select Select and Patch a File.
  • The Magisk app will patch the entire firmware file to[Internal Storage]/Download/magisk patched [random strings].
  • tar
  • Using ADB, copy the patched tar file to your PC:
adb pull /sdcard/Download/magisk_patched_[random_strings].tar
  • Don’t try to copy large files over the MTP interface because it has corrupted them.
  • Restart your computer in download mode. Open Odin on your PC and flash magisk patched.tar as AP, along with the original firmware’s BL, CP, and CSC.
  • Because we want to wipe data, don’t select HOME CSC.
  • Odin should reboot your device automatically once it’s finished flashing. If asked, agree to perform a factory reset.
  • If your device doesn’t have a boot ram disk, you’ll need to reboot to recovery to enable Magisk.
  • Install and run the most recent Magisk app. It should pop up a dialogue asking for more information. Allow the app to complete its task, and your device will be automatically rebooted.
  • Restart your computer and enjoy Magisk!

Step 4: Verification 

The final step is to double-check that everything is in working order. Open the Magisk app that you just installed. Next to the “Installed” parameter, we want to see a version number. This indicates that Magisk has been successfully installed. You did an excellent job!

It’s time to try out some Magisk Modules now that you’ve got Magisk installed. There are many modules available for specific purposes, and because Magisk grants root access, you can also install some of the best apps for rooted devices. So go ahead and install whatever apps and modules you want and start tweaking!

Making use of Magisk

Magisk is a root management, root app installation, and more all-in-one solution. Consider it a combination of SuperSU and Xposed, all in a neat, tidy package. It’s fantastic.

The app is simple to use and understand, especially if you’ve previously used a rooted phone. Here’s a quick rundown of the menu, which can be accessed by swiping in from the app’s left-hand side:

  • Status: This displays the current version, as well as the root and SafetyNet.
  • Install: To install Magisk from the app directly. This is useful when you’ve completed the initial setup and want to keep Magisk up to date.
  • SuperUser: This is Magisk’s SuperSU section.
  • Modules: The Magisk modules that are currently installed.
  • Downloads: This is where you can get Magisk modules.
  • Log: This is the log for the root request.
Also See:  Took Too Long to Start Xbox One Error

You’ll also find some cool but more advanced options if you go into the Settings menu. Here’s a rundown of what each of them does:

  • Dark Theme: Changes the appearance of the app.
  • When a new version of Magisk becomes available, you’ll receive a push notification.
  • Refreshes the app repository by clearing the repo cache.
  • Magisk in its most basic form, with only superuser, hide, systemless hosts, and busybox. If your device fails the SafetyNet check, turn this on.
  • Enable Busybox: Busybox is mounted.
  • Magisk Hide: Protects Magisk from known detections used by some apps to prevent access due to root status.
  • Adblock apps use Systemless Hosts.
  • SuperUser Access: Select which services are eligible for superuser access requests. Apps, ADB, both, or completely disable SuperUser.
  • Automatic Response: Automatically prompt, approve, or deny superuser requests.
  • Request Timeout: The amount of time Magisk waits before denying a request.
  • Notification to SuperUsers: It’s toast or nothing. When an app is given superuser permissions, this message appears.
  • Advanced debug logging is enabled, as well as verbose logging. For the most part, this is probably not required.
  • Enable shell command to debug logging: Allows shell commands and their output to be logged. Again, most users are unlikely to require it.

Except for Magisk Hide, most of these are passively enabled (that is, they operate in the background). Once enabled, a new option called Magicisk Hide will appear in the menu. You’ll tell Magisk which apps to hide its presence (and status) from in this section. Android Pay is selected by default, but you can choose any other app that won’t work on a rooted device, such as Netflix or Pokémon Go.

Apps like Android Pay won’t work until you fix this, regardless of Magisk Hide status, if your device doesn’t pass the SafetyNet check (as mine didn’t at first). If you’re running June security patches on your device, you’ll need to enable Magisk Core Only mode in Settings (and then reboot) for it to pass SafetyNet. All Magisk Modules will be disabled, but all root functions and BusyBox will continue to function.

Conclusion

I hope you found this information helpful. Please fill out the form below if you have any questions or comments.

User Questions:

1. Is it safe to root with Magisk?

The Magisk is unharmed. Much like the hammer and sickle, the Magisk and the modules available can be abused by users when used for purposes outside of its scope. If that’s what you meant, it’s also not malware.

2. Does Magisk have a root?

Magisk is a tool created by topjohnwu that allows you to root your Android device easily. It’s a Systemless root method that makes changes to the Android system without actually changing it.

3. Is Magisk still alive?

What’s the good news? The project is far from dead. Magisk will be available for the foreseeable future. Google will “review with extra scrutiny” Wu’s continued participation in the community, he claims.

4. What is Magisk? / Get Magisk! / Official Download and Install Magisk!

What is Magisk? / Official Download and install Magisk! / Get Magisk! from Magisk

Also See:  instagram oops an error occurred

5. Do I require the installation of Magisk Manager? Is this just a case of magisk? A magisk app does prompt me to grant root access. However, I am unable to open the app to view root access logs. There isn’t such a thing as an app. I recall the app having a side menu. However, I am unable to locate such a menu at this time.

[Help] I’m so confused. Do I need to install magisk manager? Is this just magisk? I do get prompts to allow root access from a magisk app. But I can’t open the app to see root access logs. There is no such app.. I remember a sidemenu for the app. But can’t find such a menu now from Magisk