How to start an application using android ADB tools?

后端 未结 11 1094
醉酒成梦
醉酒成梦 2020-11-22 07:23

How do I send an intent using Android\'s ADB tools?

11条回答
  •  旧时难觅i
    2020-11-22 07:55

    open ~/.bash_profile and add these bash functions to the end of the file

    function androidinstall(){
       adb install -r ./bin/$1.apk
    }
    function androidrun(){
       ant clean debug
       adb shell am start -n $1/$1.$2
    }
    

    then open the Android project folder

    androidinstall app-debug && androidrun com.example.app MainActivity
    

提交回复
热议问题