FORUMS
Remove All Ads from XDA

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

17,966 posts
Thanks Meter: 36,913
 
By M66B, Recognized Developer on 28th January 2018, 02:16 PM
Thread Closed Email Thread
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??
 
 
30th January 2018, 05:27 AM |#22  
M66B's Avatar
OP Recognized Developer
Thanks Meter: 36,913
 
More
Quote:
Originally Posted by mnjm9b

thank you...that helped A LOT.

any Ideas on how to hook abstract class??

Abstract classes and methods cannot be hooked. See them as a kind of templates without text. So, you will have to find the derived class, with the text filled in.

Which class are you looking at?
30th January 2018, 05:45 AM |#23  
mnjm9b's Avatar
Senior Member
Thanks Meter: 227
 
More
Quote:
Originally Posted by M66B

Abstract classes and methods cannot be hooked. See them as a kind of templates without text. So, you will have to find the derived class, with the text filled in.

Which class are you looking at?

android.webkit.WebSettings.UserAgentString
30th January 2018, 07:00 AM |#24  
M66B's Avatar
OP Recognized Developer
Thanks Meter: 36,913
 
More
Quote:
Originally Posted by mnjm9b

android.webkit.WebSettings.UserAgentString

This method returns an instance of WebSettings:
https://developer.android.com/refere...#getSettings()

In a hook after you can try to manipulate the user agent string, but there is no public method to set it. The other problem is that the web view can be handled by a browser, so even if you find a way to set the user agent string, it will be browser dependent. Also, the user may switch from the web view to the browser. So, you'll need to hook the browser user agent too.

tl;dr; find a browser where you can select/set a user agent string.
30th January 2018, 07:51 AM |#25  
Rom's Avatar
Senior Member
Flag Lyon
Thanks Meter: 1,022
 
Donate to Me
More
I am currently learning Lua docs, but about XPrivacyLua usage for that, i don't understand where i can make tests by applying any Lua command, it is an in-app feature or i must create a specific file contained the Lua command(s) in a specifiq folder ?
30th January 2018, 08:10 AM |#26  
M66B's Avatar
OP Recognized Developer
Thanks Meter: 36,913
 
More
Quote:
Originally Posted by Rom

I am currently learning Lua docs, but about XPrivacyLua usage for that, i don't understand where i can make tests by applying any Lua command, it is an in-app feature or i must create a specific file contained the Lua command(s) in a specifiq folder ?

In the XPrivacyLua companion app you can edit definitions. You can add a new one or modify an existing one.

https://play.google.com/apps/testing...rcode.xlua.pro
30th January 2018, 09:29 AM |#27  
Rom's Avatar
Senior Member
Flag Lyon
Thanks Meter: 1,022
 
Donate to Me
More
Quote:
Originally Posted by M66B

In the XPrivacyLua companion app you can edit definitions. You can add a new one or modify an existing one.

https://play.google.com/apps/testing...rcode.xlua.pro

I already started to participate in your BETA test program, but i had not fully explored it, it's found now.
And indeed it is, how could i say...quite impressive!
So in this section "Definitions", i see rules already established with your GPL licenses, so let's assume if we take a very simple example: if i want to create a new rule with a command in Lua language that will prohibit all access to SMS, it will only apply to one default application or to all user and system applications?
30th January 2018, 09:32 AM |#28  
M66B's Avatar
OP Recognized Developer
Thanks Meter: 36,913
 
More
Quote:
Originally Posted by Rom

I already started to participate in your BETA test program, but i had not fully explored it, it's found now.
And indeed it is, how could i say...quite impressive!
So in this section "Definitions", i see rules already established with your GPL licenses, so let's assume if we take a very simple example: if i want to create a new rule with a command in Lua language that will prohibit all access to SMS, it will only apply to one default application or to all user and system applications?

You'll need to apply it to the apps you want to prevent access to SMSes, since any app can read SMSes with the right permissions.

BTW, there is already a hook to prevent access to SMSes.
30th January 2018, 11:57 AM |#29  
Rom's Avatar
Senior Member
Flag Lyon
Thanks Meter: 1,022
 
Donate to Me
More
Quote:
Originally Posted by M66B

You'll need to apply it to the apps you want to prevent access to SMSes, since any app can read SMSes with the right permissions.

BTW, there is already a hook to prevent access to SMSes.

Agree understood, so for what is:
"Collections", i guess it's a predefined category,
Concerning the category "Group", i don't quite see what this corresponds to and what it allows to define.
The category "Name" as its name should indicate it should define a name rather short and sufficiently speaking for the user having set it up.
The category "Autheur" designates the pseudo of the script author.
It follows the boxes to check / uncheck to enable/disable.
Put in "Optional" (what is this for?)
Usage (what is this for?)
"Notify" which I suppose is used to create a Toast notification to each execution of the rule in question?
It follows the "Class", which I suppose corresponds to the targeted class JAVA.
Then "Method" (what is this?)
Then "Return type" which I suppose is the value returned anyway, is this good?
For "min SDK" and "Max SDK" this is to refer to the supported Android version (s).
"Exclude packages" should refer to the names of the application packets for which the rule in question will be ignored and finally the Lua script to execute.

Apart from the cases where i don't see what it will serve, i understood everything?

If i take another example now, let's say i want to apply a Lua rule through your application for my system application that will redirect the default save path for Bluetooth files transfert.
So i should create a new rule among the existing ones in which i should find the JAVA class used by decompiling my apk in my phone, rewrite word by word the method used, indicate a recognizable name, indicate my username, indicate the state of the hook , the name of the class to which the rule should apply, the method (idk what it is), etc etc, thats it ?

Sorry for all these questions that may seem very simple, but i am not a great talent with the JAVA language and the possibilities of your applications seem extremely advanced!
30th January 2018, 12:15 PM |#30  
Senior Member
Thanks Meter: 207
 
More
Quote:
Originally Posted by Rom

Agree understood, so for what is:
"Collections", i guess it's a predefined category,
Concerning the category "Group", i don't quite see what this corresponds to and what it allows to define.
The category "Name" as its name should indicate it should define a name rather short and sufficiently speaking for the user having set it up.
The category "Autheur" designates the pseudo of the script author.
It follows the boxes to check / uncheck to enable/disable.
Put in "Optional" (what is this for?)
Usage (what is this for?)
"Notify" which I suppose is used to create a Toast notification to each execution of the rule in question?
It follows the "Class", which I suppose corresponds to the targeted class JAVA.
Then "Method" (what is this?)
Then "Return type" which I suppose is the value returned anyway, is this good?
For "min SDK" and "Max SDK" this is to refer to the supported Android version (s).
"Exclude packages" should refer to the names of the application packets for which the rule in question will be ignored and finally the Lua script to execute.

That stuff is all covered in DEFINE.md in the XPL GitHub repo
The Following User Says Thank You to Namnodorel For This Useful Post: [ View ] Gift Namnodorel Ad-Free
30th January 2018, 12:17 PM |#31  
M66B's Avatar
OP Recognized Developer
Thanks Meter: 36,913
 
More
Quote:
Originally Posted by Rom

Agree understood, so for what is:
"Collections", i guess it's a predefined category,
Concerning the category "Group", i don't quite see what this corresponds to and what it allows to define.
The category "Name" as its name should indicate it should define a name rather short and sufficiently speaking for the user having set it up.
The category "Autheur" designates the pseudo of the script author.
It follows the boxes to check / uncheck to enable/disable.
Put in "Optional" (what is this for?)
Usage (what is this for?)
"Notify" which I suppose is used to create a Toast notification to each execution of the rule in question?
It follows the "Class", which I suppose corresponds to the targeted class JAVA.
Then "Method" (what is this?)
Then "Return type" which I suppose is the value returned anyway, is this good?
For "min SDK" and "Max SDK" this is to refer to the supported Android version (s).
"Exclude packages" should refer to the names of the application packets for which the rule in question will be ignored and finally the Lua script to execute.

Apart from the cases where i don't see what it will serve, i understood everything?

If i take another example now, let's say i want to apply a Lua rule through your application for my system application that will redirect the default save path for Bluetooth files transfert.
So i should create a new rule among the existing ones in which i should find the JAVA class used by decompiling my apk in my phone, rewrite word by word the method used, indicate a recognizable name, indicate my username, indicate the state of the hook , the name of the class to which the rule should apply, the method (idk what it is), etc etc, thats it ?

Sorry for all these questions that may seem very simple, but i am not a great talent with the JAVA language and the possibilities of your applications seem extremely advanced!

Most is right on spot.

For a better understanding, look at the hook with the name 'Privacy.WifiInfo.getSSID' in the companion app. Scroll down to get to the Lua script. Also look at the WifiInfo documentation here and I guess you will be able to put most things together: https://developer.android.com/refere.../WifiInfo.html

This is one of the hooks which will be applied in XPrivacyLua as part of the 'Read network data' restriction (which corresponds to group in the definition).
Thread Closed Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes