Thank you for all info posted. I have done the connect part. But for disconnect nothing works. I have tried both below solution.
Could you please give a help?
am start -a android.intent.action.MAIN -net.openvpn.openvpn/activities.DisconnectVPN
Send Intent Action: android.intent.action.VIEW Cat: None Extra: net.openvpn.openvpn.AUTOSTART_PROFILE_NAME: <Your VPN Name> Package: net.openvpn.openvpn Class: net.openvpn.openvpn.DisconnectVPN Target: Activity
Hello, you can just use the same code that you used to connect the VPN but, replace your VPN name with a bogus name. When it attempts to connect to the bogus VPN it will disconnect from the existing.