5,815,061 Members 37,432 Now Online
XDA Developers Android and Mobile Development Forum

[GUIDE] Set up ADB and Fastboot on a Mac easily (With Screenshots!)

Tip us?
 
AshtonTS
Old
(Last edited by AshtonTS; 13th October 2012 at 03:49 PM.)
#1  
AshtonTS's Avatar
Senior Member - OP
Thanks Meter 2,737
Posts: 5,712
Join Date: May 2011
Location: Woodstock, CT

 
DONATE TO ME
Default [GUIDE] Set up ADB and Fastboot on a Mac easily (With Screenshots!)

Ok, so I'm going to make a little write up on how to easily install ADB and fastboot on a Mac. It's actually quite simple, and plus you don't have to worry about drivers like in Windows.

Instructions

First, make a folder named "android" (no quotes of course ) You can place it anywhere on your hard drive, it doesn't really matter. Put it somewhere you'll easily remember, because you're going to be using it a LOT. I placed mine on my desktop.


Next, you'll want to download the android SDK from Here. (you won't need to install Java first like you would on a Windows PC, though I would recommend it anyway)
(As pointed out by Wlmeng11, you could skip this step just download a zip that I will have attached at the bottom of the page containing the adb and fastboot files instead of downloading the whole SDK)


When the SDK finishes downloading, Unzip it and the contents of the "android-sdk-mac_x86" folder into your android folder.

Once you have done that, open your android folder. Go into the tools folder inside of it. Double click on the file called "android" (possibly called android sdk) This file is a UNIX executable and will open within a Terminal window.


When it finishes opening, check the folder called tools. Make sure both "Android SDK Tools" and "Android SDK Platform-tools" are selected within the tools folder. Click install and wait for them to download.


When they finish downloading, go into the platform-tools folder inside your android folder, then copy adb and fastboot and paste them into the root of your android folder.


Now that you have adb and fastboot installed, we're going to want to test them to make sure they work.

Go ahead and plug in your android device at this time. Make sure android debugging is enabled in settings. Go into Settings > Apps > Developer and check it there (for Gingerbread 2.3 and lower) or go into Settings > Developer Options and check it there for Ice Cream Sandwich or Jellybean. As of now, there are two ways to access adb and fastboot.

Open a Terminal window (look in Applications > Utilities if you can't find it). Type "cd" followed by the path you saved your android folder to (I'm going to use the Desktop for this demonstration) it should look like this
Code:
cd /Users/<yourusername>/Desktop/android


Press enter.


Now you need to actually execute an adb or fastboot command. To do this, you'll need to type "./adb (or fastboot) <command>" For this tutorial, we will use "ADB devices" since it doesn't actually do anything to the phone. (we won't use fastboot since it requires rebooting to the boot loader which is different for every device)

In the same terminal window as before type the following:
Code:
./adb devices
then hit enter. It should turn up your device's serial number. If it does, proceed to the next step, if not recheck your steps, then leave a post in this thread.


(if it says * daemon not running. starting it now on port 5037 *
* daemon started successfully * that is perfectly normal)

Now, at this moment, ADB and Fastboot are both completely useable. However, it's very annoying to have to CD into the directory and use ./ in front of every terminal command. I'll show you how to add it to your path so you don't have to do any of that.

Open a new Terminal window and type
Code:
nano ~/.bash_profile
it will open a window that looks like this:

(Yours will probably be blank, because I've added a lot of stuff to mine over the years)

Add a line to it that contains the path to your android folder. (again, I'm using Desktop) It should look like this
Code:
export PATH=${PATH}:/Users/<yourusername>/Desktop/android


Once you have added that, press CTRL+X to exit, then Y to confirm the save then press enter. It will close the nano editor. You can close the Terminal window now.

Now we need to verify that it works. Open a new Terminal window and type
Code:
adb devices
If it shows the serial number, then you have set it up successfully and are good to go!


If you have any questions or issues let me know in the thread below.

If this has helped, please press thanks!

Awesome! This made the front page of XDA Thanks guys!
Attached Files
File Type: zip android.zip - [Click for QR Code] (154.3 KB, 23465 views)


ROM: CyanogenMod 10.2
Recovery: ClockworkMod Touch
Kernel: franko.Kernel
#BlameAnt

HTC Linkify | ADB/Fastboot for Mac | General Android Help | Cydia for Android

If I helped, please press the thanks button.
The Following 229 Users Say Thank You to AshtonTS For This Useful Post: [ Click to Expand ]
 
AshtonTS
Old
#2  
AshtonTS's Avatar
Senior Member - OP
Thanks Meter 2,737
Posts: 5,712
Join Date: May 2011
Location: Woodstock, CT

 
DONATE TO ME
Added screenshots


ROM: CyanogenMod 10.2
Recovery: ClockworkMod Touch
Kernel: franko.Kernel
#BlameAnt

HTC Linkify | ADB/Fastboot for Mac | General Android Help | Cydia for Android

If I helped, please press the thanks button.
The Following 16 Users Say Thank You to AshtonTS For This Useful Post: [ Click to Expand ]
 
wlmeng11
Old
#3  
wlmeng11's Avatar
Senior Member
Thanks Meter 1,356
Posts: 3,222
Join Date: Apr 2012
Location: Palo Alto, CA
Quote:
you won't need to install Java first like you would on a PC
So... Macs are Impersonal Computers?

---------- Post added at 06:24 PM ---------- Previous post was at 06:17 PM ----------

Nice guide though btw
Nexus 4 | CM 10.1

Connected Sites:
Github | XDA Developers | Google+ | Diaspora*
The Following 2 Users Say Thank You to wlmeng11 For This Useful Post: [ Click to Expand ]
 
AshtonTS
Old
#4  
AshtonTS's Avatar
Senior Member - OP
Thanks Meter 2,737
Posts: 5,712
Join Date: May 2011
Location: Woodstock, CT

 
DONATE TO ME
Quote:
Originally Posted by wlmeng11 View Post
So... Macs are Impersonal Computers?

---------- Post added at 06:24 PM ---------- Previous post was at 06:17 PM ----------

Nice guide though btw
Lol I'll fix that. Thanks btw. I'm out today, but I'll give you one tomorrow (too lazy to use my phone)


ROM: CyanogenMod 10.2
Recovery: ClockworkMod Touch
Kernel: franko.Kernel
#BlameAnt

HTC Linkify | ADB/Fastboot for Mac | General Android Help | Cydia for Android

If I helped, please press the thanks button.
The Following 6 Users Say Thank You to AshtonTS For This Useful Post: [ Click to Expand ]
 
wlmeng11
Old
#5  
wlmeng11's Avatar
Senior Member
Thanks Meter 1,356
Posts: 3,222
Join Date: Apr 2012
Location: Palo Alto, CA
To save time, you might want to just have a adb/fastboot combo instead of the entire sdk.
(BTW it's tomorrow )

Sent from my HTC Rezound
Nexus 4 | CM 10.1

Connected Sites:
Github | XDA Developers | Google+ | Diaspora*
The Following User Says Thank You to wlmeng11 For This Useful Post: [ Click to Expand ]
 
AshtonTS
Old
#6  
AshtonTS's Avatar
Senior Member - OP
Thanks Meter 2,737
Posts: 5,712
Join Date: May 2011
Location: Woodstock, CT

 
DONATE TO ME
Quote:
Originally Posted by wlmeng11 View Post
To save time, you might want to just have a adb/fastboot combo instead of the entire sdk.
(BTW it's tomorrow )

Sent from my HTC Rezound
Maybe, I actually use other parts of the SDK . Ill look into that though


ROM: CyanogenMod 10.2
Recovery: ClockworkMod Touch
Kernel: franko.Kernel
#BlameAnt

HTC Linkify | ADB/Fastboot for Mac | General Android Help | Cydia for Android

If I helped, please press the thanks button.
The Following 3 Users Say Thank You to AshtonTS For This Useful Post: [ Click to Expand ]
 
wlmeng11
Old
#7  
wlmeng11's Avatar
Senior Member
Thanks Meter 1,356
Posts: 3,222
Join Date: Apr 2012
Location: Palo Alto, CA
Quote:
Originally Posted by AshtonTS View Post
Maybe, I actually use other parts of the SDK . Ill look into that though
Well since this guide is primarily aimed towards users who only want to root their phone, rather than developers, adb/fastboot is really all you need.
So it would save time to just use an adb/fastboot combo.
Nexus 4 | CM 10.1

Connected Sites:
Github | XDA Developers | Google+ | Diaspora*
 
Fallon9111
Old
#8  
Fallon9111's Avatar
Senior Member
Thanks Meter 86
Posts: 265
Join Date: Jul 2012
Location: The Shire, Middle Earth

 
DONATE TO ME
Angry I still prefer linux

I still prefer the linux enviroment, although its handy to have the adb on my macbook for when I'm not at home and have bricked my device :S

I had already got this setup, I just didn't know the ~/.bash_profile bit Now I know had to add my own programs as actual programs and not just aliases XD
Nexus 5 (hammerhead) Self Compiled CM11 from CM's repos
Nexus 7 (grouper) Self Compiled CM11 from CM's repos
Desire HD (ace) Self Compiled CM10.1 from Mustaavalkosta's Github
Xperia Tablet S Won from androidpolice Running rooted stock 4.1
The Following User Says Thank You to Fallon9111 For This Useful Post: [ Click to Expand ]
 
visor
Old
#9  
Member
Thanks Meter 16
Posts: 55
Join Date: Sep 2004
First off, nice guide. I am still trying to understand why you've moved adb and fastboot from platform-tools, rather than export the path to that directory. Is there any particular reason?

EDIT: BTW, you've hit the front page on XDA.
The Following 2 Users Say Thank You to visor For This Useful Post: [ Click to Expand ]
 
straycat
Old
#10  
straycat's Avatar
Senior Member
Thanks Meter 34
Posts: 130
Join Date: Mar 2007
Location: Ponferrada
Hi.

Would it be valid on a very old Powerbook Pismo running 10.4 Tiger??

Thanks in advance and regards.

The Following User Says Thank You to straycat For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes