How to use your Android device as a webcam in Ubuntu with DroidCam

DroidCam in Ubuntu

You’ve already got an expensive smartphone that’s running Android OS of all things. Why would you need a webcam? Unless you’ve got money lying around (in which case, I’d be happy to take some off of you), I will show below how to use your android device as the webcam in Ubuntu with DroidCam. This will also work for all debian distros.

Step 1: Install DroidCam in your phone.

DroidCam is developed by Dev47Apps, and is one of the most useful software out there. I was very happy to pay for the pro version. It’s worth the purchase.

You can download the free one from the Play Store. Once downloaded, open the app and proceed to step 2.

Step 2: Install DroidCam client in Ubuntu

Download and extraction

Press Ctrl + Alt + T and bring out the terminal.

Type cd /tmp to go to the temporary directory of the OS.

Download the client with the following command:

wget https://files.dev47apps.net/linux/droidcam_latest.zip

It’s a good practice to verify downloaded files, to make sure they are not corrupted:

echo "73db3a4c0f52a285b6ac1f8c43d5b4c7 droidcam_latest.zip" | md5sum -c --

This will print out OK if the file was not corrupted.

Time to unzip the file:

unzip droidcam_latest.zip -d droidcam && cd droidcam

This will unzip the file and navigate inside the folder it was extracted to: droidcam.

Let’s install the app:

sudo ./install

You will be prompted for the root password. All should go well afterwards.

Installation

Step 3: Start the client

Now, the command droidcam is available to you in the terminal.

GUI

Run the command to start the GUI. You can also use the CLI client but I think this is simpler.

Step 4-a: Connect via WiFi

This is very straight forward. Grab the `Wifi IP` the app shows you on your phone. The port is usually 4747 unless you change it.

Give it to the Ubuntu Client and hit Connect.

Step 4-b: Connect Via Cable

You only need either the WiFi or the Cable connection. I find cable more stable. But it requires a bit of work.

First, install ADB:

apt install -y adb

Once that is done, connect your phone and accept the Allow Data Access prompt if it shows up in your phone.

Then, select the USB (Android) option in the desktop client and hit connect.

Important: Your phone will ask you for another permission. And the initial try to connect may fail on PC. Don’t be alarmed. Just accept the ADB connection prompt in your phone and click on the ‘Connect’ button again on the desktop client.

If you see no errors, you are done:

Step 5: Using the webcam source in your apps

Apps like Zoom, Skype, Web browsers will all now show Droidcam Source X in their video source list. X is a number, sometimes it changes based on port but they will all work. You don’t have to keep changing it.

Enjoy!

If you face any problems, drop me a comment below and I’ll do my best to help.

Links:

Official source that I copied from.

2 Replies to “How to use your Android device as a webcam in Ubuntu with DroidCam”

    1. Yeah, I agree. I use it myself. This is all I need: droidcam-cli -v adb 4747. And it works great!
      I decided to keep it simple for those without much knowledge of the CLI tools.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.