LSPosed Xposed Framework [8.0-12.0]. Simple Magisk Module, EdXposed Alternative.

What Xppsed Framework are You Using??


  • Total voters
    1,078
Search This thread

VD171

Senior Member
Jun 21, 2012
2,684
2
1,946
127.0.0.1
LG K10
Samsung Galaxy J7
As I already said before, LSPoes does NOT support Android 8.0.
(Please, ignore the topic of this thread because this thread is NOT officially supported by LSPosed developers.)
As you can see here:
Code:
Drop support for API 26 (Android 8) (please at least use 8.1 because Android 8 is buggy)
 
  • Like
Reactions: Lord Sithek

beeshyams

Senior Member
Dec 29, 2014
1,647
585
Bangalore
As FYI

LSPosed developer on his Tg says

We recently received many complaints from users that they cannot launch the LSPosed manager the second timne. This is because the third-party ROM they use has merged this PR. This is totally wrong and breaks the behavior of standard SDK: the fd changes its offset after calling an open interface. We don't fix this on our side. Please ask your ROM maintainer to revert this commit or fix this commit (open + setoffset instead of dupping the fd). Or switch to another ROM.
 
  • Like
Reactions: josephcsible

ch3mn3y

Senior Member
Sep 11, 2011
2,921
583
Seaside Voivodeships
www.xperiasite.pl
Hijust restored My old Moto Z3 Play with stock 9.0.
Wanted to use GravityBox, so I installed Zygisk version of Lsposed. Both Zygisk and module are enabled I Magiel, but Lsposed Manager still says that Lsposed is not enabled.

Any idea?
 

winner71

Member
Nov 1, 2007
14
2
Please maybe someone here can help me. After long cat n mouse game with some marketplace applications, I decided to uninstall both magisk and lsposed (unrooting). When I rooted again with only magisk+shamiko+unsf, those apps still worked smoothly. But after I installed lsposed with no xposed module yet, they start to stop working. Now I know this is obviously about lsposed that cause some apps keeps stopping. I've used the parasitic Manager and remove the lsposed icon from homescreen, but doesn't help. How can I solve this problem?
 

heinhuiz

Senior Member
Nov 26, 2011
1,160
927
Xiaomi Mi A1
Redmi K20 / Xiaomi Mi 9T
By popular request, this is my setup for automatically adding newly installed packages to some user-defined LSPosed scopes.

[EDIT:] These instructions have been updated on February 1, 2022 and the zip file has been updated on November 14, 2021.

Requirements:
Caveats:
  • LSPosed won't pick up the changes until the device is rebooted.
Instructions:
  1. Unzip the attached LSPosed-Auto-Add.zip
  2. Create the /sdcard/usr/bin directories.
  3. Move lsposed-scopes-add from step 1 file to /sdcard/usr/bin. The file full path must be /sdcard/usr/bin/lsposed-scopes-add
  4. Move xposed-modules-status from step 1 file to /sdcard/usr/bin. The file full path must be /sdcard/usr/bin/xposed-modules-status
  5. Launch Automate, go to settings and change the Superuser command from its default of
    Code:
    su
    to
    Code:
    su -mm
    .
  6. Import LSPosed Auto Add.flo in Automate.
  7. After the flow is imported, grant all needed permissions.
  8. In the imported flow, start Configure. You should see a list of active LSPosed modules like the one seen on the attached screenshot.
  9. Toggle the modules as needed. If shown with a check mark, any newly added package will be added to the module's scope.
  10. Press Cancel to exit from the module list.
  11. Make sure that Automate is set to start at boot (in Automate settings).
There should be two automate fibers running in the flow. If it stops for whatever reason, just start the Init flow.
You can add and remove modules at any time by launching the Configure flow.

Changes:
  • 2021-11-01: Provide missing script.
  • 2021-11-08: Force running scripts in / in Automate flow.
  • 2021-11-14: Also support parasitic manager.
  • 2022-02-01: Add "su -mm" instructions for newer versions of Automate.
Thanks to @Open.Orange, @spawnlives and @randomwordhere for testing.
@Fif_ do you think this Automate flow can be transferred to Tasker? I can't use it because it's more than 30 blocks and I can't buy the full version of Automate without a Google account.

(I don't think it will be easy 😉)
 

Fif_

Senior Member
Jun 5, 2013
1,218
1,347
Google Nexus 10
Google Nexus 4
@Fif_ do you think this Automate flow can be transferred to Tasker? I can't use it because it's more than 30 blocks and I can't buy the full version of Automate without a Google account.

(I don't think it will be easy 😉)
The core of the action is undertaken by the /sdcard/usr/bin/lsposed-scopes-add script.
Automate just maintains the list of modules that need to add new apps to their scope and calls:
Code:
bash /sdcard/usr/bin/lsposed-scopes-add <new-app> <xposed-module1> <xposed-module2>...
whenever a new app is installed.

Reimplementing the logic to parse the list of active modules and the UI in Tasker would be a pain, and may not be possible. I was a Tasker user but have moved to Automate a long time ago because it's way more powerful, but also more complex.
However you should be able to configure Tasker to run the command line above as root for every new package install, as long as you configure the Xposed module list manually. It is just a list of Xposed modules packages names from the list you can get by running:
Code:
bash /sdcard/usr/bin/xposed-modules-status
 
  • Like
Reactions: heinhuiz

heinhuiz

Senior Member
Nov 26, 2011
1,160
927
Xiaomi Mi A1
Redmi K20 / Xiaomi Mi 9T
Thank you @Fif_. I've never used Tasker and currently it is a little bit over my head. I don't think investing time for only this project will be too much for me.

If anyone else knows their way around Tasker and can implement a setup like this, it would be very much appreciated! Many people are asking for auto adding new apps to LSPosed modules, but those requests have always been refused,
 

heinhuiz

Senior Member
Nov 26, 2011
1,160
927
Xiaomi Mi A1
Redmi K20 / Xiaomi Mi 9T
The core of the action is undertaken by the /sdcard/usr/bin/lsposed-scopes-add script.
Automate just maintains the list of modules that need to add new apps to their scope and calls:
Code:
bash /sdcard/usr/bin/lsposed-scopes-add <new-app> <xposed-module1> <xposed-module2>...
whenever a new app is installed.

Reimplementing the logic to parse the list of active modules and the UI in Tasker would be a pain, and may not be possible. I was a Tasker user but have moved to Automate a long time ago because it's way more powerful, but also more complex.
However you should be able to configure Tasker to run the command line above as root for every new package install, as long as you configure the Xposed module list manually. It is just a list of Xposed modules packages names from the list you can get by running:
Code:
bash /sdcard/usr/bin/xposed-modules-status
@anuraag.neo posted a what he calls "minimal task" to enable new packages in XPL automatically.
@Fif_ said he has some questions about it, but the discussion would be off-topic there. Maybe we can continue that discussion here?
 
  • Like
Reactions: dr4go

Fif_

Senior Member
Jun 5, 2013
1,218
1,347
Google Nexus 10
Google Nexus 4
@anuraag.neo posted a what he calls "minimal task" to enable new packages in XPL automatically.
@Fif_ said he has some questions about it, but the discussion would be off-topic there. Maybe we can continue that discussion here?
My main question was about restarting lspd to pick up the changes made to the lsposed database. On my devices, killing and restarting lspd with:
Code:
kill all lspd
ASH_STANDALONE=1 su -pc /data/adb/magisk/busybox sh /data/adb/modules/*_lsposed/service.sh --system-server-max-retry=-1
doesn't work: lspd is killed but not restarted, there are no messages in logcat but LSPosed reports the framework as not installed.
Of course, after rebooting, everything is back to normal.
This is with Magisk 24.3 and Zygisk LSPosed 1.8.3 (current stable).
 

anuraag.neo

Senior Member
Aug 7, 2013
88
54
Code:
ASH_STANDALONE=1 su -pc /data/adb/magisk/busybox sh /data/adb/modules/*_lsposed/service.sh --system-server-max-retry=-1
Use exact command as mentioned in their GitHub.
Code:
ASH_STANDALONE=1 su -pc /data/adb/magisk/busybox sh /data/adb/modules/*_lsposed/service.sh --system-server-max-retry=-1&
 

anuraag.neo

Senior Member
Aug 7, 2013
88
54
That doesn't make any difference, lspd doesn't respawn on my devices.
I have tried above code on Automate and it's working. Screenshot_2022-06-15-05-01-17-189_com.llamalab.automate.jpg
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    @Fif_ do you think this Automate flow can be transferred to Tasker? I can't use it because it's more than 30 blocks and I can't buy the full version of Automate without a Google account.

    (I don't think it will be easy 😉)
    The core of the action is undertaken by the /sdcard/usr/bin/lsposed-scopes-add script.
    Automate just maintains the list of modules that need to add new apps to their scope and calls:
    Code:
    bash /sdcard/usr/bin/lsposed-scopes-add <new-app> <xposed-module1> <xposed-module2>...
    whenever a new app is installed.

    Reimplementing the logic to parse the list of active modules and the UI in Tasker would be a pain, and may not be possible. I was a Tasker user but have moved to Automate a long time ago because it's way more powerful, but also more complex.
    However you should be able to configure Tasker to run the command line above as root for every new package install, as long as you configure the Xposed module list manually. It is just a list of Xposed modules packages names from the list you can get by running:
    Code:
    bash /sdcard/usr/bin/xposed-modules-status
    1
    The core of the action is undertaken by the /sdcard/usr/bin/lsposed-scopes-add script.
    Automate just maintains the list of modules that need to add new apps to their scope and calls:
    Code:
    bash /sdcard/usr/bin/lsposed-scopes-add <new-app> <xposed-module1> <xposed-module2>...
    whenever a new app is installed.

    Reimplementing the logic to parse the list of active modules and the UI in Tasker would be a pain, and may not be possible. I was a Tasker user but have moved to Automate a long time ago because it's way more powerful, but also more complex.
    However you should be able to configure Tasker to run the command line above as root for every new package install, as long as you configure the Xposed module list manually. It is just a list of Xposed modules packages names from the list you can get by running:
    Code:
    bash /sdcard/usr/bin/xposed-modules-status
    @anuraag.neo posted a what he calls "minimal task" to enable new packages in XPL automatically.
    @Fif_ said he has some questions about it, but the discussion would be off-topic there. Maybe we can continue that discussion here?
    1
    Some modules requires xposed.... Can that be handled via lsposed.?

    Think of it this way - LSPosed is a somewhat new version of Xposed. Both are an unofficial Android framework made for changing codes of system apps. By changing these codes, new customization options and features can be added to the Android device using the LSPosed Framework.

    -- Most modules that I have thrown at LSPosed that were designed for XPosed have stuck thus far.
    -- Bear in mind that some XPosed modules just will not function on LSPosed [hit or miss].

    You can also compare the alternative projects

    -- TrustMeAlready - Disable SSL verification and pinning on Android, system-wide

    -- VirtualXposed - A simple app to use Xposed without root, unlock the bootloader or modify system image, etc.

    -- Hide-My-Applist - An Xposed module to intercept applist detections

    -- Riru - Inject into zygote process

    -- XPrivacyLua - Really simple to use privacy manager for Android 6.0 Marshmallow and later

    -- MagiskOnEmulator - Install Magisk on Official Android Emulator

    -- Magisk-Ad-Blocking-Module - Magisk module to block ads on android

    -- riru_edxposed

    -- TaiChi - A framework to use Xposed module with or without Root/Unlock bootloader, supportting Android 5.0 ~ 11.

    -- EdXposedManager - Companion Android application for EdXposed
    1
    How to manually update lsposed to newer version (zip file from its official telegram channel) without lose any data/module?
    Just install the zip file with the Magisk app.

    here is a newbie question
    why don't developers make magisk models instead of xposed models that runs with out lsposed?
    The capabilities are very different (although with Zygisk, this is not entirely true anymore). Magisk can only replace entire files or apps. Xposed/LSPosed can inject code into apps and alter their behavior without replacing them.
    Now Zygisk (a part of Magisk) can also inject code, but it is a very recent development.
    Zygisk and Xposed have similar capabilities, but the Xposed API haa been implemented by a lot more apps (classic rovo89 Xposed, EdXposed, LSPosed, VirtualXposed and more), so it's likely to stick around.

    On android 9, I tried to run same APK with magisk and lsposed and give System Framework permission to this module, lsposed crashes. If I don't give this permission to module, module does not work as expected.

    These are the logs that I grab from logcat. What could be the problem? How can I solve?

    Thanks

    Code:
    06-17 10:46:06.216  1100  1100 W ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.bindService:1611 at.zweng.xposed.lepro3infrared.InfraredMagic.bindQuickSetService:96 at.zweng.xposed.lepro3infrared.MethodHooks$6.beforeHookedMethod:101 de.robv.android.xposed.XposedBridge$AdditionalHookInfo.callback:79 LSPHooker_.halOpen:5
    06-17 10:46:06.217  1100  1100 W ActivityManager: Unable to start service Intent { act=com.uei.control.IControl cmp=com.uei.quicksetsdk.letvitwo/com.uei.control.Service } U=0: not found
    Line 2, the system can't find the com.uei.quicksetsdk.letvitwo/com.uei.control.Service service. Is that something that your module alters or could interfere with?

    Edit: the module hooks the package manager, which is a very sensitive piece of android, so I would comment that part out to see if thats's still crashing LSPosed and go from there.
    1
    @anuraag.neo your tasker profile is working great. Thank you for it. Is there a way to disable it for specific package names so that they are never checked in xpl?
    Add STOP action at beginning of TASK with condition if evtprm2 matches specific package.
  • 66
    Developers: LSPosed Developers
    Homepage: GitHub
    Requirements:
    • Magisk 21+
    • Android 8.1-11 [Android 12(experimental)]

    Riru
    Description: Riru module providing ART interception framework (natively for Android Pie) that provides consistent API -interfaces with OG Xposed, using YAHFA (or SandHook) interception environment, supports Android 8.1 ~ 11.
    & Installation:
    • Install Riru 23+
    • Install Riru - LSPosed via Magisk Manager
    Install LSPosed Manager app (Note: No Saparate App and Zip, App Will be Installed Automatically)
    • Reboot your device.

    Download:
    For stable release, please go to Github Release page For canary build use telegram.
    Go to second post for latest version Download

    Notes:
    I'm just sharing this from github, I'm not responsible if you bricked your device.

    GPay and other banking apps working fine without any issue so this xposed alternative is worth trying and safer.

    Note: If anyone facing bootloop issue, don't panic, hard reboot again and it will work.


    Screenshot:
    21
    Download:
    Flash zip file through magisk and then install LSPosed Manager app

    Update 1 March 2021
    V1.2.0

    V1.3.7 Updated 15.May.2021
    (Note: No Saparate App and Zip, App Will be Installed Automatically)

    Bump New Version v1.5.0 14.August.2021

    Android 12 Supported(Experimental)

    Changelog

    • Fix manager white screen
    • Support split-apk modules (LSPosed will choose only one apk with xposed_init to load)
    • Fix manager crash when launching an uninstalled module from notification
    • Load modules with SharedMemory (it can speedup app cold launch) 2
    • New manager icon
    • Fix incorrect update notification in the first installation
    • Fix some apps not showing in the scope list in some rare cases
    • Show notification of module uninstallation
    • Prevent modules from hooking inner methods (methods from XposedBridge's classloader)



    Note:

    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 recommended).

    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.
    16
    Why it's safer than EdXposed?
    I didn't say it's safer than edxposed. I meant xposed alternatives like taichi etc.
    All banking apps works, no system slowdown, i got more free ram etc.
    In edxposed the hooked apps take time to open, no such issue with LSPosed.
    That's why i thought it's worth trying and safer.
    16
    I was considering that until I made an Automate flow to automatically add newly installed apps to select Xposed modules' scope.
    By popular request, this is my setup for automatically adding newly installed packages to some user-defined LSPosed scopes.

    [EDIT:] These instructions have been updated on February 1, 2022 and the zip file has been updated on November 14, 2021.

    Requirements:
    Caveats:
    • LSPosed won't pick up the changes until the device is rebooted.
    Instructions:
    1. Unzip the attached LSPosed-Auto-Add.zip
    2. Create the /sdcard/usr/bin directories.
    3. Move lsposed-scopes-add from step 1 file to /sdcard/usr/bin. The file full path must be /sdcard/usr/bin/lsposed-scopes-add
    4. Move xposed-modules-status from step 1 file to /sdcard/usr/bin. The file full path must be /sdcard/usr/bin/xposed-modules-status
    5. Launch Automate, go to settings and change the Superuser command from its default of
      Code:
      su
      to
      Code:
      su -mm
      .
    6. Import LSPosed Auto Add.flo in Automate.
    7. After the flow is imported, grant all needed permissions.
    8. In the imported flow, start Configure. You should see a list of active LSPosed modules like the one seen on the attached screenshot.
    9. Toggle the modules as needed. If shown with a check mark, any newly added package will be added to the module's scope.
    10. Press Cancel to exit from the module list.
    11. Make sure that Automate is set to start at boot (in Automate settings).
    There should be two automate fibers running in the flow. If it stops for whatever reason, just start the Init flow.
    You can add and remove modules at any time by launching the Configure flow.

    Changes:
    • 2021-11-01: Provide missing script.
    • 2021-11-08: Force running scripts in / in Automate flow.
    • 2021-11-14: Also support parasitic manager.
    • 2022-02-01: Add "su -mm" instructions for newer versions of Automate.
    Thanks to @Open.Orange, @spawnlives and @randomwordhere for testing.
    14
    I have it working on the Poco X3 NFC, running RR, loaded and runs without issue, I used the YAHFA option, has updated without issue.

    Thought I should add that I can't get SafetyNet on, but I've never been worried about that, I think I've only ever had it working once on one of my devices years ago. The one app that refused to play nice I just used MagiskHide on, and it's not a problem now.

    In saying that I only have one module loaded, I haven't had time to go looking for the below answers, to install any others.

    The only thing I haven't figured out yet is what apps need to be picked with what modules, sure some are obvious as they are named after the apps, but is there anything else that needs to be picked with them? For example, do I need to pick the framework app with everything, I'm sure I don't, but how do I know?
    I'm using YAHFA myself, even though I was using SandHook earlier with EdXposed. Also, I'm passing SafetyNet without an issue and Play Store shows certified as well, so that's nice.

    Coming to your question about "scope", basically for a module, you have to select the apps that are hooked by the module. This is pretty straightforward for modules that hook a specific app, for example, if you're using WATweaker, you have to select WhatsApp in its "scope". Similarly, another example, if you're using Instaprefs, you have to select Instagram in its "scope". However, for more systemwide module (like GravityBox, for example), multiple apps have to be selected in the "scope" as the module is more global in nature, so to speak.

    The only way to figure out which apps need to be added in scope for a module is to ask the module developer or by trial and error. Taking GravityBox as an example, you'll find the list of apps that need to be selected for its scope in the first post of its thread (under apps that need to be whitelisted; "whitelisted" term being used in context of EdXposed, since when the post was written, LSPosed wasn't a thing).

    Also, modules can auto-add recommended apps to their scope, but the responsibility of making that happen lies with the module developer. Once again, taking GravityBox as the example, if you install GravityBox in LSPosed, you don't have to select apps manually in its scope. They're auto-selected since the developer has added support for LSPosed and auto-selection of scope apps.

    I know the reply is long-ish, but I hope it helps you and the others who had similar questions. :)