All-Android
Would you like to react to this message? Create an account in a few clicks or log in to continue.

All-Android


 
HomeHome  Latest imagesLatest images  SearchSearch  RegisterRegister  Log inLog in  

 

 Setting up ADB

Go down 
AuthorMessage
Admin
Admin



Posts : 27
Points : 85
Rep : 0
Join date : 2009-08-07
Age : 40
Location : So. Cali

Setting up ADB Empty
PostSubject: Setting up ADB   Setting up ADB EmptyAugust 22nd 2009, 11:20 pm

Things you need:

Android SDK 1.5r2 - Download
Winrar - 32 bit download D64 Bit download
Windows PC
USB Cable
A Rooted HTC Dream (Google G1)

--------------------------------------------------------------------------

Setting up the Android 1.5r2 SDK

Download the file from above
Unzip to your desktop
Take the "android-sdk-windows-1.5_r2" 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)
Select Environment Variables...
Press New

For Variable Name type: adb
For Variable Value type: C:\android-sdk-windows-1.5_r2\tools

--------------------------------------------------------------------------

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-1.5_r2\usb_driver)
Depending on your OS pick x86 or amd64
You ADB Android Device should now be installed! Good Job

--------------------------------------------------------------------------

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-1.5_r2\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!

--------------------------------------------------------------------------


--------------------------------------------------------------------------

"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

--------------------------------------------------------------------------

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 - directs command to the USB device or emulator w
ith
the given serial number
-p - 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 - copy file/dir to device
adb pull - copy file/dir from device
adb sync [ ] - copy host->device only if changed
(see 'adb help all')
adb shell - run remote shell interactively
adb shell - run remote shell command
adb emu - run emulator console command
adb logcat [ ] - View device log
adb forward - forward socket connections
forward specs are one of:
tcp:
localabstract:
localreserved:
localfilesystem:
dev:
jdwp: (remote only)
adb jdwp - list PIDs of processes hosting a JDWP transport

adb install [-l] [-r] - 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] - 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:
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 [parameters] - Run PPP over USB.
Note: you should not automatically start a PDP connection.
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 [ ]
can be interpreted in several ways:

- If 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 -
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 -
Example: adb pull /data/app_s/Stock.apk
adb install - Install app to phone

Code:
adb install -
Example: adb install c:/apps/apps2sd.apk
adb uninstall - Uninstall app from phone

Code:
adb uninstall -
Example: adb uninstall linda.apk
For more ADB Commands go - Here
Back to top Go down
https://allandroid.forumotion.com
 
Setting up ADB
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
All-Android :: Make and Model :: HTC :: HTC G1/Dream-
Jump to: