I have a Squid proxy installed with HTTPS/SSL support. When I install the generated CA certificate in Firefox and set the proxy, everything looks good -- that is, I can see all the HTTP(S) requests the Squid log files. It also works fine when I install the CA certificate in my emulator (Android 9) and set the proxy. Again, see all the requests in the Squid log files, i.e., the requests made by the browser or the apps that use the proxy settings.
However, when I do the exact same steps on a real device (Samsung A30s with Android 9), I have problems. Well, I still see all the requests made by the browser, but not the ones made by apps (and thus they yield connection errors). OK, I still can see the CONNECT request in the logs but no other requests (e.g., GET, POST). So the apps are definitely using the proxy settings. (I know that some apps like Facebook ingore the proxy settings and connect directly to their server; they still work fine, of course).
The odd thing is that everything was working on an old Android 6 phone. Here the same apps where working perfectly fine using the proxy and relying on HTTPS requests. Now I have a newer Android 9.0 phone and all apps so far fail. The apps obviously use the proxy (seeing the CONNECT entries in the logs) but seem to not not use/acknowledge the installed certificate.
Can the newer Android version be an issue? Maybe permissions? Can it be that the newer Samsung phone has some bloatware that requires additional settings or something (the old phone was a OnePlus with an almost stock Android version as far as I know)?
/system/etc/security/cacerts
/system/etc/security/cacerts
requiresu
to remount the file system as writable./system
can only be modified with root access.dm-verity
(Verified Boot) must also be disabled, or you may use bind mounts (see Magisk documentation for details). But please note that the app which are not proxy-aware (as you have mentioned) and those using SSL pinning will still not work with proxy. You need to perform extra steps to make them work. See some more details on using proxy on Android devices in this answer and the links given inside the answer.