yashsingh1/xdaforums huggingface dataset:
[G2 and Desire Z Android Development] veritasaequita:
I had to uninstall HTC sync to get it working, not sure if this will help but here are the drivers i switched to and everything went smooth as silk from that point on.
[G2 and Desire Z Android Development] musky:
my g2 doesnt have the conect to pc option in menu/ settings. adb finds my phone and the reboot commands work, but when i try to push the temp root files over to temp root then use gfree i get the error cannot stat 'su no such file or directory. any ideas? sorry if this is in the wrong thread. thanks in advance. I have downloaded all the files several times, and am about to pull my hair out.
[G2 and Desire Z Android Development] eneka:
yea i'm using the oem cable, I uninstalled HTC sync and my computer began to search for and install drivers...that seemed to fix the problem. ADB can detect my phone now! The G2 doesn't give you an option when you plug the usb in, it only asks you if you want to mount your sd car...

edit:my phone is now rooted and now backing up my rom :) Thanks guys! :D
[G2 and Desire Z Android Development] jboy15:
i tried it ! and i dont know its not working on my mac!

i need help!
[G2 and Desire Z Android Development] heybobitsme:
Adb for Ubuntu

Installing the SDK and getting adb on Ubuntu is very easy imho. All you need to do is download the linux version of the sdk and extract it to your home folder. That's it! I suggest naming it something short and sweet to make it easier to type. To get adb, you open a terminal and

cd /path/to/your/tools/folder

For example, mine is

cd /home/rob/android/tools

Once in there, you just input your adb commands.

Now, if you want to get adb without cd'ing to the tools folder you can put adb in your path. To do that, open a terminal and type

sudo gedit .bashrc

Input your sudo password and gedit will open your .bashrc file. At the top of the file type

export PATH=${PATH}:path/to/your/sdk/tools

For example, mine is

export PATH=${PATH}:/home/rob/android/tools

Also, if you're using Linux Mint, there is no .bashrc file. When you type the sudo gedit .bashrc command it will create it. This is fine, and is what I had to do to input my path.

Now you need to create rules. In terminal type

gksu gedit /etc/udev/rules.d/99-android.rules

This will create a rules file for the sdk. 99 is for Ubuntu 10.10/10.10, use 70 for Ubuntu 9.10.

Now copy and paste this into the file

SUBSYSTEM==”usb”, ATTRS{idVendor}==”0bb4”, MODE=”0666”

Different manufacturers have different vendor id's. For instance HTC is 0bb4.

Save and close the file and in terminal login as root

sudo su

and type

chmod a+rx /etc/udev/rules.d/99-android.rules

Now just reboot your pc and you test it out.

With Linux Mint (Mint 10), I've had a little trouble recently getting adb to recognize the phone. To fix it, I had to type in terminal

sudo su
cd to your sdk tools folder
./adb kill-server
./adb start-server
exit root

ADB will work until you restart your computer.

I hope this helps and please feel free to edit and correct as needed. :)

All these instructions can be found throughout these forums as well as the android developers site.
[G2 and Desire Z Android Development] soypoi:
I'm having the problem where I do not have the option to mount my phone to the computer. When I'm in adb I can type devices and it'll show my phone. I can even push some files... I'm using a MacBook followed the instructions but for some reason it isn't really taking.
[G2 and Desire Z Android Development] steviewevie:
Sorry, I thought that settings bit was the same as on the Sense ROM (Desire Z), but I see that it's not. On the G2 I think you need to open up the Notifications Panel and you just need to make sure you haven't got "USB Storage" turned on.

Did the adb push commands appear to work ? You should get some sort of message about how much data it sent (KB) and how long it took in seconds.
[G2 and Desire Z Android Development] steviewevie:
What isn't working exactly ? We need some more information to be able to help you. What have you tried and which bit is failing ?
[G2 and Desire Z Android Development] steviewevie:
Are the files transferring correctly to your phone ? If you open up Terminal Emulator on your phone, can you see the files there ? (e.g. if you do an "ls -l" of the appropriate directory on the phone).

If you can see the phone in "adb devices" then you're pretty much there.

Are you running a Sense ROM or no Sense ? e.g. is it a G2 with the stock ROM ? If so then it's in the Notifications panel that you turn on or off "USB Storage", which is if the SD card is mounted on your PC/Mac or not. You don't want the card on the PC/Mac, i.e. USB Storage off, because otherwise the adb push won't be able to see the SD card.
[G2 and Desire Z Android Development] soypoi:
I have a T-mobile G2:

running 2.2

baseband: 12.28b.60.140eU_26.03.02.26_M

kernel: 2.6.32.17-g9ab3677 htc-kernel@and18-2 #1

Build: 1.22.531.8 CL277427 release-keys

when I get into the recovery screen after holding down power and home it says:

Vision pvt eng s-off

hboot-0.76.2000 (pc1010000)

microp-0425

radio-26.03.02.26_m

emmc-boot

Aug 20 2010, 16:51:01

Fastboot => followed by some options

I have the debugging thing but not the usb option to mount via usb.
[G2 and Desire Z Android Development] musky:
We are all good!

I figured it out. It was user error. I was in the wrong directory. Everything is running smooth now. Thank you for the excelent guide. I'm now rooted and running cyanogen with my swype. I love this website. Thanks again everybody!
[G2 and Desire Z Android Development] jboy15:
the one when it says quit the terminal but when i quit it says something like this (Closing this window will terminate the running processes: login, bash, adb.)
[G2 and Desire Z Android Development] steviewevie:
Which guide are you following ?

I wonder if you are trying to close the terminal window on your Mac when you should be closing it on the phone ? Please check your guide.
[G2 and Desire Z Android Development] jboy15:
so you mean after im done with the text/edit part on my mac i should close the terminal of the phone??? how am i going do that if im using my mac terminal.

this part is what i dont get (All you need is that one line. Then Save and exit TextEdit and then very importantly QUIT TERMINAL.)

so now what do you mean by ALL YOU NEED IS THAT ONE LINE.??
[G2 and Desire Z Android Development] steviewevie:
ok, thanks for clarifying. I see that the Mac guide does indeed tell you to close the terminal session on your Mac. So you edited .bash_profile successfully and saved it ?

Now I don't really know the Mac, though that command line is pretty standard Unix/Linux stuff, which I do understand. Perhaps someone else who has done this on a Mac can chime in here.

Quitting the terminal session there should be fine, I would just ignore that warning and carry on with the guide.
[G2 and Desire Z Android Development] jboy15:
Okay so I did that but it just says something like this (no such file or directory) something like dat when I enter a command. What should I do on the text/edit part??
[G2 and Desire Z Android Development] BootloopedMillennials:
New member here, had my G2 for a week now. Im thinking about rooting it, only thing Ive done so far is the Tmobile OTA update. Anyway Im following this guide to setting up ADB but Im having trouble locating the HTC Sync specifically for the G2. On the HTC website for the G2 (under downloads), they only have the user manual. Anyone have a link to the HTC Sync with the correct G2 drivers? Or is it okay to use the HTC Sync for the Desire Z (in original post)? Thanks for answering a possibly stupid question.
[G2 and Desire Z Android Development] steviewevie:
Same phone, same drivers :)

i.e. yes, you can use HTC Sync to get the G2 drivers.
[G2 and Desire Z Android Development] steviewevie:
It sounds like you may have made a mistake in setting up your PATH variable, so it can't find any commands any more. Please re-check what you've put in that PATH.

Try doing "echo $PATH" and post up the output from that.
[G2 and Desire Z Android Development] jboy15:
All I did was drag the "platform-tools" to the text/edit window.
[G2 and Desire Z Android Development] Realm11984:
So I have followed the tutorial and I am still unable to find my device. When I type in "adb devices" I get back:

aaron-sowles-computer:~ Aaron$ adb devices

dyld: Symbol not found: ___stack_chk_guard

Referenced from: /Users/Aaron/android-sdk-mac_86/platform-tools/adb

Expected in: /usr/lib/libSystem.B.dylib

Trace/BPT trap

I have USB debugging activated.

I ran an echo $PATH and I got:

aaron-sowles-computer:~ Aaron$ echo $PATH

/bin:/sbin:/usr/bin:/usr/sbin:/Users/Aaron/android-sdk-mac_86/platform-tools

aaron-sowles-computer:~ Aaron$

Please Help!
[G2 and Desire Z Android Development] steviewevie:
You're going to have to help me out with some more information, please, especially considering I don't have a Mac and have never tried this myself on a Mac.

Can you still run commands from the Terminal window, or is it telling you that it can't find any commands now, as you implied in your previous post ? Can it find adb ? Please do an "echo $PATH".
[G2 and Desire Z Android Development] steviewevie:
Right, well your PATH is setup ok.

Something isn't working with adb itself though. Where did you get adb from, did you install the Mac version of the Android SDK, as per the procedure in this thread ?
[G2 and Desire Z Android Development] jboy15:
i now have this!

PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/Users/johnralleca/Documents/MEM. stick/Imerel/untitled folder/android/android-sdk-mac_86/platform-tools

JoHn-RaLLeCas-MacBook-Pro:~ johnralleca$
[G2 and Desire Z Android Development] steviewevie:
So it's just adb it can't find ?

That PATH is a list of directories/folders that it will look in to try and find any command that you run.

I wonder about that space in the "MEM. stick" bit, is that in there in the PATH, that's not just a copy/paste issue when you pasted that up here ? Has that directory name really got a space in it ? Because I wonder if that's the problem.
[G2 and Desire Z Android Development] jboy15:
it does really have space.
[G2 and Desire Z Android Development] primatage:
It's generally a good idea to keep spaces OUT of anything important, even on a Mac, which for some reason allows file and folder names with spaces.

If you want to make things as simple as possible and bypass the PATH variable headaches, just copy adb straight to your bin or usr/sbin folder:

sudo cp your_sdk_folder/platform-tools/adb /bin/adb

or

sudo cp your_sdk_folder/platform-tools/adb /usr/sbin

It's definitely not standard procedure, but it's not going to hurt anything either.
[G2 and Desire Z Android Development] wayde187:
Its so easy. The only thing you need to worry about is following instructions correctly.
[G2 and Desire Z Android Development] footclan:
I just installed adb using the first method. I type adb devices and I see a serial number under "list of devices attached" but above it is says

"adb server is out of date. Killing.......

* daemon started successfully *"

Is this normal?
[G2 and Desire Z Android Development] steviewevie:
Yes that's normal.

Sent from my HTC Desire Z
[G2 and Desire Z Android Development] taz4101:
Could someone please post a updated link to htc sync for the G2. The one in the faq is a dead link and I can't find the proper version anywhere I looked
[G2 and Desire Z Android Development] zkid2010:
Well, sync would probably be for the Z or Vision. T-Mobile us is the G2 and IIRC HTC sync is not for us devices. :D
[G2 and Desire Z Android Development] steviewevie:
It's not a dead link, just not on that page any more. If you pull up the section for the DZ it will find it -

http://www.htc.com/uk/supportdownloadlist.aspx?p_id=325&act=sd&cat=all

Note that although HTC Sync doesn't support the G2, that doesn't matter for this guide, because we're just after the USB drivers for the DZ, which work fine for the G2 too.

Edit - sorry, I just noticed that the link in the "Quick" guide (as opposed to the "Complete" one) was broken, now fixed.
[G2 and Desire Z Android Development] taz4101:
i cant get windows 7 to allow me to install the drivers. it installs microsofts drivers and it wont allow me to update with the drivers i want. if i delete the drivers for it on my computer, as soon as i plug my g2 back in it automatically reinstalls with microsofts drivers.

the drivers that it is automatically installs with debugging on are

Htc android phone usb device under disk drives and

usb composite device

im not using a stock usb cord cause i dont have one. but i bought a few of the best ones that monoprice had with ferrite cores.

i also tried to use pdanet and it failed with error code 103 saying android device not recognized.
[G2 and Desire Z Android Development] steviewevie:
Have you installed HTC Sync ? If so I think that should be ok.

I personally had a problem where adb wouldn't work on a 3rd party USB cable, but it was fine on my stock cable, no idea why.
[G2 and Desire Z Android Development] heybobitsme:
Fastboot

I'm trying to get fastboot working. I've flashed the ENG HBOOT and when I go into bootloader the phone shows FASTBOOT USB. On my Linux Mint 10 I have the SDK installed and I installed the fastboot binary. When in terminal and I type

fastboot

it shows the fastboot output

~ $ fastboot
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

My problem is, when I type in terminal

fastboot devices

nothing shows up. Am I doing something wrong. or is it more a Linux Mint problem?

Edit: I googled some more and found this: http://goo.gl/TIODo

The part I didn't realize I needed to do is this:

su
./fastboot devices

duh! :)
[G2 and Desire Z Android Development] zkid2010:
nevermind then, happy flashing!
[G2 and Desire Z Android Development] heybobitsme:
Well thank you, anyway! And I am! :D

Sent from my HTC Vision
[G2 and Desire Z Android Development] jboy15:
i cant make a command on my terminal now!

what do i do now?
[G2 and Desire Z Android Development] androidcues:
Using Dropbox to hold your SDK

I am very surprised to see there has been literally no mention of the fact you can utilize Dropbox to store your ADB/Fastboot and/or SDK. I use several machines in different locations and I find I may need ADB at any given time -- so I got real tired of reinstalling the SDK (I must have installed it maybe 100 times over the last couple years) and this is a great way to have ONE sdk/adb available at any time from anywhere -- even if I have to deal with a computer thats never seen a htc driver... so Dropbox to the rescue....

I do not yet have enough dropbox space to hold a whole v8 SDK so I basically installed the quick one... and its just too easy. You only need to make sure the drivers are on each machine you are using -- just install the HTC Sync program and after thats installed, uninstall the program but not the drivers. For the Dream -- just run the drivers from the phone.

So the dbSDK is like your own travelling SDK, and its ONE sdk to worry about not 7 different setups. And I can store the important files for for all my phones (amon-ra froyo clockwork and ginger clockwork recoveries, and the important .img's to fastboot a restore in when hell breaks loose.

Having having a "cloud" SDK has really simplified a lot of things for me. I was able to "share" the dbSDK folder with a total noobie who couldnt figure out how to extract a zip file anywhere -- so rather than go the long way around reinventing comp sci 101 I just shared my dbSDK folder with this noob and we were able to flash the correct recovery to said noobs phone. (I set it up like a T-ball game and the noob just had to execute commands, it was ridiculously simple)
[G2 and Desire Z Android Development] captmack007:
Hi Noob beginner here...

I really stumbled on the Step 4 as it does not apply to Vista .

For the Vista folks

Step 4:

Left click "Start" (not short cut icon..

right click "Computer"

Left click "Properties"

bottom right, right click "Change settings" (this is the missing step..:)...

left click "Advanced"

left click "Environment Variables"

That is as far as I can get due to what I saw when I got there versus what is proposed in the tut. Help!!!!!

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..

I know the path to the "Android " folder and tool and platforms.. just am not sure how to enter EXACTLY... Thanks...
[G2 and Desire Z Android Development] steviewevie:
Thanks, I will amend the guide :)

I think when you're double-clicking on it that it's taking you perhaps to either right at the start or the end of the line, just making it *look* different, not actually changing it (it's too long to fit in the section of the window it's showing you).

No, do not delete that line. Just use the cursor to move to the end (or press the "End" key on your keyboard) of the path, and then *add* that new stuff in there, separated by semi-colons.
[G2 and Desire Z Android Development] urquidezj:
got it all installed on ubuntu but i dont know where to go from here i look for the devices and it returns this

julio@julio-laptop:~/android/tools$ adb devices

List of devices attached

????????????	no permissions

but i turn off usb debugging and nothing comes up so im guessing its recognizing but not fully? idonno, some help will be appreciated. thanks
[G2 and Desire Z Android Development] durps:
Can you please tell me how you installed it on ubuntu? Thank you!
[G2 and Desire Z Android Development] urquidezj:
followed hey bob its me guide, post number 46 on page 5,

so i been messing with it i tried to start the root process, i tryto push the first file as described on the guide and it gives me this

julio@julio-laptop:~/Documents/files$ adb push su /sdcard/su

error: insufficient permissions for device

usb debug turned on and phone mounted
[G2 and Desire Z Android Development] steviewevie:
I don't know, but have you tried running it as root ?
[G2 and Desire Z Android Development] heybobitsme:
You shouldn't have the phone mounted, just plugged in. Also, it sounds like you may need to run as root. Try my fix for Linux Mint at the bottom of the post or run as root by typing su and then cd to the folder.

Sent from my HTC Vision
[G2 and Desire Z Android Development] urquidezj:
Thanks, I finally figured it out I needed to be in root first, after that all went smooth on my permaroot. Not a hard thing to do once you get it running
[G2 and Desire Z Android Development] rtorbs:
woo hoo.....followed the guide and everything went without so much as a hitch cheers steviewevie your a ledge :D
[G2 and Desire Z Android Development] imakul8:
Thanks for the great guide steviewevie. It wants Java installed regardless of what SDK version I choose...no big deal. Love the username btw, too cute. Lol.:D
[G2 and Desire Z Android Development] Json_81:
Doesn't work for me in OS X.

Install goes fine, path is set up correct but "adb devices" doesn't find anything.

Debugging is checked in the phone.

Could it be gingerbread rom that is the problem?
[G2 and Desire Z Android Development] steviewevie:
Good question. I don't know. I'd be suprised if Gingerbread was the problem, though you could easily test that if you did a nandroid backup and flashed a Froyo ROM. Could it be an OSX driver problem ?

Sent from my HTC Desire Z
[G2 and Desire Z Android Development] Json_81:
Just reverted back to CM 6.1.1, same issue.

Does OS X need another driver that what is installed following this guide?

ADB for windows does work fine for me however.
[G2 and Desire Z Android Development] steviewevie:
Any Mac people out there who can help ?
[G2 and Desire Z Android Development] Json_81:
Think I've found the problem.

Found a post that claims that easytether driver breaks adb.

Haven't tried uninstalling it since I need it more than adb, will use another computer for my adb needs.
[G2 and Desire Z Android Development] hungyellow:
I can't get past step one haha. I am too noob I guess. HTC Sync just won't recognize my phone. I have a G2 and all my stats are in my sig. Anyone have similar issues?
[G2 and Desire Z Android Development] jmpcrx:
no reponse from adb

Hi, could someone help please, im having trouble getting adb to connect to my u.k dezire z..

firmware : 1.72.4052 (which i think is the updated one, does this matter?)

windows xp

i have the sdk installed with the correct paths setup, but when i use a dos box and type 'adb devices' i just get a flashing cursor and nothing else.

i have had htc sync installed for a while and all working, but i did notice when turning on usb debugging, two drivers were installed into windows, the first i missed but the second i think was 'my htc' and it reperted an error and someting might not work properly.. (it does show my htc as working properly though in device manager)

ive tryed downloading the drivers seperately (from on here), and they install but the driver name has changed to adb compatible usb. with this driver installed, everything is exactly the same. (i.e sync connects, usb tethering etc all work, but adb still doesnt connect to my Z)

ive also tryed reinstalling htc sync etc (presumably when uninstalling/reinstalling it would remove/reinstall the drivers also, as i did not get and bubbles pop up when connectiong my z to sync etc after the re-install..) but nothing works..

if anyone is still reading this topic and has any suggestions, it would be much appriciated :-)

(just after perm rooting and overclocking!)

thanks..
[G2 and Desire Z Android Development] convolution:
Why install ADB when you don't have to and STILL be able to use it?

Click the link in my sig for that.
[G2 and Desire Z Android Development] jmpcrx:
ok thanks, i wish ad found that first!

now working, just have to find out how to downgrade now, unless there is another way..
[G2 and Desire Z Android Development] azazel71:
ADB installed and working many thanks steviewevie.
[G2 and Desire Z Android Development] ruan619:
Has anyone recently used Stevie's Mac guide because when I got to the part when you go in the android repository and there's supposed to be Android SDK platform tools revision 1 I have revision 3 would that make a difference. Plz helps a noob.
[G2 and Desire Z Android Development] Charliehustle:
i dont know how adb still doesnt find my semi-bricked tmobile g2 phone. Once im in fastboot and hook up through usb it installs the adb android interface drivers, but once i go into adb and put in adb shell or adb devices its stil saying device not found. im using the usb wire that came with the htc evo shift which is the same exact usb as the g2 from what i know.
[G2 and Desire Z Android Development] tackleberry:
my lordy lord lord...adb finally works on my computer and my phone! great write up!
[G2 and Desire Z Android Development] tackleberry:
i dont understand..i entered this in, but it does not do anything? anyone have a screen shot of what it should look like exactly? i type this in as said but its not working.