A virtual camera based on Xposed

Overview

android_virtual_cam

简体中文 | 繁體中文 | English

基于Xposed的虚拟摄像头

请勿用于任何非法用途,所有后果自负。

支持平台:

  • 安卓5.0+

使用方法

  1. 安装此模块,并在Xposed中启用此模块,Lsposed等包含作用域的框架需要选择目标app,无需选择系统框架。

  2. 在系统设置中,授予目标应用读取本地存储的权限,并强制结束目标应用程序。若应用程序未申请此权限,请见步骤3。

  3. 打开目标应用,若应用未能获得读取存储的权限,则会以气泡消息提示,Camera1目录被重定向至应用程序私有目录/[内部存储]/Android/data/[应用包名]/files/Camera1/。若未提示,则默认Camera1目录为/[内部存储]/DCIM/Camera1/。若目录不存在,请手动创建。

注意:私有目录下的Camera1仅对该应用单独生效。

  1. 在目标应用中打开相机预览,会以气泡消息提示“宽:……高:……”,需要根据此分辨率数据制作替换视频,放置于Camera1目录下,并命名为virtual.mp4,若打开相机并无提示消息,则无需调整视频分辨率。

  2. 若在目标应用中拍照却显示真实图片,且出现气泡消息发现拍照和分辨率,则需根据此分辨率数据准备一张照片,命名为1000.bmp,放入Camera1目录下(支持其它格式改后缀为bmp)。如果拍照时无气泡消息提示,则1000.bmp无效。

  3. 如果需要播放视频的声音,需在Camera1目录下创建no-silent.jpg文件。

  4. 如果需要临时停用视频替换,需在Camera1目录下创建disable.jpg

常见问题

A1. 前置摄像头方向问题?
Q1. 大多数情况下,替换前置摄像头的视频需要水平翻转并右旋90度,并且视频处理后的分辨率应与气泡消息内分辨率相同。但有时这并不需要,具体请根据实际情况判断。

Q2. 画面黑屏,相机启动失败?
A2. 目前有些应用并不能成功替换(特别是系统相机)。或者是因为视频路径不对(是否创建了两级Camera1目录,如./DCIM/Camera1/Camera1/virtual.mp4,但只需要一级目录)。

Q3. 画面花屏?
A3. 视频分辨率不对。

反馈问题

请直接在issues中反馈,如果为BUG反馈,请附带Xposed模块日志信息。

致谢:

提供HOOK思路: https://github.com/wangwei1237/CameraHook

H264硬解码: https://github.com/zhantong/Android-VideoToImages

JPEG转YUV: https://blog.csdn.net/jacke121/article/details/73888732

Comments
  • 安卓11微信无法直接读取data文件夹下文件

    安卓11微信无法直接读取data文件夹下文件

    已经在气泡提示的 /storage/emulated/0/Android/data/com.tencent.mm/files/Camera1/

    新建camera1文件夹且放入virtual.mp4文件 但由于安卓11的缘故 微信依然无法读取到 请问这种情况怎么解决.. 在特殊应用权限的访问所有文件里 也没能找到微信进行授予权限

    opened by Ceiso1 19
  • 软件扫码黑屏

    软件扫码黑屏

    描述:同一个手机其他的软件Qq, WeChat, zfb都可以替换视频正常扫码,但这个软件打开扫码一片黑,也没有任何提示。手机摄像头坏了,想用虚拟相机扫码😂希望作者解答一下,十分感谢 软件链接:https://play.google.com/store/apps/details?id=vn.coquan.hd

    Screenshot_2021-09-16-14-29-37-970_org lsposed manager

    opened by noname9528 10
  • openCamera(String cameraId, Executor executor, CameraDevice.StateCallback callback)有问题

    openCamera(String cameraId, Executor executor, CameraDevice.StateCallback callback)有问题

    openCamera(String cameraId, Executor executor, CameraDevice.StateCallback callback) 这个从Android P开始才有的,之前的版本都没有。

    如果不做处理的话,会报以下错误: submitRequestList - cannot use a surface that wasn't configured

    导致无法显示内容。

    opened by bad-copy 7
  • setPreviewTexture处理有遗漏

    setPreviewTexture处理有遗漏

    setPreviewTexture传入的参数可能是null(Android 6.0.1): android/hardware/camera2/legacy/RequestThreadManager.java 在configureOutputs函数中有如下代码片段: try { mCamera.setPreviewTexture(/*surfaceTexture*/null); } catch (IOException e) { Log.w(TAG, "Failed to clear prior SurfaceTexture, may cause GL deadlock: ", e); } catch (RuntimeException e) { 这样就会造成HookMain.msurf = new Surface(HookMain.msurftext);抛出异常IllegalArgumentException

    opened by bad-copy 6
  • 放置virtual.mp4显示本机摄像头

    放置virtual.mp4显示本机摄像头

    您好, 我安卓了以后在/sdcard/DCIM/Camera1放了个virtual.mp4,但是打开摄像头还是本机摄像头。我又看教程然后又创建了1000.bmp,但是依旧为本机摄像头。我已确定模块已经启动,但我区看日志并没有找到android_virtual_cam相关内容。 以下是日志文件 EdXposed_Verbose_20220326_164958.txt

    image

    opened by zhihuiyuze 5
  • Latest version bug

    Latest version bug

    After updating to the latest version, work profile apps can't read files inside work space storage. Instead it shows toast to put files in main directory. But the apps doesn't use the files stored in main directory.

    opened by girlofparadise 5
  • video playback problem on meet gmail

    video playback problem on meet gmail

    Vcam v3.0 | Virtual cam meet on gmail, i have 2 minutes video but the video does not play full video, the video only plays for 13 seconds and then returns to the beginning, After looping the third time the video will be stuck and the camera will automatically turn off, And while i turn camera back on the virtual cam only appears for 1 second and camera automatically turn back off, I have screen record the problem, here is the link https://drive.google.com/file/d/1mj3o_kne-9zhKHQ_sh9KsQPGSIbEQUKx/view

    And on chrome the camera is black? Screenshot_20210922-161155873

    Does this problem occur on your phone?

    opened by adamelegord 5
  • App crash when access to camera

    App crash when access to camera

    Some apps like google meet and chrome will crash when access to camera. There is the log https://hastebin.com/ijoyuyicox In previous versions vcam v2.5 it runs normally and doesn't crash, And when in v2.6 and v2.7 the app crash, I've tried disabling and enabling cam2api.

    opened by adamelegord 5
  • Cam video is streched

    Cam video is streched

    Could anyone try to help me fix the problem with my cam video? The video image is always stretched when using camera no matter what resolution I download video. I can't see any toast I can change resolution. Has anyone got idea what I do wrong? In video player the video plays well however when using vcam it is always stretched. My device is xiaomi 11. I appreciate for any help. Thank you

    opened by robkor26 4
  • Triggering read

    Triggering read

    Thank you for this great module.......

    I got a qr-reading app, replacing input works and displays correct image but it does not 'trigger' the app to decode the qr.

    Any idea how to activate the triggering?

    感谢你的代码库 我现在有个问题如下:我有一个gr-reading app, 二维码可以不用扫描 然后直接播放一个二维码的视频来代替, 这个正常运行,但它然后好像就不行激活app来解析二维码。简单来说,它识别到了二维码,但是不知道怎么去处理二维码。

    请问怎么样才能让app来解析和处理二维码?提前感谢

    opened by kababoom 4
  • 需要针对视频校验app的改进建议。

    需要针对视频校验app的改进建议。

    有些做人脸验证的app的,在视频播放时,会连续拍摄多张照片,然后比对这几张照片,如何发现都是相同的那张1000.bmp,肯定就被判定为作弊了。 能否改进下功能,可以放入多张静态图片的,比如 1001.bmp 1002.bmp 1003.bmp 然后每次发现拍照时候循环读,这样就能解决app连续拍摄多张照片的困局了。

    opened by macenjie 4
  • I want to buy working version

    I want to buy working version

    Hi, i want to buy working version of virtual camera with support android camera API v2. Budget 5k$. i can pay in bitcoin. Who have solution, please contact me on [email protected] best regards.

    opened by reptiloid8825 0
  • How to use 1000.bmp

    How to use 1000.bmp

    It can work the virtual video in whatsapp, however, when i put the 1000.bmp into the whatsapp folder, it cannot display the bmp, what should i do? can anyone help, thank you.

    opened by kenlam5551 1
Releases(42-4.4)
Owner
null
Dual Camera, IMU, and GPS data recorder for Android

Visual-Inertial Recorder (VIRec) Record camera frames at ~30fps from one or two camera sensors, Inertial Measurement Unit (IMU) measurements at ~100Hz

AUT 3D Vision 17 Oct 24, 2022
A minimal WHIP implementation for the Raspberry Pi. It sends Mic and Camera to a WHIP endpoint

whipi A minimal WHIP implementation for the Raspberry Pi. It sends Camera Mic to a WHIP endpoint. Requires a Raspberry Pi with a PiCam and Java 11. It

|pipe| 12 Oct 27, 2022
Allows changing of hurt animation modifier, changing how much the user's camera moves after the player being hurt.

Hurt Animation Modifier Allows changing of hurt animation modifier, changing how much the user's camera moves after the player being hurt. Credit to W

null 5 May 17, 2022
WebRTC for React-Native. Allows camera to zoom on the fly while streaming and change max bitrate.

rn-webrtc This repo is forked from react-native-webrtc. A WebRTC module for React Native. Support iOS / macOS / Android. Support Video / Audio / Data

SAURABH KAYASTH A. 7 Aug 7, 2022
The Google code scanner API provides a complete solution for scanning codes without requiring your app to request camera permission.

Android Google Code Scanner The Google code scanner API provides a complete solution for scanning codes without requiring your app to request camera p

Prabhakar Thota 7 Nov 23, 2022
A simple app to use Xposed without root, unlock the bootloader or modify system image, etc.

中文文档 Introduction VirtualXposed is a simple App based on VirtualApp and epic that allows you to use an Xposed Module without needing to root, unlock t

VirtualXposed 14k Jan 8, 2023
An Xposed module for Telegram clients

TMoe TMoe 是一个兼容若干第三方开源 Telegram 客户端的开源 Xposed 模块 使用方法 激活本模块后,在 Telegram 客户端的设置中点击 "TMoe 设置" 即可开关对应功能。 一切开发旨在学习,请勿用于非法用途 本项目保证永久开源,欢迎提交 Issue 或者 Pull R

Acetylcholine 355 Dec 31, 2022
Xposed module for Snapchat.

SnapMod Xposed module for Snapchat. Setup To set SnapMod up, download and install the latest apk from here. When you open it, it will ask to install s

Rodi 138 Dec 21, 2022
Add custom auth options (e.g. face unlock) to your phone using Xposed.

UniversalAuth This project aims to bring a variety of custom authentication options to various Android ROMs. Your phone needs to have Xposed (or EdXpo

Andy Bao 134 Dec 29, 2022
LimboAuth - Minecraft Auth System for Velocity proxy built in virtual server (Limbo).

LimboAuth Auth System built in virtual server (Limbo). MC-Market SpigotMC.org Описание и обсуждение на русском языке (spigotmc.ru) Описание и обсужден

Elytrium 89 Jan 4, 2023
Echo client-server components to evaluate Project Loom virtual threads.

Overview Project Loom is the OpenJDK initiative to introduce user-mode threads in Java. The purpose of this repository is to compare Project Loom virt

Elliot Barlas 15 Nov 1, 2022
Runtime code generation for the Java virtual machine.

Byte Buddy runtime code generation for the Java virtual machine Byte Buddy is a code generation and manipulation library for creating and modifying Ja

Rafael Winterhalter 5.3k Dec 27, 2022
A fast and secure browser for standalone virtual-reality and augmented-reality headsets.

Wolvic VR Browser The goal of the Wolvic project is to create a full-featured browser exclusively for standalone AR and VR headsets. You can find us i

Igalia 465 Jan 7, 2023
Virtual model of an atom

Project Zero Virtual model of an atom. Download Demo · Report Bug Table of Contents About The Project Built With Getting Started Prerequisites Install

Phi Long Bui 3 Dec 23, 2022
Java virtual machine made in Java by HoverCatz#0060

Obzcure Virtual Machine Java virtual machine made in Java THIS IS NOT PRODUCTION SAFE - WORK IN PROGRESS! Use at your own risk. Requires Java 17 (with

null 9 Oct 18, 2022
code test from a virtual bank

account-manager provided 2 apis: /api/account/{accountNumber} for retrieving balance /api/account/transfer for transferring balance transfer balance o

Ray Chong 2 Oct 23, 2021
Vert.x virtual threads incubator

Vert.x Virtual Threads Incubator Incubator for virtual threads based prototypes. Prerequisites Vert.x 4.3.2 Java 19 using preview feature OpenJDK 19 E

Eclipse Vert.x 89 Dec 27, 2022
This app/widget is based on the work of Anthony (tonesto7), which is in turn based on the earlier work of David Schablowsky

Mustang Mach-E Widget for Android Intro This app/widget is based on the work of Anthony (tonesto7), which is in turn based on the earlier work of Davi

null 25 Nov 15, 2022
Team 5468's 2022 FRC robot code. This code is written in Java and is based off of WPILib's Java control system and utilizes a command based system

FRC 2022 Team 5468's 2022 FRC robot code. This code is written in Java and is based off of WPILib's Java control system and utilizes a command based s

null 4 Oct 4, 2022