more or less this - https://old.reddit.com/r/Piracy/comments/g4gb8t/kodi_186_iagl_retroarch_emulation_heaven/
but I installed the kodi libretro things instead of retroarch... which would work too, but I honestly wanted to see if i could keep it all in one app. And it works very well... oddly, thought, I'm struggling to get it to run on my laptop... but it was a breeze on my shield tv