can't enable "always on" VPN for OpenVPN in EMUI (but works for other vendors UIs)

Search This thread

WieselDroid

Member
Dec 23, 2012
10
3
can't enable "always on" VPN for OpenVPN in EMUI (but works for other vendors UIs)

In Android 8, 3rd party VPN apps can use the new APIs to show up in Androids VPN list and also offer settings like "always on VPN".
I'm using "OpenVPN for Android". On my LG phone with Android 8 it shows up in that list just as a native VPN and I can edit it by clicking the gear icon on that entry in the list. There I can enable the "always on" feature.

But in EMUI, in that same VPN list, the gear icon is only shown for native VPNs. For my OpenVPN entry, theres an arrow icon instead. By clicking, it enters the OpenVPN app instead of showing an Android settings screen. Inside the OpenVPN app I can't do that system setting for "always on", I think that an app cannot set this setting, it must be done by the user in the Androidsettings.

Am I too stupid or did Huawei implemented the settings screens so strange that it is just not possible to access the needed screen?
Are there apps that let you change Android settings instead of using the proprietary setting pages from LG, Huawei, etc?
 

WieselDroid

Member
Dec 23, 2012
10
3
You can use Nova Launcher, as shown here:

https://xdaforums.com/huawei-p20-pro/how-to/disable-displaying-apps-huawei-emui-8-t3795342

You could also try installing Settings Database Editor which allows you to manually alter the settings database.

Nova Launcher is just for Homescreen (I'm already using it across all devices) but the Settings keep proprietary (or do I miss some settings of Nova?)

But thank you for the hint to Settings Database Editor, I was able to copy the 2 necessary lines from my LG phone.
For anyone interested in this, the settings are in "Secure Table":
"always_on_vpn_app" -> "de.blinkt.openvpn" (adjust if using another client)
"always_on_vpn_lockdown" -> "1"

But it only takes effect after a reboot. It doesn't matter much for me but what would I need to do after adding those system settings to apply the change? Is there some process to restart or a way to reload the config?