Sideloaded Game Ignores Your Controller: Four Layers Behind Broken Button Mapping
You install a game from a third-party site, pair a Bluetooth controller, Android shows it as connected - and in-game nothing works or every button is wrong. This is rarely a fake or stripped APK. Controller input on Android passes through four independent layers: HID descriptor parsing, input event reporting, the app's device support, and the in-game mapping table. Here is how to find which layer is broken using getevent, dumpsys input, and a look inside the APK, plus how per-package signing quietly wipes mapping profiles.
You sideload a game from a third-party site, pair a Bluetooth gamepad, and Android shows the controller icon in the status bar - so the hardware obviously works. Then you open the game: the character does not move when you push the stick, A and B are swapped, the triggers do nothing, or the only thing that works is the on-screen touch controls. You try a second controller. Same result. The natural conclusion is "this APK is a pirated or stripped build."
Most of the time it isn't. Controller input on Android is a chain of four independent layers, and any one broken link produces the same visible symptom: "the controller does nothing." Worse, sideloading hits a trap that store installs never see - in-game mapping profiles are keyed to package name plus signing certificate, so changing the install source silently throws away your mapping. On top of that, repackaged or "lite" builds sometimes ship without the gamepad support libraries entirely.
Below is the chain, layer by layer, with the exact commands to test each one.
1. Identify which of four problems you actually have
| Symptom | Most likely layer | First check |
|---|---|---|
| Controller connected, game completely ignores it | Event reporting / app support | getevent - any events at all? |
| Buttons work but are wrong (AB swapped, stick inverted) | HID descriptor / mapping table | dumpsys input device source |
| Only some inputs fail (triggers, d-pad) | HID descriptor parsing | Controller mode switch (XInput/DInput) |
| Playable only with on-screen touch controls | App deliberately detecting a gamepad | Game settings toggle |
Do not reinstall the game before you know which row you are in.
2. Prove the system receives input at all
With the controller connected, stream raw input events over adb:
adb shell getevent -ltNow press buttons. If the terminal streams EV_KEY / EV_ABS lines, Android is receiving input and the problem lives above the driver - in device classification, app support, or the mapping table. If nothing appears, the problem is at the connection layer: pairing, OTG power, or the controller being in the wrong mode.
Next, ask Android what it thinks the device is:
adb shell dumpsys input | grep -A 20 -i "gamepad\|joystick"Two fields matter:
- Source. It should contain
SOURCE_JOYSTICKorSOURCE_GAMEPAD. If it saysSOURCE_KEYBOARD, Android classified your controller as a keyboard - many mobile games have no keyboard-remap path and will simply ignore it. - Device name and Vendor/Product ID. The same controller can enumerate as two different devices over Bluetooth versus USB, and mapping profiles are saved per device name. A new name means your old profile never loads.
3. Switch the controller out of DInput mode
Most third-party controllers have two modes - XInput (the standard Android/PC gamepad layout) and DInput (legacy direct input) - usually toggled with a button combo such as X + Home.
Tell them apart from dumpsys input: in DInput mode you will see ordinary key codes (KEYCODE_A, KEYCODE_ENTER, KEYCODE_MOVE_HOME) instead of the gamepad range. Switching to XInput and re-pairing resolves "triggers dead" and "d-pad acts like a stick" in one step.
4. Mapping profiles do not travel with the APK
This is the sideload-specific trap. Games that support controllers typically store the mapping in:
/sdcard/Android/data/<package>/files/or in app-private shared_prefs. That storage is isolated by package name plus signer. So:
- The store build and a third-party build of the same game with different certificates are, to Android, two separate apps. The profile does not carry over.
- Uninstalling and reinstalling, or overwriting with a differently signed build, leaves you with an empty or freshly created config directory.
Confirm what you have installed:
adb shell pm list packages | grep -i <name>
adb shell pm path <package>
apksigner verify --print-certs app.apkIf the certificate differs from the build you previously used, do not try to copy the old profile over - signature checks inside the game can reject it, and the profile may reference a device ID that no longer matches. Re-run the in-game mapping wizard instead. It takes two minutes and avoids a category of weird half-working states.
Also confirm the game can actually write where it wants:
adb shell dumpsys package <package> | grep -i "storage\|MANAGE_EXTERNAL"If the game writes to shared external storage without MANAGE_EXTERNAL_STORAGE or the correct scoped-storage grants, the "Save mapping" dialog reports success while nothing is persisted - which looks exactly like a mapping bug.
5. Only now question the APK itself
Check whether this build contains gamepad support at all:
unzip -l app.apk | grep -iE "gamepad|joystick|controller|input"
aapt dump badging app.apk | grep -i "uses-feature\|uses-permission"Two common failure shapes:
- "Lite" / "no-ads" / carrier-customised builds where
lib/has had gamepad-related native libraries stripped. Nothing in Settings can restore what is not in the file. - Missing `<uses-feature android:name="android.hardware.gamepad">` in the manifest, which some game engines use to decide whether to enable the controller code path at all.
Also verify the ABI matches your device. An arm64 phone running a build with only armv7 natives can start the game fine and then fail to load the peripheral module.
6. Quick status table
| Finding | Conclusion | Action |
|---|---|---|
getevent shows nothing | Connection layer | Re-pair, or use a USB-OTG cable |
Events but Source=KEYBOARD | DInput mode | Switch to XInput, re-pair |
| Source correct, game ignores input | Mapping or app support | Rebuild mapping in-game |
| Some inputs dead | Descriptor parsing | Change mode or controller |
| No gamepad libraries in APK | Stripped build | Get the full official build |
7. FAQ
Q1: The system's gamepad test screen responds, but the game doesn't. Why?
System calibration uses the standard input channel; the game reads input through its own engine layer. A responsive test screen proves the hardware and driver are fine - the failure is above them. Look for a controller toggle in the game's settings and check whether a mapping profile exists.
Q2: The controller works in other games but not this one.
That is an app-support problem, not a controller problem. Check whether the game exposes a peripheral option, or whether it only whitelists specific models.
Q3: I switched install source and lost every mapping. Can I copy the old file back?
You can, but expect it to be rejected. Signing differs, so the app sees a different installation, and profiles often embed a device identifier. Redo the mapping in-game.
Q4: The stick drifts - a slight touch moves the character.
That is hardware deadzone, not mapping. Most games expose a deadzone slider; otherwise calibrate the controller's firmware. Raising the deadzone is the standard fix.
Bottom line
"sideloaded game ignores my controller" is not one bug but four possible breaks in one chain. Work the fixed order: `getevent` to prove input arrives, `dumpsys input` to see how Android classified the device, switch to XInput, rebuild the in-game mapping, and only then check whether the APK was stripped. The sideload-specific insight is that a new signing certificate means a new app as far as mapping storage is concerned - so if you changed download sources, plan to remap rather than restore.