'How to add network security configuration to enable Charles proxy SSL in Nougat?
I am trying to enable Charles Proxy SSL on my Samsung s8 running on Android Nougat but don't know how to.
Before Nougat am able to successfully record the charles sessions for multiple apps on my device.
Have followed this and this to set up everything but it's the first step to follow while enabling Charles in Android. My use case is different than those in other questions because am monitoring third party apps and I do not have any AndroidManifest.xml or res directory to create network_configuration files.
Have also gone through the Network Security Configuration and what to do but don't know how.
Is there a way I can enable the proxy for all the third party apps in my device? Any ways to add this network configuration to the device itself and not individual apps?
Appreciate the help.
Solution 1:[1]
Steps
Create an
xmlfolder in your application'sresfolder.Add a file named
network_security_config.xmlin thexmlfolder with the following contents:<?xml version="1.0" encoding="utf-8"?> <network-security-config> <base-config cleartextTrafficPermitted="true"> <trust-anchors> <certificates src="system"/> </trust-anchors> </base-config> <debug-overrides> <trust-anchors> <certificates src="user"/> </trust-anchors> </debug-overrides> </network-security-config>Reference the
network_security_config.xmlfile in theapplicationtag in yourAndroidManifest.xmlfile, as follows:<application ... android:networkSecurityConfig="@xml/network_security_config" ...
Solution 2:[2]
As of 2022 adding just the following in network_security_config.xml worked for me.
<network-security-config>
<debug-overrides>
<trust-anchors>
<certificates src="user" />
</trust-anchors>
</debug-overrides>
</network-security-config>
the same is explained in docs as well. https://www.charlesproxy.com/documentation/using-charles/ssl-certificates/
after doing the above you will still have to refer the xml file in manifest
<application
...
android:networkSecurityConfig="@xml/network_security_config"
.../>
Solution 3:[3]
I will try to figure out the essence of the informations you given.
First: You have a Drupal 7 installation with compressed css files based on Bootstrap. That sounds the theme use less or sass precompiler for the theme css and you have the production (builded) instance of the project. Without the uncompressed less/sass/scss files it will be hard to edit the css. if you have no way to get the source files, the best way you can try is to add a extra css file and write you own css in it.
Second: Drupal strictly separates the code from the administration interface. Your PHP, HTML, CSS and other codes (except the WYSIWYG output) should not be entered via the administration interface. That's the best practice way. But anyway, there is a couple of modules that allows to write code inside the Drupal backend like this https://www.drupal.org/project/extra_css_js
Third: As information for you, Drupal 7s End of life is on November 28, 2022 so the best and recommanded way for you is: Freeze the Drupal 7s Instance as is (only Sercurity Updates and Hotfixes) and relaunch the Project with Drupal 9.
Solution 4:[4]
Drupal theme css files are mostly located in theme folder like "theme folder/css/style.css". As above mentioned, it might be used css minify tool or module for theme performance aspects. If it is created by drupal tools/module then once cache clear it will delete automatically and regenerate with new one with updated new css code on after page visit. You can also add custom css file by hook alter.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Adil Hussain |
| Solution 2 | Mightian |
| Solution 3 | Schwarz Developing |
| Solution 4 | Manikandan_Egrove |
