xCam - Universal Virtual Camera & Media Injection Xposed Module

xCam is a high-performance, universal Xposed module built with the modern LibXposed API (API 101). It seamlessly injects virtual media (videos and images) into live camera feeds, photo capture routines, and video recording sessions across a wide variety of Android applications, supporting Android 9 up to Android 16 (API 28 - API 36+).


🚀 Key Features

📸 Universal Media Support

  • Video & Image Support: Inject standard video files (.mp4, .mkv, etc.) or still photos (.jpg, .png, etc.) with automated seamless loop processing.
  • Real-Time Transformations: Rotate media on-the-fly (90°, 180°, 270°) and horizontally mirror preview output to match physical camera sensor orientation.

🎥 Multi-Layer Pipeline Interception

  • Camera1 & Camera2: Surface and preview stream hijacking supporting both legacy APIs and modern OutputConfiguration pipelines.
  • Hardware ImageReader Hijacking: Directly injects synthesized YUV420 and JPEG data into native ImageReader queues.
  • Universal Capture Replacement: Intercepts BitmapFactory decode streams, Bitmap.compress, and ContentResolver/MediaStore file descriptors to ensure 100% replacement success on photos taken in target apps.
  • Synchronized Video Recording: Employs hardware Surface-to-Surface transcoding (MediaCodec) to replace MediaRecorder output with millisecond accuracy matching the live preview, producing authentic IDR keyframes without green screen artifacts or PTS drift.
  • WebRTC Injection: Replaces incoming video tracks in video call and live streaming apps.
  • Virtual Audio Feed: Synchronized audio capture routing for media sources with sound.

🛠️ Diagnostics & Telemetry

  • Pipeline Monitor: Real-time inspection of active hook execution routes (e.g., ImageReader(YUV) ➔ Camera2(SurfaceTexture) ➔ MediaRecorder#start ➔ MediaRecorder(VideoTrimmed)).
  • Capture Alert: Heads-up notification card with captured image thumbnail preview and quick-dismiss capabilities.

📊 Feature Availability

Feature Android 9 - 11 (Legacy) Android 12 - 16 (Modern)
Video Playback (.mp4) ✅ ✅
Still Images (.jpg / .png) ✅ ✅
Rotate (90° / 180° / 270°) ✅ ✅
Horizontal Mirroring ✅ ✅
Photo Capture Hijacking ✅ ✅
Video Recording Replacement ✅ ✅
Live Route Pipeline Monitor ✅ ✅
Capture Alert Notification ✅ ✅

📦 Installation & Setup

📱 Rooted Environments

Requirements:

  • Rooted Android device (Android 9.0 - 16.0)
  • Xposed framework provider supporting modern API (e.g., LSPosed, Vector, KernelSU + Zygisk, APatch)

🛡️ Non-Rooted Environments

Requirements:

  • Non-rooted Android device (Android 9.0 - 14.0+)
  • APK patcher tool such as LSPatch (recommended) or Shizuku + LSPatch

⚖️ License

This project is licensed under the GNU General Public License v3.0.

Copyright (C) 2026 hazbu

⚠️ Disclaimer

This module is intended for educational, testing, and development purposes only. Use responsibly and at your own risk. The developer is not responsible for any misuse, account suspensions, or violations of third-party application terms of service.

Releases

v1.2

Stable

10/15/2026, 4:07:49 AM

Fix webRTC

Assets

1

v1.1

Stable

10/7/2026, 1:28:01 AM

  • Improve stability
  • New pipeline tracker

Assets

1

v1.0

Stable

8/14/2026, 4:01:57 AM

Convert image to video for better compability for various apps

Assets

1

v0.9

Stable

8/11/2026, 6:15:12 AM

Now using fit center instead center crop

Assets

1

v0.8

Stable

8/10/2026, 11:31:37 AM

Update version to v22 and remove unused engine stop logic

  • Bump xcamVersion to v22-master.
  • Remove stopEngineWithDelay and its associated uiHandler logic for stopping the camera engine.
  • Clean up unused imports, including Bitmap, PixelCopy, ByteArrayOutputStream, and BitmapFactory, across XCamModule and XCamInjectors.
  • Enhance null safety in isIgnoringHooks by providing a default value for the ThreadLocal state.
  • Apply minor code formatting and trailing comma adjustments in XCamCapture and XCamModule.

Assets

1

v0.7

Stable

8/9/2026, 3:58:55 AM

Update version to v18.1-clean and refactor injector architecture

  • Centralize module installation logic in XCamInjectors with streamlined OS version detection.
  • Refine the "Universal Hunter" BitmapFactory hook with improved argument replacement logic and more robust logging.
  • Introduce UIFallbackHooks in the modern engine to support TextureView and SurfaceView based applications.
  • Update README.md to include a feature availability matrix and clarify current support status for video and image media.
  • Improve process name detection on Android 12+ using Application.getProcessName().
  • Refactor XCamModule to clean up unused state variables, redundant comments, and engine stop logic.
  • Enhance XCamInjectorsModern session discovery to automatically clear preview surfaces when a new capture session is initiated.
  • Minor cleanup in XCamRenderer and legacy injectors to improve error handling and API usage.

Assets

1

v0.6

Stable

8/8/2026, 8:22:43 PM

Update README for v17.5-Stable and document new injection techniques

  • Update the module version to v17.5-Stable and expand documented OS support to include Android 9 through Android 16 (APIs 28-37).
  • Define the Dual-Engine Pipeline, distinguishing between the Legacy Engine (APIs 28-30) and the Modern Engine (APIs 31-37).
  • Document "The Hunter Hook," a new universal capture system utilizing BitmapFactory interception.
  • Introduce "Surgical Target Diversion" logic to describe how preview streams are redirected without hanging photo capture sessions.
  • Clarify installation steps for both rooted and non-rooted environments, specifically mentioning LSPosed, Vector, and LSPatch.
  • Simplify usage instructions and refine feature descriptions for clarity.
  • Update the project disclaimer and license section.

Assets

1

v0.5

Stable

8/8/2026, 6:10:35 AM

Update versioning logic to support Gradle project properties

  • Modify versionCode and versionName assignment in build.gradle.kts to prioritize Gradle project properties before falling back to environment variables.

Assets

1

v0.4

Stable

8/7/2026, 4:30:42 AM

Migrate to LibXposed API and update documentation

  • Update ProGuard rules to support the LibXposed API (101) and remove legacy de.robv.android.xposed references.
  • Add specific keep rules for XCamModule constructors, MainActivity helper methods, and io.github.libxposed interfaces.
  • Update README.md to highlight the transition to a modern LibXposed architecture.
  • Expand documentation to include support for newer frameworks like Vector and NPatch.
  • Add details to the README regarding real-time status tracking and active scope display features.
  • Refine installation and usage instructions to reflect the updated module behavior and activation status.

Assets

1

v0.3

Stable

8/7/2026, 12:31:14 AM

Update Xposed minimum version and remove package scope

  • Increment xposedminversion to 101 in AndroidManifest.xml to align with the current xposedapi version.
  • Remove scope.list from Xposed resources to eliminate package-specific scoping restrictions.

Assets

1

v0.2

Stable

8/4/2026, 7:42:27 AM

Migrate to libxposed service API and enhance module status UI

  • Replace manual framework provider queries with the official libxposed service API for detecting active scopes.
  • Implement XposedServiceHelper.OnServiceListener in MainActivity to dynamically update module status and retrieve the official app scope.
  • Refactor the main UI to use MaterialCardView containers for module status and active scopes, adding a HorizontalScrollView for better app icon display.
  • Update XCamModule to use modern libxposed hook syntax and priority-based logging, removing legacy manual activity registration logic.
  • Register XposedProvider in AndroidManifest.xml and update dependencies to include libxposed-service.
  • Clean up Constants, SettingsProvider, and string resources by removing deprecated scope-tracking keys and manual framework authority checks.
  • Improve UI feedback with theme-aware colors for active/inactive states and updated iconography spacing.

Assets

1