[stunnel-users] How do I use the Stunnel download on android?
Research | FrenchFlorida
research at frenchflorida.com
Wed Dec 9 15:00:55 CET 2015
Thanks for the reply.
I'm not sure what " statically linked ELF executable for Android/ARM" means yet, but I will look it up. ;)
Since I sent the message I did a lot of digging that yielded me very little details. In fact I only came a cross a few mentions that stunnel could be used on android but no examples of how that was implemented. After a vague hint I managed to deduced how the file worked, but it took me a little more independent research to understand how to make it, at least execute. I'm not new to linux but am new to android so not as familiar to how the system works in general.
I did see that an android app was on your todo list. In the meanwhile however, may I suggest a little howto for Android that could get a user started in using the app. Stunnel is an amazing application and since I was able to figure it out I made myself a guide on how to set it up (Minus actually creating the configuration) so that I can at least know how to execute stunnel.
Since I already did the research I offer you my very unorganized primer on how to set it up below. Perhaps it would be useful for some to have a better version of this doc on the site, and if not, well at least a well determined person can find this topic in the mailing list, because there will be only one other topic with the word "Android" in the title so it can perhaps get a user out of jam more quickly without.
Here is my guide:
Chances are that "It is a statically linked ELF executable for Android/ARM." Means that within the stunnel-android.zip resides one file, and that file is the executable file for stunnel. It is in fact the defacto program that under linux you would see in /etc/local/bin/stunnel if that was where you installed it.
This means that the requirements to use this file are as such:
1. Your phone probably needs to be rooted
2. You will need access to a terminal on your phone (Terminal Emulator)
3. There is no "APP" to run stunnel it is a command line file
There are probably two reasons you would want to use stunnel on your phone.
1. You are an app developer that wants to use stunnel to connect one part of your app to something else, and therefore will incorporate this script within your app. I don't know how to make apps yet so that's probably as useful as I can make the description for you.
2. You are a user that has already used stunnel on your machine and wants to use it on your phone too. [The rest of the guide assumes this is the case.]
Assuming the latter, what do you need to do to get it running?
1. Move the stunnel application to your phone.
2. As you would do in linux open the terminal
3. Run stunnel like a command
If you get an error message saying it is not executable, or that permission is denied it is because of one of two things.
Maybe you need to mark the file as executable
Chmod +x ./stunnel
Terminal Emulator's chmod does not understand "+x" so you will have to change the permission to
Chmod 700 ./stunnel
700 means Read-Write-Execute for the user. If it doesn't work try 770 and 777
However you are likely to still receive that error on some phones. (I'm guessing, just because it happened to my phone I am not assuming it will happen to all phones.)
Some phones forbid there to be an executable script within the /sdcard/ directory. Therefore you have to move it somewhere else.
I don’t know where the proper place for such a file is, I moved mine to /system/bin/ therefore the script is callable by /system/bin/stunnel
Another Caveat!! My phone's /system folder is not writable!! Therefore before you can even move the file you need to make the system folder writable:
mount -o rw,remount /system
Once moved needs to be made readonly again:
mount -o ro,remount /system
So In summary, here is a step-by-step of what might work in getting the script to an executable state on Android:
1. Root phone
2. install terminal emulator
3. get stunnel script onto your phone somehow
4. mount -o rw,remount /system
5. cp /sdcard/Download/stunnel /system/bin/stunnel
6. chown 700 /system/bin/stunnel
7. mount -o ro,remount /system
8. /system/bin/stunnel /path/to/conf/file*
Now as if you are on linux you should probably** be able to run stunnel.
*I haven't tested it out with conf files yet.
** I'm able to run stunnel --version so stunnel in and of itself is "working"
If this guide is any good to you guys, please feel free to use, I would love to contribute in some way. :)
From: stunnel-users [mailto:stunnel-users-bounces at stunnel.org] On Behalf Of stunnel-users-request at stunnel.org
Sent: Tuesday, December 08, 2015 7:00 PM
To: stunnel-users at stunnel.org
Subject: stunnel-users Digest, Vol 137, Issue 10
Send stunnel-users mailing list submissions to
stunnel-users at stunnel.org
To subscribe or unsubscribe via the World Wide Web, visit
or, via email, send a message with subject or body 'help' to
stunnel-users-request at stunnel.org
You can reach the person managing the list at
stunnel-users-owner at stunnel.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of stunnel-users digest..."
1. Re: How do I use the Stunnel download on android?
Date: Mon, 7 Dec 2015 16:14:05 +0100
From: Michal Trojnara <Michal.Trojnara at mirt.net>
To: stunnel-users at stunnel.org
Subject: Re: [stunnel-users] How do I use the Stunnel download on
Message-ID: <5665A23D.8050408 at mirt.net>
Content-Type: text/plain; charset=utf-8
-----BEGIN PGP SIGNED MESSAGE-----
It is a statically linked ELF executable for Android/ARM.
It is only useful for people who customize their Android, and not for end-users.
A proper Android GUI is on my TODO list:
On 04.12.2015 11:02, Research | FrenchFlorida wrote:
> In the download section of the site, there is a zip for android.
> Inside this file is a single file, without any extention.
> How do I install this, I have found no documentation anywhere on the
> Can anybody guide me, or give me a hint. Is this something I do on the
> phone, or that I do from the computer first?
> _______________________________________________ stunnel-users mailing
> list stunnel-users at stunnel.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
-----END PGP SIGNATURE-----
Subject: Digest Footer
stunnel-users mailing list
stunnel-users at stunnel.org
End of stunnel-users Digest, Vol 137, Issue 10
More information about the stunnel-users