为什么:
1.体验下如何编译面具源码
2.魔改面具-绕过更深的root检测
1.ubuntu 虚拟机下载地址
http://mirrors.aliyun.com/ubuntu-releases/20.04/
github:https://github.com/topjohnwu/Magisk
编译根据这篇文章做好前缀下代码工作
https://zhuanlan.zhihu.com/p/385255256
编译踩坑记录:
https://blog.csdn.net/u012932409/article/details/123001265
Unresolved reference: transferTo
根据 https://github.com/topjohnwu/Magisk/issues/4712
Change transferTo to copyTo 这样修改就OK
2.
需要配置最新的 as
到这一步 我们可以用虚拟机里面的 Android studio打开Magisk目录。等他自己先加载一阵子
解决方案:https://blog.csdn.net/qq_41105058/article/details/122891183
error: linker cc
not found
|
= note: No such file or directory (os error 2)
error: could not compile syn
due to previous error
error: could not compile quote
due to previous error
error: could not compile proc-macro2
due to previous error
error: failed to compile cxxbridge-cmd v1.0.72 (/home/muyang/Desktop/Magisk/native/src/external/cxx-rs/gen/cmd)
, intermediate artifacts can be found at /home/muyang/Desktop/Magisk/native/src/external/cxx-rs/target
解决方法:
在终端执行以下命令:
sudo apt update
sudo apt install build-essential
https://blog.csdn.net/love906897406/article/details/126070786
接下来执行
./build.py all
就可以了
安装提示这个 建议重新刷机 或者 之前的面具没卸载干净 重新装回来重新卸载
刷面具的另外一种方式:
修补boot
https://www.bilibili.com/video/BV1UN4y137Z5/?spm_id_from=333.337.search-card.all.click&vd_source=43c2c404de6d798650d44c856ee1e992
6.魔改
https://mp.weixin.qq.com/s/epbJfjnO8x6Wenwo61uj4A
1.将su 修改为 mysu 可以躲过一定的root检测
1.
路径 /home/muyang/Desktop/mogai/Magisk/native/src/include/magisk.hpp
constexpr const char *applet_names[] = { "su", "resetprop", nullptr };
su -> mysu
2.
路径 /home/muyang/Desktop/mogai/Magisk/native/src/core/applets.cpp
constexpr Applet applets[] = {
{ "su", su_client_main },
{ "resetprop", resetprop_main },
};
su -> mysu
改完编译后会发现一个问题。mysu可以用了,但是
超级用户和模块功能不能使用了。
完整版本资料领取视频及魔改面具领取:https://www.bilibili.com/video/BV1hK411Z7cd