如何从命令行中的模拟器中运行的apk [英] How to run apk from commandline in emulator

查看:199
本文介绍了如何从命令行中的模拟器中运行的apk的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何开始从控制台模拟器的APK?我没能找到正确的命令。

How do I start an apk on the emulator from the console? I wasn't able to find the correct command.

我有一个Ubuntu的一个虚拟机有模拟器中运行。我现在尝试安装(ADB安装App.apk -Works!)和命令行运行它。

I have an Ubuntu running in a VM and there the emulator. I now try to install (adb install App.apk -works!) and run it from commandline.

在此先感谢!

推荐答案

安装:

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>

样品推出code

sample launch code

am start -a android.intent.action.MAIN -n
com.abhi.ui/com.abhi.ui.LaunchIt

这篇关于如何从命令行中的模拟器中运行的apk的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆