Based on the comment troubleshooting topic for the OP, the answer is to install only the proxy CA certificate as trusted, not its cert + private key.
The problem was caused by two factors:
Installing not only CA MiTM proxy certificate, but also its private key (which allows VPN applications on the device to decrypt / MiTM network traffic from other applications). You do not need the MiTM proxy secret key on the device.
Android Nougat changes the behavior of the Settings -> Security -> Install from storage stream for files that contain a private key in addition to the certificate (s). This change in behavior exposes the above problem.
Prior to Nougat, the Settings -> Security -> Install from storage stream for files containing the private key in addition to certificates mistakenly installed certificates as reliable for server authentication (for example, HTTPS, TLS, which made your MiTM successful), in addition to the correct installation as client certificates used to authenticate this Android device to servers. In Nougat, the error has been fixed, and these certificates are no longer set as trusted for server authentication. This prevents client authentication credentials from affecting (security) connections to servers. In your scenario, this will prevent the success of your MiTM.
What complicates the situation is that Settings -> Security -> Install from storage does not explicitly provide the user with an indication of whether they install client authentication credentials (private key + certificate chain) or server authentication trust (CA certificate only - - no secret key needed). As a result, the Settings -> Security -> Install from storage stream guesses whether it deals with client / user proxy authentication or server authentication trust proxy, assuming that if the private key is specified, it should be the client / user ID. In your case, it was incorrectly assumed that you are setting the credentials for client / user authentication, and not a server authentication proxy.
P. S. With regard to network security configuration, you should probably configure your application to also trust "system" trust bindings in debug mode (debug-overrides section). Otherwise, the application debug builds will not work if the connections are not a MiTM'd proxy server whose CA certificate is installed as reliable on the Android device.
Alex Klyubin Aug 30 '16 at 1:31 on 2016-08-30 01:31
source share