Years after the smartphone boom, there are hundreds of different Bluetooth controllers for Android. Most of them work just fine out of the box, but there are exceptions, like Microsoft’s new Bluetooth-equipped Xbox One S controller.

The controller connects fine, but due to Microsoft’s firmware, the buttons are all scrambled and you can’t play standard games easily. If you want to manually edit the inputs for your controller, you’ll need a rooted phone, a file explorer with root abilities (we’ll use Root Explorer) and a bit of experience editing system files.

NOTE: If you can’t root your phone (or simply don’t want to), you still have options—albeit more limited ones. Any game that allows you to manually remap the controller configuration, including almost any retro console emulator, should be able to work with the Xbox One S controller after changing the configuration. However, to get it working properly with any game, you will need root.

Step One: Download the Custom Layout

When the updated One S controller first came out, some enterprising Android users created a custom layout file that corrects the scrambled button input. It’s hosted on Google’s Issue Tracker, here: press the “Download” button under “Vendor_045e_Product_02e0.kl”. This is a custom keyboard layout file that you’ll place in the System partition of your phone.

Download the file directly to your phone, or copy it from your computer to your phone over USB. On Chrome, the file should download to the default Download folder.

Step Two: Copy the Layout File

Open your root-enabled file explorer and navigate to the file you just downloaded (by default, it’ll probably be in /sdcard/download ). Select and copy the file.

Now head for the folder holding the keyboard layout files, /system/usr/keylayout . Paste the file into the folder. If you get a root mount prompt from the app, accept it.

Step Three: Reconnect Your Controller and Start Gaming

Once the file is in the correct folder, reboot your phone and re-connect the One S controller over Bluetooth.

Then, start up any game with controller support, and you should be able to play it normally!

If The Controller Still Doesn’t Work

If you also own an Xbox One and you’ve used your controller on your console, it may have updated the controller’s firmware automatically. If that’s the case, the modified layout might not work. Try renaming the layout file “Vendor_045e_Product_02fd.kl” and repeating the steps above. If that doesn’t work, check the permissions of the file and change the code to 644 (as shown above). Hopefully, that’ll get things up and running for you.