adb shell run-as /data/data/com.mypackagename
returns
adb command not found
though I see adb in the dir
The first step, you should get android sdk directory path by open:
Android Studio -> Preferences -> Appearance & Behavior -> System Settings -> Android SDK
The path will be show here. example: /Users/thisismyaccount/Library/Android/sdk
Next, you open Terminal and type command as below:
echo 'export PATH=$PATH:/Users/*thisismyaccount*/Library/Android/sdk/platform-tools/' >> ~/.bash_profile
source ~/.bash_profile
adb devices