From a523037358d000e50dff7a43f12b385862d21b52 Mon Sep 17 00:00:00 2001 From: Wang DiYuan Date: Mon, 19 Aug 2019 20:24:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=B8=8D=E6=8C=87=E5=AE=9AAc?= =?UTF-8?q?tivity=E5=90=8D=E7=A7=B0=E5=90=AF=E5=8A=A8=20(#66)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add adb launch app without activity name Signed-off-by: Wang Diyuan --- README.en.md | 16 ++++++++++++++++ README.md | 16 ++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/README.en.md b/README.en.md index 2c09178..c1d6f17 100644 --- a/README.en.md +++ b/README.en.md @@ -823,6 +823,7 @@ There are some options addting data for ``, similar to `extra` for Bundl | `--ela [, start with Activity's name The syntax is: @@ -844,6 +845,21 @@ adb shell am start -n org.mazhuang.boottimemeasure/.MainActivity --es "toast" "h The command above means starting MainActivity of the application with the package name `org.mazhuang.boottimemeasure` with an extra string information (key is 'toast' and value is 'hello, world'). +> start without Activity's name + +The syntax is: + +```sh +adb shell monkey -p -c android.intent.category.LAUNCHER 1 +``` +For example: + +```sh +adb shell monkey -p com.tencent.mm -c android.intent.category.LAUNCHER 1 +``` + +The command above means starting the launch activity of WeChat. + ### Start a Service The syntax is: diff --git a/README.md b/README.md index 6faf546..c4b32e6 100644 --- a/README.md +++ b/README.md @@ -828,6 +828,7 @@ package:/data/app/ecarx.weather-1.apk | `--ela [, 指定Activity名称启动 命令格式: @@ -849,6 +850,21 @@ adb shell am start -n org.mazhuang.boottimemeasure/.MainActivity --es "toast" "h 表示调起 `org.mazhuang.boottimemeasure/.MainActivity` 并传给它 string 数据键值对 `toast - hello, world`。 +> 不指定Activity名称启动(启动主Activity) + +命令格式: + +```sh +adb shell monkey -p -c android.intent.category.LAUNCHER 1 +``` +例如: + +```sh +adb shell monkey -p com.tencent.mm -c android.intent.category.LAUNCHER 1 +``` + +表示调起微信主界面。 + ### 调起 Service 命令格式: