I have a solution to the Kodi joystick problem. I have only tried it on Kodi 21 so not sure if it would work on earlier versions i.e. 20.4 to 21.0
I have 3 kodi boxes 2 64bit and one of the cigar 32bit boxes. The 32bit Kodi cigar box does not have the joystick problem but the 2 64bit boxes does.
1. Ensure you have Kodi 21 installed and configured on your Shield with whatever build you want
2. You will see that the system>input screen, driver settings is greyed out and when you hit peripherals it is blank (no joystick driver)
3. Exit kodi
4. On the shield go into settings>device preferences>storage>Transfer files over network
5. Switch it on and take a note of the IP address username and password
6. Apologies I use a windows desktop but I'm sure you could do this using other devices
7. Open a windows explorer instance (windows key + e)
8. On the address bar put in \\<ip address of the shield> e.g. \\192.168.0.17 and hit return
9. Input the username and password you noted earlier
10. You will get an internal directory coming up
11. Navigate down to \\192.168.0.17\internal\Android\data\org.xbmc.kodi\files\.kodi\addons
12. using chrom/edge browser download garbears kodi 21 retro apk for your device, I have a 64bit Nvidia shield so I downloaded
https://github.com/garbear/xbmc/releases...64-v8a.apk
13. Go to where you downloaded the file using another windows explorer instance (windows key + e)
14. Rename retroplayer-21-20240527/kodi-20240527-366cac13-retroplayer-21-arm64-v8a.apk to retroplayer-21-20240527/kodi-20240527-366cac13-retroplayer-21-arm64-v8a.zip this makes it a simple ZIP file
15. Open the ZIP and navigate to \kodi-20240527-366cac13-retroplayer-21-arm64-v8a\assets\addons
16. Copy the peripheral.joystick folder and paste it into the \\192.168.0.17\internal\Android\data\org.xbmc.kodi\files\.kodi\addons folder which you should have open in another windows explorer window
And that's it. You can close all windows, go to your shield and launch Kodi 21, joystick support will be completely re-enabled and will work the way it did in Kodi 20.3
I would also suggest you switch off auto-updates in the google play store on your shield and only do manual updates as the next version of Kodi will break it.
An alternative would be to remove Kodi 21 from your shield, reboot and side load Garbear's version of Kodi though I like to remain on the main fork.
Hope this helps, I've been having the same problem for quite a while and stayed on Kodi 20.3 for a long time but felt it was time to upgrade.