How do I run adb on a mac terminal?

前端 未结 6 1314
一个人的身影
一个人的身影 2021-02-02 07:29
adb shell run-as /data/data/com.mypackagename 

returns

adb command not found

though I see adb in the dir

6条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-02 07:44

    You just need to add this path to your bash profile and source it:

    echo 'export PATH=$PATH:~/Library/Android/sdk/platform-tools/' >> ~/.bash_profile
    
    source ~/.bash_profile
    
    adb devices
    

提交回复
热议问题