FORUMS
Remove All Ads from XDA

[APP][XPOSED][6.0+] Use Xposed without developing a module

17,966 posts
Thanks Meter: 36,912
 
By M66B, Recognized Developer on 28th January 2018, 02:16 PM
Thread Closed Email Thread
29th January 2018, 05:10 PM |#11  
M66B's Avatar
OP Recognized Developer
Thanks Meter: 36,912
 
More
Quote:
Originally Posted by jawz101

... I turned on notifications for your new Firebase rules. I would think a bunch of apps I have use Firebase Analytics. @M66B Have you seen any apps trigger it yet?
Even if the app imported Firebase Analytics library and gathers Firebase Analytics but never uses the setAnalyticsCollectionEnabled() method in its own code would it mean this hook will never trigger?

An app will normally not disable/enable analytics given the default is enabled and the user has mostly no choice in this. So see this hook as a safeguard to prevent an app enabling analytics again after we disabled it in another hook
 
 
29th January 2018, 05:44 PM |#12  
jawz101's Avatar
Senior Member
Thanks Meter: 710
 
More
Quote:
Originally Posted by M66B

An app will normally not disable/enable analytics given the default is enabled and the user has mostly no choice in this. So see this hook as a safeguard to prevent an app enabling analytics again after we disabled it in another hook

Would there be a way to introduce the app to calling it? Or maybe that's what you're implying. Also, have you noticed that system and google apps seem to gray out the read identifiers permission? Ex: set read identifiers as restricted on Android Webview or Google Photos/Maps/Google TTS. Turns pink Get out of XPrivacyLua and open it again. Read Identifiers is gray. (I'm on LineageOS if that matters)
29th January 2018, 06:04 PM |#13  
M66B's Avatar
OP Recognized Developer
Thanks Meter: 36,912
 
More
Quote:
Originally Posted by jawz101

Would there be a way to introduce the app to calling it? Or maybe that's what you're implying. Also, have you noticed that system and google apps seem to gray out the read identifiers permission? Ex: set read identifiers as restricted on Android Webview or Google Photos/Maps/Google TTS. Turns pink Get out of XPrivacyLua and open it again. Read Identifiers is gray. (I'm on LineageOS if that matters)

Normally an apps doesn't call the function. Maybe if the user can choose to opt in or opt out, but this is rarely the case.

The other thing should go into the XPrivacyLua XDA thread, but I will look into it anyway.
29th January 2018, 06:54 PM |#14  
mnjm9b's Avatar
Senior Member
Thanks Meter: 227
 
More
Quote:
Originally Posted by M66B

I will see what I can do for collection and group, but all the other fields are flexible and depend on the hook.

Thanks, That's a good start.
Maybe if the "PRO" app takes off enough for you to bother you could charge extra for the expanded feature of having the drop lists change depending on the choices made?

I did have a moment to look over a definition I was playing with for "TIME"

it serves no real purpose so I gave up early but if I could get a better understanding on why it doesn't work it could help with actual ones.

using the FINGERPRINT example I made several other entries that all worked fine but this one caused issue.
I assumed it was because according to https://developer.android.com/refere.../os/Build.html the type for TIME wasn't "String" but "Long"

this is the last one I tried...
Code:
{
  "collection": "Privacy",
  "group": "Read.Device",
  "name": "Build.TIME",
  "author": "M66B",
  "className": "android.os.Build",
  "methodName": "#TIME",
  "parameterTypes": [],
  "returnType": "long",
  "minSdk": 1,
  "maxSdk": 999,
  "enabled": true,
  "optional": false,
  "usage": true,
  "notify": false,
  "luaScript": "function after(hook, param)\n  param:setResult("unknown")\n  return true\nend\n"
}


I was also playing with "SUPPORTED_ABIS" which also didn't work and the type was "Sting []" instead of just "String" so I was thinking that was the problem also.

29th January 2018, 07:00 PM |#15  
Senior Member
Thanks Meter: 207
 
More
@mnjm9b You are returning a string (series of characters) as a long (number). Try returning just a number (without the quotes).
String[] is an array (mulitple strings), so you need to return an array as well. But I don't know how to do that in Lua right now
29th January 2018, 07:03 PM |#16  
M66B's Avatar
OP Recognized Developer
Thanks Meter: 36,912
 
More
Quote:
Originally Posted by Namnodorel

@mnjm9b You are returning a string (series of characters) as a long (number). Try returning just a number (without the quotes).
String[] is an array (mulitple strings), so you need to return an array as well. But I don't know how to do that in Lua right now

You are 100% right.

Returning a string array is not trivial. Look at 'generic_empty_string_array.lua' about how to do this.
29th January 2018, 07:55 PM |#17  
mnjm9b's Avatar
Senior Member
Thanks Meter: 227
 
More
Quote:
Originally Posted by Namnodorel

@mnjm9b You are returning a string (series of characters) as a long (number). Try returning just a number (without the quotes).
String[] is an array (mulitple strings), so you need to return an array as well. But I don't know how to do that in Lua right now

so in my example the returnType instead of "long" should be a number like 0 without quotes?

I tried that and it still doesn't work.

---------- Post added at 08:55 PM ---------- Previous post was at 08:54 PM ----------

Quote:
Originally Posted by M66B

You are 100% right.

Returning a string array is not trivial. Look at 'generic_empty_string_array.lua' about how to do this.

thanks for this, I guess I am in WAY over my head.
29th January 2018, 08:00 PM |#18  
Senior Member
Thanks Meter: 207
 
More
Quote:
Originally Posted by mnjm9b

so in my example the returnType instead of "long" should be a number like 0 without quotes?

I tried that and it still doesn't work.

No. the return type was correct. That specifies what type of object you are expected to return. What you need to change is what you then actually return, which is

Code:
param:setResult("unknown")
to
Code:
param:setResult(12345678)
29th January 2018, 10:27 PM |#19  
Rom's Avatar
Senior Member
Flag Lyon
Thanks Meter: 1,022
 
Donate to Me
More
@M66B

Thank you for your work, if i understand right, you provide us an programmable interface that will execute command lines written in Lua language without having to create a complete module in JAVA for XPosed?

From what i understood in your initial post, you indicate that we must install your module "XPrivacyLua", then that one disposes there after of the possibility to apply for the applications which one wishes, lines of codes written in Lua language and which do not necessarily have to relate to the logic of rights of access concerning privacy?

If yes then we must necessarily install XPrivacyLua even if in view of all your work provided on it the basic functions do not interest me forcibly?

All this seems to be promising however
29th January 2018, 10:43 PM |#20  
M66B's Avatar
OP Recognized Developer
Thanks Meter: 36,912
 
More
Quote:
Originally Posted by Rom

@M66B

Thank you for your work, if i understand right, you provide us an programmable interface that will execute command lines written in Lua language without having to create a complete module in JAVA for XPosed?

Yes.

Quote:
Originally Posted by Rom

From what i understood in your initial post, you indicate that we must install your module "XPrivacyLua", then that one disposes there after of the possibility to apply for the applications which one wishes, lines of codes written in Lua language and which do not necessarily have to relate to the logic of rights of access concerning privacy?

Yes.

Quote:
Originally Posted by Rom

If yes then we must necessarily install XPrivacyLua even if in view of all your work provided on it the basic functions do not interest me forcibly?

All this seems to be promising however

You'll need XPrivacyLua to install and run defined Xposed hooks written in Lua, but you don't need to use the built in privacy related hooks.

The companion app allows you to switch to another collection of hooks you've written, in effect disabling the built-in privacy related hooks.

Try it and I will help you when needed and in the process I will update the documentation where needed.
The Following 3 Users Say Thank You to M66B For This Useful Post: [ View ]
29th January 2018, 11:26 PM |#21  
mnjm9b's Avatar
Senior Member
Thanks Meter: 227
 
More
Quote:
Originally Posted by Namnodorel

No. the return type was correct. That specifies what type of object you are expected to return. What you need to change is what you then actually return, which is

Code:

param:setResult("unknown")

to

Code:

param:setResult(12345678)

thank you...that helped A LOT.

any Ideas on how to hook abstract class??
Thread Closed Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes