Error: adbd cannot run as root in production builds

Hi,
I’m developing an Android app on Windows and recently bought a Samsung A21s (Android 10 API 31) phone to test with. When I try to run ‘adb root’ from the Windows terminal I’m receiving the following error:

adbd cannot run as root in production builds

Could someone please advise on how I can resolve this issue? The phone is brand new and has not been rooted. If I try to gain ‘su’ rights by using the following commands:

adb shell
su

Then I received the following:

/system/bin/sh: su: inaccessible or not found

Many thanks,
Peter.

You have to have the phone rooted to gain super user privileges.

Thanks - I don’t want to root the phone and I haven’t had to root phones in the past to use the adb functionality when developing.

I guess the question is why can’t I run the ‘adb root’ command with this phone when it has worked fine on all other phones and tablets I’ve debugged with before?

I’ll read up on rooting the phone to see if that may be a solution…