https://github.com/topjohnwu/Magisk/
A Riru / Zygisk module trying to provide an ART hooking framework which delivers consistent APIs with the OG Xposed, leveraging LSPlant hooking framework.
Xposed is a framework for modules that can change the behavior of the system and apps without touching any APKs. That’s great because it means that modules can work for different versions and even ROMs without any changes (as long as the original code was not changed too much). It’s also easy to undo. As all changes are done in the memory, you just need to deactivate the module and reboot to get your original system back. There are many other advantages, but here is just one more: multiple modules can do changes to the same part of the system or app. With modified APKs, you have to choose one. No way to combine them, unless the author builds multiple APKs with different combinations.
Android 8.1 ~ 14
Note: debug builds are only available in Github Actions.
Only bug reports from THE LATEST DEBUG BUILD will be accepted.
- GitHub issues: Issues
- (For Chinese speakers) 本项目只接受英语标题的issue。如果您不懂英语,请使用翻译工具
Developers are welcome to write Xposed modules with hooks based on LSPosed Framework. A module based on LSPosed framework is fully compatible with the original Xposed Framework, and vice versa, a Xposed Framework-based module will work well with LSPosed framework too.
We use our own module repository. We welcome developers to submit modules to our repository, and then modules can be downloaded in LSPosed.
Notice: These community groups don’t accept any bug report, please use Get help to report.
You can contribute translation here.
LSPosed is licensed under the GNU General Public License v3 (GPL-3) (http://www.gnu.org/copyleft/gpl.html).
IContentProvider
for Android P and belowParcel
setOverrideTable
address on some devicesLoadedApk
s not calling onPackageLoad
XSharedPreferences
IContentProvider
Parcel
setOverrideTable
地址LoadedApk
没有回调 onPackageLoad
XSharedPreferences
的路径错误@rawer886 @Howard20181 @yujincheng08 @Dr-TSNG @naicfeng @vvb2060
Full Changelog: https://github.com/LSPosed/LSPosed/compare/v1.9.1...v1.9.2
helper
). We hope developers can test the new API to provide feedback on possible issues. The modern API will be published to Maven Central with the release of LSPosed 2.0.0, so before this, you can make suggestions to help make it better.android
package besides system_server
(See this commit): For historical reasons, the package name of system_server
was changed to android
(See this commit from rovo89). To correct this behavior, for legacy modules, no code adjustment is needed, but the system framework is displayed as system
instead of android
in manager, with a new package android
which is responsible for system dialogs, etc. For modern modules, the meaning of system
and android
in the declared scope have the same meaning as they display in manager.processName
for handleLoadedPackage
's lpparam
isFirstPackage
for afterHookedMethod
getModule()
return valueAfterHooker
class nameLoadedApks
rather than allIActivityManager.bindService
for Android 14helper
)。我们希望开发者能够测试新 API,并提供反馈以解决可能存在的问题。现代 API 将在 LSPosed 2.0.0 发布时发布到 Maven Central,因此在此之前,您可以提出建议以帮助改进它。system_server
外的 android
进程(查看此提交):
由于历史原因,system_server
的包名被更改为 android
,ChooserActivity
等系统UI的包名被更改为 system
(请参阅 rovo89 的此提交)。为纠正此行为,管理器作用域界面中的 system
和 android
的含义现与它们的实际含义相同。我们保留传统模块代码层面的相反含义,但现代模块已得到更正。handleLoadedPackage
的 lpparam
中的 processName
afterHookedMethod
的 isFirstPackage
getModule()
返回值引起的 NPEAfterHooker
类名中的拼写错误LoadedApks
而不是全部清除IActivityManager.bindService
@libxzr @yujincheng08 @Howard20181 @vvb2060 @Dr-TSNG @naicfeng @aviraxp @StefMa @delvinru @5ec1cff @anonymix007 @JasonKhew96
Full Changelog: https://github.com/LSPosed/LSPosed/compare/v1.8.6...v1.9.1
This version was replaced by v1.9.1 due to a signature error
As Android version iterates, the original Xposed API by rovo89 reaches its limits. Now we are working on the new modern Xposed API with features of application scope management, remote preferences, dex parser interface and so on. The new API will be implemented in the next releasing of LSPosed, and it is welcome to post your suggestions on https://github.com/libxposed.
Some devices cannot create shortcuts due to kernel issues, now LSPosed switches to opening parasitic manager from notification. This notification is always present and can be disable in manager settings after created a shortcut.
随着 Android 版本的迭代,原有的 rovo89 Xposed API 已经达到了极限。 我们正在开发新的现代 Xposed API,它具有模块作用域管理、远程配置文件、dex 解析器接口等功能。 新的 API 将在 LSPosed 的下一个版本中实现,欢迎在 https://github.com/libxposed 上发表您的建议。
有部分设备因内核问题无法创建快捷方式,现在 LSPosed 切换到从通知打开管理器。此通知一直存在,也可以在创建了快捷方式之后在管理器设置中关闭通知。
@yujincheng08 @vvb2060 @Howard20181 @Dr-TSNG
finishReceiver
for unordered broadcastshookSystemWideLayout
finishReceiver
hookSystemWideLayout
时候初始化资源钩子@yujincheng08 @vvb2060 @Howard20181 @green1052 @5ec1cff
cancelNotificationWithTag
for Android 11-broadcastIntentWithFeature
on Android 12+cancelNotificationWithTag
broadcastIntentWithFeature
@vvb2060 @canyie @yujincheng08 @Dr-TSNG @chenxiaolong @1552980358 @TigerBeanst @dependabot @keta1 @1552980358 @fankes @Howard20181
XposedHelpers
(Thanks @RinOrz)XposedHelpers
的缓存性能 (感谢 @RinOrz)pm hide
-ed modules in the module listpm unhide
-ing modulespm hide
的模块pm unhide
模块时的通知getFloat
since Android 10 and raw getValue
; thanks @PeanutMelonSeedBigAlmond)getFloat
以及 getValue
; 感谢 @PeanutMelonSeedBigAlmond)SystemWideReplace
SystemWideReplace
时候自动开启资源钩子¹ About Zygisk 1. LSPosed will not release the Zygisk version until Magisk releases its first stable version with Zygisk support, but you can test with CI build. 2. Zygisk and Riru are doing the same thing: inject into Zygote. 3. Zygisk and Riru are not complete alternatives to each other. 4. Once Zygisk is enabled from Magisk, Riru and its modules will NOT load anymore. You have to choose one but not both. 5. Magisk will remove Magisk Hide and Magisk Repo from the next release. 6. Zygisk has a denylist that revokes almost all changes made by Magisk (Note it's not doing the same thing as Magisk Hide, and it CANNOT view as an alternative to Magisk Hide). 7. Revocation includes Zygisk modules. That means apps in the denylist will NOT load Zygisk modules, including the Zygisk version of LSPosed, so those apps cannot load Xposed modules. 8. Riru has a Riru Hide that avoids apps to detect it. However, Zygisk does not have the same stuff. Apps can thus discover Zygisk even they are in the denylist.
¹ 关于 Zygisk 1. LSPosed 在 Magisk 发布其第一个支持 Zygisk 的稳定版本之前不会发布基于 Zygisk 的版本,阁下仍可使用 CI 构建进行测试。 2. Zygisk 和 Riru 在做同一件事:注入 Zygote。 3. Zygisk 和 Riru 并不完全是彼此的替代品。 4. 一旦在 Magisk 中 启用 Zygisk,Riru及其模块就不会再加载。你必须二者选其一,不能同时选择。 5. Magisk 将在下一个版本中删除 Magisk Hide 和 Magisk Repo. 6. Zygisk 有一个排除列表,可以撤销 Magisk 所做的几乎所有修改(注意它和 Magisk Hide 做的不是同样的事,因此它不能作为 Magisk Hide 的替代品)。 7. 撤销的修改包括 Zygisk 模块。这意味着排除列表中的应用程序不会加载 Zygisk 模块,包括 Zygisk 版本的 LSPosed,因而这些应用程序将无法加载 Xposed 模块。 8. Riru 有一个 Riru Hide,可以避免应用程序检测到它。然而,Zygisk 没有同样的东西。因此,即使应用程序在排除列表中,它们依然可以发现 Zygisk。
² QQ 频道需要实名才可加入,请自行斟酌。该频道仅用于方便中国大陆用户获取更新,并不提供完整技术支持。
*#*#5776733#*#*
(digits correspond to LSPosed)*#*#5776733#*#*
唤起管理器(数字对应 LSPosed)Happy Chinese National Day!
Note: Magisk modules repo is no longer maintained, we will stop publishing to it since the next release. Follow us on our GitHub or Telegram to get the latest news at the first time!
国庆节快乐!
注: 由于 Magisk 模块仓库已不再维护,从下个版本开始我们将停止向其推送更新。在我们的 GitHub 或者 Telegram 上关注我们以获取最新消息!
DexFile
's name.DexFile
名字获取模块 apk 路径的兼容。(旧版QQ复读机可能无法使用)xposed_init
to load)SharedMemory
(it can speedup app cold launch) 2XposedBridge
's classloader)xposed_init
的 apk)SharedMemory
加载模块(这可以加快 app 冷启动速度)2XposedBridge
同一个类加载器的方法)1 For some weird devices that prevent installing apps from the root user, please install the manager from /data/adb/lspd/manager.apk
or manager.apk
from the zip file manually.
2 Some modules get modules' apk path using reflection of its classloader, it's not recommended and unstable since the apk path from classloader no longer exists when using SharedMemory
to load modules. Please use the documented way (from IXposedHookZygoteInit.StartupParam.modulePath
) instead. See #856 as well.
1 对于阻止从根用户安装应用的设备,请手动从 /data/adb/lspd/manager.apk
或 zip 文件中的 manager.apk
安装管理器。
2 一些模块使用反射从类加载器获取模块路径,这是不稳定的,在使用 SharedMemory
加载模块后这里已经不存在模块路径。请使用文档中的方法(从 IXposedHookZygoteInit.StartupParam.modulePath
获取)。详见 #856。
在管理器不再显示用户 id 而是显示用户名1
If surprised by the user name, you can change it from Settings
-System
-Advanced
-Multiple users
. The route may vary from ROM to ROM.
如果对用户名感到意外,可以在设备的设置-系统-高级-多用户界面修改用户名,不同系统的位置可能不一样。
android:showForAllUsers="true"
without switching userandroid:showForAllUsers="true"
的模块post-fs-data.sh
post-fs-data.sh
的情况支持双开、多开应用的新策略1
Previously LSPosed only recognize modules from the primary user. However, this strategy is not good and leads to some problems: some modules require getting installed app lists for configuration but they cannot do so across users; some require reading themselves from the hooked apps but they cannot do so from non-primary users; some users want to configure modules differently on different users which is not feasible previously. Thus LSPosed now requires every module to be installed to the user on which the apps they want to hook are installed. Some devices restrict modules from installing onto some users. In such a case, you can install them from the manager (but it's not recommended). Notice that the module won't take extra space if you install it on different users: there will only be one apk. 之前 LSPosed 仅识别安装在主用户的模块,该策略并非完美且导致诸多问题:一些模块需要获取安装应用列表以进行配置,但是该列表无法跨用户获取;一些模块需要从被注入应用获取本身,这样会在非主用户无法正常工作;一些用户希望分用户对模块进行配置,这也无法实现。于是,LSPosed 现在要求模块必须安装到对应用户上以注入到该用户上的应用。某些设备不允许模块安装到某些用户上,此时可以利用管理器安装(非万不得已时不推荐)。注意,安装在其他用户的模块不会占用额外空间:永远只有一个 apk。