I came back to the forum about 2 weeks ago. After a few days reading, I decided to root my phone, and then I decided to go to JF 1.5. In the last 2 weeks I keep seeing references to "adb". I knew it was part of the development package SDK, and I was pretty sure it allowed you to do some really neat things, but I couldn't find much info on it directly. I was thinking that if I was having a hard time finding info that other folks might be too.
So, you've got root, and you need to type commands into your phone to do root things or you just want to explore the file structure of the phone, but it's a pain to use the phones tiny little keyboard and screen (great for a phone, but not so much for a terminal session).
Would you like to give your phone a full size keyboard and monitor? How about install and uninstall apps from command line? Or copy/backup stuff to/from your computer from command line or just issue all of those app2sd or cache2sd commands from something a bit faster than the phone keyboard. Well, adb (Android Debug Bridge) is a tool that comes with the Android SDK that allows you to do all of that and more.
First, YOU CAN SCREW YOUR PHONE OR COMPUTER UP IF YOU AREN'T SURE WHAT YOU'RE DOING, SO TREAD LIGHTLY AND BE CAREFUL. IF YOU AREN'T 100% CONFIDENT, YOU MAY WANT TO ASK SOMEONE A QUESTION BEFORE YOU DO ANYTHING. I'M NOT RESPONSIBLE FOR YOUR MISTAKES.
I'd looked at the SDK. I'm not a developer/programmer. I'm not going to need 176MB worth of stuff to make programs. I don't want to have to install "Eclipse" which is required for the SDK. I just want ADB.
Well, you can get it, easily. You do have to download the whole SDK as far as I know. I'm going to cover this process for Windows only, not Linux or MAC. If you're running Linux, you probably don't need this info or my help. If you're running Apple/Mac, I couldn't help because I don't know.
http://developer.android.com/sdk/1.5_r1/index.html (For Cupcake)
Download the SDK and unzip it someplace. That'll basically be it as far as "installing" it goes. There's no fancy "setup.exe" or anything like that. Once it's unzipped, that's where it'll run from. When you unzip it there will be a subdirectory named "Tools". That's where ADB is.
There's only 2 more things that you need do to use ADB. You need to add it's directory to the "Path" environment variable, and you need to install the USB drivers from the other folder in the screen shot above.
The SDK has instructions for both.
http://developer.android.com/sdk/1.5_r1/installing.html
First, adding the directory to the path variable
So, basically, right click "My Computer" and select "Properties" -> "Advanced" and finally "Environmental Variables". This is what it looks like on my box (running Vista Home Premium).Optionally, you may want to add the location of the SDK's primary tools directory to your system PATH. The primary tools/ directory is located at the root of the SDK folder. Adding tools to your path lets you run Android Debug Bridge (adb) and the other command line tools without needing to supply the full path to the tools directory.
On Windows, right-click on My Computer, and select Properties. Under the Advanced tab, hit the Environment Variables button, and in the dialog that comes up, double-click on Path (under System Variables). Add the full path to the tools/ directory to the path.
You'll notice that the "Path" variable already has stuff listed that's not got anything to do with the Android SDK. That stuff is useful/necessary for Windows, so don't delete or remove any of it. When you are adding the location of your "Tools" directory, add it to the end of the list with a ";". Here's my path variable.
You can see the last entry is the SDK Tools directory. That leaves installing the phone USB drivers.%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\Sy stem32\Wbem;C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\10.0\DLLShared\;C:\Program Files (x86)\Common Files\Adobe\AGL;C:\Program Files (x86)\QuickTime\QTSystem\;D:\Downloads\Phone Stuff\android-sdk-windows-1.5_r1\android-sdk-windows-1.5_r1\tools
http://developer.android.com/guide/d...ng/device.html
That was easy. That's it, you're ready to run ADB and do whatever you want to do on your phone using ADB. Now when you plug your phone into your PC, you should see something like this in Device Manager.Turn on "USB Debugging" on your device. On the device, go to the home screen, press MENU, select Applications > Development, then enable USB debugging.
Setup your system to detect your device.
- If you're developing on 32-bit Windows, you need to install the 32-bit USB driver for adb. The USB driver is included in the SDK package. To install it, follow these steps:
- Connect your Android device via USB. When the Found New Hardware Wizard appears, you'll be asked if you'd like Windows Update to search for software. Select No, not this time and click Next.
- Select Install from a list or specified location and click Next.
- Select Search for the best driver in these locations. Browse to the usb_driver/x86 in the SDK package (<sdk>\usb_driver\x86).
- Click Finish. The system should install the driver files as necessary. Your machine may require a reboot.
- If you're developing on 64-bit Windows Vista, you need to install the 64-bit USB driver for adb. The USB driver is included in the SDK package. To install it, follow these steps:
- Connect your Android device via USB. When the Found New Hardware Wizard appears, you'll be asked if you'd like Windows Update to search for software. Select No, not this time and click Next.
- Select Install from a list or specified location and click Next.
- Select Search for the best driver in these locations. Browse to the usb_driver/amd64 in the SDK package (<sdk>\usb_driver\amd64).
- Click Finish. The system should install the driver files as necessary. Your machine may require a reboot.
So, now, what can you do? This is a link to the official Android Debug Bridge (ADB) Guide. It's got all of the commands and options spelled out for you.
http://developer.android.com/guide/d...tools/adb.html
Need any more help with actual commands? Well I'm a newb like you, so hopefully someone else on the board with more experience will be able to help. I've not yet actually performed an "install" or "uninstall" using adb. So far my experience is just getting into the shell and copying and deleting stuff.
Open a DOS/CMD prompt, and then type "adb devices". If everything went well, then you should see something like this.
If you do, that's great. If you don't. I'm not sure what happened or what needs to be done to fix it. Some guesses, you may have "mounted" the phones' SDCard (I don't think you should) or the driver install didn't go well or maybe you didn't put the directory in the path variable correctly.
Now if you want to open a "shell" session to the phone (same as if you go to "Terminal Emulator" on the phone. Just type "adb shell" and hit enter. When you do the prompt will change to a hash "#" which means that you're in the phone. You can look at the file structure or copy "cp" files from one place to the other. If you want to install apps or copy stuff to/from the phone/PC, you can do that too. The adb commands are in the last link that I posted above.
Here's a bit of the directory structure (you've probably already seen this)
You can see that I moved my cache to my SD card (and then to the ext2 partition on my SD card after I upgraded). I used this method
http://androidcommunity.com/forums/f...de-easy-12424/
from Lazy's FAQ Post
It would be so much easier now that I can use my PC keyboard and monitor. I wish I'd found something like this a week ago. It would have made things much easier as far as moving the cache or apps to SD.
One last thing. I suspect that you could delete the bulk of the SDK once you've got adb working, but I haven't experimented with what can and cannot be deleted. I suspect it would be most of the stuff outside of the tools directory, but it would be trial and error. If I get around to it, I'll post what I find.
Hopefully someone or several people find this post useful and no one "breaks" anything trying to use it.
Thanks to everyone else who's already provided so much info on the board that's allowed me to get to this point.
If anyone has any corrections or additions, please post away.
Last edited by smasraum; 05-16-2009 at 12:24 PM.
I am using the HTC Magic and installing the device drivers was slightly different for me. I had already connected my phone to the computer and had found the Android phone and installed a USB driver. This meant that ADB did not see a device. To get around the problem, I went into Device Manager and updated the relevant device driver with the files from the SDK. All is now sweet and works.
What I am not sure of is what to do with ADB?![]()
So thanks a lot for this post. It helped me out quite a bit. But im still stuck at installing the usb drivers. It says to use the "found new hardware wizard" when you plug the phone in, however, I don't get this wizard when i connect my phone. Anybody know of a way for me to install the drivers?
crazythunder has a nice adb guide in his sig. Would link to it but I'm on my phone.
ADB\FASTBOOT FOR ROOKIES
To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.
HOW TO INSTALL 1.33.2005 SPL (HAYKURO'S SPECIAL SPL)
To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.
You can see that I moved my cache to my SD card (and then to the ext2 partition on my SD card after I upgraded). I used this method
http://androidcommunity.com/forums/f28/moving-caches-made-easy-12424/ this step is only possible if your phone is rooted.
One last thing. I suspect that you could delete the bulk of the SDK once you've got adb working, but I haven't experimented with what can and cannot be deleted. I suspect it would be most of the stuff outside of the tools directory, but it would be trial and error. If I get around to it, I'll post what I find.
you can delete anything outside of the tools directory after adb is properly installed. all you really need is adbwinapi.dll and adb.exe.
you may want to keep ddms.exe. it allows you to take screenshots and browse the file system, without root.
ADB\FASTBOOT FOR ROOKIES
To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.
HOW TO INSTALL 1.33.2005 SPL (HAYKURO'S SPECIAL SPL)
To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.
Umm, I'm in device manager and I don't see an adb interface
ADB\FASTBOOT FOR ROOKIES
To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.
HOW TO INSTALL 1.33.2005 SPL (HAYKURO'S SPECIAL SPL)
To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.
yea, i have it enabled
sometimes windows registry gets corrupted. what os are you using? i've had adb working one day, and not the next. a system restore to the day before took care of it. worst case scenario, a clean install of windows. how long since you last did a clean install? windows updates? chip drivers etc? try unplugging the phone. reboot windows and phone. open device manager. plug in phone. turn usb debugging on and off. if it still doesn't show, check my sig for a link to adb. it explains how to update the mass storage drivers.
ADB\FASTBOOT FOR ROOKIES
To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.
HOW TO INSTALL 1.33.2005 SPL (HAYKURO'S SPECIAL SPL)
To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.
Bookmarks