If you bought a Retroid Pocket 2 and received with it an SD card filled with games, the first advice you will see is to back up the contents of the card immediately, because if you lose it or it becomes corrupted, you cannot get the games back, at least not in any official way. Images for the RetroidOS preload itself are available, but the games are not included.
On the stock SD card, the preloaded game files are in the \games\data folder, and they are encrypted. You can add your own games by placing ROMs under games\download. The internet is filled with discussions of the nature “Accidentally deleted preloaded games / formatted the card; can I get them back?” and the answer is “only if you backed them up or obtain another user’s backup”.
In my case I had a strange problem where one day all games simply disappeared from RetroidOS (the game list was empty), even though they were still physically intact on the card. Resetting settings, uninstalling and reinstalling the Retroid Pocket app from the Android OS – nothing helped.
In the end the fix was simple – by comparing the contents of the card to the backup, I noticed that the \games\data.key file was different. This file contains the decryption key for the preloaded games database. Voilà! I restored this file from the backup, rebooted RetroidOS, and all the games reappeared immediately.
I do not know how the data.key file got corrupted, but in case it happens to you – this is a simple way to regain access to the games without restoring the full multi-gigabyte backup, and you will not lose any settings or saved games either.