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

Search This thread

Fif_

Senior Member
Jun 5, 2013
1,191
1,313
Google Nexus 10
Google Nexus 4
Thank you. :D

I did it but it does not make any changes. I also read original "PackageManager.getInstalledApplication.lua" . but there is no "getinstalledApplications" value there and works perfect .
it is strange for me how this method get hooked. after importing my custom script , if I delete "PackageManager.getinstalledApplicaitons" part from Manage hook definitions menu and I mean restore it to default version it is worked !!!
Did you restart the app (force stop) after lua changes? The hooks are only loaded at app start. If you see inconsistent behavior like the one you are describing, that may be a sign that Xposed is not working as it should.
 
  • Like
Reactions: TiTiB

magedkathom

Senior Member
Apr 16, 2011
53
3
hi there...
can I make a costumed return list to be a fack result for xprivacylua hook PakageManager.getPackagInfoAsUser
sorry for my bad English.
 
Last edited:

Fif_

Senior Member
Jun 5, 2013
1,191
1,313
Google Nexus 10
Google Nexus 4
hi there...
can I make a costumed return list to be a fack result for xprivacylua hook PakageManager.getPackagInfoAsUser
sorry for my bad English.
Yes you can certainly return a custom, fake list of apps for PackageManager.getInstalledPackages. You'll also want to hook PackageManager.getInstalledApplications.
PackageManager.getPackageInfoAsUser doesn't return a list.
 

magedkathom

Senior Member
Apr 16, 2011
53
3
Yes you can certainly return a custom, fake list of apps for PackageManager.getInstalledPackages. You'll also want to hook PackageManager.getInstalledApplications.
PackageManager.getPackageInfoAsUser doesn't return a list.
thanks for your reply...
could you please tell me how to do that.
I am just a newbie
 
  • Like
Reactions: VD171

nIMa_aZx

Member
Dec 15, 2012
39
9
Tehran
Yes you can certainly return a custom, fake list of apps for PackageManager.getInstalledPackages. You'll also want to hook PackageManager.getInstalledApplications.
PackageManager.getPackageInfoAsUser doesn't return a list.
thanks.
two weeks ago I could fix it. I edited default hooks code that are related to installed app in XprivacyPro in privacy package.
interesting part is that I did not need using "getInstalledApplications" in hook list and my codes. As the developer (Marcel Bokhorst) did not use.

now I have another weird problem in "tracking hooks".
I'm sure the code is ok , because I wrote two these of hooks "Board - Model" and replace it to Privacy collection and worked. If it is needed I upload my JSON code.

All of these hooks have same template.

Code:
-- This file is part of XPrivacyLua.

-- XPrivacyLua is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.

-- XPrivacyLua is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-- GNU General Public License for more details.

-- You should have received a copy of the GNU General Public License
-- along with XPrivacyLua.  If not, see <http://www.gnu.org/licenses/>.

-- Copyright 2017-2019 Marcel Bokhorst (M66B)

function after(hook, param)
    local result = param:getResult()
    local name = hook:getName()
    local filtered = false
    
    if result == nil then
        return false
    end

    local fake = ''
    if name == 'Build.BOARD' then
        filtered=true
        fake='msm8960'
    elseif name == 'Build.BRAND' then
        filtered=true
        fake='xiaomi'
    elseif name== 'Build.DEVICE' then
        filtered=true
        fake='ken'
    elseif name == 'Build.PRODUCT' then
        filtered=true
        fake='hav_mido'
    elseif name== 'Build.BOOTLOADER' then
        filtered=true
        fake='unknown'
    elseif name== 'Build.ID' or 'Build.DISPLAY' then
        filtered=true
        fake='MRRM'
    elseif name== 'Build.FINGERPRINT' then
        filtered=true
        fake='Xiaomi/kenzo/kenzo:40.1/MMB29MK/V3.8.1.1.MHUCNDL:user/release-keys'
    elseif name== 'Build.ID' then
        filtered=true
        fake='PZQ1.110204.231'
    elseif name=='Build.MODEL' then
        filtered=true
        fake='Redmi Note 3'
    elseif name=='Build.PRODUCT' then
        filtered=true
        fake='mido'
    elseif name=='Build.DEBUG' then
        filtered=true
        fake='user'
    elseif name== 'Build.USER' then
        filtered=true
        fake='zeelog'
    elseif name== 'Build.TIME' then
        filtered=true
        fake='1698066734736'
    elseif name == 'WifiInfo.getSSID' then
        filtered=true
        fake='Irancell_Portable_4G'
    elseif name == 'WifiInfo.getBSSID' then
        filtered=true
        fake='99:c2:3e:48:31:ec'
    elseif name == 'Networkinterface.getHardwareAddress' then
        filtered=true
        fake='56:43:14:e4:38:7a'
    elseif name == 'Build.Hardware' then
        filtered=true
        fake='ken'
    end
  
        if filtered==true then
        param:setResult(fake)
        return true, result, fake
        end
end



I am so happy to join this grate job
by the way is there any documentation may help me to do that

You need understanding programming concepts at first . the language of programing is LUA.
Source : https://www.lua.org/pil/contents.html
then read them :

for writing custom hook:

for importing your customized script , you need pro version of Xprivacy.
in my opinion it is a bit harder to code LUA for hooking purpose without programming background.

Edited: I forgot to tell you , for better understanding codes , you can review default written code in pro version in "privacy" collection and see what happens in hooking.
 
Last edited:

okwhateverok

Senior Member
Sep 21, 2014
63
28
Amsterdam
Im on the latest version of Edxposed, and on my other One UI 1.0 device it is the same, no logging...

It is verry difficult to get my security extreme tight without logging soo...
 

okwhateverok

Senior Member
Sep 21, 2014
63
28
Amsterdam
Me too, im on Riru 25.4.4...

Maybe this logging problem is only on One Ui, if you are one a different rom there is a possibility that it work...
 

putin53455

New member
Jan 28, 2022
1
0
hello how can put my owd data in hook hook list ????

who can help me please contact me in {Mod edit}

i want spoof android version and manufater and android vwersion but i dont know how i have andrroid 12 can help me which hook i must use?
 
Last edited by a moderator:

Oswald Boelcke

Senior Moderator / Moderator & RC-RT Committees
Staff member
hello how can put my owd data in hook hook list ????

who can help me please contact me in {Mod edit}

i want spoof android version and manufater and android vwersion but i dont know how i have andrroid 12 can help me which hook i must use?
@putin53455

I've merged all your 3 consecutive posts into one. Please just edit your existing post instead of creating new ones, at least as nobody hasn't posted after you. Additionally, I've removed the link to telegram from your post above!
As an exemption from the last bullet of rule no. 5 of the XDA Forum Rules, we grant only developers the privilege to share references to their social media in their own development threads and if thorough support is provided in the thread. These conditions obviously don't apply to this thread or you. Additional information is also available here:
Please refrain from sharing social media links in future unless done in your own development thread.

Thanks for your cooperation!
Regards
Oswald Boelcke
Senior Moderator
 

Moon_stay

Senior Member
Apr 4, 2020
70
24
@M66B
Thanks for great privacy app
I had two questions
Why are all logs hooks apps are stored?
Why is there no option to clear logs hook?
Even removed apps. It is also saved!
 

Top Liked Posts

  • 4
    Moderator Announcement

    On request of OP @M66B the thread has been cleaned from posts that were not related to the topic of this thread. And on special request of OP, I've also removed his last two posts respectively PSA's.

    Regards
    Oswald Boelcke
    Senior Moderator
  • 12
    @k2helix @anuraag.neo can you please install this test version of XPrivacyLua?


    Edit: this problem is reported to be fixed, so:


    To people who installed the test version: you'll need to update to the version in the Xposed repo, which is different, even though the version number is the same!
    4
    Moderator Announcement

    On request of OP @M66B the thread has been cleaned from posts that were not related to the topic of this thread. And on special request of OP, I've also removed his last two posts respectively PSA's.

    Regards
    Oswald Boelcke
    Senior Moderator
    4
    Discussions about evading policies of companies can result in take down requests. As I have said before, I won't fight that ...
    2
    Discussions about evading policies of companies can result in take down requests. As I have said before, I won't fight that ...
    @M66B Thread cleaned assuming your consent.
    2
    As I was saying to the previous reply, that is basically the whole point (hence why I was originally asking as to whether somebody might have gone through the process already and had an XPrivacy backup I could use): I DO want to block certain system apps and functions (at least as many "non-required" as I can). It basically means some Telephony and/or Network function currently blocked is not allowing the transmission of data nor showing 3G/4G icons - although it doesn't affect voice calls or data via WiFi (for which I do get the icon, connection and transmission). Appreciate the response, but I guess I will just keep trying for a bit longer. I'll start unblocking processes in block, and see what changes I identify...
    Check the log in the companion app. Turn on 4g then go check the log and see what was the last app/service that tried to do something related to 4g and unblock it.
  • 307
    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 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.


    XDA:DevDB Information
    XPrivacyLua, Xposed for all devices (see above for details)

    Contributors
    M66B
    Source Code: https://github.com/M66B/XPrivacyLua

    Xposed Package Name: eu.faircode.xlua

    Version Information
    Status:
    Beta

    Created 2018-01-05
    Last Updated 2020-03-10
    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.