Add platform-tools to your path
echo 'export ANDROID_HOME=/Users/$USER/Library/Android/sdk' >> ~/.bash_profile
echo 'export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools' >> ~/.bash_profile
Refresh your bash profile (or restart your terminal app)
source ~/.bash_profile
Start using adb
adb devices
You can use the code below to install application from command line
adb install example.apk
this apk is installed in the internal memory of current opened emulator.
adb install -s example.apk
this apk is installed in the sd-card of current opened emulator.
You can also install an apk to specific device in connected device list to the adb.
adb -s emulator-5554 install myapp.apk
install [options] Installs a package (specified by ) to the system. Options:
-l: Install the package with forward lock.
-r: Reinstall an exisiting app, keeping its data.
-t: Allow test APKs to be installed.
-i <INSTALLER_PACKAGE_NAME>: Specify the installer package name.
-s: Install package on the shared mass storage (such as sdcard).
-f: Install package on the internal system memory.
-d: Allow version code downgrade.
uninstall [options] Removes a package from the system. Options:
-k: Keep the data and cache directories around after package removal.
ref: Set up adb on Mac OS X Install an apk file from command prompt?
Step one:
ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl
Step two:
git config --global core.editor "subl -n -w"
or
git config --global core.editor "'/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl' -n -w"
defaults write com.apple.Dock appswitcher-all-displays -bool true; killall Dock
have u checked Settings > Apps > See all x apps?