The answer you linked is giving the instructions for people to copy a KeyLayout file (
Vendor_045e_Product_0291.kl) to another file (
Vendor_045e_Product_0719.kl), so that the Operating System can match the product ID1 of your device against the KeyLayout file intended for an older (but compatible) version of the device.
However, the description of your problem isn't enough to give a conclusive answer.
From what I know, the controller will be able to work with an Android device even though it is not visually "pairing" (as indicated by the LEDs around the XBox button).
To connect to your controller, the android device will require an existing driver in the first place.
So the first thing you should do is plug it, follow the steps you have followed the first time you connected your controller to your computer2, and then try the controller out. This will help you determine if there is a driver present for the device: If yes, using it should allow to change the selection of your icons on your desktop, or at least have a visual effect upon activation. Else, chances are that you are missing the driver for the XBox controller; which is a much more difficult file to find than a configuration file (such as a KeyLayout file).
In case you are missing a driver:
Drivers need to fit your hardware (architecture, devices) and software (kernel, possibly libraries). You usually cannot transfer them around between devices and have them "just work". If you miss a driver, you will need to get one that matches the exact same android version and the exact same hardware (i.e one precisely for your controller)
So, short of finding a pre-compiled driver for your device somewhere, you would need to find the source code for this driver and compile it yourself; which isn't an easy task3 and then, even if you have the sources, you would need to compile them, probably without documentation or assistance, which will certainly prove challenging.
You however have a few options to try, before giving up, if you are missing the Xbox controller driver for your Galaxy Tab:
- Find a compatible driver on your device and copy (or symlink) it to the right folder/file for the driver. Then add it to the modules loaded at boot time.
- Find a compatible driver on a similar device (same list of drivers as in the previous point; but this can be tricky since it is a differing device, and will involve a lot of trial and error) and perform the operations described in the previous point.
- Find the source code for the driver (or a reverse-engineered version of it) and try compiling it until you succeed (Good luck!)
- Find assistance in some android development boards (XDA, etc.) or chats (the IRC channel of LineageOS - formerly known as Cyanogenmod) to learn how to solve this problem yourself.
Note that I tried to sort those options in an ascending time cost manner, so that the first ones should yield a (positive or not) result faster.
Also, an important note is that I was told on the LineageOS IRC channel that it is usually easier to re-build the whole image for a device than to add a driver to it.
In case you are just missing the KeyLayout file:
If your controller "sort of" works but you are getting unwanted behavior with it, you are most probably missing a KeyLayout file.
This is the problem that corresponds to the solution you are describing in your question.
However, you cannot take a random KeyLayout file, copy it over with the
Vendor_045e_Product_0719.kl4 name, and expect it to work.
The file that you would copy to
Vendor_045e_Product_0719.kl should match the configuration of your input device, or it will not solve the problem of having an inconsistent input. (
Vendor_045e_Product_0291.kl should such a file, since it is for the XBox 360 Wireless Controller, but maybe there are others: search (on your favorite search engine - a quick search gave me
045E:02A1, and maybe also
045E:028F) what ProductID the Xbox 360 controllers can have, to get the full list).
You can also attempt to create the missing KeyLayout file by following the process described here.
In any case, if your controller is recognized but has the wrong behavior, it is a much easier problem to solve.
- When using USB connections (but not only), devices are identified with a Vendor ID and a Product ID, each being four hexadecimal characters long - or 2 bytes - and usually written down like:
XXXX is the vendor ID and
YYYY is the product ID. In your case that would give
045E is a vendorID from Microsoft).
- First press the button on the receiver to set it to "pairing mode" and then press the paring button on the controller - and do not worry about the LEDs flashing, it may keep doing that, yet work.
- Finding the sources for a proprietary technology from Microsoft isn't usually easy - and if you find some sources, they will probably be unofficial sources written via reverse-engineering (so they may have issues and glitches).
- While possible, it is NOT GUARANTEED that the
045E:0719 hardware identifier is the one of your device. If it is not, you will need to find the correct hardware identifier before continuing. To find out if it is, use
lsusb on GNU/Linux or the Microsoft® Windows™ Device Manager while plugging your XBox 360 Wireless Receiver to your computer.