[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-203791-105":59,"doc-detail-203791-en":131},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":124,"head_meta":126,"extra_data":128,"updated_unix":130},105,"en","android-activity-manager-am-command-cheat-sheet","Android Activity Manager (am) - Command Cheat Sheet","","Android Activity Manager (am) command references for managing and debugging app lifecycle behavior from the command line. Covers process control such as killing background processes and stopping target apps by package, plus launching activities via intent specifications. Includes profiling tools to start and stop profilers, output results to files, and repeat launches for stress testing. Also documents instrumentation and monitoring commands for crashes and ANRs, with options for user context, emulator display compatibility, and performance-oriented raw outputs.",{"@graph":69,"@context":123},[70,84,106],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":30,"@type":76,"position":81},"https://docshare.wps.com/document/technology/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/android-activity-manager-am-command-cheat-sheet/203791/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/android-activity-manager-am-command-cheat-sheet/203791.png","ImageObject",300,407,{"name":92,"@type":93},"Aurelia","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-10-09","2026-09-04",true,{"@type":102,"interactionType":103,"userInteractionCount":105},"InteractionCounter",{"@type":104},"ViewAction",11,{"@type":107,"mainEntity":108},"FAQPage",[109,115,119],{"name":110,"@type":111,"acceptedAnswer":112},"How do you start an activity using am?","Question",{"text":113,"@type":114},"Use start [options] \u003CINTENT> with an intent specification. Add flags like -D to enable debugging and -W to wait for launch to complete.","Answer",{"name":116,"@type":111,"acceptedAnswer":117},"How can you kill processes for a specific Android app package?",{"text":118,"@type":114},"Use kill [options] \u003CPACKAGE> to terminate safe processes associated with the package name. Use the user option to target specific users (or all/current).",{"name":120,"@type":111,"acceptedAnswer":121},"How do you profile an app with am?",{"text":122,"@type":114},"Use profile start \u003CPROCESS> \u003CFILE> to begin profiling and profile stop \u003CPROCESS> to stop it. Related options include -start-profiler \u003CFILE> and P \u003CFILE> to stop profiling when the app becomes idle.","https://schema.org",{"og:url":83,"og:type":125,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":127,"canonical":83},"index,follow",{"doc_id":129,"site_id":62},203791,1788563906,{"code":4,"msg":5,"data":132},{"doc_id":129,"user_id":133,"nickname":92,"user_avatar":134,"doc_module":4,"category_id":29,"category_name":30,"doc_title":65,"doc_description":67,"doc_content":135,"file_id":136,"file_url":137,"file_type":138,"file_size":139,"view_count":105,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":14,"language":140,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":67,"update_tm":130,"read_time":24},1099514068365,"https://ap-avatar.wpscdn.com/avatar/10000253d8d9f28188e?_k=1776742907772140068","Android Activity Manager (am) Cheat Sheet  \nby Ryan Johnson (CITguy) [via](via cheatography.com/138/cs/870/)[ cheatography.com/138/cs/870/](via cheatography.com/138/cs/870/)  \nam commands  \nkill-all  \nKill all background processes  \nprofile start \u003CPROCESS> \u003CFILE>  \nStart profiler on \u003CPROCESS> , write results to \u003CFILE>  \nprofile stop \u003CPROCESS>  \nStop profiler on \u003CPROCESS>  \nscreen-compat [on|off] \u003CPACKAGE>  \nControl screen compatibility mode of \u003CPACKAGE>  \ndisplay-size [reset|\u003CWxH>]  \nOverride emulator/device display size  \ndisplay-density \u003Cdpi>  \nOverride emulator/device display density  \nto-uri \u003CINTENT>  \nPrint the given intent specification as a URI  \nto-intent-uri \u003CINTENT>  \nPrint the given intent specification as an intent: URI.  \nclear-debug-app  \nClear the package previous set for debugging with set-debug-app  \nam command : set-debug-app  \nBy Ryan Johnson (CITguy)  \n[cheatography.com/citguy/](cheatography.com/citguy/)  \nam command : broadcast  \nam command : instrument  \ninstrument[options] \u003CCOMPONENT>  \nStart monitoring with an Instrumentation instance. Typically the target \u003CCOMPONENT> is the form \u003CTEST_PACKAGE> /\u003CRUNNER_CLASS> .  \n-  \n-  \n-  \n-  \n-  \n-  \nr  \nPrint raw results (otherwise decode \u003CREPORT_KEY_STREAMRESULT>) . Use with [-e perf true] to generate raw output for performance measurements.  \ne \u003CNAME> \u003CVALUE>  \nSet argument \u003CNAME> to \u003CVALUE> . For test runners a common form is-e  \n\u003Ctestrunner_flag> \u003Cvalue>[, \u003Cvalue> ...]  \np \u003CFILE>  \nWrite profiling data to \u003CFILE>  \nw  \nWait for instrumentation to finish before  \nreturning. Required for test runners.  \n-no-window-animation  \nTurn off window animations while running  \n-user [\u003CUSER_ID>]  \nSpecify which user instrumentation runs in; current user if not specified  \nam command : monitor  \nmonitor [options]  \nStart monitoring for crashes or ANRs  \ngdb  \nStart gdbserv on the given port at crash/ANR  \nPublished 4th March , 2013. Last updated 13th May , 2016. Page 1 of 2.  \nam command : dumpheap  \nam command : start  \nstart [options] \u003CINTENT>  \nStart an Activity specified by \u003CINTENT>  \n-  \n-  \n-  \n-  \n-  \n-  \n-  \n-  \nD  \nEnable Debugging  \nW  \nWait for launch to complete  \n-start-profiler \u003CFILE>  \nStart profiler and send results to\u003CFILE>  \nP \u003CFILE>  \nLike--start-profiler , but profiling stops when the app goes idle.  \nR \u003CCOUNT>  \nRepeat the activity launch \u003CCOUNT> times. Prior to each repeat , the top activity will be finished.  \nS  \nForce stop the target app before starting the activity.  \n-opengl-trace  \nEnable tracing of OpenGL functions  \n-user [\u003CUSER_ID>]  \nSpecify which user to run as; if not specified , then run as the current user.  \nSponsored [by](by Readability-Score.com)[ Readability-Score.com](by Readability-Score.com)[ ](by Readability-Score.com)Measure your website readability!  \n[https://readability-score.com](https://readability-score.com)  \nAndroid Activity Manager (am) Cheat Sheet  \nby Ryan Johnson (CITguy) [via](via cheatography.com/138/cs/870/)[ cheatography.com/138/cs/870/](via cheatography.com/138/cs/870/)  \nam command : startservice  \nam command : kill  \nkill [options] \u003CPACKAGE>  \nKill all processes associated with \u003CPACKAGE> (the app's package name) . This command kills only processes that are safe to kill and that will not impact the user experience.  \nuser [\u003CUSER_ID> | all | current]  \nSpecify user whose processes to kill; all users if not specified.  \nBy Ryan Johnson (CITguy)  \n[cheatography.com/citguy/](cheatography.com/citguy/)  \nPublished 4th March , 2013. Last updated 13th May , 2016. Page 2 of 2.  \nSponsored [by](by Readability-Score.com)[ Readability-Score.com](by Readability-Score.com)[ ](by Readability-Score.com)Measure your website readability!  \n[https://readability-score.com](https://readability-score.com)","cbCaigXPzFdOR0ta","https://ap.wps.com/l/cbCaigXPzFdOR0ta","pdf",58975,"English","# am commands\n## Process and lifecycle control\n## Profiling, monitoring, and instrumentation","[{\"question\":\"How do you start an activity using am?\",\"answer\":\"Use start [options] \\u003cINTENT\\u003e with an intent specification. Add flags like -D to enable debugging and -W to wait for launch to complete.\"},{\"question\":\"How can you kill processes for a specific Android app package?\",\"answer\":\"Use kill [options] \\u003cPACKAGE\\u003e to terminate safe processes associated with the package name. Use the user option to target specific users (or all/current).\"},{\"question\":\"How do you profile an app with am?\",\"answer\":\"Use profile start \\u003cPROCESS\\u003e \\u003cFILE\\u003e to begin profiling and profile stop \\u003cPROCESS\\u003e to stop it. Related options include -start-profiler \\u003cFILE\\u003e and P \\u003cFILE\\u003e to stop profiling when the app becomes idle.\"}]","Android Activity Manager (am) - Command Cheat Sheet | PDF"]