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


Recommended>>
1、NASA uses Google AI for new unknown planet discovery
2、Blockchain Daily News
3、Artificial Intelligences 100x coins and what else has slipped through the cracks Anjar Handson Guide to Financial Freedom
4、Building an artificial intelligence unicorn in 3D imaging
5、A chart to see the current state of IoT use in various industries

    已推荐到看一看 和朋友分享想法
    最多200字,当前共 发送

    已发送

    朋友将在看一看看到

    确定
    分享你的想法...
    取消

    分享想法到看一看

    确定
    最多200字,当前共

    发送中

    网络异常,请稍后重试

    微信扫一扫
    关注该公众号