How to auto import profile to openvpn?

Official client software for OpenVPN Access Server and OpenVPN Cloud.
Post Reply
spxyoung
OpenVpn Newbie
Posts: 3
Joined: Thu Dec 01, 2016 2:48 am

How to auto import profile to openvpn?

Post by spxyoung » Thu Dec 01, 2016 2:52 am

I develop an app, need to auto import profile to openvpn.
After searching Internet, I successfully auto start openvpn with
manually import profile.The method is invoke the activity
net.openvpn.openvpn.OpenVPNClient.
I also found the activity net.openvpn.openvpn.OpenVPNImportProfile,
but I can't invoke the activity,the error is permission deny.
I need help.thank you for any idea.

spxyoung
OpenVpn Newbie
Posts: 3
Joined: Thu Dec 01, 2016 2:48 am

Re: How to auto import profile to openvpn?

Post by spxyoung » Tue Dec 06, 2016 3:11 am

By searching the Internet.I found someone successfully import profile using activity OpenVPNAttachmentReceiver.
But I use adb shell to run the activity.It didn't work.
my command is :
#am start -n net.openvpn.openvpn/.OpenVPNAttachmentReceiver -d "/a.ovpn" -t "application/x-openvpn-profile"

There are only three usable activity:OpenVPNClient, OpenVPNAttachmentReceiver, OpenVPNDisconnect.
only OpenVPNAttachmentReceiver is possibly use to import the profile.And I found someone successfully use adb
shell to run the activity to import profile.Why I cann't use it?

Post Reply