How to run apk from commandline in emulator

后端 未结 2 941
孤街浪徒
孤街浪徒 2021-01-06 10:01

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

I have an Ubuntu running in a VM and there the emulator. I now tr

2条回答
  •  爱一瞬间的悲伤
    2021-01-06 10:53

    to install:

    adb -e install -r "your-apk-file-complete-path"
    

    Now to run:

    am [start|instrument]
    am start [-a ] [-d ] [-t ]
    [-c  [-c ] ...]
    [-e   [-e   ...]
    [-n ] [-D] []
    am instrument [-e  ] [-p ]
    [-w] 
    

    sample launch code

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

提交回复
热议问题