ReCam repurposes old Android phones as webcams on Linux by combining:
scrcpyto read the Android camera stream through ADBv4l2loopbackto expose that stream as a virtual webcam device (default:/dev/video9)
- Turn an Android phone into a reusable USB webcam source
- Automatic dependency and system setup via
scripts/install.sh - Creates and manages a persistent
v4l2loopbackvirtual camera (ReCam) - Includes a launcher command (
recam) with prerequisite checks - Monitors ADB device connection/auth status and starts streaming automatically
- Linux system with Bash and
systemd/udevsupport - Kernel support for
v4l2loopback
- Python 3
scrcpyadb(Android Debug Bridge)v4l2loopbackmodule (v4l2loopback-dkmson some distros)v4l-utils(v4l2-ctl)
- Android phone with a working camera
- USB debugging enabled (
Developer options) - USB authorization accepted when prompted (
Allow USB debugging) - USB cable (stable data cable recommended)
git clone https://github.com/Tobi-maru/ReCam.git
cd ReCamRun the installer as root:
sudo ./scripts/install.shWhat it configures:
- Installs required packages (
scrcpy,adb,v4l2loopback,v4l-utils,python3) - Installs udev trigger files (
deploy/ReCam.rules,deploy/ReCam-map-triggers.sh) - Installs/enables
recam-loopback.serviceto loadv4l2loopback - Verifies
/dev/video9exists - Installs launcher command as
/usr/local/bin/recam
If you prefer manual setup, install equivalent packages for your distro and load the module:
sudo modprobe v4l2loopback devices=1 video_nr=9 card_label="ReCam" exclusive_caps=1Verify the virtual webcam exists:
v4l2-ctl -d /dev/video9 --info- Enable Developer options on Android
- Enable USB debugging
- Connect phone via USB
- Approve ADB authorization prompt on phone
- Verify device visibility:
adb devicesYou should see your device listed as device (not unauthorized).
recamThe launcher checks python3, adb, scrcpy, and v4l2-ctl, ensures /dev/video9 is available, then runs the engine.
python3 src/main.pyIn OBS/Discord/Meet/Zoom (Linux clients), select video device:
/dev/video9- or camera label containing
ReCam
-
/dev/video9not found- Re-run:
sudo ./scripts/install.sh - Or load manually:
sudo modprobe v4l2loopback devices=1 video_nr=9 card_label="ReCam" exclusive_caps=1
- Re-run:
-
ADB shows
unauthorized- Unlock phone screen
- Reconnect USB cable
- Accept USB debugging prompt
- Retry
adb devices
-
scrcpy/adbcommand missing- Install dependencies, then restart shell/session
-
Camera device not visible in app
- Confirm stream is running in terminal
- Check with
v4l2-ctl -d /dev/video9 --info - Restart the target app after ReCam is started
Contributions are welcome.
- Fork the repository
- Create a focused feature/fix branch
- Keep changes minimal and scoped
- Test your changes locally
- Open a pull request with clear description and reproduction/validation steps
Please include logs/screenshots when reporting device/driver issues.
This repository currently does not include a LICENSE file. Until a license is added by the maintainers, usage, modification, and redistribution are not granted by default (all rights reserved).
scrcpyfor Android device streaming/controlv4l2loopbackfor Linux virtual camera devices