Hi Iņigo,
I experimented with
SQLite2009Pro (Freeware version) and added two png files to the shortcut. On my DR1000 (with first R2 beta) it shows the correct thumbnail in the SD Card view. (Although its name is still Osmo.desktop and not the name specified in the desktop file.)
I opened the global.db file and searched for the Osmo.desktop file in file_metadata-table. I used its file_id and added a new row in the thumbnails-table with the same file_id. I created two thumbnails of size 60x60 and 120x120 with gimp and added them to the new row as well.
So the mechanism seems to work, I suspect the lua script still does something wrong (or maybe something changed in the 2nd beta that breaks the mechanism).