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.
How to auto import profile to openvpn?
-
- OpenVpn Newbie
- Posts: 3
- Joined: Thu Dec 01, 2016 2:48 am
-
- OpenVpn Newbie
- Posts: 3
- Joined: Thu Dec 01, 2016 2:48 am
Re: How to auto import profile to openvpn?
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?
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?