background
Since the advent of Android, to get the phone ROOT privileges became a topic of playing machine enthusiasts commonplace. We have cell phones, but can not have the highest authority operation of the phone, which for the mobile phone lovers, how can it endure? So no matter what version of Android rose, someone wants to get the phone ROOT privileges. However, the process of acquiring ROOT privileges after all the trouble, even if you are lofty, for some phones you get it or not. For ROOT difficult, difficult to modify the system, @ topjohnwu big brother made a great thing: Magisk. It solves the difficult ROOT, modify the system difficult problem. As used herein, Magisk, speaking about for a generic way ROOT privileges.
ready
(1) download MagiskManager installed to the phone
https://github.com/topjohnwu/Magisk/releases
(2) use a computer to download their own cell phone package Brush, Brush package must be mobile phones currently in use. After the download is good, the boot.img extract out of standby
(3) Download adb and fastboot, unpack it, specify a directory on your computer, and placed in an environment variable
https://www.lanzous.com/i7iuidg
(4) unlock (bootloader lock) mobile phone, check the USB debugging in the developer options
Operating procedures
In the PC Explorer, you boot.img storage directory, type cmd in the Explorer address bar and press Enter
Cmd in the pop-up window, enter the following command and press Enter:
adb push boot.img /sdcard
boot.img it will be sent to the phone.
On the phone, open MagiskManager
Click Magisk not installed behind the install button
Click the install button
Select Select and repair a file , locate and select we just sent to your phone boot.img in the file manager
修补完成,在/sdcard/Download
目录下生成一个名为magisk_patched.img
的文件,这就是被Magisk处理过的boot.img。在cmd窗口输入以下命令并回车,把文件发送回电脑:
adb pull /sdcard/Download/magisk_patched.img
在cmd窗口输入以下命令并回车,手机会自动重启进入bootloader模式:
adb reboot bootloader
在cmd窗口输入以下命令并回车,刷入Magisk处理过的boot镜像:
fastboot flash boot magisk_patched.img
刷入成功后,在cmd窗口输入以下命令并回车,重启手机:
fastboot reboot
手机重启完成后,打开Magisk Manager,发现Magisk已经安装成功了。这说明手机已经获得ROOT权限
问题解决
如果刷入修改后的镜像,发现没法开机,那也不要慌,手动进入bootloader模式,在cmd窗口输入以下命令并回车,刷入原来的镜像:
fastboot flash boot boot.img
但是这也意味本文的这种方式并不能帮助你获得ROOT权限,你可以去Magisk项目下提issue,也许其他人能帮到你。