2026-05-08 11:45:15 +02:00
2026-05-08 11:45:15 +02:00
2026-05-08 11:45:15 +02:00
2026-05-08 11:45:15 +02:00
2026-05-08 11:45:15 +02:00
2026-05-08 11:45:15 +02:00
2026-05-08 11:45:15 +02:00
2026-05-08 11:45:15 +02:00
2026-05-08 11:45:15 +02:00
2026-05-08 11:45:15 +02:00
2026-05-08 11:45:15 +02:00
2026-05-08 11:45:15 +02:00
2026-05-08 11:45:15 +02:00
2026-05-08 11:45:15 +02:00
2026-05-08 11:45:15 +02:00

CamSwapper: A Virtual Camera Module (Android 10+)

PLEASE DO NOT USE THIS SOFTWARE FOR ILLEGAL PURPOSES.

CamSwapper is a virtual camera module that replaces your device's camera feed with video files or images at the application level (via Xposed/LSPosed) or system-wide (via HAL hook).

Quick Start

  1. Install the CamSwapper APK on a rooted device with LSPosed
  2. Enable module in LSPosed Manager and select target apps
  3. Select a video file from the app UI
  4. Open any hooked camera app — your video plays as the camera feed

Features

App-Level Hook (LSPosed)

Feature Status
Local video file hooking [x]
AMediaCodec hardware decoding (4K@60fps HEVC) [x]
Static image hooking [x]
Network stream (RTSP) [ ] In progress
Preview cropping to match aspect ratio [x]
Camera1 API photo capture [x]
Camera1/Camera2 API hooks [x]
Audio playback [x]
Floating debug panel [x]

System-Wide HAL Hook (Magisk/KernelSU)

Feature Status
LD_PRELOAD injection [x]
All apps simultaneous [x]
No per-app scoping [x]
RTSP network streams [x]

Requirements

  • Android 10+ (API 29+)
  • Root access
  • LSPosed Framework 2.0.0+ (for app-level hook)
  • Magisk or KernelSU (for system-wide HAL hook)

Usage

Setup

  1. Place video files in DCIM, Movies, or other public storage
  2. Grant the module media read permissions
  3. Grant target apps media read permissions
  4. In LSPosed, enable CamSwapper and select target scope (TikTok, Telegram, etc.)
  5. Force stop target app after any changes
  6. Tap the thumbnail area to select a video file

Debugging

Enable "Print Logs" in the app, then:

adb logcat | grep "VCX"

System-Wide HAL Hook

For system-wide camera replacement (all apps at once), flash the module ZIP:

Installation

# Flash camswapper-hal-hook-v1.zip in Magisk/KernelSU
adb reboot

# Configure
enabled=1
source_mode=file   # or rtsp
video_path=/data/local/camera_magic/video.mp4
rtsp_url=rtsp://192.168.1.100:554/stream

Verification

# Check hook loaded
adb shell getprop wrap.android.hardware.camera.provider@2.7-service-google

# Check logs
adb logcat -d -s CameraHook

Uninstall

adb shell su -c "rm -rf /data/adb/modules/camera-hook"
adb shell su -c "setprop wrap.android.hardware.camera.provider@2.7-service-google ''"
adb shell su -c "rm -rf /data/local/camera_magic"
adb reboot

Known Issues

  • Green lines on video edges — Fixed
  • Camera1 API not stopping threads after recording — Fixed
  • Camera2 API hook on menu switch — Fixed
  • 4K audio desync on older devices (runtime permission) — Toggle front/rear camera as workaround

Credits

S
Description
No description provided
Readme 9.9 MiB
Languages
Kotlin 46.5%
C++ 41.9%
Shell 7.8%
C 2.9%
CMake 0.6%
Other 0.3%