Convert Figma logo to code with AI

LSPosed logoLSPosed

LSPosed Framework

19,993
3,357
19,993
5

Top Related Projects

7,550

The native part of the Xposed framework (mainly the modified app_process binary).

51,615

The Magic Mask for Android

4,988

Inject into zygote process

Elder driver Xposed Framework.

Quick Overview

LSPosed is an advanced Xposed framework implementation for Android devices. It provides a powerful platform for modifying Android system behavior and app functionality without altering the original APK files. LSPosed is designed to work on Android 8.1 to 14, offering enhanced stability and compatibility compared to traditional Xposed frameworks.

Pros

  • Supports a wide range of Android versions (8.1 to 14)
  • Improved stability and performance over traditional Xposed frameworks
  • Offers a user-friendly interface for managing modules
  • Regular updates and active community support

Cons

  • Requires root access, which may void device warranty
  • Can potentially cause system instability if modules are not properly configured
  • Limited compatibility with some devices due to manufacturer restrictions
  • May raise security concerns due to system-level modifications

Getting Started

To get started with LSPosed:

  1. Ensure your device is rooted and running a supported Android version (8.1-14).
  2. Download the latest LSPosed release from the official GitHub repository.
  3. Install the LSPosed Manager app on your device.
  4. Reboot your device to activate LSPosed.
  5. Open the LSPosed Manager app to manage modules and settings.

Note: Detailed installation instructions may vary depending on your device and Android version. Always refer to the official documentation and follow the recommended installation method for your specific setup.

Competitor Comparisons

7,550

The native part of the Xposed framework (mainly the modified app_process binary).

Pros of Xposed

  • Established and widely recognized framework with a large user base
  • Extensive documentation and community support
  • Compatible with a broader range of Android versions

Cons of Xposed

  • Requires device rooting, which can void warranties and compromise security
  • Less frequent updates and slower development cycle
  • May cause system instability on some devices

Code Comparison

Xposed:

public class MyModule implements IXposedHookLoadPackage {
    public void handleLoadPackage(LoadPackageParam lpparam) throws Throwable {
        XposedBridge.log("Loaded app: " + lpparam.packageName);
    }
}

LSPosed:

public class MyModule implements IXposedHookLoadPackage {
    public void handleLoadPackage(XC_LoadPackage.LoadPackageParam lpparam) throws Throwable {
        XposedBridge.log("Loaded app: " + lpparam.packageName);
    }
}

The code structure for both frameworks is similar, with minor differences in import statements and method signatures. LSPosed maintains compatibility with existing Xposed modules, allowing for easy migration between the two frameworks.

LSPosed offers improved performance, enhanced stability, and support for newer Android versions without requiring root access. It also provides more frequent updates and active development compared to Xposed.

51,615

The Magic Mask for Android

Pros of Magisk

  • More comprehensive system-level modifications, including root access
  • Wider range of customization options and module support
  • Actively maintained with frequent updates and strong community support

Cons of Magisk

  • Requires unlocked bootloader and may void device warranty
  • Higher risk of system instability if not used carefully
  • More complex setup process compared to LSPosed

Code Comparison

Magisk (C++):

static int magisk_main(int argc, char *argv[]) {
    if (argc > 1 && strcmp(argv[1], "-c") == 0) {
        printf(MAGISK_VERSION ":MAGISK\n");
        return 0;
    }
    // ...
}

LSPosed (Java):

public class LSPosed {
    public static void main(String[] args) {
        if (args.length > 0 && args[0].equals("--version")) {
            System.out.println(BuildConfig.VERSION_NAME);
            return;
        }
        // ...
    }
}

Both projects handle version information differently, with Magisk using C++ and LSPosed using Java. Magisk's code appears more low-level, reflecting its system-wide approach, while LSPosed's code is higher-level, consistent with its focus on app modification.

4,988

Inject into zygote process

Pros of Riru

  • More lightweight and focused on providing a framework for modules
  • Potentially better performance due to its minimalistic approach
  • Wider compatibility with various Android versions and devices

Cons of Riru

  • Requires more technical knowledge to implement modules
  • Less user-friendly for those seeking ready-to-use modifications
  • Smaller community and fewer pre-built modules available

Code Comparison

LSPosed:

public class LSPosed extends XposedHelper {
    @Override
    public void handleLoadPackage(XC_LoadPackage.LoadPackageParam lpparam) throws Throwable {
        // LSPosed-specific implementation
    }
}

Riru:

static void onModuleLoaded() {
    // Riru module initialization
    // More low-level C implementation
}

LSPosed is built on top of the Xposed framework, providing a higher-level Java API for module development. Riru, on the other hand, offers a lower-level C-based approach, allowing for more direct system modifications but requiring more expertise to implement.

Both projects aim to enhance Android functionality, but LSPosed focuses on providing a user-friendly Xposed framework alternative, while Riru serves as a lightweight foundation for various system modifications.

Elder driver Xposed Framework.

Pros of EdXposed

  • Longer history and established user base
  • More extensive documentation and community resources
  • Supports a wider range of Android versions (including older ones)

Cons of EdXposed

  • Less frequent updates and slower development cycle
  • Higher resource consumption and potential impact on system performance
  • More complex installation process, especially for newer Android versions

Code Comparison

EdXposed:

public class EdXposedBridge {
    public static void hookMethod(Member method, XC_MethodHook callback) {
        if (method == null) {
            throw new IllegalArgumentException("method must not be null");
        }
        // ... (implementation details)
    }
}

LSPosed:

public final class LSPosed {
    public static void hookMethod(@NonNull Member hookMethod, @NonNull XC_MethodHook callback) {
        if (hookMethod == null) throw new IllegalArgumentException("hookMethod cannot be null");
        if (callback == null) throw new IllegalArgumentException("callback cannot be null");
        // ... (implementation details)
    }
}

Both projects aim to provide Xposed framework functionality, but LSPosed is generally considered more modern and efficient. It offers better performance, more frequent updates, and improved compatibility with newer Android versions. However, EdXposed may still be preferred by some users due to its broader device support and established community resources.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

LSPosed Framework

Build Crowdin Channel Chat Download Total

Introduction

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.

Supported Versions

Android 8.1 ~ 14

Install

  1. Install Magisk v24+
  2. (For Riru flavor) Install Riru v26.1.7+
  3. Download and install LSPosed in Magisk app
  4. Reboot
  5. Open LSPosed manager from notification
  6. Have fun :)

Download

Note: debug builds are only available in Github Actions.

Get Help

Only bug reports from THE LATEST DEBUG BUILD will be accepted.

  • GitHub issues: Issues
  • (For Chinese speakers) 本项目只接受英语标题的issue。如果您不懂英语,请使用翻译工具

For Developers

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.

Community Discussion

Notice: These community groups don't accept any bug report, please use Get help to report.

Translation Contributing

You can contribute translation here.

Credits

  • Magisk: makes all these possible
  • Riru: provides a way to inject code into zygote process
  • XposedBridge: the OG Xposed framework APIs
  • Dobby: used for inline hooking
  • LSPlant: the core ART hooking framework
  • EdXposed: fork source
  • SandHook: ART hooking framework for SandHook variant
  • YAHFA: previous ART hooking framework
  • dexmaker and dalvikdx: to dynamically generate YAHFA hooker classes
  • DexBuilder: to dynamically generate YAHFA hooker classes

License

LSPosed is licensed under the GNU General Public License v3 (GPL-3) (http://www.gnu.org/copyleft/gpl.html).