如何从控制台在模拟器上启动 apk?我找不到正确的命令。
我有一个在虚拟机中运行的 Ubuntu,还有一个模拟器。我现在尝试安装(adb install App.apk -works!)并从命令行运行它。
提前致谢!
最佳答案
安装:
adb -e install -r "your-apk-file-complete-path"
现在运行:
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>
示例启动代码
am start -a android.intent.action.MAIN -n
com.abhi.ui/com.abhi.ui.LaunchIt
关于android - 如何在模拟器中从命令行运行apk,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8605821/