[HOWTO] OpenVPN Settings/Install - Run on Desire (LeeDrOiD) - Desire Themes and Apps

Because of some request, i post here a Mini-HowTo, how i got OpenVPN to work.
There are a lot of infos here at xda-devs and around the net and i like to put them almost here together.
My Setup:
- HTC Desire
- LeeDrOiD 2.2d
In this example i use a Config called "Denver",
which is also running on my PC.
This is not about get OpenVPN running in gerneral.
It is how i got it running on the Desire with a preconfigured VPN-Config-File (*.ovpn),
and Certificates.
In this configuration, all traffic will routed through the VPN if it is activated!
Preparation:
A. Create a password.txt if you want Auto-Login:
Type in the first line your username.
In the second the password.
Save this as "password.txt"
B. Create the script "iproute-wrapper.sh":
Code:
#!/system/bin/sh
# ip route wrapper, add 'table vpn' to add/del commands
IPROUTE=/system/bin/ip
case "[email protected]" in
*'route add'*|*'route del'*)
exec "$IPROUTE" "[email protected]" table local
;;
*)
exec "$IPROUTE" "[email protected]"
;;
esac
# EOF
Copy this to:
/data/local/bin/iproute-wrapper.sh
You must create /bin and copy by for example with RootExplorer or with adb.
HowTo for use with adb you'll find here:
http://forum.xda-developers.com/showpost.php?p=7610101&postcount=31
Thanks to all, who contributed this!
IMPORTANT: Do NOT put the iproute-wrapper.sh on the sdcard - it won't work!
C. To get A. and B. to work, you must also edit the *.ovpn and add two lines:
auth-user-pass password.txt
iproute /data/local/bin/iproute-wrapper.sh
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
D. Create a folder on sdcard: sdcard\openvpn
Copy in here your neccessary Certs and Config (*.ovpn).
In my case/example this:
Copy in here also the password.txt!
Now - here it goes:
1. Install "OpenVPN Installer" from market
2. Open - then click "install" with target /system/xbin
3. Install "OpenVPN Settings" vom market
Open and use menu-button to go to "Advanced":
- activate "Load tun kernek module"
- "Path to configurations": /sdcard/openvpn
- "Path to openvpn binary": /system/xbin/openvpn
4. Now do a restart of the desire!
5. Go to OpenVPN Settings, activate it and choose your VPN to start
I had archived some links, where i got some of the nessesary informations:
OpenVPN Installer
http://www.androidpit.com/en/androi...t.android.openvpn.installer/OpenVPN-Installer
OpenVPN Settings
http://www.androidpit.com/en/androi...chaeuffelhut.android.openvpn/OpenVPN-Settings
Openvpn update for desire + tun.ko
http://forum.xda-developers.com/showthread.php?t=673764#
android-openvpn-settings
http://code.google.com/p/android-openvpn-settings/
Thanks to all that people there and in the WorldWideWeb, who give hints to get this to work for me
and specially to the developer of "OpenVPN Settings/Install" (Friedrich Schäuffelhut/Christophe Vandeplas)!
Hope this will help you guys!

Appreciate it, very simple and good explanation. Thanks, worked for me and i am connecting flewlessly now.

how to make it work in Leedroid 2.3d? Tried the steps and does not work

OpenVPN
Nice and celan tuto!
Do you have links to info on how to setup VPN on my network though?
I guess I could google it but there might be an easy tuto like this one out there that I could miss...

I can't access the /system/xbin folder only, and hence am not able to install it in any way. I am trying to install on Emulator.
Why I can't access the /system of the emulator ? Is that we can access it of real device and not of emulator ! Then how a developer can test its application that uses openvpn.
Really stuck up at this installation part. Just can't access /system even after changing the permission I get messages like "Read only", "Access denied", etc.
Can anyone help me with this issue ?
Thanks

Is there a way to install OpenVPN on Leedroid 3.0.7 without S-Off ?
At the moment, I can't install openvpn with OpenVPN Installer because there is no way to write in the /system/ protected partition...
Clément

Related

[APP] Compiled lynx binary for android - Shell or ADB

I've searched the web, and found no lynx binaries for android, so I set out to compile it myself.
For the uninitiated, lynx is a text-based browser. No images, no javascript, no flash. Just pure content.
You can use it by connecting to your phone through adb, telnet, ssh or a shell on the phone itself.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
This is lynx version 2.8.8 with ncurses 5.9
I pretty much just followed the instructions at http://www.embedu.org/Column/Column294.htm, and added a flag to make the linking static. No code changes were required.
Installation instructions
Root is not required.
You need to unzip the file on the /sdcard folder. The following files must exist:
/sdcard/lynx/lynx.cfg
/sdcard/lynx/lynx.lss
/sdcard/lynx/cache/
Then you need to move the binary to /data/local (or /system/xbin if you want something more permanent. Then you'd need root)
and run this command:
chmod 755 /data/local/lynx
Then run :
/data/local/lynx
and enjoy!
Additional information
If you want to put these files somewhere else, you must redefine the following variables, respectively:
LYNX_CFG (eg: export LYNX_CFG=/system/etc/lynx.cfg)
LYNX_LSS (eg: export LYNX_LSS =/system/etc/lynx.lss)
TMPDIR (eg: export TMPDIR =/cache)
If you receive an error message about the terminal, you need to configure a terminal.
Here are some instruction (for nano, but it works the same)
Sources are at the following addresses:
http://lynx.browser.org/
http://www.gnu.org/s/ncurses/
reserved
soon get the flash-able package
Thanks! I installed this on my ZTE Blade with 2.3.4 Gingerbread, but after setting everything in Terminal Emulator, I get these errors:
Alert!: Unable to connect to remote host.
Looking up lynx.isc.org
Unable to locate remote host lynx.isc.org.
lynx: Can't access startfile http://lynx.isc.org
Click to expand...
Click to collapse
As if there were no internet connection...
Awesome
Will be testing on my thunderbolt later today. I'll let you guys know how it goes.
However, would you mind reposting this on RW, or would you mind if I were to repost it and link back?
[EDIT] In having just configured everything, I also get the error from the post above. It seems as though lynx thinks it doesn't have internet access. This is the case on 3g and wireless networks. Let me know if you want me to test anything for you.[/EDIT]
All the best,
-HG
Looks great.
May I add that to my script ?
http://forum.xda-developers.com/showthread.php?t=1191984
Well, I was able to install it from a chrooted ubuntu 10.10 distro on my device. It's already compiled for ARM on ports.ubuntu.com, so maybe it's not so exclusive.
Sent from my Milestone 2 XDA App
Sure
sebsch1991 said:
Looks great.
May I add that to my script ?
http://forum.xda-developers.com/showthread.php?t=1191984
Click to expand...
Click to collapse
Sure, go ahead. It's open-sourced after all, I just built it.
dangpzanco said:
Well, I was able to install it from a chrooted ubuntu 10.10 distro on my device. It's already compiled for ARM on ports.ubuntu.com, so maybe it's not so exclusive.
Sent from my Milestone 2 XDA App
Click to expand...
Click to collapse
Nice. Can you point me to the correct file? I got as far as http://ports.ubuntu.com/pool/universe/l/lynx-cur/, but I don't know which one contains the binary.
While this is quite cool, why lynx? Why not elinks? It has much better layout capabilities. It has tabs! It even has javascript.
Code:
[email protected]:/# apt-get install lynx
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
lynx
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B/215kB of archives.
After this operation, 254kB of additional disk space will be used.
Selecting previously deselected package lynx.
(Reading database ... 66275 files and directories currently installed.)
Unpacking lynx (from .../lynx_2.8.8dev.2-1_all.deb) ...
I installed it that way.
Search for opkg (i think this is the name) if you are curious. It's a way of using deb packaging on Android (G1), but not in development anymore...
Sent from my Milestone 2 XDA App
I would be nice if someone could compile the HTTPS version of this so I could browse my banks mobile site
norti said:
Thanks! I installed this on my ZTE Blade with 2.3.4 Gingerbread, but after setting everything in Terminal Emulator, I get these errors:
As if there were no internet connection...
Click to expand...
Click to collapse
any solution ? i got the same problem...
hawkeyexp said:
any solution ? i got the same problem...
Click to expand...
Click to collapse
Can you ping any web address from the shell? What about wget, can you try that?
both pissble without problems
I am getting the following error
Looking up <url>.
Unable to locate remote host <url>
Alert!: Unable to connect to remote host.

[Q] [Solved] How to determine PATH for busybox binary location?

I'm hoping to be able to get some feedback and bounce this idea around. I wasn't able to figure out the right terms for a google search with good results even though I spent a while trying.
From an Android application, I want to determine where the busybox binary is installed on the system or data partition. I was hoping for a pure java solution, but I don't think there are any android java APIs for calling the shell PATH variable...
I also wanted to avoid hard coding the common linux binary directories (ex. /system/bin and /system/xbin, etc.)
From a shell perspective, I would usually run busybox find / -name busybox to locate it. Or I'd run busybox which busybox .. none of these are pure Android java solutions.
There are only two ways I'm aware of:
1) Using the linux binary "which". I could compile this for arm (or use the busybox applet) and package this binary into the application, have it extract when the application loads and execute and parse the output. Could do the same with the find linux binary...
2) Use the RootTools method Stericson published - InternalMethods.java. Although his approach uses a root shell to run dd to copy it from /init.rc (permissions usually read only for root) into /data/local/tmp and set it 777 so the android application and parse it for the export PATH line.
EDIT: found another method .. kind of an interesting approach.
http://osdir.com/ml/AndroidDevelopers/2009-03/msg04053.html
ps | grep /system/bin/sh
cat /proc/<pid>/environ
have to parse some of that output, but it seems to work thru adb shell w/o root.
I very well might have overlooked something or missed another approach. Any other ideas or other approaches?
Thanks in advance!
Include busybox with your app, no need to worry about its version
Couldn't you use java.lang.System.getenv()?
http://developer.android.com/reference/java/lang/System.html#getenv(java.lang.String)
doixanh said:
Include busybox with your app, no need to worry about its version
Click to expand...
Click to collapse
lol. unfortunately the scope of my app is only to show the user where their busybox binary is currently located, not provide them with a busybox binary.
Gene Poole said:
Couldn't you use java.lang.System.getenv()?
http://developer.android.com/reference/java/lang/System.html#getenv(java.lang.String)
Click to expand...
Click to collapse
Wow! very interesting. Sad I couldn't find this in all my searching through the android docs.
Two questions after looking over the information I can probably answer through testing, but can't test at the moment. If anybody knows the answer, would be helpful. Otherwise I'll post back when I am able to test.
1) Would the SecurityManager block a 3rd party app from using this call as it might be reserved for only apps signed with platform keys? I can compile and test watching logcat to see if it blocks this call.
2) For the getenv(String name) method, what value should be passed as the string? I can probably bypass this by just running the getenv w/o a string to have it return the Map and sort through the map.
Thanks for the help/suggestions/feedback!
Finally had a chance to test!
Gene Poole said:
Couldn't you use java.lang.System.getenv()?
http://developer.android.com/reference/java/lang/System.html#getenv(java.lang.String)
Click to expand...
Click to collapse
Turns out to be the perfect answer!!
This is the exact command I was looking for:
textBox.setText(System.getenv("PATH"));
Found a great test example for implementing real quick - How do I get Environment Variables?
Here is the output on my EVO 3D:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}

[APP] iptraf 3.0.0 for Android (with APK Installer)

Introduction:
Here's the classic iptraf for Android!
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Installation:
You need to have a rooted phone and busybox installed on /system/xbin
You also need to have about 1Mb free on your /system partition.
Usage:
To use iptraf, you need to either have an SSH server on your phone (for example DroidSSHd) and connect using Putty from your PC, or you can use the Terminal Emulator (please see attached screenshots).
Any terminal emulator application should work, but iptraf requires at least 80×24 characters screen so for smaller screens you might need to reduce the font size a lot to make it fit.
The price is payed for the installer and the effort to have iptraf cross-compiled for Android, since iptraf is distributed under GPL license. Put in a different way, you are just buying me a beer for making it easier for you to have iptraf on your phone!
Filters:
If you decide to connect using SSH, the trouble is that iptraf will show the SSH traffic too – something that you might not want to have there constantly updating.
It would seem intuitive to create a filter which excludes SSH port from the traffic, but once you do that, iptraf will not show anything else; iptraf actually has an “implicit no-display” policy meaning that once you apply a filter (include / exclude) nothing else is displayed, even if the filter is Exclude mode. You will need to have an additional Include entry added to the filter (after the Exclusion entry taking care of the SSH port) where everything is 0 and all the ports have an Y next to them. Please check attached screenshots as an example on how the entries of the filter should look like.
Please do not forget to “Apply filter…” every time you change something in the filters. X saves the filter, Ctrl-X cancel the changes, but even if you press X, the filter is not yet applied unless you Apply the filter.
Download
Please donate by buying it from the Google Play :fingers-crossed:
Use it at your own risk!
IptrafInstaller.apk
Source code: https://code.google.com/p/iptraf-installer/
Could you please make the sources of the iptraf binary available?
(preferably on github)
1 Euro to download from Android Market? That sucks
M66B said:
Could you please make the sources of the iptraf binary available?
(preferably on github)
Click to expand...
Click to collapse
As soon as possible ... I am working on an updated version.
defim said:
1 Euro to download from Android Market? That sucks
Click to expand...
Click to collapse
Well, you can actually download for free from few posts above.
I'm to lazy to update app by manual download .apk

[GUIDE][Tool][WindowsOnly][NonRoot] USB Reverse Tethering

Hello there!
Since the most recent guide thread ((that I found) [GUIDE] USB Reverse Tethering - New method) does is quite
complicated for many and requires root and for the sake of simplicity, I wanted to present a simpler alternative
to you here in a separate thread, which works without root and is not outdated.
If this violates any XDA rules, please close the thread.
-This method works 100% on Android 9. For other versions you need to check.
-Very useful for people whose wifi module is broken (like mine x.x)
I will attach the .zip here as well as pictures for a better understanding.
Requirements are:
-A working USB connection
-USB debugging enabled.
-A Windows computer
-adb
First, of course, we need to unzip the .zip.
In this case it doesn't matter where.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Second, we need to open the console and go to the path of the extracted .zip
CD path\to\gnirhtet-rust-win64
Third, we press tab 2 times in the cmd, space, write install and press enter.
When that's finished, we press tab again twice, space and write run and press enter.
Alternatively, if "gnirehtet" is already installed, you can use the .bat, provided in the .zip to start it.
That's it! You got reverse usb tethering!
thank you for sharing, i followed the steps but didn't succeed in getting internet
i think you should mention having adb in systempath or just extract your program in adb directory
my steps were
get adb fastboot and extract it
get your program extracted inside adb directory
start cmd normally without admin rights
execute first command in your post to install ( returned success)
execute second command ( returnt 1 at the end ) but no internet
Code:
2022-07-30 00:41:44.389 ERROR Main: Cannot start client: Command adb ["reverse",
"localabstract:gnirehtet", "tcp:31416"] returned with value 1
i should am running AOSP 7.1
**solved
i report it working on AOSP 7.1
solution = use an up-dated version of adb-tools
0cold said:
**solved
i report it working on AOSP 7.1
solution = use an up-dated version of adb-tools
Click to expand...
Click to collapse
Lol
Can you host network as a hotspot using reverse tethering?
Edit: Yes you can using VPNHotspot
How to share the usb reverse tethered share via hotspot
konrino said:
Can you host network as a hotspot using reverse tethering?
Edit: Yes you can using VPNHotspot
Click to expand...
Click to collapse
How
The problem im facing is that im able to use the internet but the apps are not detecting it as an actual connection and showing no internet. Is there any way we can emulate or fake our wifi or mobile data is turned on and connected?
patelmilanun said:
The problem im facing is that im able to use the internet but the apps are not detecting it as an actual connection and showing no internet. Is there any way we can emulate or fake our wifi or mobile data is turned on and connected?
Click to expand...
Click to collapse
I think that's a problem of the application, which wants a specific connection e.g. wifi or mobile data.
actually i want to update the phone using this method to download update package
patelmilanun said:
actually i want to update the phone using this method to download update package
Click to expand...
Click to collapse
This should be no problem.
It was creating the problem but then I just reflashed whole stock ROM and bam my phone is better than before
working thank you for this program.
You may also check the re-link app at https://re-link.io, as it doesn't even need ADB on Windows, making it safer to use

General Seeking Help for fixing vmware tools in Android x86_64 images

Hello Friends~!
I decided to play with some forks of android and chrome os in vmware this week, it was a lot of fun!
A problem I would like to create a solution for, is the inability for vmware tools to install natively.
Here is a toolset I prepared called "droidvmtools" DOWNLOAD
I was able to create this toolset based off of the prelGlibc25 Linux iso that came with VMWare, that is stored in Windows in this directory:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
If you care about the extra steps added to "droidvmtools" I tried to document that process HERE
This exercise is performed using this Prebuilt copy of PrimeOS for VMWare DOWNLOAD
In theory, this method should work on other android images with root access, then likely fail as this example does at the end.
INSTALLATION:
Obtaining the perl binaries:
In termux run the command
Code:
pkg install perl
Then in Root Explorer, go to
Code:
/data/data/com.termux/files/usr/bin
and copy the perl binaries.
Now paste the binaries to:
Code:
/system/bin
To install the Toolset:
Extract droidvmtools and paste it to the root file system. The video goes over this step at 2:34 if you need reference. ( I also used my yt channel to easily dl the tools youtube.com/@jennn/about the tools are there if no usb)
Open a terminal emulator and type:
Code:
su
chmod 777 -R /droidvmtools
Then in Root Explorer, open droidvmtools, select all, copy, and then paste the contents to the root file system
You will be prompted with this message, select these options:
Now when you type:
Code:
perl run.pl
The tools are able to start installation but they crash at this part:
This is the part I am stuck on. I had never heard of recursion until this happened..
Here is a PASTEBIN dump of the code, maybe someone is able to look and see why this would be happening?
This thread is in preparation for a megathread I want to make. If you want to preview some of the images early see HERE
PLEASE NOTE:
I Understand that "Vmware Tools is not supported" in Linux let alone Android, blah blah. Let's try!
I also already know about and have tried every emulator in existence... So Please! Let's refrain from "just use x emulator", this is about problem solving.

Categories

Resources