Can't get adb logcat to work

I’m trying to debug android device from a mac. I used to be able to debug but I stepped away from coding for a while and now that I’m coming back into it, I can’t seem to get adb logcat to work.

For starters, yes I did read the debugging guide and other forum answers. I seriously spent all day trying to get this to work to no avail. In terminal when I type: 

/Users/Nate/Library/Android/sdk/platform-tools

terminal will respond with “is a directory”

Within this platform-tools folder I have the adb file but when I type:

adb logcat

or 

adb logcat Corona:v *:s

Then terminal says “command not found” 

Any ideas on what to do next? 

ANY help is greatly appreciated (don’t be afraid to really dumb it down either, haha. It will be appreciated)

That’s an Android/ADB specific issue and not directly related to Corona. I think you’d have better success asking this question in an Android specific forum. I am a Windows user but it looks like you are using OSX. On Windows, when I get a message like “command not found” it means that the executable I am trying to run is not in one of the folders in my PATH environment variable.

You need to change directory to that path:

cd /Users/Nate/Library/Android/sdk/platform-tools

then you can do:

./adb logcat

However make your life easier, you can add the path: /Users/Nate/Library/Android/sdk/platform-tools to the $PATH environment variable and then you can just type:

adb logcat from where ever you want without having to do the cd command and prefix the command with ./

In your home directory:

cd ~/

there is a hidden file called .bash_profile

You can use a text editor to open it (google how to open a text editor from the command line) find the:

export PATH=

line and append:   :/Users/Nate/Library/Android/sdk/platform-tools

to the end and save it.

Exit terminal and start it back up.

Rob

Hi Rob, thanks for the help. Everything is working now.

For other’s reference, I received a message saying illegal (something) 4, which meant that my computer’s software was too old. So you have to update. 

and to open up a text file from terminal, use open -e .x (Where “x” is the file you want to open)    

I’d also recommend checking out Android Monitor. It’s in your Android SDK installation directory (in the tools folder I believe).

It offers filtering messages by type, by app etc.

The app should be called “monitor”.

That’s an Android/ADB specific issue and not directly related to Corona. I think you’d have better success asking this question in an Android specific forum. I am a Windows user but it looks like you are using OSX. On Windows, when I get a message like “command not found” it means that the executable I am trying to run is not in one of the folders in my PATH environment variable.

You need to change directory to that path:

cd /Users/Nate/Library/Android/sdk/platform-tools

then you can do:

./adb logcat

However make your life easier, you can add the path: /Users/Nate/Library/Android/sdk/platform-tools to the $PATH environment variable and then you can just type:

adb logcat from where ever you want without having to do the cd command and prefix the command with ./

In your home directory:

cd ~/

there is a hidden file called .bash_profile

You can use a text editor to open it (google how to open a text editor from the command line) find the:

export PATH=

line and append:   :/Users/Nate/Library/Android/sdk/platform-tools

to the end and save it.

Exit terminal and start it back up.

Rob

Hi Rob, thanks for the help. Everything is working now.

For other’s reference, I received a message saying illegal (something) 4, which meant that my computer’s software was too old. So you have to update. 

and to open up a text file from terminal, use open -e .x (Where “x” is the file you want to open)    

I’d also recommend checking out Android Monitor. It’s in your Android SDK installation directory (in the tools folder I believe).

It offers filtering messages by type, by app etc.

The app should be called “monitor”.