ok..so ive recently flash my X10i stock 2.1 eclair to Wolfbreak CM 6.1.3 v5
and im having problems regarding my Openvpn settings.
**cant check my config files
so what i did is to follow the old thread regarding the old openvpn settings for eclair and issue this following command on terminal emulator
mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system
busybox insmod /sdcard/openvpn/tun.ko
busybox cp /sdcard/openvpn/openvpn /system/xbin/openvpn
busybox cp /sdcard/openvpn/openvpn /system/xbin/tun.ko
chmod 700 /system/xbin/openvpn
mkdir /system/xbin/bb
busybox ln -s /system/bin/busybox /system/xbin/bb/ifconfig
busybox ln -s /system/bin/busybox /system/xbin/bb/route
busybox mount -o remount,rw /dev/block/mtdblock2 /system
busybox cp /sdcard/openvpn/chargemon /system/bin/chargemon
busybox cp /sdcard/openvpn/busybox /system/bin/busybox
reboot
Click to expand...
Click to collapse
then my X10i will reboot and will start acting up. Force close keeps on popping and the device will automatically restart.
ive used those command when i used 2.1 eclair before and everything is working fine.
if anyone could enlighten me about this will be a great help.
also if you need other info, you can pm me or reply to my post.
this is my old working settings when i used eclair.
1.rooting my phone
2.install busy box
3.install terminal emulator
4.install openvpn application
5.install openvpn settings
6. issue this command in terminal
mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system
busybox insmod /sdcard/openvpn/tun.ko
busybox cp /sdcard/openvpn/openvpn /system/xbin/openvpn
busybox cp /sdcard/openvpn/openvpn /system/xbin/tun.ko
chmod 700 /system/xbin/openvpn
mkdir /system/xbin/bb
busybox ln -s /system/bin/busybox /system/xbin/bb/ifconfig
busybox ln -s /system/bin/busybox /system/xbin/bb/route
busybox mount -o remount,rw /dev/block/mtdblock2 /system
busybox cp /sdcard/openvpn/chargemon /system/bin/chargemon
busybox cp /sdcard/openvpn/busybox /system/bin/busybox
reboot
Click to expand...
Click to collapse
7.open the config file and wait for it to connect.
but those above mention steps doesnt work anymore in 2.2 froyo cm 6.1.3 of wolfbreak
tried it and my phone starts acting up.
reflash again, this time openvpn settings is the only application i installed because as far as i know, wolfbreak custom rom is already been rooted and includes busy box and openvpn application but no luck..
help please.
Hi There!
I think you've followed my old thread so i've made this very same codes work on every Froyo Modded ROM... Wolfbreak already have the openvpn binary installed in /system/xbin so you'll have to do 1 extra step.
1.- Open Terminal Emulator and issue this comand
Code:
rm -r /system/xbin/openvpn
mkdir /system/xbin/bb
ln -s /system/bin/busybox /system/xbin/bb/ifconfig
ln -s /system/bin/busybox /system/xbin/bb/route
cp /sdcard/openvpn/tun.ko /system/lib/modules/tun.ko
chmod 644 /system/lib/modules/tun.ko
2.- Download OpenVPN installer from Market (Free)
3.- Click on Install and choose the following options and you'll see two screens:
3.1 - In the first one choose "/system/xbin"
3.2 - In the Second one choose "System/xbin/bb"
4.- Go to OpenVPN settings and go to Advanced>TUN module Settings>Path to tun module> This should be /system/lib/modules/tun.ko
5.- Choose your OpenVPN configuration and you'll be done.
Report back if this helps... At least i've test it in the following ROMS:
* Trip's MIUI Roms
* Wolf's CM Roms (all Variants)
* Zdizihu's Free X10
* Jerpelea's CM 7 GB Roms
thanks mate for the reply,
anyway, i somehow manage to fix the above mention problem and somehow got my config file to get connected using the above post.
but everytime it get connected, a lot of errors occur.
1.force closed.... .....
2.linux....error....... .....fork error...
i cant remember the whole error message because it only pops up for a bit.
tried to reflash twice but to no avail, same results hapen.
so i gave up and flash back to 2.1 kx10 aosp and everything is working again..
Hi everyone,
I tried to gather some information to install OpenVPN on the Galaxy Tab 10.1, but could not complete the install.
I already installed successfully OpenVPN Installer, BusyBox Installer, OpenVPN Settings, copied tun.ko to modules folder (/system/lib/modules).
I ran those commands (first had read only errors but eventually succeeded with adb console) :
insmod /modules/tun.ko
ln -s /system/bin/busybox/system/xbins/bb/ route
ln -s /system/bin/busybox/system/xbins/bb/ ifconfig
Then, when i launch OpenVPN Settings, it starts connecting but finally says "FATAL: Linux ifconfig failed, could not start external program".
Anybody could tell me how to do it properly? Is it even possible on the Galaxy Tab 10.1?
Many thanks!!!
I'm about to try it right now, I have ovpn running on my galaxy s, just going to create certificates for my tablet, and copy the config across and see if it works.
I believe the default kernel includes tun support.. or so I have been told.. will find out I guess.
Thanks! Keep me updated please.
Anyone able to make progress on getting openvpn working?
Hi. I just wanted to add that if anyone have any more info on openvpn and tun.ko for the gt-7100 that i too would be greatful.
Vissie
I have openvpn working. I installed busybox installer, openvpn and openvpn settings from the market place.
I Used root explorer and made the directory /system/xbin/bb. I also used root explorer to make this directory read/write. Then I used a terminal app to do
Su
ln -s /system/xbin/route /system/xbin/bb/route
ln -s /system/xbin/ifconfig /system/xbin/bb/ifconfig
after this make the directory read only. In openvpn settings point tun.ko path to
/data/media/openvpn/openvpn/tun.ko
add your config and that should do it
i still can't connect
Well when i comment
iproute /data/local/bin/iproute-wrapper.sh
Click to expand...
Click to collapse
openvpn connects but i cant browse my local lan
when i uncomment this line nothing happens when i try to connect
what did i missed?
one more question - im using ccd folders with different push commands on my vpn server - this doesnt seem to work aswell.
Anyone could post stepby step iproute configuration for our devices?
thanks
Wojtek
I've been trying again and again.
I always get "FATAL: Linux ifconfig failed, could not start external program".
Anyone could post a complete tutorial ?
Thanks.
I did it!!!
I installed OpenVPN Installer, BusyBox Installer, OpenVPN Settings, copied tun.ko to modules folder (/system/lib/modules), then copied the configuration files of my VPN (ca.crt and client.ovpn) to /sdcard/openvpn.
I ran those commands with adb tools :
mount -o remount,rw /system
insmod /modules/tun.ko
mkdir /system/xbin/bb
ln -s /system/xbin/busybox /system/xbin/bb/ifconfig
ln -s /system/xbin/busybox /system/xbin/bb/route
In the advanced settings of OpenVPN Settings, the path to tun module is "/system/lib/modules/tu", the path to configurations is "/sdcard/openvpn" and the path to openvpn binary is "/system/xbin/openvpn".
Then i launched OpenVPN Settings, entered the username and password and it connected.
I hope it can help...
Which kernel are you using -- stock or ??
I'm running the stock kernel.
can you please tell me......
armavista said:
I installed OpenVPN Installer, BusyBox Installer, OpenVPN Settings, copied tun.ko to modules folder (/system/lib/modules), then copied the configuration files of my VPN (ca.crt and client.ovpn) to /sdcard/openvpn.
I ran those commands with adb tools :
mount -o remount,rw /system
insmod /modules/tun.ko
mkdir /system/xbin/bb
ln -s /system/xbin/busybox /system/xbin/bb/ifconfig
ln -s /system/xbin/busybox /system/xbin/bb/route
In the advanced settings of OpenVPN Settings, the path to tun module is "/system/lib/modules/tu", the path to configurations is "/sdcard/openvpn" and the path to openvpn binary is "/system/xbin/openvpn".
Then i launched OpenVPN Settings, entered the username and password and it connected.
I hope it can help...
Click to expand...
Click to collapse
You said you run stock kernel, but what rom are you on: kmb, kme?
Also, can you please point me to the tun.ko file or a pointer of where I can get it.(the one that you have working)
Much thanks.
The version of my kernel is [email protected] #1.
ROM : HMJ37.UEKF3 P7510UEKF3
I attached the tun.ko file i used for you.
Keep me updated...
I managed to make openvpn work.
I am using openvpn setting software.
For galaxy tab 10.1, the openvpn binary and the associated lib liblzo.so is missing, so you just need to copy those two files from , say cm7 sources.
Simply download the attachment and extract it, there are two files:
openvpn : copy it to /system/xbin/openvpn ( don't forget chmod 755 to it )
liblzo.so: copy it to /system/lib/liblzo.so ( don't forget chmod 644 to it )
I have tested it on my galaxy tab 10.1 P7510, works great.
Hoping this would help.
Sorry to mention, i am using starburst kernel which already have tun support in the kernel.
For stock kernel, maybe you need to have matched tun.ko copied from elsewhere.
I get this message
[email protected]:/ # insmod /modules/tun.ko
insmod: can't open '/modules/tun.ko
I pushed tun.ko to /system/lib/modules via adb , though I cant see it with root explorer
If it's there tou should be able to see it with root explorer
I run GT-P7500, Kernel 2.6.36.3, [email protected] #1, buildnr HMJ37 P7500XXWKG9, baseband XXKG7, ).
I have seen statements that there is no tun.ko in the kernel and the available versions of tun.ko do not work with the 3.1 Honeycomb kernel, I have.
I do not have a folder called modules under /system/lib, shall I create one.
The directory modules I have is /lib/modules/...
insmode did not work.
I run openvpn from the shell and it stops after establishing the TCP connection, this is just before establishing the tun...clearly I am still missing the tun.
Does anyone else experienced same problem or have a solution?
Hi I'm having a nightmare trying to get openvpn installed.
When I do the insmod /modules/tun.ko i get
the following
[email protected]:/ # insmod /modules/tun.ko
insmod: can't open '/modules/tun.ko'
255|[email protected]:/ #
any idea what I'm doing wrong
Hey everybody.
I also have some problem with openvpn connection.
At first i turn on openvpn the start the configuration (at the same time i started a ping on my server: ping 300.300.300.300 -t)
After that my ping works for 12 - 14 times. After the 12 + 14 times then it shows "out of time" error message.
What have i done wrong? (Every 5 seconds at the bottom of my tab it shows "myvpn.openvpn: Connected"
Preferences:
Samsung Galaxy Tab 10.1 Rooted
Android 3.1
Newest Busybox
Done everything from the tutorial of this topic
Update: When i turn the tun module on then the ping only works for about 9 times.
After about 20 failed pings, the pink works again for the amount i wrote.
I learned about this here... http://fieldeffect.info/w/NativeCompileSDK
You can install an i386/x86_64 chroot within your existing Debian chroot using qemu-user-static to run the Android SDK on your Android phone/tablet/phablet.
1.
Get yourself a debian chroot, I recommend at least 2gb. I use DebianKit from market.
2.
You will need a X11 desktop environment and a VNC client on your device. I use androidVNC from market.
Here is my working example...
Start your Debian chroot/environment and do...
apt-get install openbox openbox-themes obmenu obconf menu menu-xdg xdg-utils xfonts-base xfonts-terminus* nautilus terminator lxappearance gmrun leafpad man-db hicolor-icon-theme tightvncserver tint2
That gives you a window manager, fonts, filebrowser, terminal emulator, text editor, theme manager, taskbar, and a VNC server.
Now lets get some GTK engines and libraries....
apt-get install gtk2-engines-auroa gtk2-engines-murrine gtk2-engines-oxygen gtk2-engines-pixbuf libgtk2.0-bin gtk3-engines-oxygen gtk3-engines-unico libgtk-3-bin
Now 7zip to handle zips and archives comfortably(put non-free in your apt sources.list)...
apt-get install p7zip p7zip-full p7zip-rar zip unzip
##The Android SDK manager, qemu, and multistrap##
apt-get install ant file openjdk-6-jre openjdk-6-jdk qemu-user-static libswt-gtk-3-java libswt-cairo-gtk-3-jni
3.
Now we can build a small x86_64 rootfs using multistrap
multistrap can use a config, have mine...
http://db.tt/hS5j3wg
Copy multistrap.conf straight into your working(pwd) directory....
cp /sdcard/Download/multistrap.conf .
Do this to avoid multistrap complaining later...
cat multistrap.conf >mstrap
mkdir /data/mnt
Determine size of rootfs for loop image..
du -hs /data/mnt/
Now make an image for x86_64 chroot
dd if=/dev/zero of=/sdcard/64bit.img bs=$(( 0x100000 )) count=YOUR IMAGE SIZE
That byte size makes your image slightly larger than the count value in Mb, for example count=78 will write 82Mb image.
mkfs.ext2 /sdcard/64bit.img
tune2fs -c0 /sdcard/64bit.img
mkdir /data/tmp
busybox mount -o loop /sdcard/64bit.img /data/tmp/
cp -r /data/mnt/* /data/tmp/
umount /data/tmp
rm -r /data/tmp/
rm -r /data/mnt/
mkdir /data/mnt
busybox mount -o loop /sdcard/64bit.img /data/mnt/
5.
Now the environment is set up and mounted, at this point install the SDK
Aim your browser to http://developer.android.com/sdk/index.html
Select "Linux" from "SDK Tools Only", thats the last thing at the bottom of the list.
cp /sdcard/Download/android-sdk_r21.0.1-linux.tgz .
7z x android-sdk_r21.0.1-linux.tgz russosv
7z x android-sdk_r21.0.1-linux.tar
Now we need a couple goodies from http://fieldeffect.info/w/NativeCompileAPK ##--Thanks to russosv from FeildEffect
These are edited from original....
#!/bin/bash
QEMU=/usr/bin/qemu-x86_64-static
64CHROOT=/data/mnt/
case "$1" in
mklinks)
if [ ! -e "./64BIT" ]; then
mkdir ./64BIT
fi
for i in $(file ./* | grep "ELF 32" | awk '{print $1}' | sed s/://g | sed s/[./]//g); do
echo "Moving $i..."
mv $i ./64BIT
ln -s ~/bin/run-64-link $i
done-
;;
*)
$QEMU $64CHROOT/lib64/ld-linux-x86_64.so.2 --library-path $64CHROOT/lib:$64CHROOT/usr/lib:$64CHROOT/usr/share/perl/5.12.4/unicore/lib:$64CHROOT/var/lib:$64CHROOT/lib/x86_64-linux-gnu:$64CHROOT/usr/lib/x86_64-linux-gnu [email protected]
;;
esac
Copy that to run-64, then...
chmod 755 run64
cp run-64 /usr/bin/
One more...
echo $(dirname $0)/64BIT/$(basename $0) [email protected]
/usr/bin/run-i386 $(dirname $0)/64BIT/$(basename $0) [email protected]
Make that run-64-link
chmod 755 run-64-link
cp run-64-link /usr/bin/
5b.
Now launch VNC server
tightvncpasswd
tightvncserver
killall Xtightvnc
cat >.vnc/xstartup<<EOF
tint2 &
terminator &
openbox-session
EOF
tightvncserver
export DISPLAY=:1
6.
Now launch the VNC client I mentioned earlier, should connect with 127.0.0.1:5901 and your password you set.
Go back to terminal or use the one launched on X11 to do...
sh android-sdk-linux/tools/android
Install at least one api.
If all went well you can now go around "debugging" yours and your friends Android devices over wifi now.
For an example, and to see it work do....
svc wifi disable(or enable) ##this turns off/on wifi
setprop service.adb.tcp.port 5555(or -1) ##this turns on/off adb over network
stop adbd
start adbd
adb connect 127.0.0.1(yours) or any other adbd addy listening on your network,
Have fun
Never did a "how to" before, go easy and I'll make corrections and answer things. Thanks for reading. Leave feedback.
Potential necro post but I believe the information is still currently valid and not readily available on searches. I've looked variations of this up for years with no luck until I hit the right search terms.
bump, and thanks.
can't believe there's no comments.
I know it's a slower than real-64-bit-pc method but not all of us have access to new hardware... or pc's. Maybe a novelty, still cool and useful if you've got the time to let the slower hardware compile.
you have preserved the scripts, original link is dead.
here is the Internet Wayback Machine cache of the original circa 2012 for reference.
http://web.archive.org/web/20120502044700/http://fieldeffect.info/w/NativeCompileAPK
appreciate you sharing.
How can I add u2nl to init.d? I have an HTC Evo 4g LTE and need to make android 4.3 Viper4g Rom run my script on boot. I've tried to use Root Explorer and Root Browser apps to manually add them to the init.d folder, set permissions and changed owner and group to root. But my phone won't boot after I've added my script. The name of my script file is autostart.sh and this is what it contains.
#!/system/bin/sh
export PATH="$PATH:/system/bin"
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -F
iptables -t nat -F
iptables -X
iptables -t nat -A OUTPUT -o rmnet0 -p 6 ! -d 10.132.25.254 -j REDIRECT --to-port 1025
u2nl 10.132.25.254 8080 127.0.0.1 1025 >/dev/null 2>&1 &
sh -c "sleep 5;kill `ps|grep nk.bla.android.autostart|grep -v grep|awk '{print $2}'`" &
exit 0
I know someone here has the knowledge to make this happen. Please advise and assist. Thanks. P.S. I have tried to rename the script to 99data and placed it init.d directory so it would run last but phone won't boot.?
solcam said:
How can I add u2nl to init.d? I have an HTC Evo 4g LTE and need to make android 4.3 Viper4g Rom run my script on boot. I've tried to use Root Explorer and Root Browser apps to manually add them to the init.d folder, set permissions and changed owner and group to root. But my phone won't boot after I've added my script. The name of my script file is autostart.sh and this is what it contains.
#!/system/bin/sh
export PATH="$PATH:/system/bin"
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -F
iptables -t nat -F
iptables -X
iptables -t nat -A OUTPUT -o rmnet0 -p 6 ! -d 10.132.25.254 -j REDIRECT --to-port 1025
u2nl 10.132.25.254 8080 127.0.0.1 1025 >/dev/null 2>&1 &
sh -c "sleep 5;kill `ps|grep nk.bla.android.autostart|grep -v grep|awk '{print $2}'`" &
exit 0
I know someone here has the knowledge to make this happen. Please advise and assist. Thanks. P.S. I have tried to rename the script to 99data and placed it init.d directory so it would run last but phone won't boot.?
Click to expand...
Click to collapse
have you tried a dummy test script that just echos a number to the sdcard file?
Thanks for replying. The script term-init.sh that I found elsewhere on XDA, had a test and set perms output file that can be found in /data/Test.log. I have solved the problem on my Evo 4g LTE but, not on my Sprint Galaxy S3. Turns out that I couldn't use Root Explorer to manually add the file! I had to REALLY MANUALLY add the file using the terminal emulator. That worked on the Evo but not the S3. I had placed the scripts in one postboot.rc files on S3 and it worked fine but, my battery seemed to be draining a lot faster, which was not acceptable. So I guess my problem is half solved. So, do you know how to make it work on the S3? Thanks in advance to anyone that can help me.
Hi,
I've got a Probox2 AndroidTV box on Marshmallow.
I would like to mount a remote NFS share into it's filesystem, so that the share is accessible to all apps (I've disabled mountspace in SuperSU).
I can do this via terminal or SSH using the following 3 lines
Code:
su busybox mkdir -p /mnt/nfs/roms
su busybox chmod 777 /mnt/nfs
su --mount-master -c busybox mount -o rw,nolock,hard,intr,vers=3 -t nfs x.x.x.x:/mnt/Roms /mnt/nfs/roms
This works well and my Apps can find the network shares.
However I would like this be mounted automatically at every boot...
I've tried ScriptManager with this as the script
Code:
#!/system//bin/sh
su busybox mkdir -p /mnt/nfs/roms
su busybox chmod 777 /mnt/nfs
su --mount-master -c busybox mount -o rw,nolock,hard,intr,vers=3 -t nfs x.x.x.x:/mnt/Roms /mnt/nfs/roms
The script doesn't work from script manager or cli. (I know nothing about scripting).
I'm unsure how to go about getting it run/work....
Please could someone explain to me how to get those lines to run after boot or how to fix the script...
Thanks