[英]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.