《安卓逆向》Magisk的编译踩坑记录-安装方法-分享魔改后的Magisk过root检测方法

为什么:
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目录。等他自己先加载一阵子

  • What went wrong:
    Could not determine the dependencies of task ‘:stub:compileDebugJavaWithJavac’.
    Failed to install the following Android SDK packages as some licences have not been accepted.
    build-tools;32.0.0 Android SDK Build-Tools 32
    To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.
    All licenses can be accepted using the sdkmanager command line tool:
    sdkmanager.bat --licenses
    Or, to transfer the license agreements from one workstation to another, see https://developer.android.com/studio/intro/update.html#download-with-gradle

解决方案: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

  1. 接下来执行
    ./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

  • 2
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

和沐阳学逆向

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值