简体   繁体   English

android lanuch从命令行未知的apk应用程序

[英]android lanuch unknown apk applications from command line

i'm trying for a while to lunch apk apps, from adb. 我正在尝试一会儿从adb来午餐apk应用程序。 i know it's possible to open well known application like browser(am start -a android.intent.action.MAIN -n com.android.browser/.BrowserActivity) which you know there's main activity. 我知道有可能打开知名的应用程序,例如浏览器(am start -a android.intent.action.MAIN -n com.android.browser / .BrowserActivity),您知道它的主要活动。 but what about other application which you don't know their's main activity, is there a way to get the main activity (or the activity's list) from adb, and than run the appilcation from adb as well?? 但是,对于您不知道其主要活动的其他应用程序呢,有没有办法从adb获取主要活动(或活动列表),而不是从adb运行应用程序呢? i know it's possible using PackageManager() class, but i need to run it from command line(adb) and i have only the apk file. 我知道可以使用PackageManager()类,但是我需要从命令行(adb)运行它,而我只有apk文件。

thank's David Barns 谢谢大卫·巴恩斯

adb -e install "package.apk" adb -e安装“ package.apk”

This will install and launch the application on emulator. 这将在模拟器上安装并启动该应用程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM