Email or username:

Password:

Forgot your password?
Mishaal Rahman

One of the features I was expecting to see in Android 14 was the ability to turn your phone into a USB webcam for your PC.

Google hasn't talked about this feature yet, but I hope they still plan to ship it!

Here's some tidbits about Android 14's USB webcam feature 👇

6 comments
Mishaal Rahman

So back in February, I discovered (twitter.com/MishaalRahman/stat) code changes in AOSP that hinted at a new "DeviceAsWebcam" service (which upon re-reading the code changes I now believe to be a separate system app) that "turns an Android device into a webcam."

Android devices that support the UVC gadget mode (ie. the kernel is compiled with CONFIG_USB_CONFIGFS_F_UVC=y) can be set up to send camera frames to a /dev/video* node that a host device supporting UVC webcams can read from.

Mishaal Rahman

A dedicated DeviceAsWebcam app - which I should note has not yet been shipped on any Pixel builds - is what, I believe, would be responsible for actually using Android's Camera API to forward frames.

Only system apps-like DeviceAsWebcam-would have permission to R/W data to the /dev/video* node. In fact, the USB configuration file for all Tensor & Tensor 2-based (but not SM7250) Pixels already sets up the UVC function. Here's a snippet from init.gs101.usb.rc/init.gs201.usb.rc:

Mishaal Rahman

But since the DAW app is not present in current Android 14 beta builds, we can't actually use this functionality, though we can surface the "Webcam" option in "USB Preferences" as shown in the first post.

The "Webcam" option appears when the system property ro.usb.uvc.enabled is set to true. Settings calls UsbManager#isUvcSupportEnabled(), which reads this property, to decide whether to show this option.

Mishaal Rahman

When you select "webcam", UsbDeviceManager sets the USB config to "uvc" and the android.hardware.usb.action.USB_STATE broadcast is sent with the USB_FUNCTION_UVC boolean extra. DAW presumably listens for this broadcast to know when to start forwarding frames.

Mishaal Rahman

"That's just like Apple's Continuity Camera!" I can already hear some say. Well, the difference would be that Android 14's USB webcam feature wouldn't be exclusive to Pixel, and it would turn into a webcam that's compatible with any desktop OS (...and Android itself).

Though yes, Google isn't the first to turn a phone into a UVC/USB webcam. Some Motorola phones (twitter.com/MishaalRahman/stat) that support "Ready For" already do this.

Mishaal Rahman

I only shared a snippet of the Tensor & Tensor 2 USB configuration file, but there's also lines to set up 1080p resolution support for the webcam.

Oh, and without the DAW app in hand, we don't know what other features it might offer. Like will it let you control zoom, exposure, show a preview, etc?

Go Up