adb shell run-as /data/data/com.mypackagename
returns
adb command not found
though I see adb in the directory (/Users/me/Library/Android/sdk/platform-tools
)
From Xamarin Studio, go to Tools, then select "Open Android SDK Command Prompt". This will open a terminal window and automatically navigate you to the Android SDK location. From there you can use the ADB command. Show activity on this post.
There is a program called Terminal that is installed in OSX that you can use to run the adb shell command. You must open up a Terminal and navigate to the directory that is shown in your screenshot, and then you can run the command ./adb shell and it should work.
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
If you are in that directory, you can run it with a leading dot-slash, i.e. ./adb shell run-as /data/data/com.mypackagename
.
In general, you might want to add that directory to your PATH
environment variable.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With