user13776577
user13776577

Reputation:

Android 5.0 how to automatically obtain permissions when recording the screen?

MediaProjectionManager.createScreenCaptureIntent();

When sharing the screen, a window asking for permission will pop up.

I am looking for a way to automatically obtain all content (permissions) on the screen.

I have root access to this device!

Thanks in advance!

Upvotes: 0

Views: 1193

Answers (1)

Maurice Lam
Maurice Lam

Reputation: 1794

If this is for testing where you have ADB access to the device – the media projection checks the OP_PROJECT_MEDIA AppOps (code), and you can enable it through ADB like this:

adb shell cmd appops set <your.package.name> PROJECT_MEDIA allow

Upvotes: 2

Related Questions