Is there a location tracker installed to my Android phone? I have a Samsung Galaxy S7 phone running stock Android 7.0. It's not rooted. I've left my phone unattended for 10 hours. I don't have a PIN code or any other security measure to unlock the phone, anyone can unlock it with a swipe.

How can I easily figure out if someone (possibly with physical access) has installed a location tracker or some similar unwanted app to my phone? Let's suppose the attacker is not working for Google, Facebook or Samsung, but may also have access to my Google or Facebook account (e.g. by stealing or guessing my password -- I don't have two-factor authentication enabled).

Please note that in this question I'm not looking for advice for protecting my phones and my accounts, I only want to learn about the presence of location trackers and other similar unwanted apps on my phone.
If the device came into possession of an unauthorized person than you should be more concerned whether the device's software integrity is intact or not. Although Android since Nougat informs the user if boot process is compromised (only when booting the device), one can employ a minimal cross-check on their own. 

Some root checker apps attempts to ensure that the software is intact (includes bootloader, kernel and system partition). You can use them to get the state of integrity. Once you are confident here, find out which apps were recently installed. You can use adb to explore the dump of package service (adb shell dumpsys package) or try an app based solution such as Applications Info. It can show the apps by installation date. 

This could single out an app for you. If you find a phishy app, then check out its permissions, location usage, battery usage and data (internet) usage.



That said, if you don't find anything convincing and still remain convinced your device is tampered with and could prove your hunch to yourself with evidence (such as high battery consumption suddenly; location icon toggling in status bar, or anything that is weird or incompatible with your daily routine and usage), than I'm afraid I don't have a single source to help out.

Based on your evidences or observations, you would have to figure this out on your own. As an example, for sudden high battery consumption, you can check with Battery usage history in Settings app. Same goes for Location and data usage. Android shows the usage app-wise. 

You can also search into detailed usage output of battery, location, data usage and many more important services through dumpsys utility, which requires adb usage.