====== Android Debug Bridge (adb) ======
To improve usability and user experience of the system remap some of the keys of the Logitech Harmony Remote and the Logitech Keyboard. Note that the Mi Box S bluetooth remote is compatible with the NVIDIA Shield remote, which we will use when setting up the Harmony Remote.
- To install adb on your computer, follow [[https://www.xda-developers.com/install-adb-windows-macos-linux/|How to install ADB on Windows, macOS, and Linux]] (beginner's guide) and read [[https://developer.android.com/tools/adb|Android Debug Bridge (adb)]] (Android adb documentation). You will need it to interact with your device in the following cases:
* change settings, for example when using the [[android:buttonmapper|Button Mapper]]
* copy files and folders into an apps restricted storage space
- Enable **USB debugging** in //Settings --> Device Preferences --> Developer options//. You might need to //Revoke USB debugging authorizations// first if the device does not prompt you to allow connections from your computer.
- Connect and disconnect to the device on default port 5555adb connect
adb disconnect
exit
- You will need to confirm the connection on your device the first time you connect
- List connected devices withadb devices -l
- Make sure there is only one device listed, otherwise you need to specify the device the command should be sent to for every adb command
- To create a folder and copy a file to it, follow the example of adding a font file to kodi's settings directory, the file system path of ''/storage/emulated/0/'' can usually be accessed with the alias ''/sdcard/'' and is equivalent to ''Main Storage/'':adb shell mkdir -p /sdcard/Android/data/org.xbmc.kodi/files/.kodi/media/Fonts
adb push /sdcard/Android/data/org.xbmc.kodi/files/.kodi/media/Fonts/
- To copy an entire folder from your computer to the device copy the folder with a file manager app to a location on your device outside of the restricted app storage, for example ''/sdcard/Download/''. After that open a adb shell and move the folder to the app storage space, here I use as example a custom skin folder for Kodi:adb shell
$ cd /sdcard/Android/data/org.xbmc.kodi/files/.kodi/addons/
$ mv /sdcard/Download/skin.estuary.custom .
$ exit
- I'm using FX file manager which is available for Android TV. The paid version (3 USD) allows to copy from a network path which is great as you don't need to continuously plug and unplug a USB drive.
==== Links ====
* [[https://forum.kodi.tv/showthread.php?tid=372801&pid=3149728#pid3149728|Android TV 11 OS unable to add custom subtitle font]]