Samsung's "Gallery" does a fantastic job at automatically / on its own assigning "tags" to photos, making it easy to find photos with certain keywords (e.g. "sunset" or "furniture" or what not). Where exactly are these tags stored and will they be preserved / usable downstream, i.e. in non-Android photo management / digital asset management software?

Further comments:

Alternatively / similarly, "Google Photos" has a similar feature as Samsung's "Gallery" and it seems that the former app's photo metadata is stored in JSON file(s) which can be "merged" with the JPG's, cf., for instance, https://metadatafixer.com/how-it-works (which goes via takeout.google.com).

The trouble for me here is that Google does not store the photo's originals for free, or at least then I would have used up my free storage years ago... and hence that export route would only export lower-resolution images... sub-ideal...

Related links:

Originally posted earlier this month here but sense it might be more photography-software specific than android specific... anyway, still unanswered / unsolved; might need to delete it there or something... haven't yet read through all the meta's on the subject, e.g. this one or that one.

  • 1
    \$\begingroup\$ Did you try to transfer the picture to your PC and to look at the metadata with ExifTool or similar (assuming the transfer software isn't ripping out the metadata for privacy reasons). \$\endgroup\$
    – xenoid
    Commented Mar 1, 2022 at 0:04
  • \$\begingroup\$ @xenoid Fair point; I should test that and report back. If I just connect the phone and copy an individual jpg over I'd expect quite a few meta tags to be lost (e.g. "furniture"), but I'll post back with evidence either way... Maybe instead of just copy-pasting the jpg I'd need to use some proprietary Samsung (Windows) software to preserve these tags... tbd... \$\endgroup\$ Commented Mar 1, 2022 at 10:19
  • 1
    \$\begingroup\$ It's not the PC side I'd worry about. The tags could be removed by app on the Android side. Try to connect you phone as a USB mass storage to your PC, and copy the files by drag and drop in the explorer. This should avoid any interference. \$\endgroup\$
    – xenoid
    Commented Mar 1, 2022 at 10:34
  • \$\begingroup\$ @xenoid Copy-pasted an image file from the Android device (Samsung) and ran 'exiftool filename.jpg' for a file which would appear when searching for "furniture" (and perhaps other keywords too) in Android - but "furniture" does not appear via that command yet. Haven't yet looked more deeply into the tool but imagine that there ain't much more attached to that jpg. Or is there? \$\endgroup\$ Commented Mar 13, 2022 at 20:51
  • \$\begingroup\$ What is the data transfrerred when you copy/paste the only good way is to transfer files with trustable utilities. Perhaps import a md5sum/sha1sum utility on both the phone and the PC, and a transferred should have the same hash on both sides. Until you have done that you can't really tell (though having the exact same size in bytes may give some hope). \$\endgroup\$
    – xenoid
    Commented Mar 13, 2022 at 21:10

1 Answer 1


TLDR: huge app, no easy way to explain how it works, let alone how to alter or export this data.

The Question

Looking at all the references you've added to the question I can only assume you've done quite some research already. Honestly it seems like that is the best approach to find a documented way to merge Samsung specific data into your workspace.

I don't have any personal experience using the Samsung Gallery app. I do have som general remarks that might (or might not) help you in this Quest.

The Problem(s)

To start with it's a huge app with a ton of features, requirements, permissions, dependencies... so it's likely:

  1. not very easy to simplify
  2. not openly documented

Also be aware that there will be multiple versions of this app around. Looking at apk mirror websites I've seen major version 14. Plus not all Samsung devices might support the latest version. Plus internally they could simply change the implementation w/o warnings since it's not a public API to begin with.

A (very) Quick Look in Code

All that said I briefly looked at code. This is only to give an insight on how it works. By far a solution since this doesn't reveal any public API one could use.

If you want to do so yourself you can extract the apk from your device or find other sources for a specific apk version and then look for the right tools to look into its content. Don't trust any archive downloaded from The Internet though, especially not when it states it's scanned and safe ;-).

This is what I found (and what matches what I would expect to find).

package com.samsung.android.gallery.module.tag;

This is just where it's internally located, this specific part of code that might be related to how tags are added to pictures.

import android.database.Cursor;
import android.util.LongSparseArray;
import com.samsung.android.gallery.module.dal.abstraction.query.QueryParams;
import java.lang.String;
import java.util.ArrayList;

These are some imports of dependencies, the first and third stand out to me since the first indicates the use of a database system on the device. So meta tag data is highly likely stored on the device in a proprietary format.

The third import shows there is module abbreviated DAL standing for Data Access Layer and that it uses QueryParams to retrieve meta tags you're looking for from the dataset.

public class UserTagManager extends Object {

  private static LongSparseArray mTagListMap;

  static void <clinit>() { ... }

  public static void a(long, QueryParams) { ... }

  public static void addTagData(long, ArrayList) { ... }

  public static void addTagData(ArrayList, String) { ... }

  private static ArrayList getTagList(long) { ... }

  private static void lambda$loadInternal$1(long, QueryParams) { ... }

  private static ArrayList loadInternal(long) { ... }

  private static ArrayList loadTagList(Cursor) { ... }

  public static void removeAllData(long) { ... }


This doesn't add much info to be honest. The public methods are those that could be exposed through an API. Honestly Samsung doesn't have any benefit at this point (that I see) to expose this so I wouldn't expect to find much more.

Even here all I see is a way to addTagData and a way to removeAllData.


At this point you could dig deeper into code but I wouldn't recommend spending time on that. You'll probably have more luck contacting Samsung asking for ways to achieve your goal.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.