# Could not find adb. Please set the ANDROID\_HOME environment variable with the Android SDK root directory path

**URL:** <https://discuss.appium.io/t/could-not-find-adb-please-set-the-android-home-environment-variable-with-the-android-sdk-root-directory-path/4875>\
**Category:** Support\
**Created:** [June 23, 2015, 5:17am UTC](https://discuss.appium.io/t/could-not-find-adb-please-set-the-android-home-environment-variable-with-the-android-sdk-root-directory-path/4875 "2015-06-23T05:17:37Z")\
**Posts on this page:** 1\
**Showing post:** 25

<div class="post-metadata">

**Author:** ![kasperavi](https://discuss.appium.io/user_avatar/discuss.appium.io/kasperavi/32/5204_2.png) [@kasperavi](https://discuss.appium.io/u/kasperavi)\
**Post date:** [June 27, 2015, 8:03am UTC](https://discuss.appium.io/t/could-not-find-adb-please-set-the-android-home-environment-variable-with-the-android-sdk-root-directory-path/4875/25 "2015-06-27T08:03:22Z")

</div>

Hello Ashok i had the same issue when i was working in a company before.I usually create a bash file and then use that to open programatically…Here is my code …This will solve the problem

#!/bin/bash  
export ANDROID\_HOME=/Users/Robot/Downloads/Xamarin/android-sdk-mac\_x86  
export PATH=$PATH:$ANDROID\_HOME/tools  
export PATH=$PATH:$ANDROID\_HOME/platform-tools  
export PATH=$PATH:$ANDROID\_HOME/build-tools  
‘/Applications/Appiumold.app/Contents/Resources/node/bin/node’ ‘/Applications/Appiumold.app/Contents/Resources/node\_modules/appium/bin/appium.js’ --address 127.0.0.1 --command-timeout 7200 --pre-launch --app ‘/Users/Robot/Desktop/Exampletools.apk’ --app-pkg Exampletools.exampletool --app-activity bott.droid.SplashScreenActivity --app-wait-activity bott.droid.SplashScreenActivity

As you can see this is the code i stored in my file in Mac pc.Every time you programatically start it needs to set variables each time.I dont understand what is the problem 🙂 I hope this fixes your problem

---

_[View the full topic](https://discuss.appium.io/t/could-not-find-adb-please-set-the-android-home-environment-variable-with-the-android-sdk-root-directory-path/4875)._
