链接里的教程说的很明白啊,你如果不懂的话,我可以大概给你捋下思路
附上原文步骤,加上部分翻译
Step 1 First of all we need Stock boot image so take it from Stock ROM or Follow this Guide to backup unRooted Stock ROM Here
or Here is Official Firmware first Flash it then take boot.img File Here
第一步,大概说的是我们需要备份一下没有root之前的ROM,然后从官方包里拿到boot.img
Step 2. Now Flash Downloaded official Firmware using the Listed Guide on Firmware page.or Skip if you have Dumped Firmware.
第二步,刷官方包(从引导里下载的,原页面有链接)
Step 3. after that fully bootup your Phone. then transfer Magisk Manager.apk file to Your Phone and Install it.
第三步,等手机起来以后,安装magisk apk,为root做准备
Step 4. then transfer boot.img file from Firmware folder to phone.
第四步,把前边从官方包里拷出来的boot.img放到手机里
Step 5. turn Data Connection on and Run Magisk Manager,
第五步,打开数据连接或者WiFi,然后打开刚刚安装的magisk
Step 6. wait Some time When it say update Magisk. then Click Patch boot.img File
第6步,打开提示安装magisk,点确定,然后选择修改boot镜像文件,这里上两张图
Screenshot_2019-01-06-11-52-22-713_com.topjohnwu.magisk.png (113.72 KB, 下载次数: 4)
2019-1-6 11:53 上传
Screenshot_2019-01-06-11-52-28-265_com.topjohnwu.magisk.png (103.8 KB, 下载次数: 3)
2019-1-6 11:53 上传
Step 7. then Point Stock boot.img file in Magisk [transfer to Phone in earlier step]
第7步,然后找到你之前从官方包里弄出来拷到手机上的boot.ing镜像
Step 8. and Wait while Magisk patch it. Done Patched_boot.img Placed in Magisk folder of Phone’S Storage. transfer this file to Your PC.
第8步,等到修补完成,屏幕上会有显示,修补完成的boot镜像叫做patched_boot.img,这里补充一点,老版本放在magisk文件夹下,新版本放在download文件夹下,屏幕上都有显示,自己能找到就行,然后把这个修补后的boot镜像拷出来,然后刷进去就有root权限了
Step 9. Now We have 2 way to Flash it First via flash tools and Second Via fastboot..
第9步,现在我们有两种方法刷这个修补后的boot镜像,
1,通过高通工具QFIL
2,通过fastboot
Step 10. For flash tools:
Copy Patch.xml
rawprogram_unsparse.xml
and Programer from firmware folder to another folder
Place rooted boot.img in this folder [must rename it boot.img]
edit rawprogram_unsparse.xml and keep boot partition only and remove all other partitions
Run QFIL load File from This folder [ New Folder Where We copy files]
reboot phone to edl and Flash Rooted boot.img with QFIL
最后一步,网站上演示的是用QFIL的方法,虽然我也会,但是太复杂,想学习的我们可以开贴继续讨论,这里不做详细描述
我们以用fastboot为例,来说明怎么刷进去,工具啥的原网站都有,或者Android官方网站,都有adb工具包,下载解压后,在adb所在的目录,按住shift,右键,有个在此处打开命令行或者powershell,都可以,打开后,手机进入fastboot,输入
fastboot flash boot patched_boot.img
注意,这里的boot.img必须是完整路径,不会操作的话直接把文件拖到命令行窗口
点回车,刷入完毕,重启后就有root权限了,还是在magisk里授权
手机上纯手打,还望大家多多评分支持。。。有不懂的可以继续追问