Go Back   HTCPedia.com forums > Android Platform > General Android HTC Devices > HTC Hero > HTC Hero Root/Rom Discussion

Reply
 
LinkBack Thread Tools Display Modes
Old December 14th, 2009, 03:41 PM   #1
Retired Staff
 
My Device: HTC Hero white running AOSP-Hero v.2.0-r1
 
Join Date: Dec 2009
Posts: 111
jnwhiteh is on a distinguished road
Default [HOWTO] Install Android SDK and use adb

If you are going to help troubleshoot issues or work with custom roms, you are going to need the Android SDK. You can download it from the Android website: http://developer.android.com/sdk/index.html. If you're on Mac or Linux, your job is easy and I can't provide any support for people using Windows (you'd need the USB driver if you're on Windows Vista or Windows 7).

Once you have it downloaded and unzipped somewhere, open a terminal and go into the tools directory. From there you can run adb to interact with your device. For example:

Check to see what devices are connected:
Code:
adb devices
Get the output of the main log for the device:
Code:
adb logcat
If we ask you for the logcat output for an issue.. now you know how to give it to us.
__________________
Running AOSP-Hero v.2.0-r1 with full Google apps and sync

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Last edited by lox; December 14th, 2009 at 06:27 PM. Reason: Sticky
jnwhiteh is offline   Reply With Quote
Sponsored Links
Old December 24th, 2009, 06:46 PM   #2
Member
 
shenshang's Avatar
 
My Device: HTC Hero & NexusOne
 
Join Date: Dec 2009
Location: london
Posts: 47
shenshang is infamous around these parts
Default

ahh cheers, didnt know what logcat meant XD
shenshang is offline   Reply With Quote
Old December 24th, 2009, 08:27 PM   #3
New Member
 
My Device: HTC Hero
 
Join Date: Dec 2009
Location: Dublin, Ireland
Posts: 14
Neo-Dragon is infamous around these parts
Default

I've been having a problem.
I think it might be with Windows 7, but every time I try run ADB, it opens for a second then just closes.
I have all the files installed, and the emulator for example runs fine.
Any solutions for me?
Neo-Dragon is offline   Reply With Quote
Old December 25th, 2009, 11:10 AM   #4
Member
 
My Device: HTC HERO
 
Join Date: Dec 2009
Posts: 75
enki is infamous around these parts
Default

and it is
./adb logcat
in linux (from tools directory).
There is rights issue with adb bridge server, which have to be started under root permissions for some operations, so :

sudo ./adb kill-server
and
sudo ./adb start-server (ubuntu, debian like)
on rpm distros use su instead of sudo, like
su
./adb start-server (fedora,suse)

help in case you got message about permissions

Last edited by enki; December 27th, 2009 at 06:58 AM.
enki is offline   Reply With Quote
Old January 7th, 2010, 01:39 PM   #5
New Member
 
My Device: htc hero
 
Join Date: Dec 2009
Posts: 10
gelled is infamous around these parts
Default so confused

every time i do this it fails
i open terminal, drag the tools folder into it, it then ses its created a directory
when i try to put in the commands you suggested however, it ses there is no such command
do i need to put my phone into recovery, or mass storage
im stumped
gelled is offline   Reply With Quote
Old January 7th, 2010, 03:34 PM   #6
Retired Staff
 
My Device: HTC Hero white running AOSP-Hero v.2.0-r1
 
Join Date: Dec 2009
Posts: 111
jnwhiteh is on a distinguished road
Default

What operating system? What precisely are you doing?
__________________
Running AOSP-Hero v.2.0-r1 with full Google apps and sync

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
jnwhiteh is offline   Reply With Quote
Old January 7th, 2010, 03:40 PM   #7
Junior Member
 
My Device: HTC Hero
 
Join Date: Dec 2009
Posts: 26
Repp is infamous around these parts
Default

Quote:
Originally Posted by gelled View Post
every time i do this it fails
i open terminal, drag the tools folder into it, it then ses its created a directory
when i try to put in the commands you suggested however, it ses there is no such command
do i need to put my phone into recovery, or mass storage
im stumped
I just helped another guy with the same problem over here:
(http)... forum.xda-developers.com/showthread.php?t=613604

On Mac but it's the same on linux

EDIT:
This is my post there
If you just need it once or not very frequently, jnwhiteh's sollution below might be prefered. It's just a matter of taste. I prefer being able to use the command from anywhere

You need to add the tools directory to PATH variable on your computer

Here's how you do it (the alternative way is easier):
Run this in Terminal
Code:
cd
nano .bash_profile
a text editor will open. add this:
Code:
export PATH=${PATH}:/path-to-android-sdk/tools
where you replace "path-to-android-sdk" with the real path.




Alternatively you could run this command in the terminal:
Code:
echo -e "\nexport PATH=${PATH}:/path-to-android-sdk/tools" >> .bash_profile


What you have done is to tell the shell to also look inside the tools directory when entering a command

Last edited by Repp; January 7th, 2010 at 04:00 PM.
Repp is offline   Reply With Quote
Old January 7th, 2010, 03:43 PM   #8
Retired Staff
 
My Device: HTC Hero white running AOSP-Hero v.2.0-r1
 
Join Date: Dec 2009
Posts: 111
jnwhiteh is on a distinguished road
Default

You can also go into the tools directory, and prefix the executable with ./, for example:

./adb shell

That says 'use the executable in the current directory, called adb'
__________________
Running AOSP-Hero v.2.0-r1 with full Google apps and sync

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
jnwhiteh is offline   Reply With Quote
Old January 13th, 2010, 06:07 AM   #9
New Member
 
My Device: HTC Hero
 
Join Date: Dec 2009
Posts: 6
samsom is infamous around these parts
Default

Hi,
I have an HTC Hero running 2.1 and have a laptop running Arch Linux.
I have downloaded and installed the SDK folder. I have enabled USB debugging on the phone. The problem is on executing "adb devices", the phone is not listed despite being connected by USB. I googled this and found some help on the Arch Linux forums which suggested that I add the following to the 50-android.rules file

Code:

SUBSYSTEM=="usb|usb_device", SYSFS{idVendor}=="0bb4", MODE="0660", GROUP="plugdev"
SUBSYSTEM=="usb|usb_device", ATTR{idVendor}=="0bb4", ATTR{idProduct}=="0c02", SYMLINK+="android_adb"
SUBSYSTEM=="usb|usb_device", ATTR{idVendor}=="0bb4", ATTR{idProduct}=="0c01", SYMLINK+="android_fastboot"



Despite that, the problem persists. Obviously, adb logcat does not give me an output as well as it keeps searching for a device.
Any advice, anyone?
Thanks
Samsom
samsom is offline   Reply With Quote
Old January 13th, 2010, 06:11 AM   #10
Retired Staff
 
My Device: HTC Hero white running AOSP-Hero v.2.0-r1
 
Join Date: Dec 2009
Posts: 111
jnwhiteh is on a distinguished road
Default

If you have root, you can restart the adb server as root.

adb kill-server
sudo adb start-server
adb devices
__________________
Running AOSP-Hero v.2.0-r1 with full Google apps and sync

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
jnwhiteh is offline   Reply With Quote
Reply

Tags
adb, hero, htc, logcat, sdk

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[10/29/2009][SDK]HTCPedia ListOnOff Control vn1minh Development and Hacking 19 November 7th, 2010 02:18 AM
[HOWTO] Rom cooking lox HTC Hero Root/Rom Discussion 56 June 23rd, 2010 02:09 AM
NOOB guide HTC HERO root and adb modo HTC Hero 0 December 13th, 2009 04:17 PM
I need an app that will install all of my apk files at once sillyshyme G1 Apps & Games 2 November 18th, 2009 11:36 PM
Can't install WM 6.5 (21870) Premium Manila 2.5 nenenas HTC Touch HD (Blackstone) 1 October 27th, 2009 10:45 AM


All times are GMT -4. The time now is 10:25 AM.

vBulletin® Copyright ©2000-2012, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.6.1

2009-2012 htcpedia.com. All rights reserved.