We are unable to access the clipboard when running auto on an Android S7 device and get the following message in logcat: "ClipboardService: Denying clipboard access to io.appium.uiautomator2.server, application is not in focus nor is it a system service for user 0"
However, we are able to access the clipboard on the following AWS devices:
S4 (Android 8.1)
S6 (Android 9)
and the following local devices not on AWS:
S5e tablet (Android 11)
S9 (Android 10)
Android 11 emulator image
This issue seems to be specific to AWS's S7 device. Below is an excerpt from logcat.
10-06 16:31:07.958 8131 8412 I appium : channel read: POST /wd/hub/session/8e1fdceb-781a-4d2c-bcd8-8cc9edff0fef/appium/device/get_clipboard
10-06 16:31:07.958 8131 8412 I appium : Get Clipboard command
10-06 16:31:07.962 1136 2189 E ClipboardService: Denying clipboard access to io.appium.uiautomator2.server, application is not in focus nor is it a system service for user 0
10-06 16:31:07.963 8131 8412 I appium : AppiumResponse: {"sessionId":"8e1fdceb-781a-4d2c-bcd8-8cc9edff0fef","value":""}