Skip to content

Tinnci/camera-id-visibility-patch

Repository files navigation

Camera ID Visibility Patch

Systemless module toolkit for rooted Android test devices where the public Camera2 device list does not match the lower camera provider inventory.

This repository does not include proprietary system files, patched binaries, generated module zips, device dumps, or application-derived output. It provides a reproducible local build pipeline that consumes files extracted from hardware or firmware you are allowed to modify.

What It Does

  • Builds a KernelSU/Magisk-compatible module zip from local input blobs.
  • Applies byte-level patches from a profile file.
  • Places patched files under a module system/ tree for systemless overlay.
  • Keeps all extracted blobs and generated artifacts out of git.

The intended use is research and controlled device bring-up. A bad profile can break camera service startup or boot stability. Keep a recovery path ready before installing any generated module.

Repository Layout

module/                 Module template files (scriptable placeholder)
profiles/               Example and CI patch profiles
scripts/build-module.sh Build a flashable module zip from a profile
scripts/patch-bytes.sh  Offset-based binary patch helper
scripts/create-fixtures.sh
                        CI-only dummy inputs
docs/                   Operational notes

magisk/camera-hiddenid-provider-patch/
                        Source tree of the camera_hiddenid_provider_patch
                        KernelSU module (system-layer ID visibility).
                        See magisk/camera-hiddenid-provider-patch/README.md.

lsposed/camera2-alias-lsposed/
                        Source tree of the camera2_alias_lsposed_config
                        KernelSU module (process-layer ID compatibility
                        for lv.mcprotector.mcpro24fps). The hook
                        AndroidManifest.xml / Java / build.sh are
                        committed; the wrapper module zip is published
                        as a release asset only.
                        See lsposed/camera2-alias-lsposed/README.md.

Quick Start

Create a local profile from the example:

cp profiles/example.conf local/profile.conf

Put your own extracted input files under local/blobs/, then edit:

  • PATCH_ENTRIES
  • source paths
  • destination paths under the module system/ overlay
  • offsets
  • expected bytes
  • replacement bytes

Build:

scripts/build-module.sh local/profile.conf

The zip is written to build/dist/.

Install with your root manager or from a root shell:

ksud module install build/dist/camera_id_visibility_patch-0.1.0.zip
reboot

Verify after reboot:

adb shell dumpsys media.camera | sed -n '1,80p'
adb shell logcat -b crash -d -v threadtime

Patch Profiles

Profiles are shell files with module metadata and PATCH_ENTRIES.

Each entry is:

source|module-destination|offset-hex|expected-hex|replacement-hex

Example:

PATCH_ENTRIES=(
  "local/blobs/camera-service32.so|system/lib/libcameraservice.so|85b40|89f0baef6067d4f8c41001a889f0b8ee|072000bf6067d4f8c41001a889f040ed"
)

The builder refuses to patch if the bytes at the offset do not match expected-hex.

Recovery

Disable the module before reboot if needed:

touch /data/adb/modules/camera_id_visibility_patch/disable

Remove it from a root shell:

rm -rf /data/adb/modules/camera_id_visibility_patch
reboot

Legal And Safety Notes

  • Do not publish proprietary blobs or patched binaries.
  • Do not use this on devices you do not own or administer.
  • Treat every profile as device-build-specific.
  • Prefer one small patch per test cycle and keep crash logs for rollback decisions.

About

Systemless camera ID visibility patch toolkit for rooted Android test devices

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors