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


    为什么:
    1.体验下如何编译面具源码
    2.魔改面具-绕过更深的root检测

    1.ubuntu 虚拟机下载地址

    http://mirrors.aliyun.com/ubuntu-releases/20.04/
    
    • 1

    github:https://github.com/topjohnwu/Magisk

    编译根据这篇文章做好前缀下代码工作

    https://zhuanlan.zhihu.com/p/385255256
    
    • 1

    编译踩坑记录:

    https://blog.csdn.net/u012932409/article/details/123001265
    
    • 1
    Unresolved reference: transferTo
    根据  https://github.com/topjohnwu/Magisk/issues/4712
    
    Change transferTo to copyTo   这样修改就OK
    
    • 1
    • 2
    • 3
    • 4

    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
    
    • 1
    • 2
    • 3

    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
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12

    改完编译后会发现一个问题。mysu可以用了,但是
    在这里插入图片描述

    超级用户和模块功能不能使用了。
    在这里插入图片描述

    完整版本资料领取视频及魔改面具领取:https://www.bilibili.com/video/BV1hK411Z7cd

  • 相关阅读:
    Docker系列九——安装Nacos1.4.2
    高斯公式证明
    Django学习记录04——靓号管理整合
    Running “flutter pub get“ in xxx... 报错: Git error 443
    前端生成海报图技术选型与问题解决
    【debian 12】:debian系统切换中文界面
    国庆将至,景区游客爆满体验差,导览系统轻松解决问题
    STM32H7 USART 时钟初始化
    【疑难攻关】——XXE漏洞快速入门
    整形数组合并【JS】
  • 原文地址:https://blog.csdn.net/qq_41155858/article/details/127885048