Android: Disable screen casting/recording prompt

In Android 10+ A new security feature has been implemented that prevents screen recording/casting to your Android device unless you accept a warning from a dialog prompt, furthermore there are no options to allow this automatically so for things like remote desktop through AnyDesk, TeamViewer etc, and things such as Microsoft's new PC Companion this warning comes up on your phone every time you want to cast an app or remote desktop, which personally I feel defeats the point of these applications.

For example I use AnyDesk and i quite often want to access my phone directly from my computer, I don't want to have to touch my phone at all. Now since this update AnyDesk has been useless to me... If I have to pick my phone up to accept the screen casting/recording warning then I may as well just do what I was going to do on my phone...

Unfortunately there is no options to stop this new feature on the phone itself, however you CAN disable this feature for certain apps, of course this comes with a risk as those apps can now freely record/cast your screen without any prompt - so please only do this with trusted apps that essentially you NEED to allow access.

So in order to remove the nag screen you need to access your phone via USB using ADB which in turns requires Developer Mode and USB Debugging, this guide will guide you through the full process for a beginner - so if you have already performed some steps just skip them below.


1) Enabling Developer Mode for Android

Step 1: Tap Menu button so that you can enter into App drawer.

Step 2: Access Settings and tap About phone which you can find at the bottom of setting interface.

Step 3: In the About phone interface, you will see Build Number option at its bottom. Tap it continuously until you see the countdown “You are now a developer”.


2) Enable USB Debugging on Android

Step 1: Tap Menu button so that you can enter into App drawer.

Step 2: Access Settings and tap Developer Options.

Step 3: Now you can turn USB debugging on and then tap OK to allow USB debugging.

Step 4: Plug your phone into a PC and a prompt will appear on the phone that you must click Accept.


3) Download the Android Platform Tools

Head to the Android SDK Platform Tools download page. Select the link for your operating system from the “Downloads” section. This will download a ZIP file, which you can unzip wherever you want to store the ADB files - they are portable, so you can put them anywhere you want - I generally drop them into a folder in the root of my c: as we will need to CD to them in command prompt below.


4) Running ADB

Next up open a Command Prompt (in Administrator Mode) and CD to the directory where you unpacked your tools above. For example I put mine in C:\adbtools\

CD C:\adbtools\

Now run the following ADB command to see if a device is connected and ready:

adb devices

If you get the following, then make sure USB Debugging is turned on and your phone is connected to your pc:

You should instead see:


5) Find out the Android App Package Names

Now we need to find out the package names for the apps you wish to remove the screen recording/casting dialog for. This fortunately is fairly simple.  All you need to do is go to the Android App Store from your PC and find your app. Once on the app you can see the package name in the URL Address Bar.

Note down these package names ready for our ADB commands below.


6) Allowing PROJECT MEDIA on your chosen apps

This is the final step, and hopefully you have gotten here with little to no difficulty so far. All you now need to do is run the following command repeatedly with your package names in place of [package_name]. AND THATS IT!! No more nag screen about screen recording.

adb shell appops set [PACKAGE_NAME] PROJECT_MEDIA allow


Common App Commands For Allowing PROJECT MEDIA

Finally here is a useful list of ADB commands for various apps that you might be looking to remove the nag screen from:


Windows Phone Companion:

adb shell appops set PROJECT_MEDIA allow



adb shell appops set com.anydesk.anydeskandroid PROJECT_MEDIA allow


Author: Dean WilliamsI'm a Web Developer, Graphics Designer and Gamer, this is my personal site which provides PHP programming advice, hints and tips

4.3 4 votes
Article Rating
Notify of
Inline Feedbacks
View all comments