A tool for using your android device as a wireless/usb webcam
Judging from the a forum search for droidcam it appears Manjaro users are having a difficult time getting this into a working state.
So I decided to check if it is such a pain to get working.
Despite some comments on the AUR page on non-versioned package source it seems the maintainer and the droidcam developers has decided it is a good idea to version the package source - probably taking into account when an AUR helper is caching the source archive.
The comments track is filled with issues not only with relation to the build but also sound issues.
The maintainer also states that Manjaro is not supported.
We will take the sound issues later - first we take a look at getting your android device camera connected.
Before you even think of getting your computer to connect you must install the DroidCam application on your android device.
My device is a rooted Huawei Nexus 6P using a crDroid Android 10 without any Google related stuff (and I mean nothing at all).
There is several possible ways to get hold of the apk - I downloaded the apk, renamed it and installed it using adb debug
It is necessary to setup the DroidCam and to start the App to be able to connect to it from your computer.
My Manjaro system is on unstable branch and using kernel 5.7.4 using Openbox window manager.
The maintainer of the PKGBUILD states that only makepkg is supported - so let's use it to build the package.
Update your system and install the necessary build tools
Next thing is to get hold of the PKGBUILD. Open a terminal and clone the repo
Navigate into the folder and list the content
What we are interested in is the PKGBUILD as it is a good habit to verify the content
We find the expected stuff - a list of dependencies - and note that we have a dkms dependecy - and from the package() function it is worth noting that we get a new configuration loading the v4l modules required to connect to a live camera.
The dkms dependency is tricky because it usually requires kernel headers to be installed for your kernel. While Arch only has clearly distinctive kernels with only one version - Manjaro has several versions and every version has a complimentary header package.
So to be able to build droidcam you need to ensure the headers are installed for all of your kernels - otherwise the droidcam app will not build and ultimately not work.
List your installed kernels - example from my system
With this info - please use the output from your system - install the kernel headers
Now we are ready to build and install the package and the dependencies. When the build is done - you will be asked to authorize the package installation.
You should get a similar output and if you don't you have inconsistencies within your system.
I can't say what it might be - but suffice to say - as the time of writing this guide - the droidcam package builds without hickups
The app is depending on the correct v4l modules to be loaded by the kernel. If the kernel is updated but the system not restarted - there will be a mismatch between the kernel and modules which will make the application fail.
Better safe than sorry - reboot your system - or manually load the required modules which are described in droidcam.conf. Manually loading the modules do not guarantee droidcam will work - your best shot is still a restart of your system.
To connect using WiFi you must ensure your phone is on the same local network as your computer. When you start DroidCam on your device it will display the IP address to connect to.
Depending on what you want to do
Connect using a browser
http://<phoneip>:4747/
http://<phoneip>:4747/video
Using the DroidCam app
Making it possible to use sound too - you are required set the properties in the pulseaudio mixer. I have not invested time in getting this to work.
As of [date=2020-06-02 time=14:13:00 timezone="Europe/Copenhagen"] sound support is an ongoing issue.
Another comment in the thread mentions an install-sound script?