How to disable dialog "Start recording or casting *app name*" - DroidApps

How to disable dialog “Start recording or casting *app name*”

When i have started to using “modern” versions of android 10 and higher, I faced the problem of remotely connecting to the phone from another device. If earlier it was possible to confirm permission for recording or broadcasting the screen once, just checking the allow always checkbox, now you need to give permission to access the screen every time.

Fortunately i have found one soution. All you need is PC (with any OS), and ADB.

Go to app info (about app section) and find the app package name, for me its

Open console with path to your adb package on PC. Connect the device and type adb devices to start adb server. You need to provide permission on your device after that.

Next command will provide screen recording permission for app. adb shell appops set PROJECT_MEDIA allow, you need to change app package name from to yours!! And that’s all!