This method has been tested with com.miui.gallery version 2.3.1.2
- Get
/data/data/com.miui.gallery/databases/gallery.db
with a file explorer of your choice - Pull the file to your PC (optional)
- Open the .db(database) file with your SQL inspector of choice (personally recommend dbeaver)
- Execute the following query
select distinct(COALESCE(pth, lf)) as filePath
from (select f.isFavorite isf, f.dateFavorite df, f.sha1 fs, f.cloud_id as fi from favorites f where isf == 1) as ff
left join (select cloud.thumbnailFile pth, cloud.localFile lf, cloud.sha1 as cs, cloud._id as ci from cloud) as cc