Ok, it was much easier than I believed. I just had to
query the contacts.db (I used DB Browser for SQLite) as select vcard from folder_id;.
select all results, copy and paste them into a text file and save this file as contacts.vcf.
open this file in Android, confirming that contacts need to be imported.