工具
-
模拟器
-
ADB
brew install android-platform-tools

set


import cert
# cer 证书转为 pem 证书
openssl x509 -inform DER -in cacert.der -out cacert.pem
# 获取证书的 hash 值
hash=$(openssl x509 -inform PEM -subject_hash_old -in cacert.pem | head -n 1)
# 将 pem 证书改成 hash + .0 的格式
new_hash="${hash}.0"
mv cacert.pem "$new_hash"
# 将证书直接放到系统证书文件夹下
adb push "$new_hash" /system/etc/security/cacerts/



install magisk
下载地址:https://github.com/HuskyDG/magisk-files/releases

要开启系统代理才有这个选项


adb connect 127.0.0.1:5555
adb shell
su
# 将之前冲突的 su 相关文件直接备份一下
mv /system/xbin/su /system/xbin/su.bak
mv /system/app/SuperUser/ /system/app/SuperUser-Bak/

issue
#安装完面具后设置打不卡
需要到设置页面找到隐藏Magisk修改为其他名称,原因是因为settings重名

#拖动应用无法安装
这算是安装完面具的一个bug吧,得使用终端通过命令行进行安装
adb install apk包名