[Fire TV General] LazorBlind:
This is a tutorial on how to get an official Sony brand Dualshock 3+Sixaxis Controller (AKA PS3 controller) working on your Fire TV over USB.

This has been tested on confirmed working on the Fire TV 2 (Sloane) but will presumably work on all generations and versions of Fire TV as long as it is rooted.

WHAT YOU WILL NEED:

-Root Access (required for joy to touch feature, with apparently must be activated to use the feature that emulates other controllers)

-A Terminal Emulator app or ADB

-SELinux set to "Permissive" (I use the app SELinux Mode Changer)

-The following apps installed:

*USB/BT Joystick Center

*Sixaxis Enabler

-Mouse (any USB or Bluetooth mouse should be fine. I use a logitech K400+ Keyboard With Touchpad)

OR

-Mouse Toggle app

-Powered USB Hub (Only if your mouse is USB)

OPTIONAL: My supplied keymaping file

This is a pretty straightforward process, in all reality. Here are the steps.

1. Install USB/BT Joystick Center. I have included the APK for an older free version of the app, but I would suggest obtaining the latest "Gold" version, which is for sale on Google Play.

2. Open your ADB connection or Terminal Emulator of choice, enter a root shell with "su" and enter the following commands:

ime enable com.poke64738.usbjoygold/.USBJoyIME
ime set com.poke64738.usbjoygold/.USBJoyIME

OR

ime enable com.free.usbjoyfree/.USBJoyFreeIME
ime set com.free.usbjoyfree/.USBJoyFreeIME

Depending on if you are using the paid 2019 Gold version, or the free 2018 version, respectively.

Then you may close your ADB or terminal. Honestly I'm not entirely sure this is even needed, since we are going to be using gamepad emulation, but I would say to do it just in case.

3. Install Sixaxis Enabler, open it, and follow the instructions on screen. Allow the app to access the USB Device when prompted

NOTE: Sixaxis Enabler may tell you that your firmware does not support Sixaxis and that the service is stopped. In that case Keep disconnecting the controller and reconnecting it and pressing the PS Button. "Eventually it will say Sixaxis ENABLED Please Try buttons and sticks"

This is NOT a free app and is available for purchase on Google Play.

When you get "Sixaxis ENABLED" the four LEDs will stop blinking and just LED 1 will blink. If you keep getting the not supported message, and your LED 1 blinks, continue because you might still be able to get it to work.

4. Exit Sixaxis Enabler and open USB/BT Joystick Center. For this you will need some sort of mouse functionality.

Check in the upper left of the screen and make sure that the IME switch is orange and says "ON" (this should be the case, as we have already enabled and set the IME in ADB/Terminal)

With your mouse, click the IME switch and it should bring up a little menu. Click on USBJoyIME and the menu will close. This was just to be absolutely sure that the IME was FOR SURE selected.

5.Below the IME switch, there is a oval shaped cluster of buttons that will say "Search, Auto, Norm, HID"

Click "Norm" and then click allow on the prompts to access the USB Device. (if you have multiple devices connected over USB, it will ask for each device. You do NOT need to allow them all if you do not wish, a black notification at the top of the screen will tell you what device it found so you know what the app is requesting access to. I just click allow on all because it doesn't hurt anything)

After it gets trough all the USB devices, it will start a check for bluetooth devices, and will show a prompt with your paired devices on it, you can just click back on your Fire Remote or keyboard.

After a few seconds, a gray square will appear on the screen that says "PS3 USB Controller and LED 1 on your PS3 controller should now be solid. With your mouse, click on the square. A little black text box will say something about loading a keymap file. If you click some buttons on your controller, you should see the little boxes underneath the big gray box blinking orange and white when you press them. CONGRATS! You now have your PS3 controller working on your Fire TV.

Don't be content yet, WE ARENT DONE.

While this is a somewhat functional way to control your Fire TV, I don't find the default settings to be optimal. It seems like I can't rapidly press buttons. I can enter in two or three button presses before it stops accepting input for a moment. Also, despite all the controller buttons working on the test in USB/BT Joystick center, the default keymap is NOT properly configured for the Fire TV, and I was only able to get the D-pad to work outside of Joystick Center.

Instead of fussing around trying to get everything working with the default IME setting, I decided to use the app's built in controller emulation feature to simulate an Xbox 360 controller. (There is also a setting to emulate a PS3 controller, but I figured it would be better to make the system think I'm using a 360 controller, which is officially supported, then a controller that I had to install off of this stuff just to use) So onto Step...

6. With your mouse, go to the upper right and click the switch "J>T"

If you do not Already have SELinux set to Permissive, it will give you a message saying that this must be done. Do so however you want, but as mentioned above, I use the app "SELinux Mode Changer" to achieve this. The app can be found on F-Droid

With SELinux set to Permissive, give USB/BT Joystick Center Superuser rights when prompted, and the switch will turn ON.

Once "J>T" is on, to the left of that you will see the Green "JOY>" switch and a small box next to it that says "IME NAT 360 PS3"

Just click the box until "360" is selected

From here you can use the little boxes underneath the "PS3 USB Controller" box, or just load my keymap file, in order to configure the buttons and sticks properly. If you use my keymap file, down load "PS3to360_JoyPrefsFile_1356_616_0.xml" from the attachments and paste it into the folder for USBJoy in the root of your Fire's internal memory (for me it is called "USBJoyGoldData") then use the little load button and it should appear as "PS3 to 360"

With that out of the way, you are finally DONE! Your Dualshock 3 controller is connected and configured to act as an Xbox 360 controller on your Fire TV and you may now proceed to use it on your games, Emulators, or whatever you want to do with it!

When you are done, just make sure to disable "J>T" with Joystick center before you disconnect the Dualshock, otherwise things will bug out, and if you arent using an alternate launcher with mouse support, you wont be able to re-enter the app to disable it, and will have to reboot the Fire TV.

I would also suggest disabling USBJoyIME when you are not using your controller, as I have noticed that typing with my K400+ keyboard acts strange on some apps, such as Puffin Browser, when it is still enabled.

ime disable com.poke64738.usbjoygold/.USBJoyIME

OR

ime disable com.free.usbjoyfree/.USBJoyFreeIME

Feel free to play around with the different gamepad emulation modes, and if you find a better configuration, please do share it on here!