常用adb shell 命令

来源:互联网 发布:java 入门 编辑:程序博客网 时间:2024/06/05 17:28
常用adb shell命令:1.按键事件          input text <string>   input a string to device         input keyevent <event_code>   send a Key Event to device         如: adb shell input keyevent 26      (PowerKey)2.am命令           am start  <INTENT> : start an Activity           如 :            am start -n com.android.calculator/com.android.calculator2.Calculator                     am broadcast <INTENT>             am startservice <INTENT>           am force-stop <PACKAGE>           am kill <PACKAGE>            am kill-all           am broadcast <INTENT>                "<INTENT> specifications include these flags and arguments:\n" +                "    [-a <ACTION>] [-d <DATA_URI>] [-t <MIME_TYPE>]\n" +                "    [-c <CATEGORY> [-c <CATEGORY>] ...]\n" +                "    [-e|--es <EXTRA_KEY> <EXTRA_STRING_VALUE> ...]\n" +                "    [--esn <EXTRA_KEY> ...]\n" +                "    [--ez <EXTRA_KEY> <EXTRA_BOOLEAN_VALUE> ...]\n" +                "    [--ei <EXTRA_KEY> <EXTRA_INT_VALUE> ...]\n" +                "    [--el <EXTRA_KEY> <EXTRA_LONG_VALUE> ...]\n" +                "    [--eu <EXTRA_KEY> <EXTRA_URI_VALUE> ...]\n" +                "    [--eia <EXTRA_KEY> <EXTRA_INT_VALUE>[,<EXTRA_INT_VALUE...]]\n" +                "    [--ela <EXTRA_KEY> <EXTRA_LONG_VALUE>[,<EXTRA_LONG_VALUE...]]\n"                 "    [-n <COMPONENT>] [-f <FLAGS>]\n" +                "    [--grant-read-uri-permission] [--grant-write-uri-permission]\n" +                "    [--debug-log-resolution] [--exclude-stopped-packages]\n" +                "    [--include-stopped-packages]\n" +                "    [--activity-brought-to-front] [--activity-clear-top]\n" +                "    [--activity-clear-when-task-reset] [--activity-exclude-from-recents]\n" +                "    [--activity-launched-from-history] [--activity-multiple-task]\n" +                "    [--activity-no-animation] [--activity-no-history]\n" +                "    [--activity-no-user-action] [--activity-previous-is-top]\n" +                "    [--activity-reorder-to-front] [--activity-reset-task-if-needed]\n" +                "    [--activity-single-top] [--activity-clear-task]\n" +                "    [--activity-task-on-home]\n" +                "    [--receiver-registered-only] [--receiver-replace-pending]\n" +                "    [--selector]\n" +                "    [<URI> | <PACKAGE> | <COMPONENT>]\n" 更多詳细用法请见am 使用帮助.3.pm 命令        pm list packages    -f: see their associated file-s: filter to only show system packages-3 ilter to only show third party packagespm list packages [-f] [-d] [-e] [-s] [-e] [-u] [FILTER]"); pm list permission-groupspm list permissions [-g] [-f] [-d] [-u] [GROUP]");pm list instrumentation [-f] [TARGET-PACKAGE]"); pm list featurespm list librariespm path PACKAGEpm install [-l] [-r] [-t] [-i INSTALLER_PACKAGE_NAME] [-s] [-f] PATHpm uninstall [-k] PACKAGE pm clear PACKAGEpm enable PACKAGE_OR_COMPONENTpm disable PACKAGE_OR_COMPONENTpm disable-user PACKAGE_OR_COMPONENTpm set-install-location [0/auto] [1/internal] [2/external]pm get-install-location更多詳细用法,请见pm使用帮助.4. dumpsysdumpsys activitdumpsys activity intentsdumpsys activity broadcastsdumpsys activity providersdumpsys activity servicesdumpsys activity activitiesdumpsys activity processesdumpsys windowdumpsys window windowsdumpsys window tokensdumpsys window sessionsdumpsys window policydumpsys window inputdumpsys statusbar dumpsys notificationdumpsys package  [<PACKAGE> ]dumpsys locationdumpsys alarmdumpsys connectivitydumpsys wifi......5. ime输入法管理            ime list [-a] [-s]list command prints all enabled input methods-s option to see only a single summary line of each.-a option to see all input method     ime enable ID     ime disable ID     ime set ID

0 0