Blog/Audio & Video quality testing

How to Set Up Android Virtual Camera: A Quick Tutorial

Two devices with Android virtual camera set up.

Have you ever been in the middle of performing mobile audio and video tests and thought, "Wouldn't it be cool if I could just play this awesome video clip directly instead of facing mobile devices against a monitor in a black box?" Recently, I went down this rabbit hole and figured out a way to do so, using Magisk and LSPosed.

Setting up a virtual camera module on Android allows us to gather full reference video metrics, such as VMAF, PSNR, SSIM, or VQTDL. This approach is more technical and requires an unlocked bootloader and root access (so standard warnings apply: proceed at your own risk, this can void warranties, etc.), but if you're comfortable with that, stick around! I'll walk you through exactly how I got it working.

Before we begin: The essentials

Before jumping into the setup, it’s crucial to make sure you’ve got everything you need. This isn’t a plug-and-play process—you’ll be working with system-level tools and modules, so having the right components in place from the start will save you a ton of troubleshooting later. Think of this as your toolkit: each item listed plays a specific role, and missing even one could cause the entire process to fail.

Here’s what you’ll need:

  1. Your Android device: It needs to be a model that officially supports bootloader unlocking.
  2. Operating system: Your device needs to be running Android 8.1 (Oreo) or a later version. This is a minimum requirement for LSPosed.
  3. Root access: You will need Magisk installed and working for root. I'm assuming you've already unlocked the bootloader and rooted your device. 
  4. LSPosed framework: Specifically, the Zygisk version. This is the backbone of the module we’ll be using.
  5. VCAM module: This LSPosed module does the heavy lifting of replacing the camera feed with a video in selected apps.
  6. ZArchiver app: A robust file manager that can access app data directories. It’s available on the Play Store.
  7. A vertical video file: This is the clip you'll use as a substitute for your camera input—make sure it's in the correct format and orientation.

Got everything? Awesome, let's dive in.

Let's get started: The setup process

It’s a lengthy and risky process, and a lot can go wrong. So follow along closely!

Phase 1: Setting up the foundation (LSPosed)

Before diving into advanced customization or modules like VCAM, it’s crucial to have the LSPosed framework properly installed and running on your device. LSPosed is a powerful tool that works with Magisk to enable system-level modifications without altering your device’s system partition. If you haven’t already set it up, follow these steps to get started: 

  1. Download LSPosed. Head to the official LSPosed GitHub repository and download the latest Zygisk version of the framework. It'll be a .zip file. 
  2. Open Magisk. Launch the Magisk app on your device.
  3. Head to modules. Tap the 'Modules' tab (usually found at the bottom of the screen).
  4. Install. Tap "Install from storage" and navigate to where you saved the LSPosed*.zip file. Select it and tap to install.
  5. Wait & reboot. Allow Magisk to complete the installation. Once it has finished, hit the "Reboot" button to restart your device.
  6. Check. Once your phone has restarted, open the Magisk app and check that the LSPosed module appears in your list of installed modules. Success!
  7. Manage. Extract the LSPosed .zip file you downloaded earlier. Inside, you’ll find a manager.apk file. Install this APK to gain access to the LSPosed Manager, which allows you to control and configure modules like VCAM.
Screenshot showing the Zygisk version of LSPosed installation.

Phase 2: Installing the virtual camera module (VCAM)

Now that LSPosed is up and running, it’s time to install the VCAM module — a virtual camera utility that allows selected apps to use virtual video input. This can be particularly useful for streaming, screen sharing, or privacy-focused setups. Follow the steps below to get VCAM up and functional: 

  1. Download the VCAM module. Download the VCAM module apk file from here. It’s a fork of the original module, containing some fixes, and an actual apk file to install.
  2. Install the APK. Locate the file you just downloaded and install it as you would any regular Android app. You might need to enable installation from unknown sources.
  3. Open LSPosed manager. Launch the LSPosed Manager app you previously installed.
  4. Go to the modules section. Tap on the Modules tab to view your list of installed modules.
  5. Find and open VCAM. Scroll through the list to find VCAM and tap on it to access its settings.
  6. Enable the module. Flip the toggle switch to enable VCAM. It should now be active.
  7. Select target apps. LSPosed will show a list of apps installed on your device. Check the boxes next to each app you want VCAM to work with—commonly used with apps like Telegram, Discord, and others that support video input.
Screenshot showing the VCAM has been enabled.

Phase 3: Confirming your VCAM is hooked properly

Now that VCAM is installed and enabled for your chosen apps, it’s time to confirm that it’s actually working. Here’s how to make sure VCAM is properly hooked into the app: 

  1. Open a target app. Launch one of the apps you just enabled, like Telegram.
  2. Watch for the ‘Toast’ message. As the app opens, look out for a small pop-up message (called a toast) near the bottom of the screen. It’ll contain Chinese characters. If you see this, that’s a good sign—VCAM is active and functioning.
  3. Note the path. When VCAM hooks properly, it generates a special folder for that app. The typical path looks like: Android/data/[target app's package name]/files/camera1. For example, Telegram’s path might be org.telegram.messenger, and Discord’s might be com.discord.
  4. No Toast? If you didn’t see the popup, try closing all your recent apps and reopening the target app. Still nothing? Reboot your device, then try opening the app again. A restart often resolves the issue.
Screenshot showing the 'Toast' message.

Phase 4: Setting up ZArchiver for root-level access

To manage VCAM's folders and files, you’ll need a file manager with root access. ZArchiver is a great choice for this. Follow these steps to get it configured properly:

  1. Install ZArchiver. If you haven’t already, download and install ZArchiver from the Play Store.
  2. Open ZArchiver. Launch the app on your device.
  3. Access settings. Tap the three-dot menu icon (⋮) in the top-right corner and select Settings.
  4. Enable root access. Scroll down and tap on Root to open the root access settings.
  5. Set access type. Tap Type of root access and choose SU from the list.
  6. Grant root permission. A Magisk prompt should appear asking if you want to grant ZArchiver root access. Tap Grant.
  7. Enable Android/data access. Go back to ZArchiver’s main settings screen and find the toggle labeled something like “Use for Android/data and Android/OBB.” Make sure this is switched ON so you can access and manage folders like the one VCAM creates.

Phase 5: The final touches (video placement & testing)

You’re almost done! Now that VCAM is set up and ZArchiver is configured for root access, it’s time to place your virtual video and test everything. Follow these final steps:

  1. Navigate with ZArchiver. Open ZArchiver and browse to the folder VCAM created for your chosen app. The path should look like: Android/data/[target app's package name]/files/camera1/
  2. Copy your video file. Locate the vertical video file you want to use as your virtual camera feed. Copy this file into the camera1 folder.
  3. Rename the video file. Once the video is inside the camera1 folder, rename it to exactly virtual.mp4. This step is critical—VCAM will only detect and use the video if it has this exact name.
  4. Clear recent apps. Close all your recent apps, including the target app you’ll be testing with.
  5. Launch and test. Open the target app again (the one you copied the video into). Navigate to a section where you can use the camera, such as a video call screen or camera preview.
  6. Turn on the camera. Activate your camera within the app. If everything’s set up correctly, the app will show your video file as the camera feed.

If all went according to plan, you should be seeing your virtual.mp4 video playing in a video call or voice chat of the target app, instead of your real camera feed. Depending on specific apps and the phone’s hardware capabilities, as well as the specific video used, it may show a black screen for a while before it loads the actual virtual video in the camera feed.

Compatibility insights: Does it work everywhere?

App compatibility can vary significantly depending on the Android version and device manufacturer. For example, Google Meet is listed and functional with this module on a Google Pixel 2 XL running Android 11. However, the same app does not appear under-supported apps in the LSPosed VCAM menu on a Galaxy S20 FE running Android 13. This discrepancy may be due to differences in how Google Meet is bundled on Samsung devices compared to Google Pixel devices.

Third-party apps like Telegram, Discord, and WhatsApp generally work on most supported devices, as long as the apps themselves continue to support those platforms.

Keep in mind that both app and system updates can sometimes disrupt the setup, so results may vary depending on your specific device and software version.

Final thoughts

And there you have it — a step-by-step guide to setting up a virtual camera feed on a rooted Android device using VCAM and LSPosed. While the process requires a few specific tools and careful configuration, it opens the door to measuring important video metrics like VMAF, PSNR, and SSIM on receiver devices.

Whether you’re running video quality tests or just looking to streamline your workflow, this setup offers a cleaner, more controlled alternative to the old “phone pointed at a monitor” method.

It’s not without its quirks — compatibility can vary depending on your device and Android version, and updates might occasionally throw things off. But once everything’s up and running, the flexibility and insights you gain are well worth the effort.

Are you exploring video or audio testing solutions and need support or custom development tailored to your use case? Reach out. We’re here to help you get the most out of your testing setup.

QA engineer having a video call with 5-start rating graphic displayed above

Deliver a product made to impress

Build a product that stands out by implementing best software QA practices.

Get started today