[APP][XPOSED][6.0+] XPrivacyLua - Android privacy manager [UNSUPPORTED]

Search This thread

M66B

Recognized Developer
Aug 1, 2010
26,747
57,969
Good afternoon all, I need to change the region for the program Huawei health to open additional functions, the program reads the region in the sim card, mcc and mnc, built-in hooks, change is not possible, the command getprop | grep xxxxxx(mcc and mnc) outputs the following:
gsm.operator.numeric: xxxxxx
gsm.sim.operator.numeric: xxxxxx
ril.mcc.mnc1: xxxxxx
but i don't understand how to edit hooks, is it possible to do that at all, please help me.
android 12
How is this related to your privacy?
Please read the opening post.
 

Oswald Boelcke

Senior Moderator / Moderator Committee
Staff member
The Xposed repo is currently unreachable for me. Maybe it is completely offline now?
Xposed repo is unavaiable for me too for a long.
Since it is hosted by XDA may @Oswald Boelcke tell us why
Gentlemen, I think I owe you a response. I approach our Forum Administrator @MikeChannon with this question and the information I've received is that it is no longer available and is no longer being developed. I'm convinced you're also aware that SRD @rovo89 who owned the repo hasn't been posted for more than 4 1/2 years. I suggest not to rely at all that any file, which was made available for download in that repo in the past, might be available in the future there.

Personally but XPL is my one and only Xposed module, I download updates from Marcel's Github. Marcel, thanks very much for your continous support and presence.
 

VD171

Senior Member
Jun 21, 2012
2,853
2
2,102
127.0.0.1
LG K10
Samsung Galaxy J7
Gentlemen, I think I owe you a response. I approach our Forum Administrator @MikeChannon with this question and the information I've received is that it is no longer available and is no longer being developed. I'm convinced you're also aware that SRD @rovo89 who owned the repo hasn't been posted for more than 4 1/2 years. I suggest not to rely at all that any file, which was made available for download in that repo in the past, might be available in the future there.

Personally but XPL is my one and only Xposed module, I download updates from Marcel's Github. Marcel, thanks very much for your continous support and presence.
Sad, Xposed repo is a good safe place to download Xposed modules, even almost all them are present in GitHub too.

For me too, XPrivacyLua is my one and only Xposed module, but I had to rewritte all my other modules to lua scripts and now all I have all my wanted modules inside XPrivacyLua. And more. Incluiding a fast and easy debugging for reading exceptions and enabling/disabling specific hooks for specific apps without rebooting the device or freezing all the device if it crashes. My one and only problem is dealing with obfuscated classes, because I have to update my custom hooks every time the app updates, because their methods have their parameters changed/renamed.

XPrivacyLua is really the best Xposed module ever !
 

BionicAKgr

New member
Sep 20, 2022
3
0
Hi guys new user of this app here. This app it is extremely good if does what it promises. I am mainly interested in blocking trackers and currently I am using App Manager from fdroid for that. Will be any chance of conflicts in rules between the apps and secondly is any way to restrict apps in Shelter work Profile ?
 

heinhuiz

Senior Member
Nov 26, 2011
1,256
1,129
Xiaomi Mi A1
Redmi K20 / Xiaomi Mi 9T
Hi guys new user of this app here. This app it is extremely good if does what it promises. I am mainly interested in blocking trackers and currently I am using App Manager from fdroid for that. Will be any chance of conflicts in rules between the apps and secondly is any way to restrict apps in Shelter work Profile ?
For your last question: using XPL in the work profile is not officially supported, but and it is working for me since ages. I just copied XPL (and the Pro app because I use that also) to the work profile. Only thing that does not work are the Notify on new apps and Restrict new apps settings from the menu, so when you install or copy an app to the work environment you will not be warned, and no restrictions are applied by default.

If you are using LSPosed, you probably have found already that it has an Island tab in the Modules section, you will need to enable the XPL module and add the apps to its scope there too. For EdXposed you only have to enable the module.
 
Last edited:

M66B

Recognized Developer
Aug 1, 2010
26,747
57,969
For your last question: using XPL in the work profile is not officially supported, but it is working for me since ages. I just copied XPL (and the Pro app because I use that also) to the work profile. Only thing that does not work are the Notify on new apps and Restrict new apps settings from the menu, so when you install or copy an app to the work environment you will not be warned, and no restrictions are applied by default.

If you are using LSPosed, you probably have found already that it has an Island tab in the Modules section, you will need to enable the XPL module and add the apps to its scope there too. For EdXposed you only have to enable the module.
This scenario is support for XPrivacyLua, but not for NetGuard.
 

BionicAKgr

New member
Sep 20, 2022
3
0
For your last question: using XPL in the work profile is not officially supported, but and it is working for me since ages. I just copied XPL (and the Pro app because I use that also) to the work profile. Only thing that does not work are the Notify on new apps and Restrict new apps settings from the menu, so when you install or copy an app to the work environment you will not be warned, and no restrictions are applied by default.

If you are using LSPosed, you probably have found already that it has an Island tab in the Modules section, you will need to enable the XPL module and add the apps to its scope there too. For EdXposed you only have to enable the module.

Done it thank you.
 
Aug 26, 2021
30
5
Hello, friends. Does anyone have a ready-made hook for hiding the GPS module and for blocking bluetooth saved devices from being read by the app?
 

VD171

Senior Member
Jun 21, 2012
2,853
2
2,102
127.0.0.1
LG K10
Samsung Galaxy J7
Aug 26, 2021
30
5

filippov1987

Member
Apr 27, 2022
10
0
Hi all. I have a problem with one of the hooks: Privacy.SubscriptionInfo.getSubscriptionId

These are my settings for this hook:

function after(hook, param) local result = param:getResult() if result == 0 then return false end local fake = 724058694860308 param:setResult(fake) return true, result, fake end

And this is an error after aplying:

Privacy.SubscriptionInfo.getSubscriptionId Exception: org.luaj.vm2.LuaError: script:25 vm error: java.lang.IllegalArgumentException: Expected return int got class java.lang.Double at org.luaj.vm2.lib.jse.JavaMethod.invokeMethod(SourceFile:4) at org.luaj.vm2.lib.jse.JavaMethod.call(SourceFile:3) at org.luaj.vm2.LuaClosure.execute(SourceFile:106) at org.luaj.vm2.LuaClosure.onInvoke(SourceFile:4) at org.luaj.vm2.LuaClosure.invoke(SourceFile:1) at org.luaj.vm2.LuaValue.invoke(SourceFile:4) at eu.faircode.xlua.XLua$5.execute(SourceFile:16) at eu.faircode.xlua.XLua$5.afterHookedMethod(SourceFile:1) at de.robv.android.xposed.XposedBridge$AdditionalHookInfo.callback(Unknown Source:147) at LSPHooker_.getSubscriptionId(Unknown Source:8) at com.android.server.stats.pull.StatsPullAtomService$StatsSubscriptionsListener.onSubscriptionsChanged(StatsPullAtomService.java:3913) at android.telephony.TelephonyRegistryManager$1.lambda$onSubscriptionsChanged$0(TelephonyRegistryManager.java:112) at android.telephony.-$$Lambda$TelephonyRegistryManager$1$cLzLZB4oGnI-HG_-4MhxcXoHys8.run(Unknown Source:2) at android.os.Handler.handleCallback(Handler.java:938) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:246) at android.os.HandlerThread.run(HandlerThread.java:67) Caused by: java.lang.IllegalArgumentException: Expected return int got class java.lang.Double at eu.faircode.xlua.XParam.setResult(SourceFile:8) at java.lang.reflect.Method.invoke(Native Method) at org.luaj.vm2.lib.jse.JavaMethod.invokeMethod(SourceFile:2) ... 16 more Package: android:1000 Method: after public int android.telephony.SubscriptionInfo.getSubscriptionId() Arguments: Return: 2 (java.lang.Integer)

What am I doing wrong? How can I fix it?
 
Last edited:

VD171

Senior Member
Jun 21, 2012
2,853
2
2,102
127.0.0.1
LG K10
Samsung Galaxy J7
Hi all. I have a problem with one of the hooks: Privacy.SubscriptionInfo.getSubscriptionId

These are my settings for this hook:

function after(hook, param) local result = param:getResult() if result == 0 then return false end local fake = 724058694860308 param:setResult(fake) return true, result, fake end

And this is an error after aplying:

Privacy.SubscriptionInfo.getSubscriptionId Exception: org.luaj.vm2.LuaError: script:25 vm error: java.lang.IllegalArgumentException: Expected return int got class java.lang.Double at org.luaj.vm2.lib.jse.JavaMethod.invokeMethod(SourceFile:4) at org.luaj.vm2.lib.jse.JavaMethod.call(SourceFile:3) at org.luaj.vm2.LuaClosure.execute(SourceFile:106) at org.luaj.vm2.LuaClosure.onInvoke(SourceFile:4) at org.luaj.vm2.LuaClosure.invoke(SourceFile:1) at org.luaj.vm2.LuaValue.invoke(SourceFile:4) at eu.faircode.xlua.XLua$5.execute(SourceFile:16) at eu.faircode.xlua.XLua$5.afterHookedMethod(SourceFile:1) at de.robv.android.xposed.XposedBridge$AdditionalHookInfo.callback(Unknown Source:147) at LSPHooker_.getSubscriptionId(Unknown Source:8) at com.android.server.stats.pull.StatsPullAtomService$StatsSubscriptionsListener.onSubscriptionsChanged(StatsPullAtomService.java:3913) at android.telephony.TelephonyRegistryManager$1.lambda$onSubscriptionsChanged$0(TelephonyRegistryManager.java:112) at android.telephony.-$$Lambda$TelephonyRegistryManager$1$cLzLZB4oGnI-HG_-4MhxcXoHys8.run(Unknown Source:2) at android.os.Handler.handleCallback(Handler.java:938) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:246) at android.os.HandlerThread.run(HandlerThread.java:67) Caused by: java.lang.IllegalArgumentException: Expected return int got class java.lang.Double at eu.faircode.xlua.XParam.setResult(SourceFile:8) at java.lang.reflect.Method.invoke(Native Method) at org.luaj.vm2.lib.jse.JavaMethod.invokeMethod(SourceFile:2) ... 16 more Package: android:1000 Method: after public int android.telephony.SubscriptionInfo.getSubscriptionId() Arguments: Return: 2 (java.lang.Integer)

What am I doing wrong? How can I fix it?
Try to returning a string and not a number.
Change from:
param:setResult(fake)
To:
param:setResult(tostring(fake))

Or

Change from:
local fake = 724058694860308
To:
local fake = '724058694860308'
 

Da8ax

Member
Aug 7, 2021
8
2
XPrivacyLua requires adding applications in the ‘scope’ of LSPosed. Is there any way to automatically add new installed applications in the ‘scope’ of LSPosed? Manually opening and opening and opening LSPosed every time is just crazy.
 

Top Liked Posts

  • 4
    ok let is as is then, if there's still at least little hope
    If the LSPosed developers add an API to manage scopes, who knows.
    1
    I would suggest you release a version without checking for updates (finally..) since that check is useless now..
    If I do, there is no way back.
    1
    Should we all circle the wagons and chime in? What is theie contact information?
    Check https://github.com/LSPosed/LSPosed/issues/9
  • 8
    Damn, I knew this day would eventually come, I just hoped it wouldn't. It's one of the few that I've donated to because I honestly couldn't see myself using Android without it.

    Even though Android has incorporated more permissions over the years, being able to restrict an app's ability to see what other apps are installed on the phone, SIM card/subscriber data, sensor data such as accelerometer and gyroscopic data which can be used to track user movements from a wifi or gps determined location, and of course, being able to read all of the stored SSIDs stored on a phone which a malicious app could also use to determine where a person spends their time and has been via the many glob SSID location maps, many of which have been crowd sourced such as wigle.net.

    As a digital privacy advocate, I'll continue to advise people use this framework until some other developer hopefully picks this mantle back up, or such a time as these aspects of privacy become baked into mobile OSs.

    I want to say thank you for all the work you've done on this project, Marcel. You've not only empowered many people like myself to better our own operational security, but have also raised awareness that many of these forms of tracking are even possible, and are also preventable. I wish you the best of luck with your other projects, which I'll continue to support as well.
    7
    Version 1.34 should be available via the LSposed repository now. Can somebody please double-check?

    https://github.com/Xposed-Modules-Repo/eu.faircode.xlua/releases
    7
    If this is what the majority of the people here want, no problem.
    Sir, my vote: Negative. Please continue as you did in the past. And thanks for your other clarification.
    6
    A sad day but I can understand.
    Thank you very much for supporting the project so far.

    Sorry for maybe insensitive question but will the Pro companion app be open-sourced after the support is terminated? As I think both apps are important to be open-sourced just in case someone else want to continue the project.

    Thank you once again.

    If somebody wants to continue this project, which needs to be proven with actually contributions, that somebody can contact me to get the source code of the pro companion app. With this, I am trying to prevent misusing the pro companion app. Check the Play Store for clones of NetGuard, and you'll understand.
    6
    I am considering to terminate support on January 5th 2023 because:
    • Not many people use the module anymore
    • The support of the project is pretty limited
    • Android has become more privacy-friendly over time
    • The LSposed developers do not support the module (*)
    • The module is too often misused, for example to cheat in games, etc.
    • I have received enough hate mail
    (*) They refuse to add an API to access scopes, resulting a too many questions and also loosing users.

    This means that XPrivacyLua has been supported for exactly 5 years. XPrivacy was first released on June 12, 2013, so that's in total about 10 years of XPrivacy(Lua). I think that is a pretty long time.
  • 314
    XPrivacyLua

    banner_play_store.png


    Really simple to use privacy manager for Android 6.0 Marshmallow and later (successor of XPrivacy).

    Revoking Android permissions from apps often let apps crash or malfunction. XPrivacyLua solves this by feeding apps fake data instead of real data.

    Features:

    • Simple to use
    • Manage any user or system app
    • Extensible
    • Multi-user support
    • Free and open source

    See here for all details, including installation instructions and download link.

    Please read the frequently asked questions before asking a question.

    This XDA thread is about using the latest version of XPrivacyLua. Off topic comments are allowed as long they are related to XPrivacyLua and are in the general interest of the followers of this thread, but anything not related to privacy is not allowed.

    If XPrivacyLua doesn't work and/or when "module not running or updated" is shown, this is almost always caused by an Xposed problem.

    Discussions about purchases are not allowed here, please contact me via here instead.

    XPrivacyLua is being maintained and community supported, but new features won't be added anymore.

    Custom hook definitions will always be part of XPrivacyLua, but there will be community support only. This means that I won't respond to questions about defining custom hooks anymore. See this thread for the reasons.

    If you value your privacy, please consider to support this project with a donation or by purchasing pro features.


    XPrivacyLua is not a permission manager, but a privacy manager. XPrivacyLua doesn't block things and doesn't revoke permissions, but does replace real data by fake data. This means you can grant Android permissions to an app and still let XPrivacyLua prevent the app from seeing privacy sensitive data. Revoking permissions can result in an app refusing to work and/or to crash. However, replacing real by fake data generally doesn't let an app crash.

    Currently restrictions are quite crude because they mostly replace real data by no data. For example restricting the contacts app from getting contacts will result in an empty contact list. In the near future it might be made possible to select the data an app may see, for example just one group of contacts.

    About feature requests and bug reports:

    The goal is to have a tool that can properly protect the privacy of many in the near future. However, it isn't paid work, so I do whatever I like whenever I like it.

    You can request features in this XDA forum. I will read them, but I will not respond to them and they might or might not be implemented. If I know for sure something will not be implemented, I will let you know.

    You can report any problem you have here. There will be no issue tracker on GitHub.

    For now I have decided to not implement restrictions that are useful to prevent tracking only. There are simply too many data items that can be used for tracking and it would take too much time to develop restrictions for all these data items.

    The basic idea is to restrict only things that 'define' you, so which contacts you have, where you are, which apps you use, etc.

    Maybe we can widen the definition of things that the core of XPL covers to "What defines you, and what can be used to spie on you"? This would include camera/audio, but not tracking.

    XPrivacyLua is pretty feature complete and will be maintained and supported and when there is a need new hook definitions will be added to better protect your privacy. For the rest this FAQ applies:

    https://github.com/M66B/XPrivacyLua/blob/master/FAQ.md#FAQ4

    As said before, development will also depend on Xposed development, which is just minimal unfortunately.

    XDA thanks and donations are appreciated.

    XPrivacyLua is supported with Xposed only. There is no support for VirtualXposed and TaiChi.
    68
    I have just released beta version 0.5 in the Xposed repository.

    The XPrivacyLua framework and user interface seems to be stable enough to call this a beta release.

    Besides several bug fixes and improvements two new restrictions were added:
    • Read account name, which mostly holds your e-mail address and will be replace by '[email protected]' when restricted
    • Read clipboard, which will be replaced by the text 'Private' when restricted

    Furthermore the ability to restrict Android system (be careful!) and to restrict system apps was added. It is possible to restrict all of these individually (XPrivacy could not do that).

    Be sure to take a look at the help page in the app again (use the ?-icon), since there were some useful hints added.

    If you appreciate what I am building here, please let me know by means of an XDA thanks and/or a donation, so that I don't get the feeling 'What am I doing this for?'.
    59
    I have just released alpha version 0.12 in the Xposed repository.

    This version has been redesigned for Android Oreo compatibility. The user interface and the restrictions work properly for me, but be aware that a lot has been changed on the inside ("it is bigger on the inside", lol), also for earlier Android versions. There is one thing I know of that needs improving and that is that the user interface might be updated too often with a lot of restrictions, which might cause delays and hangs. I will look into this tomorrow.

    This change was necessary, but it was a lot of work, so XDA thanks and donations are appreciated.
    56
    I have just released beta version 0.25 in the Xposed repository.

    Changelog:

    With this release XPrivacyLua restriction's can be compared with XPrivacy's. There are now over 100 restriction definitions!

    XDA thanks and donations are appreciated.
    53
    @CHEF-KOCH You have been given enough time to respond here. Now I just think it is pretty cowardly to write critical about XPrivacyLua, but not to tell what can actually be improved, especially because you were invited to do so.

    I still like to hear how XPrivacyLua can be improved, but I don't want to hear what is wrong with XPrivacyLua. You'll need to keep the scope of XPrivacyLua in mind (in short: privacy, not security), see the opening post and previous discussions about this for more information.

    Also, if you really know better, I like to see an original work from your hands to prove that. Actions speak louder than words.

    As it is now, you are discouraging one of the few people in the world who really did something substantial to improve privacy on Android. And don't go talking about VPNs, TOR, etc because your private information, like your contacts, will still leak.

    I also think you are pretty ungrateful for what I did so far.

    To others: if you see someone reference one of his blogs, please reference this comment in response.

    Edit: if you agree with this, please add an XDA thanks to this comment, so it will show up in the right column as a reference for others.