How to install cURL and OpenSSL on Android

cURL is a popular command-line tool for transferring data between servers, which in a nutshell means it’s a very geeky way of downloading webpages and file links from inside a command terminal. For average users, this may sound completely wonky and unnecessary, but expert Linux admins should already be aware of the myriad of cool, useful things that can be done with cURL. You can use it to manage files on an FTP server, expand abbreviated URLs, and display the weather report in funky ASCII graphics.

OpenSSL on the other hand is an open-source implementation of SSL/TLS protocols, which is used to secure app communication between servers. Basically, it protects your credit card from being stolen when you buy things online, to boil it down very simply.

In any case, a method has recently been discovered to install cURL and OpenSSL on Android devices, which is super useful for web admins that have a terminal emulator on their phone.

Requirements:

  • A rooted Android device – search Appuals for Android root guides.
  • Download cURL and OpenSSL binaries for Android from here or here.
  • Terminal Emulator app from Google Play.

Steps:

Make sure that you follow the given steps in order:

  1. The first step is to download the cURL and OpenSSL binaries and extract them onto your desktop.
  2. Inside the extracted folder, you will see a folder named ‘Data’. Copy the following folder
    data/local/ssl

    from the binaries folder to the same folder(/data/local/ssl) on your Android device.

  3. Use an ADB terminal on your computer to push the cURL and OpenSSL from the following
    data/local/bin

    on your PC to

    /system/bin

     on your device. The complete commands would be:

adb push /curl-7.40.0-rtmp-ssh2-ssl-zlib-static-bin-android/curl-7.40.0-rtmp-ssh2-ssl-zlib-static-bin-android/data/local/bin/curl /system/bin
adb push /curl-7.40.0-rtmp-ssh2-ssl-zlib-static-bin-android/curl-7.40.0-rtmp-ssh2-ssl-zlib-static-bin-android/data/local/bin/openssl /system/bin
  1. Finally, CHMOD the binaries to 0755 with the following:
chmod 755 /system/bin/curlchmod 755 /system/bin/openssl

A Few Fun things to do with cURL:

If you’ve never used cURL before and followed this guide because it sounded like a cool thing to do, here are some fun commands you can use with cURL from inside the terminal app:

curl https://wttr.in/LOCATION

This will display the weather report for your chosen location in funky ASCII graphics. Just change “LOCATION” in the URL to an actual city, like this.

curl ftp://ftp.yoursite.x/site/

This will allow you to browse subdirectories on an FTP server.

curl -Is https://www.twitter.com -L | grep HTTP/

This will allow you to check if a website is down.

curl -sIL http://buff.ly/1lTcZSM | grep ^Location;

This will expand an abbreviated URL to show its true address.

ABOUT THE AUTHOR

Kevin Arrows


Kevin Arrows is a highly experienced and knowledgeable technology specialist with over a decade of industry experience. He holds a Microsoft Certified Technology Specialist (MCTS) certification and has a deep passion for staying up-to-date on the latest tech developments. Kevin has written extensively on a wide range of tech-related topics, showcasing his expertise and knowledge in areas such as software development, cybersecurity, and cloud computing. His contributions to the tech field have been widely recognized and respected by his peers, and he is highly regarded for his ability to explain complex technical concepts in a clear and concise manner.

Comments

10
    SA
    Santox Feb 2, 2021

    But binaries disappeared from that link…

      MZ
      Muhammad Zubyan Author Feb 7, 2021

      We have updated the article thank you for letting us know.

        SA
        Santox Feb 12, 2021

        I see, but the guide still outdated, because there isnt a “data” folder on extracted folder…

        The first link has these releases: https://github.com/robertying/openssl-curl-android/releases
        But hasnt a “data” folder
        Second link only has sources and a working app that uses a development version of cURL.
        I installed it, but Terminal Emulator app didnt find curl command…
        Im confused

    KD
    Keledai Dungu Feb 8, 2021

    Thanks for the information.
    The cURL app can read all contents from any URL with http.
    But when I use it to read from an URL with https, it fails and show this error message: “cURL error 60: SSL certificate problem: unable to get local issuer certificate”

    Could you please tell us how to solve this SSL error ?
    Thanks in advance

      MZ
      Muhammad Zubyan Author Feb 8, 2021

      Can you please tell me which link you used to download cURL? the first one or the second one?

        KD
        Keledai Dungu Feb 9, 2021

        From the first one (robertying’s GitHub)

          MZ
          Muhammad Zubyan Author Feb 9, 2021

          Can you try the second one please? Please give me feedback after trying it.

          KD
          Keledai Dungu Feb 9, 2021

          I can’t find a pre-compiled app from the second link
          I’m not a programmer and I don’t know how to compile all of the sources by myself

      KD
      Keledai Dungu Feb 15, 2021

      finally I can solve the issue by using “-k” option

      Reply
        MZ
        Muhammad Zubyan Author Feb 15, 2021

        Can you elaborate please?