I am using this to configure and start PPTP
or L2TP
protocol programmatically
L2tpService l2tpService = new L2tpService();
VpnServiceBinder vpnServiceBinder = new VpnServiceBinder();
L2tpProfile l2tpProfile = new L2tpProfile();
l2tpProfile.setSecretEnabled(true);
l2tpProfile.setSecretString("123456");
l2tpProfile.setName("test");
l2tpService.setContext(vpnServiceBinder, l2tpProfile);
Intent intent = new Intent(getApplicationContext(), vpnServiceBinder.getClass());
startService(intent);
After run this code
l2tpService.connect("136.243.133.200", "test", "K@test");
Error:
Unable to set property "ctl.start" to "mtpd": connection failed; errno=13 (Permission denied)
Please help me.