Monday, July 29, 2013

How to manually install the OpenVPN binary

It seems that since the upgrade to Android 4.3 the OpenVPN Installer App is not working for me any more. I get some error saying /system cannot be mounted writeable (rw).
However, it is still possible toinstall the openvpn binary per hand... and it is not as complicated as it seems! This guide only works on rooted devices and is written for Linux users, however the lower part should also work on Windows and Mac.

At first you need to get the Android Debug Bridge binary and install it on your computer (I just put it into $HOME/bin).
Then download the latest OpenVPN Installer APK - we need to extract the openvpn binary from this package:

Now use adb to push the binary to your phone/tablet's "sdcard" (external storage):

adb push openvpn /sdcard/

The next two commands will open a shell and give us root access on your Android device. Everything you type afterwards happens directly on your device, so be careful!

adb shellsu

Now we need to mount /system as writeable to be able to make changes. Next we copy the binary to its final location and delete it on the sdcard (unfortunately moving is not possible). After we changed the file-permissions so that the binary can be executed, we need to mount /system as read-only again:

22 comments:

if you get a error during connecting that ifconfig cannot be executed.

before you remount system ro you need to make a symlink for ifconfig to busybox. the openvpn binary seems to want it in /system/xbin but busybox seems for forget the symlink (but managed to do /system/bin/toolbox *shrug*).

Thanks for the howto! It helped me until I found a workaround for the OpenVPN Installer App itself, as it is open-source, here is the fix to make it work on Android 4.3:http://code.google.com/p/android-openvpn-installer/issues/detail?id=23

Should you get a error during connecting that ifconfig can't be executed.

Before you remount system ro you have to make a symlink for ifconfig in order to busybox. the openvpn binary appears to want it in /system/xbin but busybox seems for your investment symlink (but managed to perform /system/bin/toolbox *shrug*.

for all you that have problem on android 4.4 use this openvpn installer. off course first uninstall any other version that you may havehttp://android-openvpn-installer.googlecode.com/issues/attachment?aid=230007000&name=android-openvpn-installer-use_su_for_proc_mounts-fixed.patch&token=-BgBqaHCaDMcP7TDvHsJoLw42pk%3A1387359913578