yashsingh1/xdaforums huggingface dataset:
[G1 Android Development] PeepoTurton:
Hi,

When I try to run openvpn it gives me the error...

openvpn: 1: Syntax error: word unexpected (expecting ")")

Forgive me if its something just silly and easy I really am a bit poo when it comes to the terminal i'm lost without my little icons :(

Thanks in advanced for any help you can give me with this

Peepo
[G1 Android Development] balazer:
I haven't tested it yet, but it appears that CyanogenMod ROM for Dream has tun built into the kernel - no need to load a kernel module. It has busybox, too, so the above instructions should work.
[G1 Android Development] eratosthene:
I've been trying to find a copy of the Android OpenVPN binary without success, as Fnorder's site is no longer around. Can you post a link to somewhere that we can download this stuff? I'm excited to try it out.
[G1 Android Development] balazer:
Check the first post of this page
[G1 Android Development] eratosthene:
All that I get when trying to run the openvpn binary with a config file is this:

Tue Jul 14 13:21:15 2009 OpenVPN 2.0.9 arm-none-linux-gnueabi [SSL] [LZO] [EPOLL] built on Nov 18 2008

Tue Jul 14 13:21:15 2009 Sorry, but I can't get console input on this OS

Tue Jul 14 13:21:15 2009 Exiting
[G1 Android Development] balazer:
What ROM are you using? What terminal? What shell? are you running it as root?
[G1 Android Development] eratosthene:
Using latest JF 1.51, regular Term.apk (I've also tried using adb shell). I assume I'm just using /bin/sh as the shell, as that's the only one it comes with. I do have a debian install, but it isn't active right now. And yes, definitely running as root. I'd really like to try compiling my own from scratch, if anybody has a howto.
[G1 Android Development] balazer:
So you typed 'su'? Show us your config file
[G1 Android Development] eratosthene:
Config file (censored a little):

client

remote XXX.XXX.XXX.XXX 1194

dev tun

proto udp

resolv-retry infinite

nobind

user nobody

group nobody

persist-key

persist-tun

ca /sdcard/openvpn/ca-cert.pem

cert /sdcard/openvpn/client-cert.pem

key /sdcard/openvpn/client-key.pem

ns-cert-type server

comp-lzo

verb 3

auth-user-pass

I have a ClarkConnect router at work, and this is the config file that it recommends using. I've copied all the necessary certs and such to my sdcard. As I said, I've tried this in the terminal (after running su), and in adb shell (which is already root). I placed the openvpn binary in /data/local/bin, chmod'd it 777. Here's what I ran:

$ su

# /data/local/bin/openvpn --config /sdcard/openvpn/client.ovpn

Tue Jul 14 17:05:13 2009 OpenVPN 2.0.9 arm-none-linux-gnueabi [SSL] [LZO] [EPOLL] built on Nov 18 2008

Tue Jul 14 17:05:13 2009 Sorry, but I can't get console input on this OS

Tue Jul 14 17:05:13 2009 Exiting
[G1 Android Development] eratosthene:
Figured it out, it was the auth-user-pass line in the config file.
[G1 Android Development] balazer:
That's what I was thinking when I asked you to post your config file. :)
[G1 Android Development] eratosthene:
So the problem is my openvpn server is set up to ask for the username/password of the user when they attempt to connect. That's what the auth-user-pass line is for, and you are supposed to be able to put the name of a file containing the username/password after that command to avoid the client asking you to type it in when you connect. However, it looks like this openvpn binary was compiled without that option (--enable-password-save according to the manual). Grr.
[G1 Android Development] balazer:
Is it your own server just for you? If so, you don't need any username or password authentication. Having the keys is your authentication.
[G1 Android Development] cyberbob25:
eratosthene,

Have you managed to get around this issue yet (assuming by cross-compiling the openvpn binaries on your own)? I am in the same situation as you, and don't know where to start for compiling this from scratch for the G1.

I've gotten it all to work without this for testing, but this is a deal breaker for me in my environment.
[G1 Android Development] balazer:
I've used openvpn on my G1 a bit now over T-Mobile, and I can report that it works quite well.

The static key, cipher, and compression options all slow things down. Leave them off, if you can. (if you must use a static key, at least you can say cipher none)

UDP is faster than TCP, but TCP still works pretty well if that's your only option.

The limiting factor for download speed seems to be the upload speed of the VPN server's network. My network has about 350 kbps, which translated to about 230 kbps on my phone. Using other proxying methods through faster servers I could get 400-600 kbps, which is the same as I get directly over the 3G network.

Using ping-restart on the client and ping on the server is pretty much a requirement, so that the client can detect changes in the underlying mobile network (if, for example, your phone switches between Edge and 3G). Using ping-restart on the server and ping on the client is not necessary for UDP, but on TCP you'll need it, or otherwise the server won't open a new listening socket until the old connection times out, which seems to take pretty long.

If the VPN connection is lost for any reason and is subsequently re-established, from an application's perspective, it just looks like a momentary interruption of the network. Your application connections will stay connected, and usually handle the interruption quite gracefully. That's true even when the underlying mobile network changes completely, e.g. switching between 2G, 3G, and WiFi and getting a different IP address each time. I saw the VPN connection getting re-established after a ping-retry timeout several times per hour, or even every few minutes. But the applications didn't care. I could type commands into an ssh session after disconnecting the network, and they'd appear several seconds after the connection was re-established. I don't know if the packets are getting queued by the TCP retransmission mechanism, or somewhere else. But either way, it works quite well.

You can run Android Wifi Tether on top of the VPN, to share it with a laptop. It doesn't even matter whether you start the VPN or the tether first.

Using the VPN does suck down battery more quickly. If you left it running all day, you'd probably use your entire battery. But for a few hours it's ok.
[G1 Android Development] TheDefenestrator:
Wow, this is handy. I wish I'd found it a couple weeks ago, before going to Defcon. It should probably be pointed out that although turning off cipher, keys, etc will speed the connection up, it will also remove all security from the tunnel. Still handy if you need to get through NAT or something and don't care about security, though. Good tip on turning off compression. I actually would have expected even the G1 to have enough CPU power to benefit from it.
[G1 Android Development] zemane2:
It works great. I use it on my work network to bypass the proxy server.

Is there an app that automatically starts and stops openvpn when connected to a specific wifi network?
[G1 Android Development] gogh57:
Hi !

I also would like to compile openvpn, bit I had some problems :-( Could you describe how you did it?

Thanks
[G1 Android Development] Jonsson:
This would be an awsome app, anyone capable of putting together this to an easy to use app? :)

Tried to run the files that is already in this thread but havnt got it right yet, but will continue to try. :)
[G1 Android Development] inoah:
The build of openvpn that Fnorder made works great on CyanogenMod up to release 4.0.3. The donut branch that Cyanogen is working from removes SSL Engine support from the crypto libraries (they're not useful since the HTC phones do not implement any hardware crypto). So unless one keeps copying an older libcrypto.so library onto the device, openvpn needs to be rebuilt without engine support.

I'm not sure if Fnorder used the android source tree and wrote an Android.mk file to build it as an external application, or used some more complicated cross compilation scheme, but I'd love to get ahold of those patches before I have to re-engineer them from scratch. Fnorder, are you still here?
[G1 Android Development] balazer:
I am not clear about what you're saying. Do you mean that Fnorder's openvpn does not work with CyanogenMod versions greater than 4.0.3?

And if so, how would one go about copying an older libcrypto.so library onto the device?
[G1 Android Development] stickman:
Do you have one from an older version that might be working in the current experimental branch?
[G1 Android Development] stickman:
It looks like someone is working in a port of openvpn for android and setup a github account for the project here. It already has produced a 2.1 build that you can get here.

On the other hand... how do you handle 3G network disconnections?

If push redirect-gateway is configured, openvpn sets the default route, but if a disconnection happens it will never reconnect as there's a route in place that won't let openvpn get to the server.

If it isn't set and the default route is added manually using an script then it won't work either when it reconnects as the route through the VPN is still there.

Any ideas?
[G1 Android Development] balazer:
If you consult the scripts I posted, you will see one way of handling the problem.
[G1 Android Development] stickman:
Well, I got it working with no scripts at all...

Server has push "redirect-gateway" and client configuration is as follows:

The key is removing persist-tun.

This way openvpn manages all the route adding and removing by itself in all the situations I can think about.
[G1 Android Development] balazer:
redirect-gateway works, until the mobile network changes. (e.g. switch between EDGE, 3G, and WiFi, or T-Mobile gives you a new IP address and gateway for the heck of it - which happens quite frequently) When you get a new mobile network, a new default route is added with metric 0, and higher in the list of routes than the default route that was added by redirect-gateway. That means your VPN tunnel connection stays open, because you can still reach the VPN server over the new default route. But all your other traffic will also go over the new default route, instead of through the VPN.

Also, if you lose connectivity when changing networks, or if you stop openvpn after the mobile network changes, it will delete all the default routes, and try unsuccessfully to restore the old default route, leaving you with none.
[G1 Android Development] stickman:
I'll have to try them as from my tests with the above setup everything works except when I switch wifi on since then openvpn breaks all the routes...
[G1 Android Development] stickman:
Well, I tested network changes by enabling-disabling flight mode and when openvpn detected the network connectivity loss it deleted the default route it added and also the direct route to the vpn server.The system removed the remaining route (own network).

When I switched off flight mode and the system got connected to the 3g network it first got its address and default route from the network, then Openvpn connected, got the default route pushed through the server and set it up. So far so good.

Now, the problem came when I enabled wifi.

First, the system deletes the existing routes and connects to wifi, it receives the new default gateway and sets it up, then, openvpn detects the connectivity loss and deletes the 0.0.0.0 route without noticing it's deleting the new route that goes through wifi. If at least it tried to delete the default route indicating the gateway, since it's non-existant it would fail and everything would work for now.

For there, everything went havoc as again disabling wifi makes openvpn behave like crazy.

I'll give a try to your scripts, since they work for you :)
[G1 Android Development] stickman:
Ok, just gave it a try and found a problem...

I'm using server mode so I don't have $ifconfig_remote. I modified the scripts so they include the remote ip for the gateway instead of that variable.

VPN_SERVER = xxx.xxx.xxx.xxx

VPN_NETWORK = 10.100.103.0/24

vpn mode = server

VPN REMOTE END IP = 10.100.103.21

As you can see the problem is that tun0 doesn't exist until we receive the ip address from the remote end (using server mode) so at this point we can't add the default route through the vpn.

I've had a look to the possible hooks for the scripts to run and doesn't appear to be one that would launch after receiving the PUSH control message.

Any ideas?
[G1 Android Development] balazer:
What if you run up.sh using route-up instead of ipchange? You can also use route-delay to add some delay, if necessary.
[G1 Android Development] stickman:
It works thanks a lot for the suggestion. I'm trying to pinpoint a problem when I find myself with no default route just with the route to the provider's network, probably is some issue with openvpn itself not with the logic of the scripting used.

On the other hand I had a problem with DNS as my provider (vodafone) filters access to its DNS from the net so there were two solutions.

Either I added a static route through rmnet0 to the dns server or found a way to modify in the up.sh script the dns servers each time the vpn route was added.

This seemed to do the trick:

Now all that's left is find a way to monitor connectivity and get an alert if we lose the routing tables for some reason.
[G1 Android Development] stickman:
Well, it looks like I found the culprit... sometimes my gateway would have a dns address so it would be: 212-135-23-123.whatever.com

Your script would cut the name and leave defgw = 212.135-23-123. and then try to add that as the default gateway.

The solution was to modify the script to use

so it doesn't try to resolve names.
[G1 Android Development] balazer:
CyanogenMod 4.2.3.1 includes openvpn 2.1_rc15. This newer version handles password security differently, so it might solve the problem that some people here were having.

My scripts had to be modified slightly to work with the new CyanogenMod:

/data/openvpn/start.sh

#!/system/bin/sh
/system/bin/ps openvpn | /system/xbin/bb/awk '$2 ~ /[0-9]+/ {print "kill " $2}' |sh
/system/xbin/openvpn --config /data/openvpn/client.conf &

/data/openvpn/up.sh

#!/system/bin/sh
set -x
echo "*** up script start ***"

/system/xbin/bb/route -n |/system/xbin/bb/grep "^0\.0\.0\.0 " |/system/xbin/bb/cut -b 17-32 >/data/openvpn/defgw
echo defgw is `/system/xbin/bb/cat /data/openvpn/defgw`
/system/xbin/bb/route add $trusted_ip gw `/system/xbin/bb/cat /data/openvpn/defgw` metric 5
/system/xbin/bb/route del default
/system/xbin/bb/route add default gw $ifconfig_remote metric 10 dev tun0

echo "*** up script finish ***"

/data/openvpn/down.sh

#!/system/bin/sh
set -x
echo "*** down script start ***"

/system/xbin/bb/route del default gw $ifconfig_remote
/system/xbin/bb/route del $trusted_ip
/system/xbin/bb/route add default gw `/system/xbin/bb/cat /data/openvpn/defgw`

echo "*** down script finish ***"

And I had to add 'script-security 3' to client.conf.
[OnePlus 9 Pro] holydemon:
I have a LE2123, since this version is the one gets updates last, I installed the global version of C.61 but have some problems with local apps now there is a released C.61 for EU I want to install but OP local update for android 12 app only sees full update zips not incremental ones can anybody help with this situation?
[OnePlus 9 Pro] omar302:
Even if it did see incremental updates, you can't install an incremental zip to a different region ROM. You have two solution now, either flash the rollback OOS 11 (all user data will be wiped) to EU and then update back to C61 EU, or wait to see if a EU C61 or later full ROM becomes available to flash. For example, the India C62 Full ROM is now available, so maybe the next EU update will also be available as a full update zip.
[OnePlus 9 Pro] holydemon:
The device still seen as LE2123 in every menu though even the build number is LE2123_11_C.61 but gets 2125 updates, no bugs with calls or SIM either.
[OnePlus 9 Pro] omar302:
Yes, but to convert back to EU you need full zip for EU with the same build or greater (C61 or higher).
[OnePlus 9 Pro] holydemon:
With their turtle speed for EU variant seems like I might have to linger on with the global updates before there is a full update for it.
[OnePlus 7T Questions & Answers] ZackFearheart:
I have my HD1907 (T-mobile variant) on the international firmware and I am wondering if it's possible to keep the same firmware but relock the bootloader? I am getting ready to sell the phone and want to make sure it will work with all apps (I know some banking apps, and GPay don't work on an unlocked bootloader)

Or do I have to go back to T-mobile firmware?
[OnePlus 7T Questions & Answers] HueyT:
Best to msm to TMO before locking BL
[Samsung Galaxy J6 Questions & Answers] xp10975:
i want to flash orangefox from twrp but when i install this error occurs

E3004: This package is for j6lte. This device (a7y17lte) is not supported

i got twrp from this post: https://xdaforums.com/t/update-twrp-3-5-1_9-for-galaxy-j6-all-seris.4248631/
[Android TV General] Andrés_fer_nu:
Mod Translation

Hi there, I had a problem with this Smart TV, and is that after I turn it off and I wanted to turn it on then it stayed charging and never entered the operating system, I have tried everything to enter through recovery and not let me, what I was told was that I would have to download the same operating system of Smart TV, I come to you to see if you handle this type of operating system or if you have knowledge of it, the warranty has expired... I would appreciate your great help.. thanks....

Original

Hola que tal, tuve un inconveniente con este Smart TV, y es que después que lo apague y quise encenderlo después se quedaba cargando y nunca entraba al sistema operativo, he intentado de todo hasta entrar por medio recovery y tampoco me deja, lo que me dijeron fue que tendría que descargar el mismo sistema operativo del Smart TV, acudo a ustedes para ver si manejan este tipo de sistema operativo o si tienen conocimiento del mismo, la garantía ya caducó.. se los agradecería de ante mano su gran ayuda.. gracias..
[Motorola One Action Questions & Answers] oneal696969:
Is there a way to unlock my phone without loosing my stuff on it??
[Motorola One Action Questions & Answers] georg3_:
No, wiping data was added as a security measure in case someone untrusted may unlock it.
[Touch Diamond, MDA Compact IV ROM Development] pitt1983:
Referred to the thread open by "robert.access"

i think you must moderate the tone of your voice, and go down from your pedestal.

The guy started a thread, in the wrong way, i've done the same mistake time ago.

I think is not the case to attack in this way the guy.

If his thread don't like you IGNORE THAT. And moderators will do the job.

Not you.

IF A THREAD DON'T LIKE YOU IGNORE IT!!

And everything goes forward.

Ehm sorry for my english..
[Touch Diamond, MDA Compact IV ROM Development] liamhere:
thye have done there job

thread closed
[Touch Diamond, MDA Compact IV ROM Development] pitt1983:
done the job yes, but after a multiple attack to the guy who made a mistake.

we all made mistake..
[Touch Diamond, MDA Compact IV ROM Development] liamhere:
pardon? :rolleyes:
[Touch Diamond, MDA Compact IV ROM Development] pitt1983:
the cat on the keyboard
[Touch Diamond, MDA Compact IV ROM Development] shruff:
Damn its closed already:( even I wanted to bash him
[Touch Diamond, MDA Compact IV ROM Development] DaveShaw:
I closed this thread and the other one.

The user has been banned for his breaking of the forum rules.

Is there anything more I can say on this, no.

Please feel free to PM me if you want to discuss this topic further.

Thanks

Dave
[LG V50 ThinQ Questions & Answers] nuxa:
Hi.

I was thinking of buying a v50. I live in Sweden (EU) and wonder if you have any suggestion on what version to buy,

if it is at all a good idea.

It is not important for me to have a later android version, I would like it to be responsive and have few bugs.

Which android version is best for this phone given the above?

Also I would like to use it rooted. Is it a lot of problems with a rooted phone?

Which variant is best rooted?

Why I would like it rooted is to use a call recording app without problems.
[Samsung Galaxy A10 Questions & Answers] Lik_2345678:
So, my Samsung Galaxy A10 got into a bootloop and I'm 90% sure it was caused by short storage, because seconds before it started I saw the storage was full. I've had a similar problem before, where my phone would randomly reboot and stop when I clean up some space, but now it just locks itself on a bootloop and freezes on the Samsung logo.

I tried entering Safe Mode, but my phone just won't load it no matter how many times and how many buttons i press. Alright, "let's try Recovery Mode", i thought, but it was also very hard to do because the buttons wouldn't work most of the time. I managed to enter it around 4 times in a span of 3 hours and I got two different screens. One screen was what I believe to be the standart, with options to clear cache, factory reset and etc. The other one only had the option to clear app data, no idea why it changed or what triggered it. In these few instances where i could access the Recovery Mode, I tried clearing cache, repairing apps and clearing app data, but nothing worked.

I can't turn off my phone either, I tried holding the power button for almost a minute with no results. Maybe that's why the recovery mode didn't work...? Right now I'm waiting for my phone to run out of battery and see if it helps.

Also, one thing that is kinda concerning... everytime it reboots, before the Android logo appears, the screen glitches for a millisecond in a vibrant color.

Please, is there any way to fix it without losing my data? I'm sort of a noob so I have no idea how bootloaders and similar things work, I'd be really thankful if you guys could help :)
[Samsung Galaxy A10 Questions & Answers] blackhawk:
Welcome to XDA 🤗

Meh... why isn't your data on a SD card?

If you used a SD card as a data drive... you be able to do a factory reset and not lose critical data.

If you can't connect with the PC and you can't get into safe mode I don't see how you can recover the data. Maybe someone here has a plan for you...
[Samsung Galaxy A10 Questions & Answers] Lik_2345678:
Thanks! Yeah, no SD card for me

Draining the power didn't help, but I figured out why the buttons didn't work: I was supposed to press them when my screen started glitching, not on the android logo (leaving this info here in case someone else has the same problem). Still unable to access safe mode tho, only recovery.

Welp, most of my data was only personal things and at least I can backup some stuff with my google account, so I did a factory reset. Now it's working again, which is great, I just wanted my phone back honestly :,)
[Samsung Galaxy A10 Questions & Answers] blackhawk:
Boot loops are tough. Sometimes after a couple tries it may go into safe mode but don't count on it. Another question is what caused it, a poorly coded or incompatible 3rd party app running at start up? You don't want a repeat. It may have been a single event upset that corrupted the user data partition, these are rare but can happen.

Get a SD card and use it as a data drive, everything you need to do a complete reload should be on it including installable copies of all your apps. A full reload with no internet connection can be done like this. Since all the data is already on it for a reload, no time is wasted reloading data.

The SD card is a valuable asset if you use it correctly.
[Honor 8 Themes, Apps, and Mods] A.H.N.F:
Hi I made this theme for my self and I decided to share it with you guys

It's combination of different themes

*Extract the zip file and move Magic.hwt to the hwthemes folder. open the theme app and apply the theme then restart your phone*View attachment 5667869View attachment 5667871
[Samsung Galaxy S8 Questions and Answers] Tuyenvanlshb:
Please make me a miui rom port for g950u

thank you.