[HowTo] Install cURL and OpenSSL on Android

Search This thread

mac_see

Member
Dec 7, 2013
32
0
NOTE: YOU MUST BE ROOTED WITH BUSYBOX INSTALLED TO INSTALL cURL AND OpenSSL.
Recently, when looking to see if it was possible to get cURL on Android, I found something posted on June 22nd of 2013 on http://curl.haxx.se/. What was it, you may ask? It was an announcement of the curl binary version 7.31.0. This also came with a nice little surprise. cURL and openssl binaries for android! If you want, you can download them by going to http://curl.haxx.se/download.html and scrolling down until you see Linux - Android. Download the ".tar.gz" file and extract it. Inside, you will see a folder called data. To install, copy the data/local/ssl to /data/local/ssl on the device. Also, push the curl and openssl binaries from data/local/bin to /system/bin on the device. Be sure to chmod them to 0755. Once all that is done, have fun using curl!

I have confirmed this to be working on my Kindle Fire HD running android 4.2.2.

EDIT: Root is needed in order to run OpenSSL, but not cURL.

Sent from my Amazon Kindle Fire HD using xda app-developers app

Somehow I copied the data/local/ssl to /data/local/ssl on the device.
But not data/local/bin to /system/bin. it says operation failed and in adb shell also it is unable to copy with the CAT command.
Please advice.
 

RolluS

Senior Member
Sep 16, 2010
733
421
Near Paris
Wow nice find, thanks to r3pwn.

For your problem mac_see, you could try to mount system rw:
Code:
adb remount
or
Code:
adb shell mount -o rw,remount /system
 
Hello, it's a good idea ! But how version of Android ?
with the 5.1.1 (rom custom) on my Samsung Galaxy Note 4 (Exynos), when I type exemple
Code:
curl https://curl.haxx.se
the respons is
Code:
Error : only position independent executables (PIE) are supported.

And to compile the source code, it is not very like UNIX, ... the command make does not exist :(
Olivier
 

STcraft

Senior Member
Jul 27, 2015
70
17
Hello, it's a good idea ! But how version of Android ?
with the 5.1.1 (rom custom) on my Samsung Galaxy Note 4 (Exynos), when I type exemple
Code:
curl https://curl.haxx.se
the respons is
Code:
Error : only position independent executables (PIE) are supported.

And to compile the source code, it is not very like UNIX, ... the command make does not exist :(
Olivier
getting the same error when i install the curl bin into /system/bin (tried /system/xbin too, no luck)
 

dablado

Member
Hello, it's a good idea ! But how version of Android ?
with the 5.1.1 (rom custom) on my Samsung Galaxy Note 4 (Exynos), when I type exemple
Code:
curl https://curl.haxx.se
the respons is
Code:
Error : only position independent executables (PIE) are supported.

And to compile the source code, it is not very like UNIX, ... the command make does not exist :(
Olivier

Same error with CM12.1. Any idea to fix it?
 

phoberus

Senior Member
Oct 21, 2013
965
260
I'm on Android 6.0.1 and I get /system/bin/sh: not found after install. Got it anyone to work with newer android versions?
 

dubis999

Member
Nov 19, 2012
22
4
Hi
I'm using Android M.
With the compiled package found on this page I've got the same error than Dablado and Stcraft. So I installed the cURL APK package from (Google Play and I've this error when I launched cURL in the terminal :
CANNOT LINK EXECUTABLE: cannot locate symbol "UI_get_string_type" referenced by "curl"...

I compiled very well these sources I meant without error. I didn't find any binaries.
Do have any other issue?
Thanks for any help.
 
Last edited:

kriminel

New member
Jul 23, 2007
2
0
while i did all the steps i get permission denied on both curl and openssl, using termux
 

Attachments

  • Screenshot_20180121-010847.png
    Screenshot_20180121-010847.png
    103.1 KB · Views: 202

mrbeak

New member
May 31, 2019
2
0
Yes they have been removed little time ago. Could someone upload the file please? I searched everywhere. The original file name was curl-7.40.0-rtmp-ssh2-ssl-zlib-static-bin-android.tar.gz but I cannot find it on the internet anymore.
 

emrekasikara

Member
Mar 28, 2013
10
7
Ankara
there is an easy way to install curl on android;

- install busybox module from magisk,
- install ccbins (cross compiled binaries) module from magisk,
- open/run terminal emulator (e.g. termux),
- get superuser access with "su" command,
- run "ccbins",
- install "curl"

very simple and without any file download and transfer
 
Last edited:
  • Like
Reactions: fipsy and Zoidroid
May 23, 2020
5
0
there is an easy way to install curl on android;

- install busybox module from magisk,
- install ccbins (cross compiled binaries) module from magisk,
- open/run terminal emulator (e.g. termux),
- get superuser access with "su" command,
- run "ccbins",
- install "curl"

very simple and without any file download and transfer

thank you.
I installed curl with your instruction. How can I use it now?
When I try use "curl" in terminal I get error: "/system/bin/sh: curl: not found"

ps. after reboot all working OK
 
Last edited:

ScrapMaker

Senior Member
Jan 23, 2008
983
95
Curious as well. Not sure where it installs curl.

edit: nm, you have to reboot a second time, (after installing curl.)
 
Last edited:

DiamondJohn

Recognized Contributor
Aug 31, 2013
7,375
7,391
Sydney
there is an easy way to install curl on android;

- install busybox module from magisk,
- install ccbins (cross compiled binaries) module from magisk,
- open/run terminal emulator (e.g. termux),
- get superuser access with "su" command,
- run "ccbins",
- install "curl"

very simple and without any file download and transfer
I cant find ccbins module in Magisk?
 

DiamondJohn

Recognized Contributor
Aug 31, 2013
7,375
7,391
Sydney
I cant find ccbins module in Magisk?
OK, now I see (ie I read a few posts up a little more closely... very embarrased, and sorry.

its called "Cross Compiled Binaries" I was searching for ccbins.

So to clarify the steps.
1. Download & Install "Cross Compiled Binaries" from the Magisk Repo
2. Reboot
3. Open a shell and get an su
4. Run "ccbins"
Code:
sunfish:/ $ su
sunfish:/ # ccbins

===============================
Cross Compiled Binaries v7.2(9)
by Zackptg5
===============================
BusyBox v1.31.1-osm0sis
/dev/a7Y7BvR/.magisk/modules/ccbins/busybox
===============================

Testing internet connection [/] - OK

Fetching available binaries
[|] - Done

Checking for mod updates
[\] - Ccbins is up to date

Checking for binary updates
[/] - Installing NCursesw v6.2
[-] - NCursesw has been installed!
[|] - Binaries are up to date

Checking for conflicting modules
[\] - No conflicting mods were found

===============================
Binary Installer ==============
===============================
Current install location: /system/bin
Auto-update binaries at launch: Enabled (recommended)
DOH Server: None
===============================
Choose option =================
===============================
0: Refresh CCbins (remove everything - start fresh)
1: General Information
2: Options/Settings
3: List all installed binaries
4: List all downloadable binaries
5: Remove binary
6: Install binary
7: Install dynamic linked binary
Type 'q' at any time to quit
-->
5. Select "Install a Binary" ie "--> 6"
Code:
--> 6

===============================
Install which binary? =========
===============================
Current install location: =====
/system/bin ===================
===============================
0: None, go back to main menu
1: Install all binaries listed below
2: Aria2 (v1.35.0)
3: Bash (v5.1.8)
4: Bc (v1.07.1)
5: Brotli (v1.0.9)
6: Coreutils (v8.32)
7: Cpio (v2.12)
8: Curl (v7.78.0)
9: Diffutils (v3.7)
10: Ed (v1.17)
11: Findutils (v4.8.0)
12: Gawk (v5.1.0)
13: Grep (v3.6)
14: Gzip (v1.10)
15: Htop (v3.0.5)
16: Iw (v5.9)
17: Keycheck (v1.0)
18: Nano (v5.8.0)
19: Nethogs (v0.8.6)
20: Openssl (v1.1.1.11)
21: Patch (v2.7.6)
22: Patchelf (v0.12)
23: Sed (v4.8)
24: Strace (v5.13)
25: Tar (v1.34)
26: Tcpdump (v4.99.1)
27: Vim (v8.2.3095)
28: Wavemon (v0.9.3)
29: Xmlstarlet (v1.0)
30: Xxd (v1.10)
31: Zip (v3.0)
32: Zsh (v5.8.0)
33: Zstd (v1.5.0)
-->

6. Install the selected one. "curl" in my case. ie "--> 8"
Code:
--> 8


Downloading Curl
[|] - Curl has been installed!

Reboot for changes to take effect
7. Reboot
8. open a shell, get su and curl is now available
Code:
sunfish:/ $ su
sunfish:/ # curl--help
/system/bin/sh: curl--help: inaccessible or not found
127|sunfish:/ # curl --help
Usage: curl [options...] <url>
-d, --data <data>   HTTP POST data
-f, --fail          Fail silently (no output at all) on HTTP errors
-h, --help <category>  Get help for commands
-i, --include       Include protocol response headers in the output
-o, --output <file>  Write to file instead of stdout
-O, --remote-name   Write output to a file named as the remote file
-s, --silent        Silent mode
-T, --upload-file <file>  Transfer local FILE to destination
-u, --user <user:password>  Server user and password
-A, --user-agent <name>  Send User-Agent <name> to server
-v, --verbose       Make the operation more talkative
-V, --version       Show version number and quit

This is not the full help, this menu is stripped into categories.
Use "--help category" to get an overview of all categories.
For all options use the manual or "--help all".
 
Last edited:
  • Like
Reactions: chaoscreater

Top Liked Posts

  • There are no posts matching your filters.
  • 11
    NOTE: YOU MUST BE ROOTED WITH BUSYBOX INSTALLED TO INSTALL cURL AND OpenSSL.
    Recently, when looking to see if it was possible to get cURL on Android, I found something posted on June 22nd of 2013 on http://curl.haxx.se/. What was it, you may ask? It was an announcement of the curl binary version 7.31.0. This also came with a nice little surprise. cURL and openssl binaries for android! If you want, you can download them by going to http://curl.haxx.se/download.html and scrolling down until you see Linux - Android. Download the ".tar.gz" file and extract it. Inside, you will see a folder called data. To install, copy the data/local/ssl to /data/local/ssl on the device. Also, push the curl and openssl binaries from data/local/bin to /system/bin on the device. Be sure to chmod them to 0755. Once all that is done, have fun using curl!

    I have confirmed this to be working on my Kindle Fire HD running android 4.2.2.

    EDIT: Root is needed in order to run OpenSSL, but not cURL.

    Sent from my Amazon Kindle Fire HD using xda app-developers app
    2
    there is an easy way to install curl on android;

    - install busybox module from magisk,
    - install ccbins (cross compiled binaries) module from magisk,
    - open/run terminal emulator (e.g. termux),
    - get superuser access with "su" command,
    - run "ccbins",
    - install "curl"

    very simple and without any file download and transfer
    1
    Screenshot!
    Screenshot_2013-07-13-13-18-20.png

    Sent from my Amazon Kindle Fire HD using xda app-developers app
    1
    Do what it says,
    Run "curl -k yoururlhere"

    just like that? and avoid the verification completely?
    1
    Be sure to chmod them to 0755

    Can someone explain this bit please? :)