I understand your frustration—this sounds like a common issue on Android TV devices (like Xiaomi TVs) where USB controllers or gamepads can send input signals that the system interprets as global shortcuts or keycodes (e.g., mimicking a remote control button that launches Netflix or Prime Video). This interferes with RetroArch's input mapping process because the button press gets "hijacked" by the TV's OS before RetroArch can register it.
Don't worry, we can work around this. I'll guide you step-by-step to map your USB stick controller (I'm assuming it's a USB gamepad, like a retro-style controller or something similar). We'll focus on preventing the system from intercepting the inputs first, then mapping in RetroArch. This assumes you have RetroArch installed via the Google Play Store or sideloaded on your Xiaomi TV.
Step 1: Basic Setup and Troubleshooting
-
Connect Your Controller Properly:
- Plug the USB controller into one of the TV's USB ports. Ensure it's a compatible gamepad (e.g., HID-compliant like 8BitDo, generic SNES-style, or Xbox-style). If it's wireless, make sure the USB dongle is connected.
- Restart your Xiaomi TV to ensure the controller is detected fresh.
- Use your TV remote (or a mouse/keyboard if you have one connected) to navigate menus—don't touch the controller yet to avoid triggering apps.
-
Test for System Interference:
- Open a neutral app like the home screen or a file manager.
- Press a button on the controller. If it still opens Netflix/Prime, note which buttons do this (e.g., D-pad, A/B buttons). This confirms the inputs are being treated as system hotkeys (common on Android TV for media apps).
-
Update RetroArch and System:
- Ensure RetroArch is updated to the latest version (check in Google Play or download from the official site if sideloaded).
- Update your Xiaomi TV's firmware via Settings > Device Preferences > About > System Update. Sometimes firmware bugs cause input issues.
If the problem persists, proceed to the workarounds below.
Step 2: Disable or Remap System Shortcuts (Prevent App Launches)
The key is to stop the TV from launching apps when you press controller buttons. Android TV doesn't have built-in tools for this, so we'll use apps or ADB (Android Debug Bridge) if needed.
Option A: Use Button Mapper App (Easiest, No Computer Needed)
Button Mapper is a free app that can intercept and remap hardware inputs on Android TV, preventing them from triggering system actions.
-
Install Button Mapper:
- On your Xiaomi TV, go to Google Play Store and search for "Button Mapper" (by flar2). Install it. (If it's not available, sideload the APK from a trusted source like APKMirror using a USB drive or Downloader app.)
-
Configure Button Mapper:
- Open Button Mapper.
- Grant it accessibility permissions (it'll prompt you—follow the on-screen instructions).
- In the app, add your controller as a "device" if it detects it (it might show up as a generic HID device).
- For each problematic button (e.g., the one opening Netflix):
- Select the button/input.
- Set the action to "Do nothing" or remap it to a neutral action like "Volume Up" (something that won't launch apps).
- Enable "Customize" and test by pressing the button—it should no longer open Netflix/Prime.
- Save changes and exit.
-
Test: Press buttons on the controller. They should now be "silent" at the system level, allowing RetroArch to capture them.
Option B: Use ADB to Disable Shortcuts (If You Have a Computer)
If Button Mapper doesn't work or you prefer a more technical fix, use ADB over Wi-Fi or USB to remap or disable the app-launching packages temporarily.
-
Enable ADB on Xiaomi TV:
- Go to Settings > Device Preferences > About > Build (tap 7 times to enable Developer Options).
- In Developer Options, enable "USB Debugging" and "ADB over Network" (note your TV's IP address from Settings > Network).
-
Set Up ADB on Your Computer:
- Download ADB tools (Platform-Tools) from Google's developer site.
- Connect your computer to the same Wi-Fi as the TV.
- Open a command prompt/terminal and run:
adb connect [TV_IP_ADDRESS]:5555 (e.g., adb connect 192.168.1.100:5555).
- Accept the prompt on your TV.
-
Disable Netflix/Prime Shortcuts:
- Temporarily disable the apps:
adb shell pm disable-user --user 0 com.netflix.ninja (for Netflix)
adb shell pm disable-user --user 0 com.amazon.amazonvideo (for Prime Video, app name may vary—check with adb shell pm list packages | grep amazon).
- This stops them from launching via shortcuts. You can re-enable later with
pm enable instead of disable-user.
-
Remap Keys (Advanced):
- If specific keycodes are the issue, use ADB to remap: Install an app like "External Keyboard Helper" or edit key layouts via ADB (this is more complex—let me know if you need detailed commands).
After this, button presses shouldn't launch apps anymore.
Option C: Quick Fixes If Above Isn't Possible
- Disable Quick Launch Buttons: In Xiaomi TV Settings > Apps > See all apps > Netflix/Prime > Set as default or check for "Open by default" and disable links.
- Use a Different USB Port: Sometimes ports are configured differently.
- Factory Reset TV Apps: As a last resort, reset the TV (Settings > Device Preferences > Reset), but back up first.
Step 3: Map the Controller in RetroArch
Now that system interference is minimized, let's map the inputs.
-
Open RetroArch:
- Use your TV remote to launch RetroArch and navigate to Settings > Input > Port 1 Binds > Device Type. Set it to something generic like "Joystick" or your controller's type if listed (e.g., "Retropad").
-
Start Input Binding:
- Go to Settings > Input > Port 1 Controls > Bind All (or User 1 Bind All).
- RetroArch will prompt you to press buttons for each action (e.g., "Press button for Up", "Press button for A", etc.).
- Now press the corresponding button on your USB controller. Since we've blocked system shortcuts, it should register properly without opening other apps.
- If it times out or skips, increase the timeout in Settings > Input > Input Bind Timeout.
- For D-pad or analog sticks, move them when prompted.
-
Auto-Configure If Possible:
- If manual binding fails, try Settings > Input > Autoconfig > Enable Autoconfig. RetroArch might have a pre-made profile for your controller (e.g., for popular USB gamepads like Logitech or generic SNES).
- Download community autoconfigs if needed (from RetroArch's online updater).
-
Test the Mapping:
- Load a core (e.g., NES or SNES) and a ROM.
- Test all buttons in-game. If something feels off, go back to Port 1 Controls and rebind individually.
- Save the configuration: Main Menu > Configuration > Save Current Configuration.
If This Doesn't Work
- Controller Compatibility: Not all USB controllers work perfectly on Android TV. Test it on a PC with RetroArch to confirm it's not hardware faulty. If it's a cheap/generic one, consider a known compatible model like 8BitDo SN30 Pro (USB mode).
- Alternative Apps: If RetroArch keeps failing, try a different emulator like Lemuroid or RetroX, which might handle inputs better.
- Logs for Help: In RetroArch, enable logging (Settings > Logging > Logging Verbosity > Debug) and check for errors related to input. Share them here if needed.
- Xiaomi-Specific Issues: Some Xiaomi TVs have aggressive input handling. Search forums like XDA Developers or Reddit (r/RetroArch or r/AndroidTV) for "Xiaomi TV controller Netflix".
If you provide more details (e.g., exact controller model, RetroArch version, or what buttons trigger which app), I can give more tailored advice. Let's get this sorted!