openvpn anyone? - Hero, G2 Touch Android Development

hi,
did anyone find a way to use openvpn on htc hero?

Catscrash said:
hi,
did anyone find a way to use openvpn on htc hero?
Click to expand...
Click to collapse
Not yet, but I am using the CyanogenMod 4.0.1 on my Dream and I have seen Donut on the HTC Click -- in both cases, Settings --> Wireless Controls is showing an option for VPN Settings, so I'm guessing that it would be a matter of time before this is available on the Hero and Magic firmware
Be patient, or wait for someone to cook a ROM with this feature

VPN wil be in Donut.
For now, it seems possible to implement it.
For the program GUI, it should good to extand that program to support openvpn and pptp vpn.
First of all tun driver is needed, you'll find it here.
Install and, as root, type:
# insmod /system/lib/modules/tun.ko
lsmod command should give you:
tun 11300 0 - Live 0xbf000000
That should load the tun kernel module.
I think we should then have to compile openvpn using android ndk.
A guy did it for the dream. Worth trying it. Maybe someone else could tell if binaries compiled for Dream can work on Hero

OpenVPN ist working on hero. I used the binaries for the G1. But the CIPHER is different: AES-256-CBC. I'm now testing it and if it's stable, perhaps I'm gonna compile openvpn with complete static openssl, so all functions should work.
If someone is interested, I can post my scripts and settings.

gogh57 said:
OpenVPN ist working on hero. I used the binaries for the G1. But the CIPHER is different: AES-256-CBC. I'm now testing it and if it's stable, perhaps I'm gonna compile openvpn with complete static openssl, so all functions should work.
If someone is interested, I can post my scripts and settings.
Click to expand...
Click to collapse
I am REALLY interested to now how you compiled it.

Hi!
I haven't compiled openvpn until now. I used this one:
https://www.digital-bit.ch/wiki/OpenVPN_auf_dem_G1

Just tried, may work. But i can't connect to my astaro because the key needs auth wit user and pw.
This Version hasnt been compiled with --auth-ask-pass. And reading from commandline doesn't work either..

I did compile it on my G1 with CyanogenMod ROM.
As far as I can see, it is working perfectly: I'm using it with certificates for 3 different VPNs.
Only issue: I wasn't able to complile a shared version of liblzo, so the binary is statically linked against liblzo.a (751 KB... )
Ah, yes, of course no GUI interface, shell only...

Hi!
Cool, could you post the binary? Could you give me a hint how you did it? I had several problems.

Would be perfect if someone could compile openvpn with " --enable-password-save"

Please post it, when a OpenVPN GUI for the HTC Hero / Magic is available.
Thans alot

wolfiedk said:
Please post it, when a OpenVPN GUI for the HTC Hero / Magic is available.
Thans alot
Click to expand...
Click to collapse
The great spam protection measures in this forum deny posting links for new users, so you have to manually follow them.
See: github.com/fries/android-external-openvpn
There is also an app and a statically linked openvpn binary at github.com/fries/android-external-openvpn/downloads
The openvpn binary has the following features:
* --enable-password-save
* statically linked against a blowfish enabled openssl
* statically linked against liblzo
Build:
* openvpn-static.bz2 was build on a donut-tree (1.6) for htc-magic
* openvpn-android-2.1.tar.bz2 was build on a cupcake (1.5) tree for htc-magic
* should run on a verity of (rooted) phones, please try it an give feedback.
A dynamically linked version is also available. The above git repo integrates seamless into the android build system. Some instructions may be found here: wiki.github.com/fries/android-external-openvpn/
Any feedback is welcome. Enjoy.

read this first -> http://sourceforge.net/projects/tunneldroid/files/README/download
First make sure kernel is compile with tun module
install tunneldroid from market
binary download -> http://sourceforge.net/projects/tunneldroid/files/openvpn-binary.zip/download

The newest version of my 'OpenVPN Settings' app is available at github.com/fries/android-external-openvpn/downloads

Related

Rhobuntu 9.10 discontiunued change to Rhobuntu 9.04

The 9.10 build will not continued. Please chang to the 9.04 Build
http://forum.xda-developers.com/showthread.php?t=640785
The 9.10 build have a lot of problems with the repository.
The 9.04 build is a clean build.
If you like the 9.10 build you can sent me a PM and i sent you the link for the last stable build.
The Rhobuntu team brings you, Ubuntu 9.10 on your Rhodium:
NEW BUILD 08042010. UPLOAD later!
Users with CDMA Phone send me a PM, please
change log:
change log:
* fix WIFI and UMTS
* new keymap (from old 8.04 build)
* add xvkbd
* add x11vnc
* synaptic (Package Manager)
* fix mouse bug
* REPOSITORY SET to Jaunty (Fix Illegal Operation problem)
* lxterminal autostart
--------------------------------------------------------------------------------------------
OLD BUILD
Rhobuntu 06.04.2010
DOWNLOAD: Rhobuntu 9.10 http://www.megaupload.com/?f=MVSBV469
Broken packages
After running apt-get update followed by apt-get upgrade to get the latest package updates from the repositories you'll find that some packages bail out with an 'illegal instruction' error. This is due to a bug in libstdc++6. For now, hold your horses and wait before upgrading. Problem: via apt-get install packet for armv6 will be installed. Htc Rhodium could only handle armv5.
Could anybody help??? --> same problem on Zubuntu 2.0
changelog:
*wifi works, same like rhobuntu 8.04 (lxterminal: iwlist eth0 scan essid `YOUR AP`--> wicd --> refresh
* link for lxterminal placed to /root
Login: root with no password
Screencalibration: after login: type --> ts_calibrate
For GUI: run startx
FIX for mouse bug!
Thanks @ Bombenbach
run lxterminal
leafpad /lib/udev/rules.d/50-udev-default.rules
change
Code:
KERNEL=="mouse*|mice|event*", MODE="0640"
to
Code:
[COLOR="Red"]#[/COLOR]KERNEL=="mouse*|mice|event*", MODE="0640"
old Build:
Rhobuntu 23/03/10
latest build: Rhobunto 9.10 0630PM 23032010 (@walter79)
Download: http://rhobuntu.4shared.com
Mirror:
Rhobuntu 8.04 http://www.megaupload.com/?f=GNO6R1X3
Rhobuntu 9.10 http://www.megaupload.com/?f=MVSBV469
To install via .zip
* Download latest .zip/.tar/.gz/.7z
* Extract to sd card
* Naviagte to sd/Ubuntu
* Load haret.exe
* Enjoy!
changelog: 22032010
* changed to armel !
* based on Zubuntu (http://www.omegamoon.com/blog/index.php?entry=entry090829-014821)
* keyboard mapping now works (Ctrl is FN, FN is E-Mail)
* login: root (no password)
* disabled GDM -> default boot into console
* start Xorg by issuing startx
* for screen calibration run: ts_calibration (in console)
* added nano, libpcap, ppp (UMTS should work)
* sdcard automount to /mnt
Need fix
- wifi (driver have to implemented)
- wicd (same probleme like rhobuntu 8.04, could find network, somebody have to make the same hack like in 8.04)
- double mouse
- remove some apps (like Fennec)
Project News
We decided to organize our project a bit better, which means that we now have a project page on Google Code
https://code.google.com/p/rhobuntu/
and a Wiki
http://wiki.xda-developers.com/index...=RhodiumUbuntu
Get involved. We need your help!
One more Topic of Interest . .
This is getting interesting Rhobuntu will Rock.
I wish I knew how to create linux distro, so I could help.
So my only option is wait and watch for the Progress in these thread.
Compatibility for topaz, blackstone, and others
you can please remove the login screen? make this automatic, because i, with my topaz, have to enable the onscreen keyboard(and not is working, can be the touch screen not working) of haret only for this, the ubuntu arm have any virtual keyboard? the ubuntu have the orca and the Gnome On-screen Keyboard (GOK).
you can try this?
Maikeu Locatelli said:
you can please remove the login screen? make this automatic, because i, with my topaz, have to enable the onscreen keyboard(and not is working, can be the touch screen not working) of haret only for this, the ubuntu arm have any virtual keyboard? the ubuntu have the orca and the Gnome On-screen Keyboard (GOK).
you can try this?
Click to expand...
Click to collapse
Ok, next build comes with autologin and calibration.
new build: 23032010
Hey can u Upload it to any other File sharing host .. I don have a 4shared account .. i have RS .. and when i try to download the file from 4shared.com , d file downloads ..(Obviously slowly) .. and they disconnect very much due to limitation.. RS or hotfile or ne other would be good
Just interested to know - what graphics driver does this build use? Is it possible in theory to the graphics driver from the android builds to allow hw3d and xv acceleration - maybe even compiz?
I dont know if I missed something but I should be able to open the primary applications menu, shouldn't I? I've clicked on it time and time again, I see it change color on me as though I have clicked it but nothing actually opens? Is my screen not calibrated correctly or did I miss something entirely?
walter79 said:
changelog: 23032010
- kernel 2.6.28 armel
Click to expand...
Click to collapse
????
You ported rhodium's code to 2.6.28 ??
Based on which tree ?
And where is the source code ?
- wifi (driver have to implemented)
Click to expand...
Click to collapse
Lol The driver has been included in "my" tree for more than a month now.
And it has been existing for several years now I guess.
phhusson said:
????
You ported rhodium's code to 2.6.28 ??
Based on which tree ?
And where is the source code ?
Lol The driver has been included in "my" tree for more than a month now.
And it has been existing for several years now I guess.
Click to expand...
Click to collapse
Have a look to /etc/modules/kernel..
walter79 said:
Have a look to /etc/modules/kernel..
Click to expand...
Click to collapse
1.That's no sources.
2.I was talking about kernel, not modules. You can make modules for whatever without even having the kernel working.
Hah I wonder if there would be any way you could be able to use aircrack-ng on this??
Either way I love it. All there needs to be is a fixed wifi and a real sleep mode.
buru898 said:
Hah I wonder if there would be any way you could be able to use aircrack-ng on this??
Either way I love it. All there needs to be is a fixed wifi and a real sleep mode.
Click to expand...
Click to collapse
Real ?
Doesn't echo mem > /sys/power/state work ?
I'm not savvy with Linux... ... I know the basic basics. Lol I'll play around with it more but does it really go to sleep?
buru898 said:
I'm not savvy with Linux... ... I know the basic basics. Lol I'll play around with it more but does it really go to sleep?
Click to expand...
Click to collapse
With this command it should.
Maybe backlight isn't turned off though
walter79 said:
Have a look to /etc/modules/kernel..
Click to expand...
Click to collapse
hi walter, your kernel is build 2.6.27 like the other kernel around us (thanks to: phhusson and team).
your modules isn't same version with your kernel. so you need to build modules base on your own kernel version.
could be something like this :
make modules ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-
on your root kernel source. and then do something like :
make modules_install ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-
and then check your modules linux directory for the result.
for getting wifi working, you may need android modules (you can check from phhusson modules build). and then run insmod on your rc.local.
i already reply your message for details.
cheers,
fatsal
fatsal said:
hi walter, your kernel is build 2.6.27 like the other kernel around us (thanks to: phhusson and team).
your modules isn't same version with your kernel. so you need to build modules base on your own kernel version.
could be something like this :
make modules ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-
on your root kernel source. and then do something like :
make modules_install ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-
and then check your modules linux directory for the result.
for getting wifi working, you may need android modules (you can check from phhusson modules build). and then run insmod on your rc.local.
i already reply your message for details.
cheers,
fatsal
Click to expand...
Click to collapse
Wifi works!!
I copied modules from old 8.04 build and wifi-nvram.txt, rtecdc1.bin to /etc
and use the zimage 22032010 build.
And now it works.
Scan works. But same problem with wicd like in 8.04. Can`t find wireless network
In order to make it work I brutally hacked the poor wicd. What I did was to edit /usr/share/wicd/wicd/wnettools.py and replace "cmd = 'iwlist ' + self.iface + ' scan'" with "cmd = 'iwlist ' + self.iface + ' scan last'" After that I deleted wnettools.pyc and wnettools.pyo to make sure that python will generate these files from the hacked wnettools.py. It is indeed a very ugly and nasty hack but at the moment there is probably no better way to make WiFi working. We REALLY should better find out what is the problem with that broadcom module and try to fix it.
Its asking for username & password. I type root for username. i cant get into ubuntu what do i type?
Viper Matrix Wireless said:
Its asking for username & password. I type root for username. i cant get into ubuntu what do i type?
Click to expand...
Click to collapse
user: root
password: no
new build will release in a few day. with working wifi auto login and screencalibration
OK I am running 9.10 & it wants me to type a username & I type root n its ok theres no password to enter now im stuck on [email protected]:~# i am stuck in command what do I enter to start ubuntu?

Forwarding traffic to a proxy server, full IPTABLES

Hi Devs,
I'm trying to get my android to transparently forward certain domains/IPs to a proxy server automatically.
For this I am trying to use IPTABLES, however the compiled version I can find on the device is not compiled with glibc, but with a reduced version. When trying to use any commands that refers to a specific protocol (TCP) then I get a similar error to:
FIX ME! implement getnetbyaddr() bionic/libc/bionic/stubs.c:366
I been searching a lot for a binary of iptables, that doesn't have this problem but haven't been successful. However applications like wireless tether, droidwall, TOR client seem to work with the reduced iptables, looks like they are issuing simpler commands, I want to run something like:
iptables -t nat -A PREROUTING -i eth0 -s ! 192.168.10.16 -p tcp --dport 80 -j DNAT --to 192.168.10.16:8080
I am on a 2.1 ROM btw. Any suggestions on how to achieve selective transparent proxy forwarding o a full version of iptables for android?
Many thanks,
Edited:
BTW, I've just found out that the current iptables version works, it just prints the errors...
any one any clue?
fulanito108 said:
Hi Devs,
I'm trying to get my android to transparently forward certain domains/IPs to a proxy server automatically.
For this I am trying to use IPTABLES, however the compiled version I can find on the device is not compiled with glibc, but with a reduced version. When trying to use any commands that refers to a specific protocol (TCP) then I get a similar error to:
FIX ME! implement getnetbyaddr() bionic/libc/bionic/stubs.c:366
I been searching a lot for a binary of iptables, that doesn't have this problem but haven't been successful. However applications like wireless tether, droidwall, TOR client seem to work with the reduced iptables, looks like they are issuing simpler commands, I want to run something like:
iptables -t nat -A PREROUTING -i eth0 -s ! 192.168.10.16 -p tcp --dport 80 -j DNAT --to 192.168.10.16:8080
I am on a 2.1 ROM btw. Any suggestions on how to achieve selective transparent proxy forwarding o a full version of iptables for android?
Many thanks,
Click to expand...
Click to collapse
You tried VillainROM 10.2 with ninpo or kendon's kernel? I think they added iptables. Dunno any more than that
Thanks Pulser, I'm on VillainROM 5.5, I will update to 10 when I can, but is not the problem that I can't find iptables, the problem all the versions I find are not complete, they are compiled with bionic C library.
fulanito108 said:
Thanks Pulser, I'm on VillainROM 5.5, I will update to 10 when I can, but is not the problem that I can't find iptables, the problem all the versions I find are not complete, they are compiled with bionic C library.
Click to expand...
Click to collapse
Talk to ninpo about this, he can maybe help
The bionic library that iptables (and your android setup) was built against is missing getnetbyaddr, it hasn't been implemented yet, neither has getprotobyname, so iptables is very limited right now. I ran into this issue when enabling TOS for my build. It's in bionic/libc/include/netdb.h but needs a stub entry.
I guess that you can still compile iptables against glibc and link it statically. I am trying to find out if any one might have done this, or knows a workarround
Was there ever an update on this? I am working with someone on trying to get a "full" version of iptables going so we can try and implement qos....
spiicytuna said:
Was there ever an update on this? I am working with someone on trying to get a "full" version of iptables going so we can try and implement qos....
Click to expand...
Click to collapse
sorry haven't found it yet, and need it... if you get your hands around it please reply to this post
It's not the iptables full version you need, it's the underlying libc that is missing that particular resolver function, as kernelzilla already pointed out above.
Statically linking glibc would probably be an overkill - uclibc or dietlibc would probably be better choice. No idea if any of them implements these particular resolver functions, though.
EDIT: Shiny, after quick check of source code of both, they both *do* implement getnetbyaddr().
ticho said:
EDIT: Shiny, after quick check of source code of both, they both *do* implement getnetbyaddr().
Click to expand...
Click to collapse
Thanks Ticho, when I have some time I'll try to setup the dev enviroment to play compiling it...
fulanito108 said:
Thanks Ticho, when I have some time I'll try to setup the dev enviroment to play compiling it...
Click to expand...
Click to collapse
This would be awesome!!
BTW, I've just found out that the current iptables version works, it just prints the errors...

[Request] tun.ko for kernel 2.6.32.15-ge2fb08e

Will someone please make a tun.ko for the new released kernel or send links on how to and the tools needed? Thanks in advanced.
until HTC releases the source for kernel 2.6.32.15-ge2fb08e
we can not compile a "Real" tun.ko
I modified the version string on the current released code 2.6.32.15-g746f4f0 to ge2fb08e and am compiling it right now.
This will allow it to load and as long as there are no major changes in the kernel it could work for you. It will at least load so you can test it.
I will up load it as soon as it is done compiling
Bill Tedeski
dwertz said:
Will someone please make a tun.ko for the new released kernel or send links on how to and the tools needed? Thanks in advanced.
Click to expand...
Click to collapse
That would be great. Thank you
btedeski said:
until HTC releases the source for kernel 2.6.32.15-ge2fb08e
we can not compile a "Real" tun.ko
I modified the version string on the current released code 2.6.32.15-g746f4f0 to ge2fb08e and am compiling it right now.
This will allow it to load and as long as there are no major changes in the kernel it could work for you. It will at least load so you can test it.
I will up load it as soon as it is done compiling
Bill Tedeski
Click to expand...
Click to collapse
to build it yourself
you can get instructions for an android build system here
http://source.android.com/source/download.html
download the source from HTC http://developer.htc.com/
you will need a .config file should be /proc/config.gz on your phone, uncompress and rename to .config
http://code.google.com/p/android/issues/detail?id=3803
you will need to setup your path to include the build environment you download from source.android.com I will put mine at the end of this
edit the Makefile and change EXTRAVERSION = .15-ge2fb08e to contain version string you need
do a make modules
as long as the kernel has not changed to much from the base source HTC has provided it should work.....
I added the folllowing path statements to my .bash_profile
PATH=$PATH:$HOME/bin
PATH=$PATH:/opt/mydroid/prebuilt/linux-x86/
PATH=$PATH:/opt/mydroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/
PATH=$PATH:/opt/mydroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/arm-eabi/bin/
PATH=$PATH:/opt/mydroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/arm-eabi/lib/
PATH=$PATH:/opt/mydroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/
PATH=$PATH:/opt/mydroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/lib/
PATH=$PATH:/opt/mydroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/lib32/
PATH=$PATH:/opt/mydroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/libexec/
PATH=$PATH:/opt/mydroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/share/
PATH=$PATH:/user/lib/gcc/i686-redhat-linux/4.4.4./libgcc.a
dwertz said:
Will someone please make a tun.ko for the new released kernel or send links on how to and the tools needed? Thanks in advanced.
Click to expand...
Click to collapse
Tun.ko vermagic=2.6.32.15-ge2fb08e
the attached tun.ko is build from the released HTC source with the version string changed to ge2fb08e
as long as the kernel has not changed much on the leaked kernels this should load and work
[[email protected] net]$ strings tun.ko | grep magic
vermagic=2.6.32.15-ge2fb08e preempt mod_unload ARMv7
You are awesome. Thanks
update - The tun.ko does work so it looks like the leaked kernel did not change much.
I will try and learn how to make one. I have ubuntu in vmware to use. Does this have to be a linux box or can it be done on a MacOSX?
Do you have the cifs.ko and nls_utf8.ko for 2.6.32.15-ge2fb08e?
I am trying to get cifs working on my evo.
Never mind. Thanks for everyone's help.
Here is what I did to get the cifs.ko and nls_utf8.ko (from here http://forum.xda-developers.com/showthread.php?t=754793) to work for my kernel.
I took the cifs.ko and nls_utf8.ko created by "snq-" and used a hex editor to edit the kernel number to match mine.
That was all, no re-compile needed. then I followed the rest of the steps laid out by snq- to install the files and test them.
Lastly I installed CifsManager which is available on Market and everything worked.
I am able to connect to my network only locally. Comcast seems to be blocking ports so I cannot access smb from outside my network.
please post link for cifs.ko
If you have a working cifs.ko for this kernel, please post a link!
Thanks!
Any Suggestions
Any where else to go for a tun.ko for ge2fb08e? I've almost exhausted my searching. Thanks!
i am trying to set up OpenVPN on my Evo with the same ge2fb08e kernel version. i installed the pre-requisites, but do not have the tun driver. can you send me a copy of the tun.ko zip? TheEdge88
SR, You can download the tun.ko file in the previous post, but you need to post 9 more times before you can access it. It worked for me and now I can connect to the OpenVPN server. I think I still have a problem with routing though.

[HOWTO] tun.ko to run OpenVPN on Froyo xxJPK Galaxy S I9000

NOTE: there is no guarantee this will work, because without access to the corresponding kernel source I can't be sure. It may wipe out your device if there's memory corruption! You're warned, use it only at your risk!!
Over the last weekend I wanted to familiarize with the arm assembly, buildsystem, SDK so I created a tun.ko module for kernel running in the JPK ROM. But lots of the time was also wasted trying to guess their config (things like disabled DMABOUNCE and removal of the dummy they added in 2.6.29 from struct net_device, I hope I got it all right).
I encourage to release the kernel source along with the ROM images in the future (it'd be much simpler if there was a git tree that they can just tag with the name of the ROM), and to include the tun device into the modules/tun/tun.c (as in the tarball) so that it is included by default in the future. I won't be doing this process again.
I had to install openvpn with the openvpn installer a second time with openvpn in xbin, busybox in xbin/bb and I created the bb directory and two symlinks from xbin/bb/{ifconfig,route} to xbin/busybox (after mounting /system rw). The DNS to change during VPN must be set by long pressing on the left of the openvpn config slot in the OpenVPN settings GUI.
The tun.ko I keep it in /sdcard/openvpn/tun.ko and the path has to be configured in the openvpn settings advanced settings menu and I choose to load it with insmod.
This JPK rom works great for me, so I'll likely keep using it for a long while now that I've got openvpn running fine.
252ae6e655fa08774f32f67dd76dad3a tun.ko
EDIT: the same tun.ko module works for JPM too
Great job!!!
I use vpnc daily, so I couldn't even think to upgrade to JPK without an available tun module.. now I can!
Would you share your .config, so other devs can use it? Maybe we can hope in a Froyo-voodoo in a short time..
I'm confirming that it works.
Here is how I did it (I garantee that THIS IS NOT THE MOST ELEGANT WAY to make it work)
Install Openvpn from Openvpn Installer
openvpn in /system/xbin
route and ifconfig in /system/bin
At this point, Openvpn could connect and create a tun device, but route are not pushed so it's not very usefull
So, I downloaded this version of Openvpn
http://github.com/downloads/fries/android-external-openvpn/openvpn-static-2.1.1.bz2
As superuser
Code:
su
I remounted in rw /system
Code:
mount -o remount,rw /system
I renamed /system/xbin/openvpn into openvpn_old
Code:
mv /system/xbin/openvpn /system/xbin/openvpn_old
I put that new openvpn binary in /system/xbin
I created symlinks from /system/bin/route and ifconfig to /system/xbin
Code:
ln -s /system/bin/route /system/xbin/route
ln -s /system/bin/ifconfig /system/xbin/ifconfig
I also created a symlink os /system/xbin to /system/xbin/bb, just in case
Code:
ln -s /system/xbin /system/xbin/bb
Here we go
captive said:
Would you share your .config, so other devs can use it?
Click to expand...
Click to collapse
+1
i tried to complie cifs.ko and tun.ko for the JPC kernel and couldnt get it to work. i ultimately went back to eclair because of this so would like to be able to compile modules and other filesystem support.
thanks.
kanemari said:
+1
i tried to complie cifs.ko and tun.ko for the JPC kernel and couldnt get it to work. i ultimately went back to eclair because of this so would like to be able to compile modules and other filesystem support.
thanks.
Click to expand...
Click to collapse
config attached, but the config is not enough and it may not be fully correct (it is enough as far as the data structures used by tun.ko are concerned, I checked them all against the zImage assembly). The diff of the v2.1 image, has to be applied too but with DMABOUNCE removed from Kconfig of the subarch of the galaxy as far as I can tell and the placeholder added to struct net_device in their v2.1 diff, has to be removed too. cifs.ko may be more complicated than tun, good luck. Unless you've personal interest to familiarize with the enviroment and the arm assmbly like I had, I would wait the source to released, it has to be released eventually to comply with the GPLv2.
Thankyou Newmail!!
I've tryed VPNC 0.99 and works great!!
You have only to type from terminal: insmod /system/folder/tun.ko
After that you can use VPNC...
I've found an issue with the FQDN of the VPN gateway... solved setting the IP address
Just a question:
when I'll update my JPK.. what I have to do to recompile the tun.ko?
Can you write here the procedure?
Cheers
Paolo
newmail said:
config attached, but the config is not enough and it may not be fully correct (it is enough as far as the data structures used by tun.ko are concerned, I checked them all against the zImage assembly). The diff of the v2.1 image, has to be applied too but with DMABOUNCE removed from Kconfig of the subarch of the galaxy as far as I can tell and the placeholder added to struct net_device in their v2.1 diff, has to be removed too. cifs.ko may be more complicated than tun, good luck. Unless you've personal interest to familiarize with the enviroment and the arm assmbly like I had, I would wait the source to released, it has to be released eventually to comply with the GPLv2.
Click to expand...
Click to collapse
OK, but is the placeholder field at the end of the net_device struct?
If so it shouldn't matter and a module cross compiled from the 2.6.29 source should be OK. The absence of DMABOUNCE shouldn't matter for tun.ko either.
In theory you should be able to clone the AOSP git kernel repo and use that kernel for building a module, as long as the module itself doesn't actually use changes that have been made by Samsung (unlikely).
The .config used probably does deserve some attention though, as you have done.
foloap said:
Thankyou Newmail!!
I've tryed VPNC 0.99 and works great!!
You have only to type from terminal: insmod /system/folder/tun.ko
After that you can use VPNC...
I've found an issue with the FQDN of the VPN gateway... solved setting the IP address
Just a question:
when I'll update my JPK.. what I have to do to recompile the tun.ko?
Can you write here the procedure?
Cheers
Paolo
Click to expand...
Click to collapse
Glad it works great for you too. So the tun.ko has to be recompiled if they alter .config. It may work but it's not guaranteed. The procedure is nasty and hard to document and I don't have enough time for that sorry. But I'm sure we'll get the source when there will be an official Froyo release that is shipped to all phones so I wouldn't worry.
raven-au said:
OK, but is the placeholder field at the end of the net_device struct?
If so it shouldn't matter and a module cross compiled from the 2.6.29 source should be OK. The absence of DMABOUNCE shouldn't matter for tun.ko either.
In theory you should be able to clone the AOSP git kernel repo and use that kernel for building a module, as long as the module itself doesn't actually use changes that have been made by Samsung (unlikely).
The .config used probably does deserve some attention though, as you have done.
Click to expand...
Click to collapse
The .config is the fundamental part, and it may be enough I'm not sure. There was a placeholder was a samsung customization done in the middle of net_device and that was removed in the Froyo ROM (initially I applied it). the DMABOUNCE removal affects the struct device that is part of net_device so a lot of stuff goes off by 4 bytes by tweaking that arch config option. That gets set in some Kconfig patched in by samsung. You're right that probably tun isn't affected by the DMABOUNCE but I tried to get the net_device size right (just in case) and it may affect other net modules.
Hi newmail, thanks so much for the tun.ko file, this is the first time I've managed to get VPNC working on my SGS!! One question though, I find I'm having to run insmod everytime I reboot the phone to make tun.ko available again, does anyone know if there's a way around this please so it stays permanently available? Many thanks!!
@bdl1969
I made a subdir in /system/lib called "modules" and placed my tun.ko there.
Now it's insmodded automagically..
newmail said:
The .config is the fundamental part, and it may be enough I'm not sure. There was a placeholder was a samsung customization done in the middle of net_device and that was removed in the Froyo ROM (initially I applied it). the DMABOUNCE removal affects the struct device that is part of net_device so a lot of stuff goes off by 4 bytes by tweaking that arch config option. That gets set in some Kconfig patched in by samsung. You're right that probably tun isn't affected by the DMABOUNCE but I tried to get the net_device size right (just in case) and it may affect other net modules.
Click to expand...
Click to collapse
Oh crap, that is bad news.
Then both the DMABOUNCE and the net_device are likely a problem.
That's a stupid way of doing things.
raven-au said:
Oh crap, that is bad news.
Then both the DMABOUNCE and the net_device are likely a problem.
That's a stupid way of doing things.
Click to expand...
Click to collapse
The smart way of doing things I already mentioned in the first post (public git tree tagged at every ROM release .
captive said:
@bdl1969
I made a subdir in /system/lib called "modules" and placed my tun.ko there.
Now it's insmodded automagically..
Click to expand...
Click to collapse
hmm I tried and it didn't work for me... are you sure? openvpn GUI runs insmod for me so it's no big deal.
That worked great for me, thanks for the suggestion! The only problem I found was that it caused my Good for Enterprise app to crash so I uninstalled and reinstalled it and then it was all fine. Only problem I'm left with now is when using VPNC, I make the VPN connection fine but I can't disconnect via the app, I have to bounce the network connection (eg. toggle WiFi) to drop the tunnel!
I compiled tun.ko using the 2.6.32 kernel from android git and your .config, but it won't load with dmesg saying "Unknown symbol mem_map". May I ask which kernel version did you use, and what arm toolchain are you using?
sztupy said:
I compiled tun.ko using the 2.6.32 kernel from android git and your .config, but it won't load with dmesg saying "Unknown symbol mem_map". May I ask which kernel version did you use, and what arm toolchain are you using?
Click to expand...
Click to collapse
Probably you have discontigmem off in the .config. The platform of the galaxy isn't in the android kernel, it's in arch/arm/plat-s5pc11x (it's the thing that sets DMABOUNCE in v2.1 roms and I guess it doesn't on the JPK kernel).
You need to make a diff between android 2.6.29 and their tree, and apply it to the 2.6.32 kernel, then you need to solve enough rejects so that it can build external module. I didn't port the whole diff of course, just enough so make can start with the headers and .config all right. Then I built the module externally (adding the tun/ directory to their modules/ directory) but it should also work with just make modules setting CONFIG_TUN=m if you want to build it in-tree.
It's a bit tricky.. If you really need I can give you the broken diff to apply to the 2.6.32.9 android kernel. That is enough to build some module including tun.ko
newmail said:
Probably you have discontigmem off in the .config. The platform of the galaxy isn't in the android kernel, it's in arch/arm/plat-s5pc11x (it's the thing that sets DMABOUNCE in v2.1 roms and I guess it doesn't on the JPK kernel).
You need to make a diff between android 2.6.29 and their tree, and apply it to the 2.6.32 kernel, then you need to solve enough rejects so that it can build external module. I didn't port the whole diff of course, just enough so make can start with the headers and .config all right. Then I built the module externally (adding the tun/ directory to their modules/ directory) but it should also work with just make modules setting CONFIG_TUN=m if you want to build it in-tree.
It's a bit tricky.. If you really need I can give you the broken diff to apply to the 2.6.32.9 android kernel. That is enough to build some module including tun.ko
Click to expand...
Click to collapse
It'd be great. I've already tried to do the patching. It compiles, but crashes the phone when loaded. Maybe your version is a bit better.
sztupy said:
It'd be great. I've already tried to do the patching. It compiles, but crashes the phone when loaded. Maybe your version is a bit better.
Click to expand...
Click to collapse
Did you find the source now that JPM has been released officially with Kies? I upgraded to JPM now, in the hope we get the source....
BTW, my tun.ko and my rfs_async.ko also works fine on JPM. I don't know about my ext4 build but I assume that will work too.
I used one CSC of this thread http://forum.xda-developers.com/showthread.php?t=802909 and I deleted the KOR /efs/nv_data* created by the JPK ROM (leaving the .nv_data.bak*). So with this combination of CSC from that thread, and MODEM and PDA from the JPM rar, I apparently restored the original product_id (SGSToolbox also says I'm back to the original product_id). Not that product_id matters but I thought I'd try that next time I flashed and apparently it worked fine...
newmail said:
Did you find the source now that JPM has been released officially with Kies? I upgraded to JPM now, in the hope we get the source....
BTW, my tun.ko and my rfs_async.ko also works fine on JPM. I don't know about my ext4 build but I assume that will work too.
I used one CSC of this thread http://forum.xda-developers.com/showthread.php?t=802909 and I deleted the KOR /efs/nv_data* created by the JPK ROM (leaving the .nv_data.bak*). So with this combination of CSC from that thread, and MODEM and PDA from the JPM rar, I apparently restored the original product_id (SGSToolbox also says I'm back to the original product_id). Not that product_id matters but I thought I'd try that next time I flashed and apparently it worked fine...
Click to expand...
Click to collapse
The JPM source was avialable for a few hours on the samsung's site, did grap it. You can find it on megaupload somewhere. I couldn't manage to compile a working module from that source either (it now loads fine, but does a kernel panic when I try to mount a loop device formatted with ext4), but I'm sure that's my fault.

[Q] Working & stable SSHD/sftpd for ZE55xML ?

Apologize for possible OT, but I can't find an always working (and stable) SSH daemon app for the Zenfone2's Lollipop
This is what I tried, any of them PAID apps:
QuickSSHd - too old, not even starts
SSHDroid Pro - sometime starts, only first time after reboot, but only without root and higher ports (>1024)
RRooted SSH/SFTP Daemon - always refusing connections
Ssh Server Pro (olive tree) - seems promising, but very poor of binaries
The Dropbear service hanging issue seems the root of this problem
Thanks for any hint
I can't even find a proper ssh binary. I just tried sshd from an x86 cyanogen port (RAZRi, I think). Got this after loading appropriate library in lib (same as client)
1|[email protected]:/ # sshd
CANNOT LINK EXECUTABLE: could not load library "libssh.so" needed by "sshd"; caused by cannot locate symbol "EVP_ripemd160" referenced by "libssh.so"...
Good luck sir
Blades said:
I can't even find a proper ssh binary. I just tried sshd from an x86 cyanogen port (RAZRi, I think). Got this after loading appropriate library in lib (same as client)
1|[email protected]:/ # sshd
CANNOT LINK EXECUTABLE: could not load library "libssh.so" needed by "sshd"; caused by cannot locate symbol "EVP_ripemd160" referenced by "libssh.so"...
Good luck sir
Click to expand...
Click to collapse
Hi,
I followed the following guide which you can get from googling "Compiling-Dropbear-for-a-Nexus-7-tablet". Sorry, I can't post any links yet as my post counts are still below 10
The difference with the info from the website above is that we don't need to cross compile if you're compiling in a Linux x86-64 system. Just need to make a static binary.
Let me know if you have any questions and I'll try to help out.
Cheers.
wolfdude said:
The difference with the info from the website above is that we don't need to cross compile if you're compiling in a Linux x86-64 system. Just need to make a static binary.
Let me know if you have any questions and I'll try to help out.
Click to expand...
Click to collapse
Thanks for your answer.
Sorry but I can't get the exact entry-point, bypassing all the NDK / X-compiling stuff, as we're on a x86_64 architecture
Referring to the "simplified" version of your link (here: https://nerdoftheherd.com/articles/cross-compiling-dropbear-rsync-android/ ),
how should I compile the Dropbear source ?
Something like this ?
Code:
./configure \
--disable-zlib --disable-largefile --disable-loginfunc --disable-shadow --disable-utmp --disable-utmpx --disable-wtmp \
--disable-wtmpx --disable-pututline --disable-pututxline --disable-lastlog \
CFLAGS='-Os -W -Wall -fPIE' LDFLAGS='[COLOR="Red"]-static[/COLOR] -fPIE -pie'
... right before make-ing ?
Thanks for any further hint in the right direction
Hi,
I didn't refer to that site you have posted BUT that site does have a link at the bottom to the site where I followed.
From that site, what I did was :-
1) Download dropbear v58 (dropbear-2013.58.tar.bz2). I know this is older but the patch available is based on this version.
2) Download patch (dropbear-patch2) from that site.
3) Apply patch to the original dropbear (v58) source.
4) Run configure :-
./configure --disable-zlib --disable-largefile --disable-loginfunc \
--disable-shadow --disable-utmp --disable-utmpx --disable-wtmp \
--disable-wtmpx --disable-pututline --disable-pututxline --disable-lastlog
5) Run make :-
STATIC=1 MULTI=1 SCPPROGRESS=0 PROGRAMS="dropbear dropbearkey scp dbclient" make strip
6) You should end up with "dropbearmulti" which is a static binary that you can then copy over the the phone & go on from there.
There are some issues with that version of the code (v58+patch). Namely the "scp" doesn't work (but I have found the offending code in scp.c and found a workaround).
Let me know if you need more details. If I have some time, I might look at getting the latest dropbear version & working out a patch for it to get it to work on android x86.
Cheers.
wolfdude said:
Hi,
I didn't refer to that site you have posted BUT that site does have a link at the bottom to the site where I followed.
[...]
There are some issues with that version of the code (v58+patch). Namely the "scp" doesn't work (but I have found the offending code in scp.c and found a workaround).
Let me know if you need more details. If I have some time, I might look at getting the latest dropbear version & working out a patch for it to get it to work on android x86.
Cheers.
Click to expand...
Click to collapse
Yes of course. The main link you weren't able to post is:
http://blog.xulforum.org/index.php?post/2013/12/19/Compiling-Dropbear-for-a-Nexus-7-tablet
Actually that procedure seemed too complex as mostly dealing with the cross-compiling issue, which didn't apply to x86 case.
So I named the derivative one
Thanks for pointing out the static compiling is done within MAKE and not CONFIGURE phase... I'm quite newbie in those flags so I do appreciate any of your words
About issues, what about using the latest v67 for Dropbear sources ? (see here)
If the patch doesn't work for such different version, I guessed commenting out the interactive password line would be enough
I'm trying to compile it this way and - for instance - replace the binaries in one of the SSHD packages I named in the OP...
Thank you again for your time
Val3r10 said:
About issues, what about using the latest v67 for Dropbear sources ? (see here)
If the patch doesn't work for such different version, I guessed commenting out the interactive password line would be enough
I'm trying to compile it this way and - for instance - replace the binaries in one of the SSHD packages I named in the OP...
Thank you again for your time
Click to expand...
Click to collapse
Hi,
Yes, the patch for v58 does not work for v67. I think one just have to go through the patch and "adjust" it slightly for the newer v67. Hopefully there isn't much changes from v58 to v67. There may be more than just commenting out the password prompt as there are certain functions that don't work in Android as in *NIX. When I have some time, I will attempt to patch v67 meanwhile, I'm running v58 fine on my ZE550ML so no complains there.
Cheers.
Hi,
I've created a guide on compiling the latest dropbear (2015.67) :-
http://forum.xda-developers.com/zenfone2/general/compiling-dropbear-2015-67-zenfone-2-t3142222
Hope it helps.
Cheers.
wolfdude said:
I've created a guide on compiling the latest dropbear (2015.67)
Click to expand...
Click to collapse
Thanks a lot.
Do you think the same process (STATIC build, of course, not patching) could be likely used for other small binaries too ?
Val3r10 said:
Thanks a lot.
Do you think the same process (STATIC build, of course, not patching) could be likely used for other small binaries too ?
Click to expand...
Click to collapse
Of course. I've managed to compile tcpdump, iperf, gdbserver, etc... successfully and working fine on the Zenfone 2.
Cheers.
I found that "Servers Ultimate" SSH/SFTP modules work on the Zenfone2 once properly configured. Its not working 100% but its already more then most solutions out there.

Categories

Resources