Some Samsung user agents have the word "samsung" in them. If you find “samsung” in the user agent string, this is a good indicator. However, most Samsung user agents that I looked at did not contain the word samsung. But there is another check, all samsung model numbers (so far) are in the format "GT-xxxxxx", so we check if the user has the agent "android", and then "GT-" somewhere in UA. (or the word samsung ...) This is obviously a little weaker, but it seems they still like it.
source share