apatch/docs/cn/faq_cn.md
2026-01-04 20:10:16 +01:00

47 lines
2.1 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 常见问题解答
## 什么是APatch
APatch是一种类似于Magisk或KernelSU的root解决方案但APatch提供更多功能。
APatch分别结合了Magisk方便易用的通过`boot.img`安装的方法和KernelSU强大的内核修补能力。
## APatch与Magisk的区别
- Magisk对启动映像中的ramdisk进行补丁以修改init系统。而APatch则直接修补Linux内核。
## APatch与KernelSU的区别
- KernelSU需要您设备的内核的源代码而OEM并不总是提供该源码。而APatch仅需要您的设备原本的`boot.img`
## APatch与Magisk、KernelSU的区别
- APatch可选择不修改SELinux这意味着Android应用程序线程可以被root无需libsu和IPC。
- APatch提供**Kernel Patch ModuleKP模块**。
## 什么是Kernel Patch ModuleKP模块
一些代码在内核空间运行类似于Loadable Kernel ModulesLKM
此外KPM提供在内核空间进行内联hook、系统调用表hook的能力。
更多相关信息,请参阅[如何编写KPM](https://github.com/bmax121/KernelPatch/blob/main/doc/module.md)
## APatch与KernelPatch的关系
APatch依赖于KernelPatch继承了其所有功能并进行了扩展。
您可以仅安装KernelPatch但如此将不允许您使用Magisk模块。
要使用超级用户管理您需要安装AndroidPatch然后卸载KernelPatch。
[了解更多关于KernelPatch的信息](https://github.com/bmax121/KernelPatch)
## 什么是SuperKey超级密钥
KernelPatch 添加了一个新的系统调用syscall为应用程序和用户空间中的程序提供所有功能此系统调用称为SuperCall。
当应用程序/程序尝试调用SuperCall时它需要提供访问凭据称为SuperKey。
只有当SuperKey正确时才能成功调用 SuperCall。否则调用方将不受影响。
## 关于SELinux如何处理
- KernelPatch不修改SELinux上下文而是通过hook绕过SELinux。 这允许您在应用程序上下文中root Android线程无需使用libsu启动新进程然后执行IPC。这非常方便。
- 此外APatch直接利用magiskpolicy提供额外的SELinux支持。