How to add Android adb path to Mac OS X


You can setup your Mac OS X terminal to run adb anywhere:

echo 'export PATH=$PATH:/Users/Mohsen/android-sdk/sdk/platform-tools/' >> ~/.bash_profile

If you put the android-sdks folder in another directory, replace the path with the directory android-sdks/platform-tools is in.

Restart your terminal…

How to Debug Application over WiFi on Android Device


Start off by connecting both your Android device and your PC to a WiFI access point. Now open the Android terminal application and run netcfg to find out the ip address that was assigned to your Android device.

*** Android on-device console ***

You should now be able to ping your Android device. Replace x.x.x.x with the actual ip address of your Android device:

*** PC console ***
ping x.x.x.x

Now activate “ADB over Network”. Cyanogenmod offers a developer friendly checkbox to let you do this. On a stock Android system you can do the same, by invoking the following commands:

*** Android on-device console ***
setprop service.adb.tcp.port 5555
stop adbd && start adbd

(Yes, it can be rather inconvenient to enter this on a mobile device. Please make sure to read “Creating Android script files” further below. Good news is: you will not need to use your on-device terminal again.)

In order to ADB connect over WiFi, run the following command. Always replace x.x.x.x with the actual ip address of your Android device:

*** PC console ***
adb connect x.x.x.x

Please make sure to activate “Keep Wi-Fi on during sleep” (under Wi-Fi / Advanced). :D