Skip to content

Support ColorOS 17 (Android 17) screenshot and screen recording - #126

Open
xingluo233 wants to merge 2 commits into
LSPosed:mainfrom
xingluo233:main
Open

xingluo233 wants to merge 2 commits into
LSPosed:mainfrom
xingluo233:main

Conversation

@xingluo233

Copy link
Copy Markdown

On ColorOS 17 (Android 17), the OPlus screenshot and screen recorder apps still
reject FLAG_SECURE content. Their secure checks moved to OPlus-specific classes
that the module does not hook:

  • Screenshot: o2.b (SurfaceControlCompat impl) drops the buffer when
    OplusScreenCapture$ScreenshotHardwareBuffer.containsSecureLayers() is true.
  • Recorder: OplusInfoMonitor.registerSfEvent(..., "com.oplus.screenrecordersecure")
    triggers the "content will not be recorded" warning.

Changes:

  • Hook OplusScreenCapture$ScreenshotHardwareBuffer.containsSecureLayers() → false
    in both com.oplus.screenshot and com.oplus.screenrecorder.
  • Skip only the com.oplus.screenrecordersecure SF event registration.
  • Add com.oplus.screenrecorder to the scope.

Tested on OnePlus PLK110, Android 17 (SDK 37), ColorOS 17.0, with
com.oplus.screenshot 17.7.10 and com.oplus.screenrecorder 17.5.4.

Optional hooks are guarded, so other ROMs are unaffected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant