Skip to content
Discussion options

You must be logged in to vote

You don't need to add constants to AndroidManifestBlock for this. You can use the raw Android attribute ids and set the manifest value as a resource reference.

The important part is: android:networkSecurityConfig must point to a real @xml/... resource id, not to the string "@xml/network_security_config".

Shape of the patch:

TableBlock table = apkModule.getTableBlock();
PackageBlock pkg = table.pickOne();

String path = "res/xml/network_security_config.xml";
String xml = """
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
    <base-config cleartextTrafficPermitted="true">
        <trust-anchors>
            <certificates src="system" />
            <certificates overridePi…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@isPatcher
Comment options

Answer selected by REAndroid
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants