SoFunction
Updated on 2025-03-04

Master the Xposed and LSPosed frameworks in one article

1. What is an Xposed framework?

Xposed frameworkIt is a modular framework for the Android platform, allowing developers and users to modify application or system behavior by loading modules without modifying application APK files or system files.

How it works:The Xposed framework changes the running behavior of these methods or classes by hooking (hooking) methods or classes of Android system. Its core is to dynamically load the user-written module code and inject code at the system or application runtime.

Main features:

  • You can modify the behavior of your application without recompiling the APK file.
  • Allows deep customization of the system layer or application layer.
  • Users can dynamically load and uninstall modules.

Common application scenarios:

  • Modify the system interface (such as hiding the status bar icon).
  • Bypass the restrictions of the application (such as emulating location or disabling ads).
  • Optimize equipment performance.

2. What is an LSPosed framework?

LSPosed frameworkIt is a modern implementation based on the Xposed framework, focusing on higher performance, higher security and better compatibility.

  • Key differences from Xposed:
    • Higher stability and performance: LSPosed uses the Riru framework to inject code (no need to modify system files). Riru can directly load code in the Zygote process of Android, avoiding the large number of modifications to system files by the traditional Xposed framework.
    • Module isolation mechanism: LSPosed provides module scope management functions, and users can accurately specify which applications a certain module takes effect, improve security and avoid module interference with other applications or systems.
    • Compatibility: LSPosed is more suitable for modern Android versions (especially Android 8+), and supports higher versions of Android systems.
    • Open Source Transparency: It is fully open source and is developed through community-driven.

3. What does Xposed and LSPosed have on Root

Definition of Root:

Root refers to obtaining super user permissions (similar to Linux's administrator permissions), allowing users to have full control over the system, including modifying system files, uninstalling system applications, etc.

The relationship between Xposed/LSPosed and Root:

  • Dependencies:
    • Xposed frameworkThe device needs to be rooted before modifying the system file to inject its code.
    • LSPosed frameworkRely on Riru, and Riru itself requires Root permissions to inject code into the Zygote process.
  • effect:
    • Enhanced Root's functionality:After using Xposed/LSPosed, you can further manage Root permissions. For example, hide the Root status (some apps detect if the device is rooted, such as banking apps and games).
    • Dynamic permission management:Modules can help manage and optimize Root permissions. For example, bypass the application's detection of Root through modules (the common modules are MagiskHide Props Config).
    • Increase system customization:Users can use the Xposed/LSPosed module to expand the Root function, such as implementing complete system backup, permission forgery and other functions.

4. Steps to install and use LSPosed

Get Root permissions:

  • Use a tool such as Magisk to root the device.
  • Ensure that the device has stable Root permissions.

Install the Riru framework:

  • Install Riru from the Magisk module.
  • Riru is the basis for the LSPosed framework to run and is used to inject code into the Zygote process.

Install the LSPosed framework:

  • fromLSPosed official GitHub downloadframe.
  • Install the LSPosed module in Magisk.

Install the LSPosed Manager:

  • The manager is used to load modules, set the scope of modules, and manage the functions of LSPosed.

Install module:

  • Download the required modules (such as GravityBox, FakeGApps, etc.) from the community and enable them in the manager.

Restart the device:

  • After restarting, the module takes effect, and users can enjoy the modified system or application functions.

5. Common Xposed/LSPosed modules and functions

GravityBox:
Used to modify system interfaces and behaviors, such as status bar, navigation bar, lock screen style, etc.

XPrivacyLua:
Provides privacy protection functions to allow fine control of application permissions.

Fake Location:
Implement virtual locations and bypass location restrictions.

RootCloak:
Hide the device's root status and bypass the application's root detection.

Greenify:
Optimize system performance and manage background applications.

6. Summary

  • Xposed frameworkIt is a powerful tool, but it is gradually becoming more stable and efficient in modern Android systems.LSPosed frameworkReplaced.
  • Both rely on Root permissions to work, and can further expand the Root functionality and provide higher system customization capabilities.
  • When using the LSPosed framework, it is recommended to work with Magisk and Riru for compatibility and security.

This is the article about mastering Xposed and LSPosed frameworks in one article. For more related contents of Xposed and LSPosed frameworks, please search for my previous articles or continue browsing the related articles below. I hope everyone will support me in the future!