Android AppConfig %newline% not inserting line breaks in OpenVPN for AndroidSolved

Participant
Discussion
3 days ago Jul 21, 2026

I’m configuring OpenVPN for Android through an Android AppConfig policy and need to push a multiline VPN config into the Config field under VPN Configuration > List of VPN configurations.

I expected %newline% to insert line breaks, but the app behaves like the newlines are not being inserted. I also tried replacing the breaks with \n and \r\n, but those are passed to the app literally instead of being interpreted as line breaks.

The app can accept Base64-encoded config data as a workaround, but that prevents me from using Hexnode dynamic variables like %devicename% inside the VPN config. Is there a way to deploy this as plain text with line breaks and variables intact?

Replies (1)

Marked SolutionPending Review
Hexnode Expert
3 days ago Jul 21, 2026
Marked SolutionPending Review

Hello @monty ,

For OpenVPN for Android (‘de.blinkt.openvpn‘), the Config field requires actual line breaks in the managed configuration payload. Literal escape sequences such as ‘\n’ or ‘\r\n’ are not converted by the app in this field, so they are expected to appear as plain text.

Hexnode supports ‘%newline%‘ for inserting line breaks in AppConfig values. A formatting conflict previously affected certain Android AppConfig multiline fields, including the OpenVPN for Android Config field. This has been addressed, so ‘%newline%‘ should now insert proper line breaks while still allowing dynamic Hexnode wildcards such as ‘%devicename%‘.

Recommended setup:

  1. Open the Android policy where OpenVPN for Android is configured.
  2. Go to the managed app configuration for OpenVPN for Android.
  3. In the Config field, enter the VPN configuration as plain text.
  4. Replace each required line break with ‘%newline%‘.
  5. Keep dynamic variables such as ‘%devicename%‘ in the same field where needed.
  6. Save and associate the policy to the device.

Base64 encoding is no longer required for this use case if you need both multiline formatting and Hexnode dynamic variables.

Regards,
Simon Scott
Hexnode UEM

Save