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
You need understanding programming concepts at first . the language of programing is LUA.
Source :
https://www.lua.org/pil/contents.html
then read them :
Really simple to use privacy manager for Android 6.0 Marshmallow and later - GitHub - M66B/XPrivacyLua: Really simple to use privacy manager for Android 6.0 Marshmallow and later
github.com
Really simple to use privacy manager for Android 6.0 Marshmallow and later - XPrivacyLua/DEFINE.md at master · M66B/XPrivacyLua
github.com
for writing custom hook:
Really simple to use privacy manager for Android 6.0 Marshmallow and later - XPrivacyLua/FAQ.md at master · M66B/XPrivacyLua
github.com
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.