Jump to content

Replacing OpenVPN in MoDaCo Custom ROM 3.1


Recommended Posts

Guest yumbelie
Posted (edited)

RESOLVED: SEE 7th POST.

I've baked a shiny custom ROM for my HTC Desire from the Online Kitchen (phone is rooted) - problem is, the OpenVPN version included does not appear to work out of the box citing the following error when debugged through adb logcat:

"could not load needed library 'liblzo.so'"

First I tried the easy way out; downloaded OpenVPN Installer and tried to run it, seeing if it would force a re-install; this caused my Desire to crash. Second, I attempted to load another statically linked version of the OpenVPN binary (obtained from: http://github.com/fries/android-external-openvpn), but the problem is a the size of the binary is 500k and there is only ~5k free on the /system partition:

# df

df

Filesystem 1K-blocks Used Available Use% Mounted on

tmpfs 203928 0 203928 0% /dev

tmpfs 4096 0 4096 0% /sqlite_stmt_journals

/dev/block/mtdblock3 256000 250320 5680 98% /system

/dev/block/mtdblock5 151168 36196 114972 24% /data

/dev/block/mtdblock4 40960 1160 39800 3% /cache

tmpfs 8192 0 8192 0% /app-cache

/dev/block/mmcblk0p2 468281 93829 349469 21% /system/sd

/dev/block//vold/179:1

3342968 2077072 1265896 62% /sdcard

#

Now I'm very new to this, so are any of these sensible options:

1) rm -rf the supplied MoDoCo (broken) supplied OpenVPN binary and replace with the statically linked one (supplied one is 1673475 bytes: ~1.6mb) - chmod'd to 555?

2) Create a symlink to the OpenVPN within the /system/xbin / system/bin dir which should? allow the binary to be executed?

I tried chmod'ing a copy of the statically linked vpn binary on the root of my SDCard (/sdcard/openvpn-static-2.1.1), but regardless of the applied permissions - attempting to execute it always results in a "permission denied" error.

Any detailed help appreciated (I'm very new to this).

Cheers,

Yum.

Edited by yumbelie
Guest spammyspam
Posted

With all due respect to Paul, the OpenVPN included with MCR doesn't seem to work very well. For solutions try the following thread:

http://android.modaco.com/content/htc-desi...aco-com/307594/

The tun.ko in this update doesn't load with MCR's kernel so so either make a backup of your existing one first or extract it from the MCR image and repush it after applying.

Guest Richard K. Szabo
Posted

Place liblzo.so under /system/lib/modules and the message '"could not load needed library 'liblzo.so'"' will go away.

You can place openvpn under /system/bin if you want, but make sure that "ifconfig" and "route" are simlinked to /system/xbin/bb

I've baked a shiny custom ROM for my HTC Desire from the Online Kitchen (phone is rooted) - problem is, the OpenVPN version included does not appear to work out of the box citing the following error when debugged through adb logcat:

"could not load needed library 'liblzo.so'"

First I tried the easy way out; downloaded OpenVPN Installer and tried to run it, seeing if it would force a re-install; this caused my Desire to crash. Second, I attempted to load another statically linked version of the OpenVPN binary (obtained from: http://github.com/fries/android-external-openvpn), but the problem is a the size of the binary is 500k and there is only ~5k free on the /system partition:

# df

df

Filesystem 1K-blocks Used Available Use% Mounted on

tmpfs 203928 0 203928 0% /dev

tmpfs 4096 0 4096 0% /sqlite_stmt_journals

/dev/block/mtdblock3 256000 250320 5680 98% /system

/dev/block/mtdblock5 151168 36196 114972 24% /data

/dev/block/mtdblock4 40960 1160 39800 3% /cache

tmpfs 8192 0 8192 0% /app-cache

/dev/block/mmcblk0p2 468281 93829 349469 21% /system/sd

/dev/block//vold/179:1

3342968 2077072 1265896 62% /sdcard

#

Now I'm very new to this, so are any of these sensible options:

1) rm -rf the supplied MoDoCo (broken) supplied OpenVPN binary and replace with the statically linked one (supplied one is 1673475 bytes: ~1.6mb) - chmod'd to 555?

2) Create a symlink to the OpenVPN within the /system/xbin / system/bin dir which should? allow the binary to be executed?

I tried chmod'ing a copy of the statically linked vpn binary on the root of my SDCard (/sdcard/openvpn-static-2.1.1), but regardless of the applied permissions - attempting to execute it always results in a "permission denied" error.

Any detailed help appreciated (I'm very new to this).

Cheers,

Yum.

Guest yumbelie
Posted
With all due respect to Paul, the OpenVPN included with MCR doesn't seem to work very well. For solutions try the following thread:

http://android.modaco.com/content/htc-desi...aco-com/307594/

The tun.ko in this update doesn't load with MCR's kernel so so either make a backup of your existing one first or extract it from the MCR image and repush it after applying.

The link doesn't seem to work?

Guest yumbelie
Posted
Place liblzo.so under /system/lib/modules and the message '"could not load needed library 'liblzo.so'"' will go away.

You can place openvpn under /system/bin if you want, but make sure that "ifconfig" and "route" are simlinked to /system/xbin/bb

I've tried placing the liblzo.so file directly under the /system/lib/modules folder, but I always get a "Cannot allocate memory" error:

liblzo.so: Cannot allocate memory

I figure thats because there is only 5kb of free space on the system partition (can this be extended?). Secondly (since I'm running APPS2SD), I thought I'd try symlinking the liblzo.so file via the /system/sd mountpoint:

# ln -s /system/sd/modules/liblzo.so/liblzo.so liblzo.so

ln -s /system/sd/modules/liblzo.so/liblzo.so liblzo.so

ln: liblzo.so: Cannot allocate memory

But again, I run into the "Cannot allocate memory" error...

Any suggestions?

Cheers,

Guest yumbelie
Posted (edited)

Right, just wanted to update to say that I've solved it (thanks for all the help and to Richard Trip and agent8080). FYI: I'm using the MoDoCo 3.1 Rooted ROM

Steps:

1) Copy the tun.ko file that comes with the 3.1 MoDoCo ROM from /system/lib/modules/ on the root of the phone to somewhere safe on your PC harddisk either via shell (adb pull), or something more UI friendly like ES File Explorer

2) Get a copy of the desire OpenVPN update from http://android.modaco.com/content/htc-desi...r-uvoc-version/ (Thanks Richard Trip). For MoDoCo 3.1 you want: vpnupdatedesire_2.6.29-82821fb5-signed.zip

3) Place the vpnupdatedesire_2.6.29-82821fb5-signed.zip on the root of your SD Card, and boot into recovery mode. (Use the recovery-[platform].bat/sh etc file if using Pauls recovery stuff or, the easy way via ROM Manager application from the Market Place)

4) Install the vpnupdatedesire_2.6.29-82821fb5-signed.zip

- Instructions if using ROM Manager:

- A) Boot into Recovery Mode

- :lol: Sehttp://android.modaco.com/index.php?act=Post&CODE=02&f=430&t=312205&qpid=1324860lect "install zip from sdcard"

- C) Select "choose zip from sdcard"

- D) Select the vpnupdatedesire_2.6.29-82821fb5-signed.zip file in the root of the SDCard

5) Once installed, reboot the phone into default recovery mode (Ensure the phone is powered off, click the hold the "back" button, Power on the phone) and connect it to the PC

6) Fire up Pauls script using recover-[platform].bat/sh etc to enter recovery mode

7) Put the tun.ko file you copied in step one into the same folder as adb

8) Open a shell to your phone (adb shell (shell commands prefixed by type:))

--> Steps from agent8080's post, here: http://android.modaco.com/content/htc-desi...p/#entry1303426 <--

9) type: mkdir /tempsys

10) type: mount /dev/block/mtdblock3 /tempsys

11) type: mv /tempsys/lib/modules/tun.ko /tempsys/lib/modules/tun.ko.old

12) from another window, run: adb push tun.ko /tempsys/lib/modules

13) type: umount /tempsys

14) rmdir /tempsys

15) Exit the shell, reboot the phone

16) Fire up OpenVPN Settings and bring up settings

17) Ensure "Load tun kernel module" is ticked

18) Under "TUN module settings", ensure "Load module using" is set to "insmod" and "Path to tun module" is "/system/lib/modules/tun.ko"

19) That's it, check your config and it should connect

Edited by yumbelie
Guest cyrax89
Posted (edited)

Ok guys. i have MoDaCo 3.1 Rooted installed. Everything works fine except openvpn. So i tried your steps, but i don“t have any tun.ko file on my Phone?! How can i fix that? Anyway i was able to install the update.. But something must be wrong here.. It seems like no binary files were installed. I hope you can help me!

Thank you :)

Edited by cyrax89
Guest spammyspam
Posted

It's deffo in the ROM so if you don't have it in your phone try extracting it from the downloaded zip.

Guest cyrax89
Posted

Ok it works fine for me now. Just reflashed everything and followed your instructions :)

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.