title: How are existing VPN applications creating new profiles in Android 2.0 - 2.3?
body: <p>After much searching on StackOverflow, it seems rooting a device in the only way to create a VPN profile pre-4.0</p>
  
  <p>My question is how do the following apps do it without root? </p>
  
  <p><a href="http://www.featvpn.com/" rel="noreferrer">http://www.featvpn.com/</a></p>
  
  <p><a href="https://play.google.com/store/apps/details?id=com.expressvpn.vpn&amp;hl=en" rel="noreferrer">https://play.google.com/store/apps/details?id=com.expressvpn.vpn&amp;hl=en</a></p>
  
  <p><strong>Update 1</strong></p>
  
  <p>Seems private API is the way to go pre-4.0. Unfortunately, not many resources out there to get started. Does anyone know if private api still requires a rooted device?</p>
  
  <p><strong>Update 2</strong></p>
  
  <p>It seems you can do this using modified Android.jar or by using reflection. L2TP/IPSEC still requires rooted device. PPTP does not seem to.</p>
  
  <p><a href="https://devmaze.wordpress.com/2011/01/18/using-com-android-internal-part-1-introduction/" rel="noreferrer">How to use internal APIs on Android</a></p>
  
  <p><strong>Update 3</strong></p>
  
  <p>Please note, this is taken from various sources. It seems root is required because VpnService starts racoon, which then runs as a system user, and retrieves the PSK from the KeyStore. So KeyStore entries created by other apps aren't visible to racoon. (In linux environment, racoon is a security process assisting in IPSEC related key negotiations - IKE).</p>
  
  <p><strong>This makes sense, however, there are still applications which achieve L2TP/IPSEC without root.</strong></p>
  
  <p><strong>Update 4</strong></p>
  
  <p>XinkVPN, source code to get started. Still does not allow users to create L2TP profile without user having to generate a key_store and recompile. Not very market friendly but a fabulous start.</p>
  
  <p><a href="https://github.com/xinthink/xinkvpn" rel="noreferrer">https://github.com/xinthink/xinkvpn</a></p>
  
  <p><a href="http://code.google.com/p/xinkvpn/" rel="noreferrer">http://code.google.com/p/xinkvpn/</a></p>