Button Mapper

  1. First read Android Debug Bridge for instructions on how to connect to your device.
  2. Install Button Mapper on your device and spend the 2 USD for the pro version
  3. Open Button Mapper App on your device and select + Add Buttons. Press any button, for example the keyboard “F10” key we will remap later, and select the added key with the remote. Now select Customize and try to assign an Action or an Advanced command. Button Mapper will now take you through downloading a setup program for Windows or Mac. This setup program also includes adb.exe, which can be used to enable the necessary permissions on the device.
  4. You can enable the permissions with a USB connection:
    1. connect the Box with a USB-A to USB-A cable to your computer
    2. confirm the connection to the computer on the device
    3. run “ButtonMapperSetup.exe” on your computer and check the textbox to make sure the device is connected
    4. click “Grant WRITE_SECURE_SETTINGS permission” and Exit
  5. If the USB connection does not work, or if the box is not near your computer, run the commands manually:
    1. make sure the Box is connected to the same network as your computer. If you are connecting to a box where the ethernet connection is established through a USB to Ethernet hub (like the Xiaomi Mi Box) make sure to connect through wifi, as the bridge will not work once you enable USB debugging to connect with adb.
    2. open a shell (Command Prompt) on your computer and change to the folder “tools” inside the “ButtonMapperSetup” install folder
    3. enter the following commands within the shell
      adb connect <IP address>
      adb shell pm grant flar2.homebutton android.permission.WRITE_SECURE_SETTINGS
      adb disconnect
      exit
    4. you might need to confirm the connection to the computer on the device after the adb connect command
    5. you might get an error message “error: more than one device/emulator” if an Android emulator such as BlueStacks is installed on your computer
    6. either terminate the emulator (or other device), or issue the following commands to list the devices connected and find and specify the model number in the shell command
      adb connect <IP address>
      adb devices -l
      adb -s model:MIBOX4 shell pm grant flar2.homebutton android.permission.WRITE_SECURE_SETTINGS
      adb disconnect
      exit
    7. remember to connect to the Mi Box S through wireless, as the USB hub with Ethernet cannot be used when “Developper Options” are activ
    8. you might need to reboot the box when reconnecting a USB to Ethernet hub
  6. Disable USB debugging in Settings –> Device Preferences –> Developer options
  7. The Box does not need to be rooted, but you will need the Pro version of the app
  8. Firefox TV is supported on Fire TV only, but runs without problems on Android TV 9 and 11. It requires a “menu” key to pin websites (bookmarks), which is not available on the Box Remote or the Keyboard. Map the “menu” key (keycode: 82) to the NVIDIA Shield's “mute” button (see Harmony Remote below), and to the Keyboard's “F10” key. This allows to invoke “menu” through the Harmony Remote's “menu” button, and through the Keyboard's “F10” key.
  9. The “menu” key is now also available in other apps such as Kodi and is equivalent to a long press of the OK button on the Box Remote and the Harmony Remote (long press of the OK button is not recognized in the Firefox TV app).
  10. Map the “screenshot” action to the double pressed “F10” key for the Keyboard, which allows to take a screenshot when pressing F10 twice. Helpful for creating a user manual for your family members.
  11. Map the “power-dialog” action to the long pressed NVIDIA Shield's “record” button, which allows to invoke the power dialog for rebooting the shield device.