I want to use my phone camera as a webcam in my computer with Ubuntu. I read that DroidCam is the easiest way...
So, I tried following the official script: https://www.dev47apps.com/droidcam/linuxx/
cd /tmp/
wget https://files.dev47apps.net/linux/droidcam_latest.zip
echo "fb7d7fa80a8e47a98868941939104636 droidcam_latest.zip" | md5sum -c --
# OK?
unzip droidcam_latest.zip -d droidcam && cd droidcam
sudo ./install
However, the video device is not installed, nothing found if I check this:
lsmod | grep v4l2loopback_dc
My terminal is asking for the path of the public key but I left it empty as suggested:
$ sudo ./install
Webcam parameters: '640' and '480'
Building v4l2loopback-dc.ko
make: Entering directory '/tmp/droidcam/v4l2loopback'
make -C /lib/modules/5.4.0-33-generic/build M=/tmp/droidcam/v4l2loopback modules
make[1]: Entering directory '/usr/src/linux-headers-5.4.0-33-generic'
CC [M] /tmp/droidcam/v4l2loopback/v4l2loopback-dc.o
Building modules, stage 2.
MODPOST 1 modules
CC [M] /tmp/droidcam/v4l2loopback/v4l2loopback-dc.mod.o
LD [M] /tmp/droidcam/v4l2loopback/v4l2loopback-dc.ko
make[1]: Leaving directory '/usr/src/linux-headers-5.4.0-33-generic'
make: Leaving directory '/tmp/droidcam/v4l2loopback'
Secure Boot is enabled, attempting to sign the driver
please specify signing key location (or leave empty to sign manually later)
You can Google 'secure boot' for your distro
Enter the path of the public key:
Enter the path of the private key:
Adding uninstall script
Moving driver and executable to system folders
+ cp v4l2loopback/v4l2loopback-dc.ko /lib/modules/5.4.0-33-generic/kernel/drivers/media/video/
+ cp droidcam /usr/bin/
+ cp droidcam-cli /usr/bin/
+ set +x
Registering webcam device
insmod: ERROR: could not insert module /lib/modules/5.4.0-33-generic/kernel/drivers/media/video/v4l2loopback-dc.ko: Operation not permitted
warning: insmod failed
Running depmod
make: Entering directory '/tmp/droidcam/v4l2loopback'
make -C /lib/modules/5.4.0-33-generic/build M=/tmp/droidcam/v4l2loopback clean
make[1]: Entering directory '/usr/src/linux-headers-5.4.0-33-generic'
CLEAN /tmp/droidcam/v4l2loopback/Module.symvers
make[1]: Leaving directory '/usr/src/linux-headers-5.4.0-33-generic'
make: Leaving directory '/tmp/droidcam/v4l2loopback'
Done
If I run DroidCam in my phone and then in Ubuntu... the following message popups in Ubuntu:
Droidcam video device not found (/dev/video[0-9]). Did it install correctly? If you had a kernel update, you may need to re-install.
How can I Secure Boot Module Signing in Ubuntu 20.04? Could the issue be related with this? Any idea or alternative solution to Droidcam would be really appreciate it : )
This did it for me:
Got the solution from here modprobe v4l2loopback fails on Ubuntu
During the install of v4l2loopback-dkms I had to do the 'Enroll MOK' process (it guided me automatically).
After this I uninstalled and reinstalled Droidcam and the webcam was registered with no error