Force androidwebView to debug mode with Xposed
For more Tencent massive technical articles, please follow the Cloud Plus community: https://cloud.tencent.com/developer
Author.feix760
From the article "Getting Started with Remote Debugging for Android Devices" we know that in android 4.4+ you can enable chrome remote debugging for webview by using the following code in the apk.
webview.setWebContentsdebuggingEnabled(true);
But the apk's we touch in development are often third party and no one will turn on webContentsdebuggingEnabled for us, and Xposed can force this.
Xposed
Xposed is able to hook (Hook) android application object's methods to implement AOP, a simple example.
The above code turns on webContentsDebuggingEnabled for QQ in the WebView.
How Xposed works can be found in the documentation: https://github.com/rovo89/XposedBridge/wiki/Development-tutorial
There is no detailed API page, because there are only a few APIs, you can check the source code: https://github.com/rovo89/XposedBridge/tree/master/src/de/robv/android/xposed
piggish
Nazism
1.Need android 4.4+ Root phone
2、Install Xposed framework
3. The Apk of QQ WebView has been opened: webviewdebughook. Apk