Remove All Ads from XDA

Xposed - Legacy thread. Don't panic, Xposed is still here.

2,585 posts
Thanks Meter: 81,713
 
By rovo89, Senior Recognized Developer on 31st March 2012, 02:55 PM
Thread Closed Email Thread
25th March 2014, 09:20 AM |#10011  
bernlim's Avatar
Member
Thanks Meter: 10
 
More
Quote:
Originally Posted by PonsAsinorem

Did you try WebView and not Webview at findAndHookMethod("android.webkit.Webview"

Check the link I gave earlier.

Roger that, it helped thanks!
However, now it throws java.lang.NoSuchMethodError: android.webkit.WebView#android.webkit.WebView.load Url()#exact
Same error for WebView.loadUrl() and just loadUrl() as well.
My WebView app is a default template like so:
Code:
WebView myWebView = (WebView) findViewById(R.id.webview);
myWebView.setWebViewClient(new WebViewClient());
myWebView.loadUrl(url);
 
 
25th March 2014, 09:26 AM |#10012  
dk_zero-cool's Avatar
Senior Member
Flag Horsens
Thanks Meter: 5,044
 
More
Quote:
Originally Posted by bernlim

Roger that, it helped thanks!
However, now it throws java.lang.NoSuchMethodError:

Method should only contain the name, not the whole package

Code:
findAndHookMethod("android.webkit.WebView", lpparam.classLoader, "loadUrl", new XC_MethodHook() {
It works like this

Code:
findAndHookMethod("<package>.<class>$<sub-class>", ClassLoader, "MethodName", XC_MethodHook)
25th March 2014, 09:29 AM |#10013  
bernlim's Avatar
Member
Thanks Meter: 10
 
More
Quote:
Originally Posted by dk_zero-cool

Method should only contain the name, not the whole package

Code:
findAndHookMethod("android.webkit.WebView", lpparam.classLoader, "loadUrl", new XC_MethodHook() {

Yes, as mentioned I did try just loadUrl as well with the same error.
25th March 2014, 09:32 AM |#10014  
Junior Member
Thanks Meter: 21
 
More
Need to block apps using xposed modules
Hi I want to block apps like facebook, twitter, etc on Working days i.e. Mon-Fri.

Can you tell me how should I completely block such apps that

1. The app icon can be visible, but it should not open on clicking on it.

2. If the app is already running on sunday, at 00.00 Monday it should just hide the app in such a way that it should not be opened till next saturday. And on saturday the app should resume from where it was closed. I don't want to close the app.

3. Also is there any way to hide the icon itself that it cannot be seen.

4. Even if somebody tries to launch the app from different ways(Google Play, or may be terminal), it should not open in restricted time.

So my idea is to block the app where it actually starts, for that I want to know the source file where app actually starts, the very basic function which will be called every time when the app starts.

Also I want to know how to deal with the situation when the app is already running and I want to block it(hide it) without losing the data of the app.
25th March 2014, 09:34 AM |#10015  
dk_zero-cool's Avatar
Senior Member
Flag Horsens
Thanks Meter: 5,044
 
More
Quote:
Originally Posted by bernlim

Yes, as mentioned I did try just loadUrl as well with the same error.

Sorry, you need to apply the string parameter type

Code:
findAndHookMethod("android.webkit.WebView", lpparam.classLoader, "loadUrl", String.class, new XC_MethodHook()
The Following User Says Thank You to dk_zero-cool For This Useful Post: [ View ] Gift dk_zero-cool Ad-Free
25th March 2014, 09:37 AM |#10016  
egingell's Avatar
Senior Member
Thanks Meter: 2,073
 
Donate to Me
More
Quote:
Originally Posted by bernlim

Yes, as mentioned I did try just loadUrl as well with the same error.

loadUrl() takes arguments. They must be included.

E.G.

findAndHookMethod(WebView.class, "loadUrl", String.class, hook);
or
findAndHookMethod(WebView.class, "loadUrl", String.class, Map<String,String>.class, hook);

Note: I don't know how or if the second one will work... Maybe just Map.class?

Also note that you are only hooking one, not both loadUrl() methods.

Sent from: SGS2 - JB 4.1.2 GB27 / SGS4 - JB 4.2.2 MF9
The Following User Says Thank You to egingell For This Useful Post: [ View ] Gift egingell Ad-Free
25th March 2014, 09:43 AM |#10017  
bernlim's Avatar
Member
Thanks Meter: 10
 
More
Quote:
Originally Posted by dk_zero-cool

Sorry, you need to apply the string parameter type

Code:
findAndHookMethod("android.webkit.WebView", lpparam.classLoader, "loadUrl", String.class, new XC_MethodHook()

Quote:
Originally Posted by egingell

loadUrl() takes arguments. They must be included.

E.G.

findAndHookMethod(WebView.class, "loadUrl", String.class, hook);
or
findAndHookMethod(WebView.class, "loadUrl", String.class, Map<String,String>.class, hook);

Note: I don't know how or if the second one will work... Maybe just Map.class?

Also note that you are only hooking one, not both loadUrl() methods.

Sent from: SGS2 - JB 4.1.2 GB27 / SGS4 - JB 4.2.2 MF9

Works! Thanks so much.
p.s. Map.class doesn't work for my case.
25th March 2014, 09:44 AM |#10018  
dk_zero-cool's Avatar
Senior Member
Flag Horsens
Thanks Meter: 5,044
 
More
Quote:
Originally Posted by egingell

findAndHookMethod(WebView.class, "loadUrl", String.class, hook);
or
findAndHookMethod(WebView.class, "loadUrl", String.class, Map<String,String>.class, hook);

Note: I don't know how or if the second one will work... Maybe just Map.class?

Also note that you are only hooking one, not both loadUrl() methods.

Or he can just use "hookAllMethods" from xposed bridge to get them all
25th March 2014, 09:53 AM |#10019  
egingell's Avatar
Senior Member
Thanks Meter: 2,073
 
Donate to Me
More
Quote:
Originally Posted by dk_zero-cool

Or he can just use "hookAllMethods" from xposed bridge to get them all

Indeed. I've never tried. Seems like one would need a pant load of sanity checks, though.

Sent from: SGS2 - JB 4.1.2 GB27 / SGS4 - JB 4.2.2 MF9
25th March 2014, 10:00 AM |#10020  
dk_zero-cool's Avatar
Senior Member
Flag Horsens
Thanks Meter: 5,044
 
More
Quote:
Originally Posted by egingell

Indeed. I've never tried. Seems like one would need a pant load of sanity checks, though.

Well in this case you can just check obj length.

Code:
Map<String, String> additionalHttpHeaders = param.obj.length > 1 ? (Map<String, String>) param.obj[1] : null;
25th March 2014, 10:21 AM |#10021  
Anistruk's Avatar
Senior Member
Thanks Meter: 11
 
More
Maybe already answer but here it goes, at the installation i have this error:



What can i do?

Thanks in advance!
Thread Closed Subscribe to Thread

Tags
don't ask questions about modules here!!!, framework, xposed
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes