[GUIDE] Everything You Need to Setup and Use ADB - myTouch 4G Android Development

Hello All!
After much frustration with setting up ADB i finally got it working. Everyone said its simple and takes minimal knowledge but when things dont work, nothing really worked. Anyways after 2 hours of research trying to get ADB to work i finally got it all working and wanted to share my knowledge to anyone else that needed help.
This Guide is for windows only. If you are using Mac OS X please go here: ADB For Dummies
If you are using Linux please go here: [HOW-TO]Set up Android SDK/ADB/Fastboot on Ubuntu Linux
Like My Guide(s)? Donate
--------------------------------------------------------------------------
Things you need:
Android SDK - Download
Winrar - Download (32bit) Download (64bit)
Windows PC
USB Cable
A Rooted Android Device
--------------------------------------------------------------------------
Setting up the Android SDK
Download the file from above
Unzip to your desktop
Take the "android-sdk-windows" folder and move it to the root of your hard drive (C:\)
Right click on My Computer and click properties
Select the Advanced Tab or Advanced System Setting (Vista/Windows 7)
Select Environment Variables...
Press New
For Variable Name type: adb
For Variable Value type: C:\android-sdk-windows\tools
Now,
1. Run SDK Manager.exe located in the android-sdk-windows folder
2. If it gives you an error go to settings and click on "Force http//....."
3. Select all options and let it download and install
If you cant get the setup to work, Download the USB-DRIVERS folder - HERE (Windows XP/Vista/Windows 7)
--------------------------------------------------------------------------
Preparing your phone for ADB
Go to Settings on your phone
Select Applications
Select Development
Make sure 'USB Debugging' is checked
--------------------------------------------------------------------------
Installing Drivers
Plug in your phone through USB and DO NOT MOUNT IT!!!!!
Your computer should see a new device and try to install Android 1.0 driver (If it doesnt, scroll down to the "Im not getting a notification of Android ADB when i plug in my USB" section)
Let it load
Once it cant find them select "Install drivers from my pc"
The drivers you need are in the Android SDK 1.5r2 folder (C:\android-sdk-windows\usb_driver)
Depending on your OS pick x86 or amd64
You ADB Android Device should now be installed! Good Job
For Android SDK 1.5r7+
1. Run SDK Manager.exe
2. If it gives you an error go to settings and click on "Force http//....."
3. Select all options and let it download and install
If you cant get the setup to work, Download the USB-DRIVERS folder - HERE (Windows XP/Vista/Windows 7)
--------------------------------------------------------------------------
Check if your phone is detected by ADB
Open up Command Prompt (Go to run, type in cmd, press enter)
Type in
Code:
cd C:\android-sdk-windows\tools === Press Enter
adb devices === You should see your device listed
adb shell === you should see # in the next line
Now you are all set to run adb commands
Note: for a list of commands type in 'adb' in cmd
CONGRATS YOU NOW HAVE ADB FULLY RUNNING!
--------------------------------------------------------------------------
Droid Explorer by Camalot
Droid Explorer is a Windows software that will download, install, and setup the android SDK for you all in under a minute so you are ready to go. I use this on a daily basis. This amazing piece of software has tons of plugins and a built in file explorer for all your files on your phone! All you gotta do is download, install, and go!
Download Droid Explorer - Here
Install the program, and let it setup the SDK files for you
Connect your phone
Enjoy!
--------------------------------------------------------------------------
"Im not getting a notification of Android ADB when i plug in my USB"
Why: Your computer has detected your phone but as a protable device and as a storage device.
Fix: This took me a lot of research and time to figure out so this is what your are going to do.
First download USBDeview - Here
Unzip it
Run USBDeview.exe as Administrator
You will see all drivers being used on your computer
Highlight and Uninstall all drivers with the description have HTC Android (Should be 3 of them)
Right Click on the driver and press uninstall
Once done, Unplug your phone and plug it back in
You should now get the notification of the ADB device
Follow the steps above to install the drivers
Still not working?
Try this: Get ADB to recognize your myTouch 4G [Thanks importflip]
--------------------------------------------------------------------------
When Typing just adb in cmd you will get whats called a "usage doc" which gives you a lits of commands that you can use:
Code:
-d - directs command to the only connected USB devic
e
returns an error if more than one USB device is
present.
-e - directs command to the only running emulator.
returns an error if more than one emulator is r
unning.
-s <serial number> - directs command to the USB device or emulator w
ith
the given serial number
-p <product name or path> - simple product name like 'sooner', or
a relative/absolute path to a product
out directory like 'out/target/product/sooner'.
If -p is not specified, the ANDROID_PRODUCT_OUT
environment variable is used, which must
be an absolute path.
devices - list all connected devices
device commands:
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
(see 'adb help all')
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 jdwp - list PIDs of processes hosting a JDWP transport
adb install [-l] [-r] <file> - push this package file to the device and instal
l it
('-l' means forward-lock the app)
('-r' means reinstall the app, keeping its data
)
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
scripting:
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 specifie
d device
adb remount - remounts the /system partition on the device re
ad-write
adb root - restarts adb with root permissions
networking:
adb ppp <tty> [parameters] - Run PPP over USB.
Note: you should not automatically start a PDP connection.
<tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
[parameters] - Eg. defaultroute debug dump local notty usepeerdns
adb sync notes: adb sync [ <directory> ]
<localdir> can be interpreted in several ways:
- If <directory> is not specified, both /system and /data partitions will be u
pdated.
- If it is "system" or "data", only the corresponding partition
is updated.
--------------------------------------------------------------------------
Commands that you should know
adb push - Insert file to phone such as Stock.apk to /data/app_s
Code:
adb push <pathtofile.apk> <file system location> - Example: adb push c:\app.apk /data/app
adb pull - Remove file from phone such as Stock.apk from /data/app_s
Code:
adb pull <pathtofile.apk> - Example: adb pull /data/app_s/Stock.apk
adb install - Install app to phone
Code:
adb install <path to file> - Example: adb install c:/apps/apps2sd.apk
adb uninstall - Uninstall app from phone
Code:
adb uninstall <name of application> - Example: adb uninstall linda.apk
For more ADB Commands go - Here
--------------------------------------------------------------------------
Thats it for ADB! Congrats and if you have any questions please ask me or if anything is missing or not correct please tell me. I got all of this from research and personal experience.

Even after unstalling the HTC and myTouch 4G Drivers, when I plug my MT4G back in there's nothing to install. It automatically installs what it has to. I have no idea how to connect it with ADB.

I had to do this:
http://forums.t-mobile.com/t5/Operating-System-Software/HOW-TO-Get-ADB-to-recognize-your-myTouch-4G/m-p/540017

This is why after the temp root. I used root explorer to move the files to right folder . And then used the terminal app to do the rest. Really no need to use ADB..
Sent from my HTC Glacier using XDA App

Scoop24 said:
This is why after the temp root. I used root explorer to move the files to right folder . And then used the terminal app to do the rest. Really no need to use ADB..
Sent from my HTC Glacier using XDA App
Click to expand...
Click to collapse
I did that too but insmod said can not open wpx.ko every time. No idea why, worked perfect on my G2.
Sent from my HTC Vision using XDA App

Arcadia310 said:
Even after unstalling the HTC and myTouch 4G Drivers, when I plug my MT4G back in there's nothing to install. It automatically installs what it has to. I have no idea how to connect it with ADB.
Click to expand...
Click to collapse
You ran the HTCDriver exe that is on the SDCard? Did you go into Devices on your computer with your phone plugged in and see what it is showing up as?

setzer715 said:
You ran the HTCDriver exe that is on the SDCard? Did you go into Devices on your computer with your phone plugged in and see what it is showing up as?
Click to expand...
Click to collapse
It seemed to work for me when I copied the HTCDriver.exe from the storage card to my PC and install the drivers. My device showed up as some letters and numbers, which is ok I guess I have not named or done anything to the device.

Amazing write up. ABD has always gave me a hard time. I will be following this write up when I get time to root this. Thanks a lot!
Sent from my HTC Glacier using XDA App

Four things:
1. You don't need the generic drivers from the SDK package. I haven't even tried them. You need the HTC Drivers on the SD card.
2. I start adb by SHIFT-right clicking on the tools directory in the SDK folder and selecting 'start command prompt here' in the contextual menu. In order to see if things are working, just type 'adb devices' to see if the HTC device is connected.
3. I don't need to disable mounting of the device. I can adb and have the SD card mounted on the PC at the same time.
4. I don't see the need to add the environmental variable. Perhaps I've done something wrong, but theoretically, by adding this variable, you should just be able to type 'adb' in any command prompt window and have the system recognize adb. I can't seem to get that to work. So, instead I just do #2 above.

setzer715 said:
You ran the HTCDriver exe that is on the SDCard? Did you go into Devices on your computer with your phone plugged in and see what it is showing up as?
Click to expand...
Click to collapse
Yes I have, how exactly do I get into devices on my computer?
Sent from my HTC Glacier using XDA App

Arcadia310 said:
Yes I have, how exactly do I get into devices on my computer?
Sent from my HTC Glacier using XDA App
Click to expand...
Click to collapse
type
Code:
adb devices
in the command line

Arcadia310 said:
Yes I have, how exactly do I get into devices on my computer?
Sent from my HTC Glacier using XDA App
Click to expand...
Click to collapse
What does the output from typing "adb devices" give you?

grankin01 said:
What does the output from typing "adb devices" give you?
Click to expand...
Click to collapse
It says can not recognize ADB. I have had the SDK and ADB on my PC for months.

Arcadia310 said:
It says can not recognize ADB. I have had the SDK and ADB on my PC for months.
Click to expand...
Click to collapse
Sounds like you aren't in the directory that adb is in when you type it. try going into the tools directory in your sdk and run the command from there.

Arcadia310 said:
Yes I have, how exactly do I get into devices on my computer?
Sent from my HTC Glacier using XDA App
Click to expand...
Click to collapse
What version of windows are you running?

setzer715 said:
What version of windows are you running?
Click to expand...
Click to collapse
Windows XP. When i actually go to ADB and click on it it opens and closes within an instant.
Sent from my HTC Vision using XDA App

Arcadia310 said:
Windows XP. When i actually go to ADB and click on it it opens and closes within an instant.
Sent from my HTC Vision using XDA App
Click to expand...
Click to collapse
You don't click on it. It's a utility to use in command line. What it does is makes it easier to enter commands (along with some other useful stuff). Basically, anything you would type in terminal you can type in command line on your pc with "adb shell" pre-face. For example:
In terminal: cd /system/app
In command line: adb shell cd /system/app
Makes sense? You should really read up some guides out there

floepie said:
Four things:
1. You don't need the generic drivers from the SDK package. I haven't even tried them. You need the HTC Drivers on the SD card.
2. I start adb by SHIFT-right clicking on the tools directory in the SDK folder and selecting 'start command prompt here' in the contextual menu. In order to see if things are working, just type 'adb devices' to see if the HTC device is connected.
3. I don't need to disable mounting of the device. I can adb and have the SD card mounted on the PC at the same time.
4. I don't see the need to add the environmental variable. Perhaps I've done something wrong, but theoretically, by adding this variable, you should just be able to type 'adb' in any command prompt window and have the system recognize adb. I can't seem to get that to work. So, instead I just do #2 above.
Click to expand...
Click to collapse
Hey sorry about the driver problems... i wrote this guide based on the Nexus one and T-Mobile G1 and was asked to repost it here. If you let me know exactly what drivers you used i can change it in the OP.
The environmental variables set so that you can run adb and fastboot commands from anywhere in windows without have to be in the tools directory of the sdk. You can press SHIFT or w/e but this is a 1 time solution so u basically never have to be in that directory again...
As for the mounting, it is recommended that you dont mount your SD-Card and use adb for editing system files because that could corrupt your sd card.

Thank you, I got it working. Android is very different from winmo.

nephron said:
--------------------------------------------------------------------------
"Im not getting a notification of Android ADB when i plug in my USB"
Why: Your computer has detected your phone but as a protable device and as a storage device.
Fix: This took me a lot of research and time to figure out so this is what your are going to do.
First download USBDeview - Here
Unzip it
Run USBDeview.exe as Administrator
You will see all drivers being used on your computer
Highlight and Uninstall all drivers with the description have HTC Android (Should be 3 of them)
Right Click on the driver and press uninstall
Once done, Unplug your phone and plug it back in
You should now get the notification of the ADB device
Follow the steps above to install the drivers
Still not working?
Click to expand...
Click to collapse
This saved me... Constantly had it reverting back to USB storage device, this did the job. Thanks, a little something coming your way...
Bill

Related

I'm lost. Need rooting help.

I'm lost as hell. I found this thread:
http://www.androidpolice.com/2010/06...credible-next/
I did the unrevoked thing and I see this icon called SuperUser Permissions in my app list.
Am I able to proceed and fully root or do I have to re-do the root with the Toast method? This looks too complicated and by the way I tried the ./adb thing on my mac and I get errors saying "No such file or directory".
gqstatus0685 said:
This looks too complicated and by the way I tried the ./adb thing on my mac and I get errors saying "No such file or directory".
Click to expand...
Click to collapse
adb isn't installed on a Mac out of the box; You'll need to go download the Android SDK. Untar it somewhere (I put it in ~/), then open a term, do:
Code:
cents-macbook-pro:~ $ cd android-sdk-mac_86/tools/
cents-macbook-pro:~/android-sdk-mac_86/tools $ ./adb
CentroniX said:
adb isn't installed on a Mac out of the box; You'll need to go download the Android SDK. Untar it somewhere (I put it in ~/), then open a term, do:
Code:
cents-macbook-pro:~ $ cd android-sdk-mac_86/tools/
cents-macbook-pro:~/android-sdk-mac_86/tools $ ./adb
Click to expand...
Click to collapse
Massive Brain Freeze.. What do you mean by "(I put it in ~/)"?
I downloaded the Android SDK already. I understand what terminal is so when I download the Android SDK where do I place it?
Am I pointing terminal to the directory? Android SDK is currently in a folder on my desktop.
gqstatus0685 said:
Massive Brain Freeze.. What do you mean by "(I put it in ~/)"?
I downloaded the Android SDK already. I understand what terminal is so when I download the Android SDK where do I place it?
Am I pointing terminal to the directory? Android SDK is currently in a folder on my desktop.
Click to expand...
Click to collapse
~ in most flavors of Unix/Linux is short for your home directory. In MacOS, ~ is /Users/<username>. *nix pro-tip:
Code:
cents-macbook-pro:~ $ echo ~
/Users/cent
So in my case, ~ is short for /Users/cent.
If it's on your desktop, open a terminal and type:
Code:
cd ~/Desktop/android-sdk-mac_86/tools
-OR-
Code:
cd /Users/cent/Desktop/android-sdk-mac_86/tools
And then you can proceed to issue your adb commands. Just remember to prefix it with "./", which tells MacOS to look in the current directory for the adb command.
Code:
cents-macbook-pro:~/android-sdk-mac_86/tools $ ./adb devices
List of devices attached
HT05RHL1XXXX device
Ok. I think I'm just going to pay someone to do this for me. I'm getting a migraine.
So I'm basically typing the below:
~/android-sdk-mac_86/tools $ ./adb devices (Do I type this in one line)
List of devices attached
HT05RHL1XXXX device
I ran the thing and it doesn't show my phone listed.
I've got the time, if you have the money!
1. Make sure USB debugging is enabled. On your phone, go to Settings -> Applications -> Development, and make sure "USB debugging" is checked.
2. Make sure your USB cable is connected to your phone and computer.
3. Open a terminal
4. Type "cd ~/Desktop/android-sdk-mac_86/tools" and press enter.
5. Type "./adb devices" and press enter.
If it lists your device, you're then good to go to start following the rooting instructions!
You're the best dude. It was the USB debugging that was giving me the problem.
Good deal man, glad you got that part worked out! Have fun getting your root on!
this is the easiest way to do it....it worked for me
http://forum.xda-developers.com/showthread.php?t=701152
Do i have to keep dubugging mode on or can I turn it off before I root it. I did the command:
"cd ~/Desktop/android-sdk-mac_86/tools"
and then
adb push PC36IMG.zip /sdcard (Doesn't do anything. I tried without the space and some stuff popped up. Can I just manually put it on my SDcard?
gqstatus0685 said:
Do i have to keep dubugging mode on or can I turn it off before I root it. I did the command:
"cd ~/Desktop/android-sdk-mac_86/tools"
and then
adb push PC36IMG.zip /sdcard (Doesn't do anything. I tried without the space and some stuff popped up. Can I just manually put it on my SDcard?
Click to expand...
Click to collapse
Debugging mode needs to stay on if you want to use adb. You can turn it off once you root, but it won't hurt to leave it on.
The push command should tell you the number of bytes transfered. You need to make sure that the file you are pushing is in the current directory you're in (tools), or manually enter the path, like "./adb push ~/Downloads/PC36IMG.zip /sdcard"
But yes, you can mount the card as a disk drive and copy the file there in Finder.

[GUIDE] ADB for Noobs - How to get adb working !

A lot of people seem scared to use "adb" (Android Debug Bridge), or try it out and hit problems, then immediately give up.
I personally think that the method of rooting using adb (rage) is "better" than Visionary, because you have more control over the process and can see what it's doing. e.g. if there's an error message then you can see that, and ask for help.
But even if you don't use adb in rooting, it's still a very useful tool to have available. You can use it to run commands on your phone, copy files between your PC and phone, and to debug various issues that may occur at some point (plus lots more).
The guide in this first posting is for Windows, since I think this is what the majority of what people are using, and also it's what I use myself. Though you can use adb on Linux or Mac too. There's a Mac guide in the second posting, with a Linux guide "coming soon".
There are different ways to install adb. Below I list two methods, the first method I call "Complete", which involves installing the Android SDK (Software Development Kit), and the second "Quick" way. Either should be fine for rooting etc.
There's also a guide by gtrab in his useful FAQ posting (thanks !) HERE , which involves a very quick way to get it up and running (scroll down to the "Adb Mini Package" section).
INSTALLING ADB ON WINDOWS - METHOD A, THE "COMPLETE" WAY, USING THE SDK
Step 1
If you haven't done so already, then download and install HTC Sync from HTC's website.
You'll find it in the Support section for the Desire Z (works on the G2 too), e.g. at http://www.htc.com/www/help/htc-desire-z/#download.
This is HTC's software to sync various stuff from your phone to your PC, such as email, bookmarks etc. However, even if you don't need that stuff, HTC Sync has a bunch of USB drivers for your phone, and that's what we *do* need.
Step 2
Download and install the Android SDK (Software Development Kit) Starter package from http://developer.android.com/sdk/index.html
There are two choices for Windows there, a simple zip file which you can unzip somewhere appropriate on your PC (e.g. put it on C:\ if you like). Or there's an installer (which is the recommended option according to the Android website), though that forces you to download some Java stuff which we don't really need for adb and takes a lot longer to install (but there won't be any harm in getting). It doesn't really matter which one you pick though.
You can read all about how to install the SDK at http://developer.android.com/sdk/installing.html . Ignore all the stuff about Eclipse though, you don't need that unless you're going to start writing Android apps.
Step 3
Now we need to add the Platform Tools component to the SDK, because that contains adb.
Run "SDK Manager" on your PC. You will find that in the root directory of the SDK, so you can open up a file explorer window to find that, then double-click on "SDK Manager" to run it.
Wait for a few seconds while it checks on the Android website for updates etc, let it then pop up with a window showing you what is on offer.
Add the "Android SDK Platform Tools", you can "reject" (i.e. don't install) all the other things it offers you if you like, though there's no harm in installing them (just takes up disk space on your PC).
Step 4
Now we need to update your Path variable. This lets you run adb on your PC from a command window no matter which directory you are in (which makes things a lot easier). If you don't setup your Path, then every time you want to run adb, you will either have to type the whole long pathname where you put adb, or cd to where you've put adb and run it from there (which could be inconvenient if you are transferring files to/from your phone).
On your PC, right-click on "My Computer" and select "Properties". (on Vista, click on "Change Settings"). Go to the "Advanced" tab, then select "Environment Variables". Find the "Path" variable in the list of variables that it shows (you might need to scroll), and then double-click on that entry to edit it. Add the full path of the "tools" and "platform-tools" folders of the SDK to your path. e.g. if the SDK has been installed in "c:\Program Files\android-sdk-windows", then add to your Path "c:\Program Files\android-sdk-windows\tools;c:\Program Files\android-sdk-windows\platform-tools" (Please Note - don't put any spaces between the semi-colon and pathname, otherwise it won't work !)
Step 5
On your phone, go into Menu->Settings->Applications->Development and make sure you have the entry "USB Debugging" ticked. adb will not work without this.
Step 6
Plug your phone into your PC using the original HTC cable. This is important, do not use a third-party cable since it might not work with adb (even though it might seem fine with other communication with your phone). If this is the first time you've done it since installing HTC Sync, you might have to wait while it installs additional drivers.
Step 7
Fire up a command prompt on your computer, e.g. "Run" then "cmd", or pick the "Command prompt" option from the menus, and type in the following (obviously the C:\> bit is your actual PC's prompt, not what you type). To emphasise, you are running this on your PC, not directly from your phone (e.g. terminal emulator) :
Code:
C:\> adb devices
This should display something like the following :
Code:
List of devices attached
XXX12345 device
... where the "XXX12345" bit is actually your phone's serial number. If the list is blank and the phone is plugged in ok, go back to Step 5 and make sure USB Debugging is enabled. If you can see your phone, then you're in business, adb can see your phone and communicate with it, and you're ready to start using adb !
By the way, the first adb command that you type may well also come up with some lines similar to "adb deamon out of date" etc, but don't worry, that's normal, just check the rest of the output.
INSTALLING ADB ON WINDOWS - METHOD B, THE "QUICK" WAY, NO SDK
Thanks to amroush_1800 for the input on this.
Step 1
If you haven't done so already, then download and install HTC Sync from HTC's website.
You'll find it in the Support section, e.g. at http://www.htc.com/uk/supportdownloadlist.aspx?p_id=325&act=sd&cat=all.
This is HTC's software to sync various stuff from your phone to your PC, such as email, bookmarks etc. However, even if you don't need that stuff, HTC Sync has a bunch of USB drivers for your phone, and that's what we *do* need.
Step 2
Download this zip archive and unzip it somewhere memorable on your PC (e.g. into a folder on your desktop) - http://dl-ssl.google.com/android/repository/platform-tools_r04-windows.zip
Step 3
On your phone, go into Menu->Settings->Applications->Development and make sure you have the entry "USB Debugging" ticked. adb will not work without this.
Step 4
Plug your phone into your PC using the original HTC cable. This is important, do not use a third-party cable since it might not work with adb (even though it might seem fine with other communication with your phone). If this is the first time you've done it since installing HTC Sync, you might have to wait while it installs additional drivers.
Step 5
Fire up a command prompt on your computer, e.g. "Run" then "cmd", or pick the "Command prompt" option from the menus.
Use the "cd" command to change to the folder that contains the adb.exe and other files that you unzipped in Step 2.
Then type in the following (obviously the C:\> bit is your actual PC's prompt, not what you type). To emphasise, you are running this on your PC, not directly from your phone (e.g. terminal emulator) :
Code:
C:\> adb devices
This should display something like the following :
Code:
List of devices attached
XXX12345 device
... where the "XXX12345" bit is actually your phone's serial number. If the list is blank and the phone is plugged in ok, go back to Step 3 and make sure USB Debugging is enabled. If you can see your phone, then you're in business, adb can see your phone and communicate with it, and you're ready to start using adb !
By the way, the first adb command that you type may well also come up with some lines similar to "adb deamon out of date" etc, but don't worry, that's normal, just check the rest of the output.
INSTALLING ADB ON MAC
The following excellent guide kindly provided by siedkins, please thank him and not me !
What you will need:
A Mac
USB cable
Android SDK for OSX- http://developer.android.com/sdk/index.html
At the time of writing this the version was "android-sdk_r08-mac_86" so please have a look at the above link and let me know if you can't find that same version.
So download the zip file and I would extract it to a folder where you are happy to keep it such as within your user home folder i.e. Macintosh HD/Users/{Your User Name} and for my mac it is Users/siedkins which is how I have my OSX set up.
Then open then still in Finder, open "android-sdk-mac_86" then "tools".
Now launch Terminal - ⌘ + space then type Terminal or Applications>Utilities>Terminal
Now drag and drop the file called "android" in the "tools" folder into your terminal window and you should see something like:
/Users/siedkins/android-sdk-mac_86/tools/android
Then hit enter - this should load Android SDK
Next go to Available Packages on the left and Android Repository > Android SDK Platform-tools, revision 1 -tick the box and hit "Install Selected"
It should download and install the Platform Tools which includes ADB !!!!
Now quit Android SDK after it has downloaded and go back into Finder. Now you should see a new folder "platform-tools" in the "android-sdk-mac_86" folder. Open that and you can now see a file called adb.
Now .... I am going to show you how to make your life a lot easier in Terminal to run ADB without having to navigate to the folder every time you want to launch it.
Go back to your Terminal window and type (or copy & paste):
Code:
cd ~
The screen should then look like
NAME_OF_YOUR_MACHINE:~ USERNAME$
For me I have:
Mac-Pro:~ siedkins$
Next, type
Code:
touch .bash_profile
to create your new bash / path file
Next, type
Code:
open -e .bash_profile
to open it in TextEdit.
Now into Text Edit please copy:
Code:
export PATH=${PATH}:
Then go into Finder and navigate your your "android-sdk-mac_86" folder. Then click on the "platform-tools" folder and drag and drop this into TextEdit at the end of the code above that you copied. Mine looks like:
export PATH=${PATH}:/Users/siedkins/android-sdk-mac_86/platform-tools/
Yours should look like:
export PATH=${PATH}:insert your path to the "platform-tools" folder in your Android SDK here
All you need is that one line. Then Save and exit TextEdit and then very importantly QUIT TERMINAL.
Now ........ to turn on USB Debugging in your handset Settings > Applications > Development > USB Debugging - ticked and also go to Settings > Connect to PC > Default connection type > Charge Only and also UNTICK "Ask me ..." there also. You can always go back here and change these settings back.
Now plug in your phone to a USB port. I noticed that if I plugged my phone into one of the standard USB ports on the front of my machine I couldn't see the phone further down the line and if I plugged it into a powered USB port on the front (I have an "akasa AK-ICR-08" which has a powered connector behind the 5 USB ports. But you guys will probably be using a MacBook or MacPro and there shouldn't be any issues with the power to your USB ports.
Now to launch ADB - re-open terminal (remember that you had quit it - very important!) then type in:
Code:
adb devices
And you should see:
List of devices attached
HXXXXXXXXXX device
where XXXXXXXX is your unique phone ID.
Now you can run all of your favourite ADB commands straight by typing:
adb shell
etc straight into Terminal. I won't go into that here as there are plenty of guides about what to do with ADB once it's installed!
Now you have ADB setup on your Mac and can run it without the need for installing HTC Sync - un-installing it - loading some modified drivers over the top !!!!
It all just works !!!!!!
INSTALLING ADB ON LINUX
Coming soon ...
USING ADB
There's a comprehensive guide to using adb, including all its commands, at http://developer.android.com/guide/developing/tools/adb.html
Here are a few example commands :
Code:
C:> adb push hello.txt /data/local/tmp
The above copies the file hello.text from the current directory of your PC (i.e. the directory shown in the command prompt) into the /data/local/tmp directory on your phone.
Code:
C:\> adb pull /sdcard/error.log error.log
The above copies the file /sdcard/error.log onto your PC.
Code:
C:\> adb install Superuser.apk
The above installs the app in the Superuser.apk file in the current directory of your PC, onto your phone.
Code:
C:\> adb shell
The above starts a command prompt session on your phone. So when you see the $ prompt, that's your phone and commands you type there will be executed on your phone.
Code:
C:\> adb shell ls
The above runs the command "ls" on your phone and displays the results. So it's a way of issuing one command at a time, without starting your own shell session. You can subsitute other shell commands for the "ls".
Code:
C:\> adb reboot
The above reboots the phone.
Code:
C:\> adb reboot bootloader
The above reboots the phone into the bootloader (hboot).
Code:
C:\> adb reboot recovery
The above reboots the phone into recovery.
USING ADB FOR DIAGNOSTICS (logcat)
Coming soon ...
Thank god! Lol thanks for all your hard work.
Sent from my HTC Vision using XDA App
Get a "how to logcat" section added.
Nice work. Can we elect you to be a mod?
Sent from my HTC Vision using XDA App
ddotpatel said:
Get a "how to logcat" section added.
Click to expand...
Click to collapse
Thanks for the suggestion, will do
Nice dude. Just what I needed
Sent from my HTC Desire using XDA App
+1 mod vote!
Sent from my HTC Vision using XDA App
Nice guide mate. Let me know if you need any more posts or help in any way
steviewevie said:
Using adb
Using adb for logcat
adb logcat
Or
adb lolcat
Click to expand...
Click to collapse
Also update it for Mac / Linux users.
Mainly different adb files (I had adb and fastboot for Win/Mac/Lin uploaded somewhere, if you want?) and they go in /system/bin instead of PATH.
Otherwise, good idea + well done.
DanWilson said:
Also update it for Mac / Linux users.
Mainly different adb files (I had adb and fastboot for Win/Mac/Lin uploaded somewhere, if you want?) and they go in /system/bin instead of PATH.
Otherwise, good idea + well done.
Click to expand...
Click to collapse
Thanks. I need someone to help me come up with the different steps for Mac/Linux users please ? Then I can add those in.
steviewevie said:
Thanks. I need someone to help me come up with the different steps for Mac/Linux users please ? Then I can add those in.
Click to expand...
Click to collapse
I'll do that.
I'll also hunt down my Mediafire adb and fastboot files, because not everyone wants the whole SDK
I don't know if you need any drivers for the phone (like HTC Sync for Windows). Someone else will need to tell you, or you can wait till Christmas.
INSTALLING ADB
Step 0
Drivers perhaps? XD
Step 1
Download these files;
Mac - http://www.mediafire.com/?z8myxs9941kz3gg
Linux - http://www.mediafire.com/?m62rt943mroxm4s
Or you can download and install the Android SDK (Software Development Kit) Starter package from http://developer.android.com/sdk/index.html
You can read all about how to install the SDK at http://developer.android.com/sdk/installing.html . Ignore all the stuff about Eclipse though, you don't need that unless you're going to start writing Android apps.
Now, from version 8 (Android 2.3) of the SDK onwards, adb has been taken out of this starter package. If you downloaded version 7 (Android 2.2), then you've already got adb and you can skip Step 3 and go straight to Step 4 below. Otherwise you need to proceed to Step 3 to add adb to the SDK.
Step 2
Extract the files and rename "adb-linux" ("adb-mac") to "adb" and "fastboot-linux" ("fastboot-mac") to "fastboot"
You could call it anything you like, like "cheese" and "bread", but that makes things difficult.
Step 3
Mac - Copy the files to the folder /bin
You will need to unhide the folder. Google it.
Linux - Copy the files to /system/bin *OR* /bin
I have not used Linux for ages so my folders are rotting away. I believe you will need root access to do this, I used Kongregate (I think) as an app to control my root copying needs.
Step 4
On your phone, go into Menu->Settings->Applications->Development and make sure you have the entry "USB Debugging" ticked. adb will not work without this.
Step 5
Plug your phone into your PC using the original HTC cable. This is important, do not use a third-party cable since it might not work with adb (even though it might seem fine with other communication with your phone). Or whatever.
Step 6
Open a Terminal window. On your PC/Mac. To emphasise, you are running this on your PC, not directly from your phone (e.g. terminal emulator) :
The part were it says "Dan-Wilsons-MacBook:~ danwilson$" will probably not be on your PC/Mac, unless you are called Dan Wilson, and have a MacBook.
Code:
Dan-Wilsons-MacBook:~ danwilson$ adb devices
This should display something like the following :
Code:
List of devices attached
XXX12345 device
... where the "XXX12345" bit is actually your phone's serial number. If the list is blank and the phone is plugged in ok, go back to Step 6 and make sure USB Debugging is enabled. If you can see your phone, YOU WIN A CHEESECAKE!
If you decided to be awkward and call "adb-linux" ("adb-mac") "cheese", replace the word "adb" in command lists (like the above) to "cheese". It looks cool but complicates things.
Example;
Code:
Dan-Wilsons-MacBook:~ danwilson$ cheese devices
-------------
I think this looks OK. Some bits are weird and I don't know about drivers, but still, better than nothing. It is rough, but I've not done it in ages. Sorry bout that.
Here is the adb and fastboot files for Windows. Check they work with the Z before throwing them in the first post. If you do.
http://www.mediafire.com/?zlbyfbaaf5lrj8i
I've updated this guide to flesh it out a bit more (still more to be done though).
Significantly, please note that in the latest version of the SDK (i.e the one for Android 2.3), they have taken adb *out* of the Starter version of the SDK. So now there's an additional step, which is downloading the "Platform Tools" component of the SDK. It's all in the guide though.
nice, this needs to be "stickied"..
steviewevie...
whatever you are on.. can i haz some?
you are poster of the year! wow, such effort.
this beeyotch must be stickied all over the world.
EDIT -- i dont see "adb pull /" so as to dump all your files from system data etc into your sdk folder. if i missed that nevermind!
@steviewevie:
My 2 cents for your great work:
I have tested and uploaded a Mini ADB package and the ADB USB drivers for Windows Vista / Windows 7, to the Resources Centre, easy tutorial + FAQs thread here:
http://forum.xda-developers.com/showthread.php?t=835777
I thought this would make things easier for newbies or people who don't want to download the whole SDK / Sync software
Also, setting the path is not required, since the "Runme" file is located inside the same folder within the ADB files
This could save some steps for newbies
If you find it helpful, feel free to link from your guide
Thanks for the input guys, I have some updating to do !
steviewevie said:
INSTALLING ADB - METHOD B, THE "QUICK" WAY, NO SDK
Step 2
Download the adb binary from ? * to be completed *
Click to expand...
Click to collapse
Direct Download Links for Android SDK Platform-tools, revision 1
ht*p://dl-ssl.google.com/android/repository/platform-tools_r01-windows.zip
ht*p://dl.google.com/android/repository/platform-tools_r01-windows.zip
It contains ADB.exe and needed dlls
size 3.06 MB
Also i recommend ADBMagic from Chainfire if you got tired of using ADB commands by hand for a lot of operations
ht*p://forum.xda-developers.com/showthread.php?t=746313
Have fun
if you add adb.exe to system32 folder is windows u can adb from anywhere in command prompt.. just in case adding the variables dont work

G2; How to initiate/ launch adb

ok,,,noob here.. but not a dummy. I want to load music on my sd card. I have downloaded everything I think I'm supposed to have.. SDK, adb, drivers eclipse java program...I'm running vista 32 and have created C:\program files\Android\android-sdk-windows. I have extracted all files I think all the drivers. I have spent some considerable time (wee hours ..) I can start the sdk .exe and the java eclipse but how do I use it to connect to my usb connected phone? I want to load data onto my sd card. BTW I have temprooted with VISIONary r14.
The cmd prompt window that comes up with the sdk .exe does not respond to typing in it. Commands typed into the computer's cmd prompt are not recognized. Or maybe I'm typing the wrong thing. I can't navigate to the android folder, to find my usb'd phone. I have read a lot of posts here trying to figure this out..I'm really at wits end anybody please help!!! I thought there'd be a desktop lauch icon..haha.
There's a guide for using ADB in the dev forum: http://forum.xda-developers.com/showthread.php?t=865685
If you are just trying to put music on your SD card though, I don't think you need to do all of this. Just mount the SD card once your phone is connected to your computer (there will be an option that appears in your notification drawer to do this). Your SD card will then show up as a drive on your computer...
I saw that guide..Step 4 doent apply on vista.."My Computer" and the path that is described is not on Vista, or anything similar. I can't "update your Path variable." It did not say HOW TO LAUNCH! What is it application that I need to work from for adb? I have read every post I could find here..and that one maybe four or 5 times. I want to use adb I can see and browse my SD card as drive F..thanks..I still want to run adb.. I cant type into the sdk cmd pane.
captmack007 said:
I saw that guide..Step 4 doent apply on vista.."My Computer" and the path that is described is not on Vista, or anything similar. I can't "update your Path variable." It did not say HOW TO LAUNCH! What is it application that I need to work from for adb? I have read every post I could find here..and that one maybe four or 5 times. I want to use adb I can see and browse my SD card as drive F..thanks..I still want to run adb.. I cant type into the sdk cmd pane.
Click to expand...
Click to collapse
Whoa whoa whoa! If all you want to do is load music on your phone and your using Windows, either just install Doubletwist on it. It's kind of like iTunes for everything. Or just make a music folder and load your music onto that. No adb needed.
Now, about adb; there is no program to run. You don't really need to set your path either, it just makes things easier. Just cd to the sdk tools folder.
Sent from my HTC Vision
It's not all i want to do...i should not have mentioned it.
cd to the ??
If I wish to make an adb command, what and where do I go/do to do that....on a vista puter....thnkx
I can see tghe adb android interface is there ...I figured out to right click on "computer" "manage", which opens Computer Manager. There in the left column is "Device Manager" clicked on that and I see the Android Phone listed, with subcatagory android adb interface. and down at the bottom under "Portable Devices" HTC is shown. All drivers are showing up and say they are functioning properly.
appreciate the help..
captmack007 said:
It's not all i want to do...i should not have mentioned it.
cd to the ??
appreciate the help..
Click to expand...
Click to collapse
Oh I see. You first mentioned simply putting music on your phone and the next thing you've got a full development emvironment! Lol!
Cd to the tools folder of the android sdk. (Bear with me as I haven't done this on windows in a good long while). For example, open command prompt, then type "cd C:\androidsdk\tools", where the androidsdk part is whatever the sdk is called.
Sent from my HTC Vision
Once you have the android sdk on your computer- change the folder name to something simple so typing is easier. You'll also want to edit the enviornment variables (google is your friend, but I'll post a link tomorrow to help). The latest sdk is missing a dll file - I'm sure one of us can upload it, I just don't remember which one it is right now.
Now that you've got that done open command prompt an type:
cd c:\where\you\put\it (the sdk)
Then type:
adb devices
Or
adb start-server
If you get an error it means you did something wrong.
"cd C:\androidsdk\tools
I'll ad that to the list of command that do nuttin...lol
I downloaded all the sh*t I was told in these threads to dowload...yeah..everything to create an app. lol
I still am waiting to read or be informed of the precise command line that will let me into adb... tfn
thks KCRic... I will give that a shot.. nice tip on renaming the folder..I did not type cd C: first.. (the tuts I've been rackin my brain on did not say that..
I had read that it was missing and found it downloaded it and put it in tools..
the edit the environment variables is what I can't find where to do that.. thanks.
I added the missingAdbWinApi.dll and AdbWinUsbApi.dll and Adb.exe (of course) into the tools folder...
I renamed the folder in Programs\Android..."android-sdk-windows" simply "sdk"
I typed in:
cd c:\program files\Android\sdk\tools
I got in..opened a port..gave me my phones serial #
so this is where adb commands are made? (stupid question perhaps)
I thought the other cmd screen that opens with the sdk.exe was it. And I cant type anything there anyway.
If you have got "adb devices" to show you your phone's serial number, then adb is working find, and you can start using the other adb commands.
Sent from my HTC Desire Z
captmack007 said:
I renamed the folder in Programs\Android..."android-sdk-windows" simply "sdk"
I typed in:
cd c:\program files\Android\sdk\tools
I got in..opened a port..gave me my phones serial #
so this is where adb commands are made? (stupid question perhaps)
I thought the other cmd screen that opens with the sdk.exe was it. And I cant type anything there anyway.
Click to expand...
Click to collapse
Just type "adb", no quotes, and that will give you an output of all the adb commands.
captmack007 said:
I renamed the folder in Programs\Android..."android-sdk-windows" simply "sdk"
I typed in:
cd c:\program files\Android\sdk\tools
I got in..opened a port..gave me my phones serial #
so this is where adb commands are made? (stupid question perhaps)
I thought the other cmd screen that opens with the sdk.exe was it. And I cant type anything there anyway.
Click to expand...
Click to collapse
Yeah you're up and running now. If you typed adb devices or adb usb and got it to list your phones serial # then it's connected and running.
As far as adb commands, you can type adb help to get a list of some and they're pretty easy. Some of them are:
adb push <path\to\file> <where\to\push> - copies files to your phone
adb pull <path\to\file> <where\to\put\it> - copies files from the phone to your computer
adb remount - remounts your device
adb reboot - self explanatory
adb install <path\to\file> - self explanatory
adb start-server - starts adb service
adb kill-server - kills adb process (I always type this in when I'm done, sometimes it doesn't terminate and causes issues)
adb shell <linux type command> - runs command in the device shell
adb shell [enter] - operates in the devices shell until you type {exit}
Once you enter the shell you can type {su} to enter superuser. All commands in the shell are in linux format so if you're unfamiliar with that then do some reading.
HERE is a link that should help with adb also.
KCRic said:
As far as adb commands, you can type adb help to get a list of some and they're pretty easy. Some of them are:
adb push <path\to\file> <where\to\push> - copies files to your phone
adb pull <path\to\file> <where\to\put\it> - copies files from the phone to your computer
adb remount - remounts your device
adb reboot - self explanatory
adb install <path\to\file> - self explanatory
adb start-server - starts adb service
adb kill-server - kills adb process (I always type this in when I'm done, sometimes it doesn't terminate and causes issues)
adb shell <linux type command> - runs command in the device shell
adb shell [enter] - operates in the devices shell until you type {exit}
Once you enter the shell you can type {su} to enter superuser. All commands in the shell are in linux format so if you're unfamiliar with that then do some reading.
HERE is a link that should help with adb also.
Click to expand...
Click to collapse
Apologies if you've seen it already, but most of that is covered in the adb guide on the dev forums, with that link also - http://forum.xda-developers.com/showthread.php?t=865685
Thanks for the great info... Now I'm standing at the gate (maybe the precipice..lol)
As far as completing the pathway...
I found (through excrutiating trial and error) the Vista path for step 4 on that tut.
So under "Environment Variables" there are two editable windows, and the bottom with the "Path" that the tut says to edit says to ad the path to the tools folder and the platform folders...
The question is, when I double click to edit the Path line,(C:\Program Files\JavaFX-sdk1.3....) it changes to a different path (~1C:\Program Files\Quicktime\QTSystem\
So am I to delete that line and ad a new path or ad to the Quicktime line..
ty
The existing path was probably just too long to show up on the screen (so you saw the beginning of the line initially and the end of the line when you tried to edit it). Just add a semi-colon and then the path you want to add. You don't want to delete what you already have there since it might mess with other software installed on you computer.
So for example:
...C:\Program Files\Quicktime\QTSystem\;C:\android-sdk-windows\tools
Quicktime and android are both separatefolders under program files... so....no.. that's not it. I don't even know why java showsthere... my sdk is in C:/Program Files/Android/sdk/tools...
p.s. how you do backslash on this keyboard....lol
Sent from my T-Mobile G2 using XDA App
The path is simply a listing of directories separated by semi-colons. When executing a command, Windows will check the local directory you are in first for the program, and then parse through the directories listed in your path. This is why this step is even needed (it allows you to run adb.exe from any directory instead of always having to change to the tools directory). This is also why I said it's not a good idea to simply delete what is already there. You just want to add the tools directory where adb.exe is located to the existing listing.
So in your case, the end of the path variable will look like this:
...C:\Program Files\Quicktime\QTSystem\;C:\Program Files\Android\sdk\tools
Alternatively, you could stick it in the beginning of the path (so double-click to edit the variable, hit Home to go to the beginning, and add the directory there with a semi-colon). It should look like this in your case:
C:\Program Files\Android\sdk\tools;C:\Program Files\JavaFX-sdk1.3...
And there is no backslash on the G2 hardware keyboard (as you noticed), but you can access it by hitting the Alt key and then space to pull up a dialog box of additional symbols.
Word of advice to anyone reading this:
When adding the adb to your path make sure and don't put a space after the the semicolan. When I set mine up I spent 4 hours trying to figure out why it wasn't working, and it was the stupid space lol.
I haven't looked at the wiki since I did it back in October so maybe they've updated it to be clearer but just want to throw it out there.
Sent from my HTC Vision using XDA App

[GUIDE *WITH VIDEO*] ADB/Fastboot Easy 5 minute setup (Great for nOObs)

Ok there are some other guides here on the forums for this but they all require you to download the Android SDK. That can be very time consuming and confusing if you run into issues. I have been looking at a way to have the capability to push and pull files using my laptop but i really didnt want to go through downloading and setting up the whole SDK just to use adb.
If anyone has followed any of my threads, you know I am all about trying to get things done in the easiest way possable to help the people that are new to Android. This method has worked for me but there is no guarentee that it will work for you and I am no way responsable for anything that happens to anything unless it works great for you. Then I will take all credit j/k. With that being said:
The first method is for Windows based OS. I have tested it on XP but I would imagine it will work on any Windows OS. If I am informed of something different I will update it here. The Mac version is in post #2 and takes less than 1 minute to do. Much thanks to kwbdc and stlouie65 for the help on this.
Instructions for setting up Adb/Fastboot (windows)
1. On your phone go to Settings/Applications/Development and make sure USB debugging is ON and plug it in via the usb..
2. Install drivers on your PC. This is done on the MT4G/HTC devices by going onto your sd card and clicking on the HtcDrivers.exe file while viewing the files on your PC. It should automaticly install them to your PC. If you are using another phone or have trouble installing the ones from your sd card you can try pda.net or HTC Sync for the drivers. Here are links for pda.net 32-bit Windows 7/Vista/XP and for 64-bit Windows 7/Vista. Install the program by hitting "Run" and follow the instructions. You can remove it at a later time.
3. Download the file at the bottom of these instructions to your desktop and extract the contents. There is 1 folder and a install note (these instructions) that should extract. You can use a program called 7-ZIP (google it, its free and a great tool).
4. Open your "Start" menu and click on "My Computer". Then choose "Local Disk C:".(You can now click and drag the adb folder you extracted to the C: drive.
5.Open a command prompt and type cd\adb and hit enter. You should now see something that looks like this C:\adb>
6.Type adb devices then hit enter in the command prompt and it should list your device.
7. You can also type fastboot devices then hit enter in the command prompt an it should list your device. (you must be in the bootloader for fastboot to recognize your device)( adb command= adb reboot bootloader )
You should now be ready to send commands to your phone via ADB or Fastboot. You will need to repeat steps 5-6 anytime you want to use ADB/Fastboot. To send a file using Adb or fastboot make sure to put the file in your "adb" folder before giving the command to send it to your device.
If this helped you please use the "Thanks" button to show your gratitude.
____________________________________________________________________
Please feel free to ask any questions you want and I will help in any way I can.
DOWNLOAD MIRROR
Here are some commands for Adb/Fastboot.
DO NOT USE ANY COMMANDS THAT YOU ARENT SURE OF OR DONT KNOW WHAT THEY DO. I AM NOT RESPONSABLE FOR ANYTHING THAT YOU DO TO YOUR PHONE.
ADB Commands
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
(-l means list but don't copy)
(see 'adb help all')
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
('-l' means forward-lock the app)
('-r' means reinstall the app, keeping its data)
('-s' means install on SD card instead of internal storage)
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
DATAOPTS:
(no option) - don't touch the data partition
-w - wipe the data partition
-d - flash the data partition
scripting:
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
networking:
adb ppp <tty> [parameters] - Run PPP over USB.
Note: you should not automatically start a PPP connection.
<tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
[parameters] - Eg. defaultroute debug dump local notty usepeerdns
adb sync notes: adb sync [ <directory> ]
<localdir> can be interpreted in several ways:
- If <directory> is not specified, both /system and /data partitions will be updated.
- If it is "system" or "data", only the corresponding partition is updated.
environmental variables:
ADB_TRACE - Print debug information. A comma separated list of the following values
1 or all, adb, sockets, packets, rwx, usb, sync, sysdeps, transport, jdwp
ANDROID_SERIAL - The serial number to connect to. -s takes priority over this if given.
ANDROID_LOG_TAGS - When used with the logcat option, only these debug tags are printed
Click to expand...
Click to collapse
.
Fastboot Commands
usage: fastboot [ <option> ] <command>
commands:
update <filename> reflash device from update.zip
flashall flash boot + recovery + system
flash <partition> [ <filename> ] write a file to a flash partition
erase <partition> erase a flash partition
getvar <variable> display a bootloader variable
boot <kernel> [ <ramdisk> ] download and boot kernel
flash:raw boot <kernel> [ <ramdisk> ] create bootimage and flash it
devices list all connected devices
reboot reboot device normally
reboot-bootloader reboot device into bootloader
options:
-w erase userdata and cache
-s <serial number> specify device serial number
-p <product> specify product name
-c <cmdline> override kernel commandline
-i <vendor id> specify a custom USB vendor id
-b <base_addr> specify a custom kernel base address
-n <page size> specify the nand page size. default: 2048
Click to expand...
Click to collapse
Mac Instructions
Download THIS FILE Extract the 2 files inside it and place them on your Macintosh HD root. Plug in your phone to the usb, open terminal and type /adb devices.
It should now give u a serial #
To send a file using adb/fastboot the file must be placed in your mac HD Root or you must give the location in your command path.
Wow this is so easy, thanks man. Only thing is, you said download the contents at the bottom of the post. where'd it go?
Edit: Oh the big Download spinning button.. I don't know how I missed it. Thanks again
92drls said:
Wow this is so easy, thanks man. Only thing is, you said download the contents at the bottom of the post. where'd it go?
Edit: Oh the big Download spinning button.. I don't know how I missed it. Thanks again
Click to expand...
Click to collapse
Not a prob...Please let me know if this works good for you.
Just got back home and tried it. I'm prolly doing it wrong but it says exactly: c:\adb> push c: \adb\480x800_animationparticles1_blue.zip / data/local/bootanimation.zip hit anter and its done, gives me the size and seconds it took to transfer. I type adb reboot and it does but no go on the boot animation, same ol htc stuff
Rom: eViL-4g HD v.0.2.3
Sounds like I have adb successfully setup I just cant seem to figure out how to change the bootanimation. Know of a sure fire ways on the 4g? I could find several through other builds but not for the 4g specifically. I also tried through root explorer and emulator but no luck. Still boots the same, any help?
92drls said:
Just got back home and tried it. I'm prolly doing it wrong but it says exactly: c:\adb> push c: \adb\480x800_animationparticles1_blue.zip / data/local/bootanimation.zip hit anter and its done, gives me the size and seconds it took to transfer. I type adb reboot and it does but no go on the boot animation, same ol htc stuff
Rom: eViL-4g HD v.0.2.3
Sounds like I have adb successfully setup I just cant seem to figure out how to change the bootanimation. Know of a sure fire ways on the 4g? I could find several through other builds but not for the 4g specifically. I also tried through root explorer and emulator but no luck. Still boots the same, any help?
Click to expand...
Click to collapse
Put the file you are trying to push in the same folder you created.
ReName it bootanimation.zip
To push your file use this command after you cd into the folder you created.
You also need to be in recovery with your system mounted.
adb push bootanimation.zip system/customize/resource/bootanimation.zip
That is the location of the bootanimation on that rom.
Hope this helped
Worked great thank you, know how to do the splash screen image too??!
Back on topic, your adb method was very easy and well instructed. I'll be thanking you on payday
Edit: I found the thread about the splash screen by iriscience.. Thanks again
92drls said:
Worked great thank you, know how to do the splash screen image too??!
Back on topic, your adb method was very easy and well instructed. I'll be thanking you on payday
Edit: I found the thread about the splash screen by iriscience.. Thanks again
Click to expand...
Click to collapse
I do know how to change it but would rather you have the fulfillment of learning how to do it yourself You can find a great guide and splashscreens in the thread by Iriscience. Make sure to thank him for it.
Back on topic, I'm glad this worked good for you. It really is pretty simple. I dont have have a donation link (I do this for the love of helping people mod their phone) but I would appreciate it if you hit the "Thanks" button at the bottom of any post that have helped you.
Thanks for this... after two years owning android phones you finally got me to jump into adb instead of relying on the terminal emulator. I had tried before, but my PC never downloaded the SDK correctly, and I could never get it set up. Your download and instructions worked flawlessly.
Question: What is everyone's favorite mod using adb/fastboot? I already changed my splash screen, but I am hooked on trying out my new tool.
@trueblew, Thank you for this I follow all your threads and your always posting good Information, Your Instructions are simple and usefull. I am now ready to use adb, something I thought I would never venture In, Again Thanks.
30Glock said:
@trueblew, Thank you for this I follow all your threads and your always posting good Information, Your Instructions are simple and usefull. I am now ready to use adb, something I thought I would never venture In, Again Thanks.
Click to expand...
Click to collapse
geoffott said:
Thanks for this... after two years owning android phones you finally got me to jump into adb instead of relying on the terminal emulator. I had tried before, but my PC never downloaded the SDK correctly, and I could never get it set up. Your download and instructions worked flawlessly.
Question: What is everyone's favorite mod using adb/fastboot? I already changed my splash screen, but I am hooked on trying out my new tool.
Click to expand...
Click to collapse
Thanks Guys, I appreciate the kind comments! My whole intention of this thread is to help people that couldnt or didn't want to set up the Android SDK have a good solid way of pushing and pulling files to their phone.
Great guide Drew! I'll finally be giving adb a shot! I've always been intimidated by it.
This helps for sure.
Sent from my HTC Glacier using XDA App
thank you! i hate the sdk tools! this works much quicker for me! my only question is that when i type in "adb devices" it lists my device but when i type in "fastboot devices" it doesnt list or do anything. it just basically drops to another line for me to enter another command. does that mean that i cant fastboot?
dominicanman912 said:
thank you! i hate the sdk tools! this works much quicker for me! my only question is that when i type in "adb devices" it lists my device but when i type in "fastboot devices" it doesnt list or do anything. it just basically drops to another line for me to enter another command. does that mean that i cant fastboot?
Click to expand...
Click to collapse
You must be in fastboot (bootloader) for fastboot to recognize your device. You can get there by by turning off your phone then holding down the volume down button and the power button at the same time. Our you can use this command via adb (usb plugged in):
adb reboot bootloader
Your device should automatically go into fastboot from the bootloader. If it doesn't you can scroll to fastboot using the volume button and hit the power button.
Thank you for answering my question! I have been reading a lot about adb over the past few days and I feel more comfortable with this way than the pain in the ass sdk method! When I get back on the pc, I will be sure to hit that thanks button because you have been a great help.
Sent From my ICE COLD HTC Glacier aka MyTORCH4G!
How do I flash a recovery using fastboot.
I have an Evo Shift and I was told I could use this method.
The recovery is here along with the vague directions. 2nd Post. http://forum.xda-developers.com/showthread.php?t=932153
koolkid09 said:
How do I flash a recovery using fastboot.
I have an Evo Shift and I was told I could use this method.
The recovery is here along with the vague directions. 2nd Post. http://forum.xda-developers.com/showthread.php?t=932153
Click to expand...
Click to collapse
Set up adb/fastboot using the instructions in the first post. put your recovery in the folder you created and make sure it is namesd recovery.img . When you have done that and adb will recognize your device you can type these commands pressing enter after each one:
adb reboot bootloader
fastboot flash recovery recovery.img
TrueBlue_Drew said:
Set up adb/fastboot using the instructions in the first post. put your recovery in the folder you created and make sure it is namesd recovery.img . When you have done that and adb will recognize your device you can type these commands pressing enter after each one:
adb reboot bootloader
fastboot flash recovery recovery.img
Click to expand...
Click to collapse
Thank you so much!! I have been trying to do this for the past hour now! lol
Awesome post! Saved me a (potentially painful) convo with a friend who's just getting into modding his MT4G.
error
I feel like an idiot, idk what im doing wrong, in command prompt i get this message, 'adb' is not recognized as an internal or external command, operable program or batch file......what am I doing wrong?

Loop Boot after installing chainfire3d

my GT-N5100 got stock in loop boot after I install the driver of chainfire3d..
i tried to restore it factory default..erasing cache...but nothing seems to work...
I already resolved it using adb
This is How I fixed mine..
I search several forum and and no one has the complete tutorial on how to use adb..
so I created my own step by step tutorial on how I did it just in case I need it again or someone needs it...
I hope this fixed yours as well..
Download ADB here: http://developer.android.com/tools/help/adb.html
1. extract the file you just download
2. put it in C: (so you can access it easily)
3. you can rename it (you can name it anything you want but we will use "Android-adb" in this tutorial)
4. open SDK Manager.exe
5. make sure that Android SDK tools, Android SDK Platform-tools, Android SDK Build-tools and Google USB Driver is installed
6. Boot your device to recovery mode (hold volume up + power) hold it until it is turned on
7. connect your device through usb to PC (it should automatically install your usb driver if not download samsung usb driver)
8. go to CMD
9.type cd c:\Android-adb\sdk\platform-tools
or
9.1 press windows + pause/break
9.2 click Advance tab
9.3 click Environment Variables
9.4 search "path" under System variable
9.5 click edit (there is a value for Variable value in default)
9.6 at the end of the default value add this ;C:\Android-adb\sdk\platform-tools
9.7 click ok
10.
type this
adb
adb shell
[email protected]:/ $ su
adb shell /system/lib/cf3d_uninstall.sh
11. your device will reboot...after that it should be fine...
NOTE:
if you encounter device not detected or something try this..
adb kill-server
adb start-server
>.<
Please read before installing anything.
Chain fire works for gingerbread. .. DOESN'T WORK with ice cream sandwich and jelly bean
Sent from my GT-N5100 using Tapatalk 2
actualy I didn,t download it from from google play...
that **** bastard site didn't include that warning...
sorry chainfire for not buying it from google play maybe thats my karma..haha..
but my gt-N5100 is fine now..I google for a solution and I found 1..
Edit: if chainfire manage to make it compatible with JB, I'll promise to pay for it next tym.. I wanted to play some THD...
Sent from my GT-N5100 using XDA Premium HD app
jhonuy03 said:
actualy I didn,t download it from from google play...
that **** bastard site didn't include that warning...
sorry chainfire for not buying it from google play maybe thats my karma..haha..
but my gt-N5100 is fine now..I google for a solution and I found 1..
Edit: if chainfire manage to make it compatible with JB, I'll promise to pay for it next tym.. I wanted to play some THD...
Sent from my GT-N5100 using XDA Premium HD app
Click to expand...
Click to collapse
Where did you read or see its compatible with JB
Sent from my Galaxy Nexus using XDA Premium HD app
Same issue stuck at boot logo
Could you please let me know how to solve this issue using adb
I am having same issue :crying:
Thanks in advancex
FIXED
ankitwase said:
Could you please let me know how to solve this issue using adb
I am having same issue :crying:
Thanks in advancex
Click to expand...
Click to collapse
This is How I fixed mine..
I search several forum and and no one has the complete tutorial on how to use adb..
so I created my own step by step tutorial on how I did it just in case I need it again or someone needs it...
I hope this fixed yours as well..
Download ADB here: http://developer.android.com/tools/help/adb.html
1. extract the file you just download
2. put it in C: (so you can access it easily)
3. you can rename it (you can name it anything you want but we will use "Android-adb" in this tutorial)
4. open SDK Manager.exe
5. make sure that Android SDK tools, Android SDK Platform-tools, Android SDK Build-tools and Google USB Driver is installed
6. Boot your device to recovery mode (hold volume up + power) hold it until it is turned on
7. connect your device through usb to PC (it should automatically install your usb driver if not download samsung usb driver)
8. go to CMD
9.type cd c:\Android-adb\sdk\platform-tools
or
9.1 press windows + pause/break
9.2 click Advance tab
9.3 click Environment Variables
9.4 search "path" under System variable
9.5 click edit (there is a value for Variable value in default)
9.6 at the end of the default value add this ;C:\Android-adb\sdk\platform-tools
9.7 click ok
10.
type this
adb
adb shell
[email protected]:/ $ su
adb shell /system/lib/cf3d_uninstall.sh
11. your device will reboot...after that it should be fine...
Help
jhonuy03 said:
This is How I fixed mine..
I search several forum and and no one has the complete tutorial on how to use adb..
so I created my own step by step tutorial on how I did it just in case I need it again or someone needs it...
I hope this fixed yours as well..
Download ADB here:
1. extract the file you just download
2. put it in C: (so you can access it easily)
3. you can rename it (you can name it anything you want but we will use "Android-adb" in this tutorial)
4. open SDK Manager.exe
5. make sure that Android SDK tools, Android SDK Platform-tools, Android SDK Build-tools and Google USB Driver is installed
6. Boot your device to recovery mode (hold volume up + power) hold it until it is turned on
7. connect your device through usb to PC (it should automatically install your usb driver if not download samsung usb driver)
8. go to CMD
9.type cd c:\Android-adb\sdk\platform-tools
or
9.1 press windows + pause/break
9.2 click Advance tab
9.3 click Environment Variables
9.4 search "path" under System variable
9.5 click edit (there is a value for Variable value in default)
9.6 at the end of the default value add this ;C:\Android-adb\sdk\platform-tools
9.7 click ok
10.
type this
adb
adb shell
[email protected]:/ $ su
adb shell /system/lib/cf3d_uninstall.sh
11. your device will reboot...after that it should be fine...
Click to expand...
Click to collapse
I tried the above at last it is showing device not found
wew
ankitwase said:
I tried the above at last it is showing device not found
Click to expand...
Click to collapse
that's how exactly how I did it...
at least that what I remembered I did..
and it works for me..
is your device rooted?
Help
jhonuy03 said:
that's how exactly how I did it...
at least that what I remembered I did..
and it works for me..
is your device rooted?
Click to expand...
Click to collapse
Yes i think it is rooted
Do i need to do wipe data in recovery mode ?
I think so because I wipe my cache and reset to factory default before I used ADB...
Sent from my GT-N5100 using Tapatalk HD
just ignore step 9.1 to 9.7...
Sent from my GT-N5100 using Tapatalk HD
jhonuy03 said:
I think so because I wipe my cache and reset to factory default before I used ADB...
Sent from my GT-N5100 using Tapatalk HD
Click to expand...
Click to collapse
Tried after wiping cache getting some problem "device not found"
Drivers are also installed correctly
r u sure u r in recovery mode and device is attach to usb?
Sent from my GT-N5100 using Tapatalk HD
Help
jhonuy03 said:
r u sure u r in recovery mode and device is attach to usb?
Sent from my GT-N5100 using Tapatalk HD
Click to expand...
Click to collapse
Yes i m in recovery mode, and when i am typing adb devices it is showing a serial number, i checked and found if device is connected
and if i issue adb devices then it will show serial number if device is connected
did you install google usb driver in sdk manager?
Sent from my GT-N5100 using Tapatalk HD
adb
When you type adb this should be the output
Microsoft Windows [Version 6.2.9200]
(c) 2012 Microsoft Corporation. All rights reserved.
C:\Windows\system32>adb
Android Debug Bridge version 1.0.31
-d - directs command to the only connected USB devic
e
returns an error if more than one USB device is
present.
-e - directs command to the only running emulator.
returns an error if more than one emulator is r
unning.
-s <specific device> - directs command to the device or emulator with
the given
serial number or qualifier. Overrides ANDROID_S
ERIAL
environment variable.
-p <product name or path> - simple product name like 'sooner', or
a relative/absolute path to a product
out directory like 'out/target/product/sooner'.
If -p is not specified, the ANDROID_PRODUCT_OUT
environment variable is used, which must
be an absolute path.
devices [-l] - list all connected devices
('-l' will also list device qualifiers)
connect <host>[:<port>] - connect to a device via TCP/IP
Port 5555 is used by default if no port number
is specified.
disconnect [<host>[:<port>]] - disconnect from a TCP/IP device.
Port 5555 is used by default if no port number
is specified.
Using this command with no additional arguments
will disconnect from all connected TCP/IP devic
es.
device commands:
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
(-l means list but don't copy)
(see 'adb help all')
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] [--algo <algorithm name> --key <hex-encoded key> --
iv <hex-encoded iv>] <file>
- push this package file to the device and instal
l it
('-l' means forward-lock the app)
('-r' means reinstall the app, keeping its data
)
('-s' means install on SD card instead of inter
nal storage)
('--algo', '--key', and '--iv' mean the file is
encrypted already)
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 backup [-f <file>] [-apk|-noapk] [-shared|-noshared] [-all] [-system|-nosy
stem] [<packages...>]
- write an archive of the device's data to <file>
.
If no -f option is supplied then the data is wr
itten
to "backup.ab" in the current directory.
(-apk|-noapk enable/disable backup of the .apks
themselves
in the archive; the default is noapk.)
(-shared|-noshared enable/disable backup of the
device's
shared storage / SD card contents; the defau
lt is noshared.)
(-all means to back up all installed applicatio
ns)
(-system|-nosystem toggles whether -all automat
ically includes
system applications; the default is to inclu
de system apps)
(<packages...> is the list of applications to b
e backed up. If
the -all or -shared flags are passed, then t
he package
list is optional. Applications explicitly g
iven on the
command line will be included even if -nosys
tem would
ordinarily cause them to be omitted.)
adb restore <file> - restore device contents from the <file> backup
archive
adb help - show this help message
adb version - show version num
scripting:
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 get-devpath - prints: <device-path>
adb status-window - continuously print device status for a specifie
d device
adb remount - remounts the /system partition on the device re
ad-write
adb reboot [bootloader|recovery] - reboots the device, optionally into the boo
tloader 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 th
e specified port
networking:
adb ppp <tty> [parameters] - Run PPP over USB.
Note: you should not automatically start a PPP connection.
<tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
[parameters] - Eg. defaultroute debug dump local notty usepeerdns
adb sync notes: adb sync [ <directory> ]
<localdir> can be interpreted in several ways:
- If <directory> is not specified, both /system and /data partitions will be u
pdated.
- If it is "system" or "data", only the corresponding partition
is updated.
environmental variables:
ADB_TRACE - Print debug information. A comma separated list
of the following values
1 or all, adb, sockets, packets, rwx, usb, sync
, sysdeps, transport, jdwp
ANDROID_SERIAL - The serial number to connect to. -s takes prior
ity over this if given.
ANDROID_LOG_TAGS - When used with the logcat option, only these de
bug tags are printed.
C:\Windows\system32>
Help
jhonuy03 said:
did you install google usb driver in sdk manager?
Sent from my GT-N5100 using Tapatalk HD
Click to expand...
Click to collapse
Yes i have installed it
please see the attachment
oh wa8 i remembered something...
try to type in cmd
adb stop-server
adb start-server
Sent from my GT-N5100 using Tapatalk HD
Help
jhonuy03 said:
oh wa8 i remembered something...
try to type in cmd
adb stop-server
adb start-server
Sent from my GT-N5100 using Tapatalk HD
Click to expand...
Click to collapse
C:\Windows\system32>adb
'adb' is not recognized as an inte
operable program or batch file.

Categories

Resources