[英]Charles proxy in non debuggable flavour of Android app
首先让我澄清一下,我知道这是一个非常糟糕的做法,我不会将此更改推送到我的生产代码中。 但有时我们需要调试我的应用程序不可调试风格的一些更改,但所有 https url 都失败并出现以下错误
Client SSL handshake failed: An unknown issue occurred processing the certificate (certificate_unknown)
我使用了以下网络配置文件并添加到我的清单文件中。 这在应用程序的可调试风格下工作,但仍然无法在不可调试风格下工作。
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config>
<trust-anchors>
<certificates src="system" />
</trust-anchors>
</base-config>
<debug-overrides>
<trust-anchors>
<certificates src="user" />
</trust-anchors>
</debug-overrides>
</network-security-config>
有什么方法可以使用 charles 在 android 应用程序的不可调试风格中监视我的网络调用?
这个对我有用:
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config>
<trust-anchors>
<certificates src="user" />
<certificates src="system" />
</trust-anchors>
</base-config>
</network-security-config>
创建需要使用 Charls 调试的发布版本时,请在应用程序上下文内的清单中。 请在尝试构建发布版本并尝试使用 Charls 进行调试之后添加android:debuggable="true"
。 我还没有尝试过,但这可能会奏效。 根据以下链接。 https://developer.android.com/training/articles/security-config.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.