How to use DroidVPN on Android Lollipop?
Posted on June 14, 2015 @ 2:42 am
With the release of Android 4.3, Security-Enhanced Linux (SELinux) is used to protect the Android operating software from malicious code that could cause damage to the phone. And then when they released Android 5.0, SELinux was set by default to Enforcing mode. Unfortunately when SELinux is enabled or in Enforcing mode it blocks some functions that is needed by DroidVPN to work properly. Please note that this problem also affects certain Jellybean and KitKat devices that has SELinux set to enforcing mode. It doesnt affect all Jellybean and Kitkat devices as most manufacturers have it still set by default to permissive mode..
This problem only occurs on rooted android devices and you are connecting using functions that requires special permission like connecting through ICMP protocol or binding your connection to a local port number that is less than 1024. If your device is not rooted then you are not going to be affected by this problem. You will see the following error messages on your logs if you are having problems related to SELinux permission.
We then released a version that contained bug fixes for the SELinux permission problem on Android 5.0. The new version worked but then Google started to crack down on apps that modifies or disables SELinux on the device. Some apps have been already suspended and removed from Google Play so we have no choice but to comply with Google's request to remove the SELinux related codes. After uploading the new version that has the SELinux fix removed more users complained about this problem, there was a workaround to this problem by using the SELinux mode changer app but some user's doesnt want to use another app just to make DroidVPN work so we decided to release a separate version that already includes the SELinux fix.
How to fix the SELinux problem?
Basically all you need to do is to set your SELinux mode to Permissive. There are two ways you can set your SELinux in permissive mode
Option 1: Use the SELinux mode changer app.
Follow the steps below to set your SELinux mode to permissive as suggested by one of our users.
- You MUST reboot your phone after first installation of the app, not doing this and changing the permission did not seem to work.
- It's as simple as going into the app to change selinux status to permissive.
- I found that after every reboot of the phone selinux status changed to enforcing (however those that use custom kernels should not have this issue, right now I'm on stock CM)
- So after every reboot the user must once again change the selinux status to permissive.
- That's it! Just be sure to tick the correct boxes that pop up when opening the app.
Option 2: Install the DroidVPN version with SELinux fix.
If you do not want to use a separate app to run DroidVPN you can download a separate version of DroidVPN which will automatically changes the SELinux to permissive mode if needed. You can download the DroidVPN with SELinux fix which we will call the B version from the download link page. Just scroll down to the bottom page to see the download link.
DroidVPN download page: DroidVPN B version with SELinux Fix
Please note that you must download updates manually if you are going to install this version and not the one from Google Play. Updates are announced via our Facebook page.
I cannot change my SELinux mode to permissive
Please note that not all devices can easily allow you to change your SELinux status one of them are Samsung devices with KNOX. The only option for now is to run the device without root. You can run DroidVPN without root by denying root access to DroidVPN from your SuperSU app or by not using ICMP protocol and not binding your Local port to port number less than 1024.
But if you needed to use ICMP or you needed to bind your local port to registered ports(0-1024) then you can still set your SELinux mode to permissive mode by flashing a new kernel with SELinux already set to permissive mode on your device. You can download and find tutorials on how to flash a new kernel on your device at XDA Developers.
Still having problems?
If you are still having problems connecting to DroidVPN please send an email to support[at]droidvpn.com and then send your logs by following the instructions here.