Recent activities log
For Lollipop do adb shell dumpsys activity recents. For some earlier Android version, run adb shell dumpsys activity activities.

Alternatively, you may run adb shell dumpsys activity | grep -i run as noted by loeschg here.

You would get a list of recent apps' package name, component (activity) name, flags among other things. 

In Lollipop, if you've root access, you can browse to /data/system/recent_tasks/. You'll find some XML files with numeral names, such as 317.xml. Each of them consists of the same aforesaid details, but each XML file is created for an individual app. 

You can also get some info from adb shell dumpsys usagestats.