设为首页 收藏本站
查看: 796|回复: 0

[经验分享] 【转载】How to Install & Setup ADB on Mac OS X

[复制链接]
累计签到:1 天
连续签到:1 天
发表于 2015-12-31 07:38:10 | 显示全部楼层 |阅读模式
  文章转载自:https://seo-michael.co.uk/how-to-setup-adb-on-os-x/
  Here is an easy to follow guide for setting up Android Debug Bridge (ADB) on your Mac.


  • Create a new directory on your Mac called android and place it somewhere easy to find
  • Download Android SDK (300+MB Download)
  • Unzip adt-bundle-mac-x86_64-20140702.zip
  • Rename unzipped directory to Android-SDK
  • Move the renamed directory Android-SDK to the android directory created in step 1
  • Open the Android-SDK directory
  • Navigate to /sdk/tools
  • Double click (you may need to right click and select open) the android file

  This will execute a command in Terminal and open the Android SDK Manager window. If you don't have Java installed you will get a popup in which you will need to select More Info.. so you can download and install it.


  • In this window check Android SDK Tools & Android SDK Platform-Tools and select Install Packages. They may have already downloaded automatically, it is easy to tell if they have as the Install Packages button will be greyed out

  If the above screen is blank you will need to check Updates/New & Installed and the necessary packages will appear.

  In the next window that opens select:


  • Android SDK License
  • Accept License
  • Install
  Installation will take a minute or two.



  • Open the original android directory created in the first step
  • Navigate to Android-SDK/sdk/platform-tools
  • Copy the adb file



  • Paste adb into the root of the original android directory created in step 1
  This is pretty much completed. Now we need to test to make sure it is working correctly.
  Connect your android device to your Mac. You must ensure that you have Android Debugging enabled on your device. This is done via Developer Options (a hidden setting) which is activated by pressing Build Number 7 times in Settings > About Phone on your device.
  Once Android Debugging is enabled:


  • Open Terminal
  • Type cd followed by the path to the original android directory in step 1. In my case this would be
  cd ~/Documents/android



  • Press Return
  • Type ./adb devices & press Return
  • Look at your your Android device as it may be asking you to Allow USB Debugging from your Mac. If it does then allow.
  You should now see your device listed as an attached device. If you had to select allow on your Android device you may need to type ./adb devices again for it to appear as an authorised device.

  You may see a message in Terminal saying

* daemon not running starting it now on port 5037 *
* daemon started successfully *
  This is nothing to worry about; continue to follow setup.
  If you followed the steps above and everything went as expected then ADB is now installed and functioning as it should.
  You can now add a path using Terminal so you don't need to cd into the android directory and add ./ to every command.


  • Open Terminal
  • Type nano ~/.bash_profile
  • Press Return

  You should have a Terminal window that looks something ike the one above. Copy the export PATH command below into your Terminal window replacing /Users/<yourusername>/Documents/android with the correct path to the original android directory you created way back in step 1.

export PATH=${PATH}:/Users/<yourusername>/Documents/android



  • Press Return
  • Press CTRL+X
  • Press Y to confirm
  • Press Return
  • Quit Terminal
  You can now confirm this works by opening Terminal again and typing adb devices and you should see your device listed under attached devices without having to change directories.



Share this post

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-158610-1-1.html 上篇帖子: Mac OS X Kernel Basic User Credentials 下篇帖子: Notes about compiling android kernel source on Mac OS Lion
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表