Using the "adb shell dumpsys activity" command to see the tasks that the system is running, you will see:
activity MANAGER Activities (Dumpsys activity Activities) Stack #0: Task ID #1taskrecord{42db5500 #1 A=com.google.android.googlequicksearchbox u=0 Sz=1} Intent {Act=android.intent.action.main Cat=[android.intent.category.home] flg=0x10600000 cmp= com.google.android.googlequicksearchbox/Com.google.android.launcher.GEL} Hist #0:activityrecord{42db39f8 u0 com.google.android.googlequicksearchbox/Com.google.android.launcher.GEL T1} Intent {Act=android.intent.action.main Cat=[android.intent.category.home] flg=0x10000000 cmp= com.google.android.googlequicksearchbox/Com.google.android.launcher.GEL} processrecord{42db63481118:com.google.android.googlequicksearchbox/U0a19} Running activities (most recent first): Taskrecord{42db5500 #1 A=com.google.android.googlequicksearchbox u=0 Sz=1} Run #0:activityrecord{42db39f8 u0 com.google.android.googlequicksearchbox/Com.google.android.launcher.GEL T1} mresumedactivity:activityrecord{42db39f8 u0 Com.google.android.googlequicksearchbox/Com.google.android.launcher.GEL T1} Stack #1: Task ID #47taskrecord{42f32108 #A=COM.BAIDU.DFC u=0 Sz=1} Intent {Act=android.intent.action.main Cat=[android.intent.category.launcher] flg=0x10200000 cmp=com.baidu.dfc/. Module.mainhome.activity.HomeActivity bnds=[279,751][540,1071]} Hist #0:ACTIVITYRECORD{4310E1A0 u0 com.baidu.dfc/. Module.mainhome.activity.HomeActivity t47} Intent {Act=android.intent.action.main Cat=[android.intent.category.launcher] flg=0x10200000 cmp=com.baidu.dfc/. Module.mainhome.activity.HomeActivity bnds=[279,751][540,1071]} processrecord{425d519013633:com.baidu.dfc/u0a497} Task ID #35taskrecord{437f1720 #I=com.android.settings/.applications. Installedappdetailstop u=0 Sz=1} Intent {Act=android.settings.application_details_settings dat= Package: COM.BAIDU.DFC flg=0x10c08000 cmp=com.android.settings/. Applications. Installedappdetailstop} Hist #0:activityrecord{42d0dfa8 u0 com.android.settings/. Applications. Installedappdetails T35} Intent {Act=android.settings.application_details_settings dat= Package: COM.BAIDU.DFC flg=0x10c08000 cmp=com.android.settings/. Applications. Installedappdetails} Running Activities (most recent first): taskrecord{42f32108 #A=COM.BAIDU.DFC u=0 Sz=1} Run #0:activityrecord{4310e1a0 u0 com.baidu.dfc/.module.mainhome.activity.homeactivity T47}
The [Android] adb command dumpsys activity to see activity in a task. (uninstall virus)