How to run (not only install) an android application using .apk file?

前端 未结 7 1366
孤独总比滥情好
孤独总比滥情好 2020-11-29 18:04

Is there any command on cmd.exe that would allow me to start the main activity of a particular android application using the .apk file of that appl

7条回答
  •  自闭症患者
    2020-11-29 19:01

    First to install your app:

    adb install -r path\ProjectName.apk
    

    The great thing about the -r is it works even if it wasn’t already installed.

    To launch MainActivity, so you can launch it like:

    adb shell am start -n com.other.ProjectName/.MainActivity

提交回复
热议问题