5,597,084 Members 47,308 Now Online
XDA Developers Android and Mobile Development Forum

[How To] Setup ADB for Windows/ Mac

Tip us?
 
sekhargreen
Old
(Last edited by PG101; 12th December 2011 at 07:14 AM.)
#1  
sekhargreen's Avatar
Senior Member - OP
Thanks Meter 608
Posts: 588
Join Date: Jan 2010
Location: Durgapur

 
DONATE TO ME
Cool [How To] Setup ADB for Windows/ Mac

For Windows

Want to set up ADB or Android Debugging Bridge on your PC, here is a quick guide for you. This tutorial does not need large download or full Android SDK installation. You will just have to download a small compressed file, which is all that you require.

STEP 1: First download this file called ADBUNZIPTOCDRIVE.zip, just click on the link, download will start automatically.

STEP 2: Now download PdaNet for driver installation. It comes with drivers from all major manufacturers, so this is all you need. Install PDAnet after downloading.

STEP 3: Now extract the zip file that we downloaded in the first step to C drive and name the extracted folder ADB.

STEP 4: Now we will go to the desktop and right click to make a new shortcut.

STEP 5: Point the shortcut to ADB folder that we created in step 3, and name the shortcut ADB or whatever you want.

STEP 6: Now right click on that shortcut and go to properties and change START IN field to c:\adb.

STEP 7: Click Apply or OK and you are done. Click on ADB shortcut on the desktop and you are good to go.

Here is list of ADB commands that might be useful for you in the future.

adb devices list all connected devices
adb push <local> <remote> copy file/dir to device
adb pull <remote> [<local>] copy file/dir from device
adb sync [ <directory> ] copy host->device only if changed
adb shell run remote shell interactively
adb shell <command> run remote shell command
adb emu <command> run emulator console command
adb logcat [ <filter-spec> ] View device log
adb forward <local> <remote> forward socket connections forward specs are one of: tcp:<port>
localabstract:<unix domain socket name>
localreserved:<unix domain socket name>
localfilesystem:<unix domain socket name>
dev:<character device name>
jdwp:<process pid> (remote only)
adb jdwp list PIDs of processes hosting a JDWP transport
adb install [-l] [-r] [-s] <file> push this package file to the device and install it
adb uninstall [-k] <package> remove this app package from the device (-k means keep the data and cache directories)
adb bugreport return all information from the device
that should be included in a bug report.
adb help show this help message
adb version show version num
adb wait-for-device block until device is online
adb start-server ensure that there is a server running
adb kill-server kill the server if it is running
adb get-state prints: offline | bootloader | device
adb get-serialno prints: <serial-number>
adb status-window continuously print device status for a specified device
adb remount remounts the /system partition on the device read-write
adb reboot [bootloader|recovery] reboots the device, optionally into the bootloader or recovery program
adb reboot-bootloader reboots the device into the bootloader
adb root restarts the adbd daemon with root permissions
adb usb restarts the adbd daemon listening on USB
adb tcpip <port> restarts the adbd daemon listening on TCP on the specified port

Awesome Xperia-nce SL, A.C.A., Sekhy's Galaxy 3 ROMs Collection

The Following 24 Users Say Thank You to sekhargreen For This Useful Post: [ Click to Expand ]
 
sekhargreen
Old
(Last edited by PG101; 12th December 2011 at 07:14 AM.)
#2  
sekhargreen's Avatar
Senior Member - OP
Thanks Meter 608
Posts: 588
Join Date: Jan 2010
Location: Durgapur

 
DONATE TO ME
Cool [How To] Setup ADB for Mac

For MAC

Want to setup ADB on a mac, this tutorial should help you. This guide does not require the full Android SDK installation on your mac to use Android Debug Bridge, rather you just have to install the required files and you are good to go.

STEP 1: Download Required ADB files ZIP from here.

STEP 2: Extract the downloaded ZIP to a folder/directory that you can easily locate.

STEP 3: While you can start using ADB right away, but you will have to navigate to the folder that you created by unzipping the ADB files, to use ADB. So, we will make an entry in ~/.bash_profile configuration files to make ADB accessible from terminal normally from anywhere.

STEP 4: Open Terminal on your mac and type the following command

nano ~/.bash_profile

STEP 5: The above command will open a file in a text editor, now add the following line in the end of that file.

export PATH=${PATH}:your_sdk_dir

your_sdk_dir is the path to folder that you created in STEP 2. It will be something like Users/George/platform-tools


Image Credit: tjrocks91
STEP 6: Save the file and type the following command

source ~/.bash_profile

STEP 7: Now, quit Terminal

STEP 8: Optional: You can install PDAnet by downloading from here; it installs the drivers for popular Android device manufacturers or you can individually download and install drivers for your phone/tablet manufacturer by going to their official website.

Before you connect your Android device to mac, make your to turn on USB Debugging by going to Setting>Applications>Development on your tablet/phone.

And you are done. Connect your device and type adb devices in terminal. It should show your device in the list.

Awesome Xperia-nce SL, A.C.A., Sekhy's Galaxy 3 ROMs Collection

The Following 11 Users Say Thank You to sekhargreen For This Useful Post: [ Click to Expand ]
 
sekhargreen
Old
(Last edited by PG101; 12th December 2011 at 07:12 AM.)
#3  
sekhargreen's Avatar
Senior Member - OP
Thanks Meter 608
Posts: 588
Join Date: Jan 2010
Location: Durgapur

 
DONATE TO ME
Cool [How To] Setup ADB for Windows

<Reserved>

Awesome Xperia-nce SL, A.C.A., Sekhy's Galaxy 3 ROMs Collection

The Following User Says Thank You to sekhargreen For This Useful Post: [ Click to Expand ]
 
cdesai
Old
#4  
cdesai's Avatar
Recognized Developer
Thanks Meter 3969
Posts: 2,272
Join Date: Jan 2011
Location: IN YOUR HEAD

 
DONATE TO ME
No offense, but there are already loads of threads like this!

Now as you made the thread, make it better:)

Ask a mod to merger this with your other thread it would be easier to manage

Add a Linux section too

You can find the drivers on Sam firmware, no need to install PDA net for that

Also, adding some pictures would be nice.

From my fingers to your eyez
CyanogenMod Maintainer | SGT7 | TeamBBQ

 
BBQLinux - An Arch based Linux distribution for Android developers
Website: http://www.bbqlinux.org | Downloads: [url]http://sourceforge.net/projects/bbqlinux/files//url]
IRC: #bbqlinux on freenode
The Following User Says Thank You to cdesai For This Useful Post: [ Click to Expand ]
 
sekhargreen
Old
#5  
sekhargreen's Avatar
Senior Member - OP
Thanks Meter 608
Posts: 588
Join Date: Jan 2010
Location: Durgapur

 
DONATE TO ME
Thanks, note taken.

Awesome Xperia-nce SL, A.C.A., Sekhy's Galaxy 3 ROMs Collection

 
ak700
Old
#6  
ak700's Avatar
Senior Member
Thanks Meter 435
Posts: 1,617
Join Date: Nov 2010
Location: 25.00 N, 71.00 W
Thanks, especially for the functions you given down. Will try them later on.

Sent from my GT-I5800 using xda premium
 
Humpie
Old
#7  
Senior Member
Thanks Meter 36
Posts: 685
Join Date: Dec 2010
thanks but the first file is deleted
 
Smonic
Old
#8  
Senior Member
Thanks Meter 294
Posts: 1,686
Join Date: Jul 2011
Location: Behind You
Thanks I really needed this and i couldn't find a thread for this.
Click the thanks button if i helped!
The Following User Says Thank You to Smonic For This Useful Post: [ Click to Expand ]
 
sekhargreen
Old
#9  
sekhargreen's Avatar
Senior Member - OP
Thanks Meter 608
Posts: 588
Join Date: Jan 2010
Location: Durgapur

 
DONATE TO ME
Quote:
Originally Posted by Humpie View Post
thanks but the first file is deleted
Link working. Please check.

Awesome Xperia-nce SL, A.C.A., Sekhy's Galaxy 3 ROMs Collection

The Following User Says Thank You to sekhargreen For This Useful Post: [ Click to Expand ]
 
Humpie
Old
#10  
Senior Member
Thanks Meter 36
Posts: 685
Join Date: Dec 2010
Quote:
Originally Posted by sekhargreen View Post
Link working. Please check.
Yes it works right now.

Tags
adb
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes