I want to enter a simple adb shell command, so I navigated to ...\sdk\platform-tools\adb.exe
, and opened it. However, I am unable to type in it!
What is the solution?
.exe
files are executable files for the Windows OS. They will not work on OSX.
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.
Alternatively, you can use the Terminal in Android Studio to perform the same operation.
Here is how I change my directory to platform-tools on a mac terminal: Search the finder for "platform-tools". Then right-click on it, and left-click on "get info". You'll see a little window pop up with all the info for that folder. Copy the "where", which is the file path.
Then paste into your terminal like this:
cd /Users/[user-name]/Library/Android/sdk/platform-tools
Be sure to add /platform tools
on after pasting the path to the folder.
Then hit return. Your terminal should then be pointed to that folder and you can invoke the adb commands by using "./adb [whatever command]"
.
Or you can invoke adb shell commands: for example let's say you want to enable Analytics Debug mode on an Android device. Use the following command:
adb shell setprop debug.firebase.analytics.app [your_package_name]
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