Answers:
我相信使用adb可能:
am [start|instrument]
am start [-a <action>] [-d ] [-t <mime_type>]
[-c <category> [-c <category>] ...]
[-e <extra_key> <extra_value> [-e <extra_key> <extra_value> ...]
[-n <component>] [-D] [<uri>]
am instrument [-e <arg_name> <arg_value>] [-p <prof_file>]
[-w] <component>
例如,我们有清单如下的android程序:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.app1.android.xtract">
<application android:icon="@drawable/icon">
<activity class=".Contact" android:label="@string/app_name">
<intent-filter>
<action android:value="android.intent.action.MAIN" />
<category android:value="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
.
.
</manifest>
要像这样运行代码发布命令(一行):
am start -a android.intent.action.MAIN -n com.app1.android.xtract/com.app1.android.xtract.Contact
adb
因此,我将为您提供:)