Fixing scrcpy keyboard and mouse input that doesn't work on OPPO phones
The classic OPPO symptom is that scrcpy opens, the screen mirrors fine, and then nothing you type or click reaches the phone. no taps, no scrolling, no keystrokes. The phone is clearly connected, so people assume the cable or the adb driver is broken. it usually isn’t. ColorOS, the Android skin on OPPO (and the closely related Realme and OnePlus builds), puts extra restrictions on the input injection that scrcpy relies on by default.
If you landed here from scrcpy issue #1518, here is the direct answer. on an OPPO phone, input fails because ColorOS blocks the injected events that scrcpy’s default mode sends. you have two fixes. turn off ColorOS’s permission monitoring in developer options so injection is allowed, or skip injection entirely and use the HID modes (--keyboard=uhid, --mouse=uhid) or --otg, which behave like a real keyboard and mouse. the rest of this article walks through both, in the order I try them.
This is for people who own or are authorised to test the OPPO device in front of them: QA benches, small automation setups, or someone who just wants to type on their own phone from a PC. I run mixed Android hardware from Singapore, and OPPO is where I most often explain that mirroring and control are separate permissions.
What you need
- a Windows, macOS or Linux PC with scrcpy installed. I’m assuming scrcpy 2.4 or newer, because that is where the
--keyboardand--mousemode options were introduced. check withscrcpy --version - adb platform-tools on your PATH (scrcpy bundles adb on Windows builds)
- a data-capable USB cable. charge-only cables give you a phone that charges but never shows up in
adb devices - an OPPO, Realme or OnePlus phone running ColorOS (or a ColorOS-derived build) with developer options available
- about 15 minutes. cost is zero, scrcpy is free and open source
- optional: a Bluetooth-free fallback plan. OTG mode needs a second USB path, covered in step 7
Step by step
1. Confirm adb sees the phone as authorised
Run:
adb devices -l
Expected output is one line ending in device, with a model string like model:CPH2xxx.
If it breaks: unauthorized means the RSA prompt on the phone was dismissed. unplug, run adb kill-server, replug, and tick “always allow” on the prompt. an empty list means cable, driver or USB mode. if the USB debugging toggle itself is greyed out, see fixing a greyed-out USB debugging toggle on Android first, because nothing below works until that is sorted.
2. Reproduce the failure with default scrcpy
Run:
scrcpy
Expected output: a window with the phone screen, and in the terminal a line about the device and the encoder. clicking in the window does nothing on the phone. on some ColorOS builds the terminal also shows an injection error mentioning INJECT_EVENTS or a SecurityException when you click.
If it breaks: if even the mirror doesn’t show, that is a different problem (encoder or codec). try scrcpy --video-codec=h264 and come back. if the mirror shows and clicks work, you don’t have this problem and can stop.
3. Turn on USB debugging (Security settings) if it exists
Some OPPO and OnePlus builds expose a second toggle next to USB debugging. in developer options, look for a line labelled “USB debugging (Security settings)” or similar. this is the Xiaomi-style gate. I covered that variant in fixing install failed user restricted on Xiaomi and Redmi phones, and the logic is the same. a vendor-level gate sits on top of plain adb.
Expected output: toggle on, and a confirmation dialog you accept.
If it breaks: the label differs by ColorOS version, and many OPPO phones don’t have this exact toggle at all. don’t hunt for long. go to step 4.
4. Disable permission monitoring in developer options
This is the ColorOS-specific one. in developer options, scroll down to the debugging section and look for “Disable permission monitoring”. the exact wording changes between ColorOS versions, so search developer options for “permission” if you don’t see it. turning it on lets adb-shell processes inject input events, which is what scrcpy’s default mode does. Google’s own developer options reference documents the stock toggles. the OPPO-specific ones are vendor additions and not listed there, so treat my description as what I have seen on devices, not as vendor documentation.
Then fully restart scrcpy:
adb kill-server
scrcpy
Expected output: clicking the mirrored window now taps the phone, and the keyboard types into focused fields.
If it breaks: some builds reset this toggle on reboot or when USB debugging is switched off and on. re-check it after every phone restart. if the toggle is missing or turning it on changes nothing, move to the HID route.
5. Switch the keyboard to UHID mode
Instead of injecting key events, scrcpy can create a virtual physical keyboard on the phone. as the scrcpy keyboard documentation describes, the uhid mode simulates a real HID keyboard through adb, so it doesn’t depend on the same injection permission that ColorOS blocks:
scrcpy --keyboard=uhid
Expected output: the mirror opens as before, and typing on your PC keyboard types on the phone.
One side effect to expect. because the phone now believes a hardware keyboard is attached, it may hide the on-screen keyboard. on stock Android that is controlled under the physical keyboard settings, and on ColorOS the setting sits in a similar place under language and input. flip the “show on-screen keyboard” option if you want both.
If it breaks: the first connect can be silent if the phone shows a keyboard-layout prompt. check the phone screen. also make sure you are on 2.4 or later, because older builds reject --keyboard as an unknown option. just upgrade rather than hunt for older flag names.
6. Switch the mouse to UHID mode
Same idea for the pointer:
scrcpy --keyboard=uhid --mouse=uhid
Expected output: a mouse pointer appears on the phone screen and follows your PC mouse. the pointer is captured by the scrcpy window, so it behaves like a physical mouse rather than a finger. clicks are mouse clicks, not touches.
Some apps ignore mouse events or treat them differently from touches, and swipe gestures are not the same as dragging with a pointer. if you need real touch behaviour (pinch, multi-finger), keep the mouse on default and fix injection through step 4. UHID mouse is the fallback, not the equal.
If it breaks: if the keyboard works but the pointer never shows, the ColorOS build may be filtering the virtual device. try --mouse=aoa instead, which goes over the USB accessory protocol, but note that AOA modes need the USB cable and can interfere with adb on some hosts. if adb drops, go back to uhid for the mouse and keep the keyboard on uhid too.
7. Use OTG mode when injection and UHID are both blocked
OTG mode is the last resort and the most blunt. it makes your PC act as a physical keyboard and mouse over USB, with no screen mirroring and no adb control channel. per the scrcpy OTG documentation, it works even when USB debugging is off, because it never talks to the phone through adb:
scrcpy --otg
Expected output: a small window opens with no video. your keyboard and mouse now drive the phone as if they were plugged in over OTG. you watch the phone itself, or you pair this with a separate mirror (for example a second scrcpy session in video-only mode, scrcpy --no-control, over the same adb link).
If it breaks: OTG needs the phone to accept USB host-style peripherals through the cable. some OPPO phones prompt for the USB mode, so set it to “transfer files” or equivalent. on Windows, a driver conflict can appear because the same USB interface is claimed twice. unplug and replug, close any other adb tool first, then retry. a GUI front end can hold the adb port open too, so if you use one, see best ADB GUI tools and close it before testing.
8. Make the working setup permanent
Once one mode works, save it as a shortcut or script so you don’t retype flags. for example a Windows batch file:
@echo off
adb start-server
scrcpy --keyboard=uhid --mouse=uhid --stay-awake --turn-screen-off
Expected output: double-clicking opens the mirror with input working and the phone screen dark.
If it breaks: --turn-screen-off can interact badly with some ColorOS power settings, where the phone locks and ignores input. drop that flag first. if latency is your complaint rather than input, my notes in best scrcpy configuration for low latency mobile gaming cover bitrate and codec flags.
Common pitfalls
- assuming the cable is bad: if mirroring works, the cable is fine. input is a separate permission from video capture, and ColorOS gates them differently
- forgetting the toggle resets: disable permission monitoring can switch itself back after a reboot or a USB debugging cycle. check it first whenever input silently stops
- mixing flag generations: guides from 2020 to 2022 use older flags, and copying them into a 2026 scrcpy gives “unknown option” errors. check
scrcpy --helpagainst your installed version - expecting UHID mouse to equal touch: it is a pointer, so pinch and multi-touch don’t map over. use it for navigation and typing, not for testing touch gestures
- running two adb clients: a GUI tool, Android Studio and scrcpy all fighting over the adb server causes dropped sessions that look like input bugs. kill the server and start one tool
Scaling this
At 10 phones, the fix is a written checklist. every new OPPO unit gets the same three toggles (USB debugging, permission monitoring, on-screen keyboard setting) set during unboxing, and a saved batch file per device serial. use scrcpy -s <serial> so each window targets one phone.
At 100 phones, hand-clicking toggles stops working, because ColorOS resets them and every phone update can change the labels. you want a provisioning step that verifies input actually works (send a test tap with adb shell input tap and check the result) and flags phones that fail. a hub with proper per-port power matters here, since weak hubs cause the adb dropouts that get blamed on software. if you are weighing what machine drives all of this, do you need a dedicated GPU to run scrcpy covers the host side.
At 1000 phones, you are no longer debugging scrcpy, you are running a device farm, and the per-vendor quirks become a maintenance cost that scales with every ColorOS release. that is the point to look at purpose-built tooling such as the options in best open source Android device farm tools rather than scripting scrcpy per phone.
One practical alternative if the problem is simply that you don’t want to own and babysit OPPO hardware. cloudf.one rents real Android phones in Singapore on dedicated hardware, each with a persistent Singapore mobile IP, controlled from the browser. since control happens in the browser, there is no scrcpy input permission to fight. be clear about the limit though. there is no self-service adb. adb and Appium reach a rented phone only through a WireGuard tunnel that we set up on request by email to [email protected]. and it is Singapore-only, so it won’t help if you need devices in another country or you specifically need to debug a particular OPPO ColorOS build you own.
Where to go next
- the blog index for the rest of the adb and scrcpy how-tos
- Android RPA with adb and uiautomator2 once input works and you want to script taps instead of sending them by hand
- adb bugreport capture and read if a phone still misbehaves after these steps and you need logs to see what ColorOS is rejecting
Written by Xavier Fok
disclosure: this article may contain affiliate links. if you buy through them we may earn a commission at no extra cost to you. verdicts are independent of payouts. last reviewed by Xavier Fok on 2026-10-02.