Skip to content

Instantly share code, notes, and snippets.

@margaretmz
Last active November 17, 2020 19:19
Show Gist options
  • Save margaretmz/cefbfbb96f4630d38fba5d822258afab to your computer and use it in GitHub Desktop.
Save margaretmz/cefbfbb96f4630d38fba5d822258afab to your computer and use it in GitHub Desktop.
How to set up adb environment variable on Mac
// Step 1. Open or create the .bash_file
// Open .bash_file
$ -a TextEdit ~/.bash_profile
// create the file if it doesn’t exist:
$ touch ~/.bash_profile
// Step 2. Add path to adb tool (note your path maybe different)
export PATH=$PATH:/Users/Margaret/Library/Android/sdk/platform-tools/
// Step 3. Make the new path in effect
// Close and reopen terminal if typing “adb” command not yet working.
// Reload the environment variables (if needed). Note there is a space after the 1st dot
$ . ~/.bash_profile
// Step 4. Verify the path update is successful.
// You should see your adb version; otherwise check the path in your .bash_profile
$ adb version
@arundathidm10
Copy link

still i get error ,.bash_file does not exist.
What should i do?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment