Add the following attribute to the in AndroidManifest.xml:
android:networkSecurityConfig': '@xml/nsc_mitm'
Then set up a MITM Proxy and add the cert (Settings -> Security -> Sth with Certificates)
| <!-- res/xml/nsc_mitm.xml --> | |
| <?xml version="1.0" encoding="utf-8"?> | |
| <network-security-config> | |
| <!-- Allow cleartext traffic --> | |
| <base-config cleartextTrafficPermitted="true"> | |
| <trust-anchors> | |
| <!-- Allow user-added (proxy) certificates --> | |
| <certificates src="user" /> | |
| <certificates src="system" /> | |
| </trust-anchors> | |
| </base-config> | |
| </network-security-config> |