SUCCESS! De-Bricking Dreams - Complete JTAG Testpoints! UPDATE! 04/07/10

Search This thread

BinaryDroid

Senior Member
I figured this should be in its own thread so those working on a solution can now focus on the software side of things.

htc-g1-main-frontside-labeled-1.jpg


These are the JTAG connection points I traced from the CPU to their test points. i'm almost 90% sure the Primary is still usable. Auxilary JTAG port is Very very hard to get too and i'd imagine even for the technicians that reprogram them at the repair center. I didnt have much luck getting a connection made due to mu lack of JTAG knowledge and incorrect type of JTAG circuit(working on another though). i'm posting up the complete testpoints I spent MANY MANY countless hours and sleepless nights tracing so someone who has done this before can get a recovery procedure made to fix all bricked HTC-dreams. The reason I am doing all of this is not specifically for the Dream but because in the field of work im in, and the type of work I do I could benefit from it both for my personal phones and at work. I did research over the years but could never quite understand how JTAG is used until now. I took my spare fully working beater G1 and unsoldered the CPU with an IR Rework Station(T-870A) at home with the intentions of placing the CPU back on when done. took ALOT longer than I hoped and because of the fact that i had to hold test probes on the contact pads tight so I could flip the board and trace their also, it killed a couple of the pads so thats when I decided to say screw it, still have all the spares for my main Dream, now I can REALLY find the rest of the pins....and a few extras that might be used in the future to add features.

********Technical Notes*******

Their are 4 Mode control pins listed in the pictures.
Mode 3 is under the SIM slot, accessing requires de-soldering 4 points holding the SIM carrier to the board.
Mode 0 is NOT a testpoint, but a solder point were a resistor could go to ground. it is VERY hard to solder too directly.
Watchdog pin can simply be grounded with a resistor in place or with a needle through the shielding which would be ground. its a single solder point.
Primary JTAG is next to the LCD connector.


When you see were the pins for AUX are located you will see why I think thats not were the focus should be...their scattered in odd places, also have to remove the sim slot to access the last one which took forever to find.
Trackball has a hidden test point for the return clock as well, otherwise you need to solder directly to the connector on the main board.

Note: Return Clock is missing in the Picture for the AUX_JTAG connector...it is located at the top right testpoint just above the trackball pad, otherwise you will need to solder directly to the connector on main board.

if you need any more just let me know, if anyone wants to add to this please feel free.
Images are NOT MINE, they are the property of whomever took them, I only traced and added the labels, if their is a problem with using them let me know!

htc-g1-main-backside-labeled.jpg

htc-g1-main-frontside-labeled.jpg



IF anyone wants to donate a bricked G1 board for experimenting or donate in general please feel welcome! email@ irenep@binarytechzone.com
 
Last edited:

CrazyEye

Senior Member
Jul 30, 2009
267
1
Vegas, Nevada
Great job, I hope someone with the knowledge can jump on this because even if my phone isn't bricked (which its not) there's always a chance it could get bricked. This is a pretty good find in my opinion.
A clearer picture might be needed though if its possible.
 

scholbert

Senior Member
Aug 1, 2007
1,347
821
Hey BinaryDroid,

that's great stuff!!
Excellent finding, now we need some software ;)
Maybe someone should check out accessing the phone with QMAT!

BTW, here's a picture stolen from the Phonewreck team.
I just inserted the testpoints you found. Hope it's O.K.!
If not tell me and i will delete the picture immediately :rolleyes:

EDIT: Deleted attachment, because of copyright issues :p

Very nice work!

Cheers,
scholbert
 
Last edited:

lbcoder

Senior Member
Jan 21, 2009
2,613
98
...their scattered in odd places, also have to remove the sim slot to access the last one which took forever to find.
Trackball has a hidden test point for the return clock as well, otherwise you need to solder directly to the connector on the main board.

If necessary, removing the sim slot and trackball is a small price to pay to bring one of these back from the dead.

But wow, I gotta say.... I wasnt expecting those primary points to be *SO EASY* to get at.
 

BinaryDroid

Senior Member
Yea they were easy to trace, also over this past weekend I did manage to find the mode control pins and Watchdog pin, NAND write protection enable pin..basicallly searching for anything that might be helpful. I got the wires all soldered to the board also and the phone does recognize theirs something connected to the port but the data its returning dont seem like its correct. with nothing plugged in I get "no cable connected", after plugging the cable in i'm getting "Phone did not enter debug mode, reset?" This was before I found the mode pins using only what is posted so far and on a perfectly working phone in blue light mode which I dont think matter because it does the same thing with the phone off so long as a battery is in, does not work at all with no battery. I just went out and purchased a new camera for clearer pictures so pointing out the remaining pins is easier. I believe we may see a solution!

BTW i'm using OCD commander, plan on purchasing QMAT with JTAG this week since it tailors to HTC phones, once everything is figured out i'm sure we can use whats available free with a little modding.

@Scholbert, I thought about using those picures myself but didnt want to cause any copyright issues, I am going to put up a better picture anyhow. once thats up can you please remove the image so no one complains?
 
Last edited:

tubaking182

Senior Member
Mar 28, 2008
1,081
10
off topic: 9.10 wrecked my mouse on my laptop, my wifi, my screen doesn't function properly, and sound is messed up.

On-topic: great job on this, i'm glad we might have a way to fix the bricked phones soon, my phone works fine but there is always that chance, and i have been meaning to get off the stock SPL
 

lbcoder

Senior Member
Jan 21, 2009
2,613
98
And this is why I use Fedora....
I don't even remember the last time an update broke something. :D
 

scholbert

Senior Member
Aug 1, 2007
1,347
821
Hi!

@Scholbert, I thought about using those picures myself but didnt want to cause any copyright issues, I am going to put up a better picture anyhow. once thats up can you please remove the image so no one complains?
Maybe you're right. That's why i asked.
I just removed the pic!

I'm getting a Dream in the next days, if you're not able to take these pics, i may help out!
Just tell me :D

Best regards,

scholbert
 
Last edited:

scholbert

Senior Member
Aug 1, 2007
1,347
821
Ooops double post....

EDIT: You said you got already all the necessary pins.
Anyway, maybe this may help to verify:
http://xdaforums.com/showpost.php?p=4150161&postcount=300

Some time ago r3nrut put a very interesting package for download at his webpage. You may ask him for a link to download DreamJTAGcode.rar.
Included are professional scripts to set up the Dream with a PCI JTAG controller card named JT3710 from JTAG Technologies.
Though no one would afford such a hardware, you may find many useful files :D

Cheers,

scholbert
 
Last edited:

BinaryDroid

Senior Member
Ooops double post....

EDIT: You said you got already all the necessary pins.
Anyway, maybe this may help to verify:
http://xdaforums.com/showpost.php?p=4150161&postcount=300

Some time ago r3nrut put a very interesting package for download at his webpage. You may ask him for a link to download DreamJTAGcode.rar.
Included are professional scripts to set up the Dream with a PCI JTAG controller card named JT3710 from JTAG Technologies.
Though no one would afford such a hardware, you may find many useful files :D

Cheers,

scholbert

Yes he gave me the access to the files already, thats one of the reasons I need to installed windows first lol. I never used windows on the development machine but honestly the only thing that seems to hold the important data is the scripts which are human readable so I'm almost sure they could be adopted to OpenOCD or similar. I mean it even has the label on which pins need to be set high, low or what have you, ways to flash, erase, you name it its their. after seeing those files I figured we didnt need the JTAG document that were seeking. if everyone can figure it out on other devices with no documents..surely cant be too hard. i have soooo much more software to test on linux though. i have no plan after work so probably going to install Ubuntu 9.04 , turn off updates and then test OpenOCD. that seems really positive! i've got 3 different parallel Jtag adapters made for testing, Old cheapo, Buffered, and the third is a really complicated one that has all the possible connections needed(but more to go wrong hehe)

I could really use some help on how you normally get a phone into debug mode, or how can I do a simple test to read the Chip ID?
Also does anyone have a bricked board their willing to donate? i'm doing all of this on my primary functional board and would hate to kill i, also not sure if i'm actually in debug mode.
 
Last edited:

scholbert

Senior Member
Aug 1, 2007
1,347
821
Hi BinaryDroid!

I could really use some help on how you normally get a phone into debug mode, or how can I do a simple test to read the Chip ID?

May help out if i got my device....
Anyway it would be very nice idea to contact ViperBJK (author of QMAT).
He prooved JTAG access to Diamond already and good very deep knowledge of the device.

Debug mode should be also activated by hardware.
If nothing works out it would be a possibility is to ask one of the Hard-SPL creators. Disassembly of the SPL may give a hint of activating debug mode.

It's obvious, that the mode pins are important to be setup correctly.
The watchdog needs to be disabled (can't remember the pin), PS_HOLD would be required too.

The MSM chipset is bit more complex to access for debugging.
We need patience to gather the necessary informations.
MPU on Hermes was much easier i guess :p

EDIT:
From what i know so far, there would be mainly two methods on MSM to give access to the NAND chip:
1. Using TAP controller
This is a basic access and it is possible to toggle the pins in hardware, simple LPT adaptor should do the job.
2. Using ETM unit
This should be the mode used in QMAT.
Some binary is loaded into RAM (RAM needs to be initialised) and is used as a programming tool.
ETM gives control to the memory, but it's bit more complex to handle.

Anyway, the ARM units inside MSM chip have different ID's. Both should be accessible through primary port.
As far as in know MMU needs to be disabled while accessing the chip.

Regards,

scholbert
 
Last edited:

BinaryDroid

Senior Member
Hi BinaryDroid!



May help out if i got my device....
Anyway it would be very nice idea to contact ViperBJK (author of QMAT).
He prooved JTAG access to Diamond already and good very deep knowledge of the device.

Debug mode should be also activated by hardware.
If nothing works out it would be a possibility is to ask one of the Hard-SPL creators. Disassembly of the SPL may give a hint of activating debug mode.

It's obvious, that the mode pins are important to be setup correctly.
The watchdog needs to be disabled (can't remember the pin), PS_HOLD would be required too.

The MSM chipset is bit more complex to access for debugging.
We need patience to gather the necessary informations.
MPU on Hermes was much easier i guess :p

EDIT:
From what i know so far, there would be mainly two methods on MSM to give access to the NAND chip:
1. Using TAP controller
This is a basic access and it is possible to toggle the pins in hardware, simple LPT adaptor should do the job.
2. Using ETM unit
This should be the mode used in QMAT.
Some binary is loaded into RAM (RAM needs to be initialised) and is used as a programming tool.
ETM gives control to the memory, but it's bit more complex to handle.

Anyway, the ARM units inside MSM chip have different ID's. Both should be accessible through primary port.
As far as in know MMU needs to be disabled while accessing the chip.

Regards,

scholbert

Ok well purchaed QMAt with JTAG last night since that tool has been written specifically for the job and will help with getting everything figured out, plus i need it for other projects. the QMAT setup does not mention the mode control pins being used at all for some reason. only the pins I already found which did not seem to work with my 5 wire unbuffered Wiggler. I have to do another test tonight with the complete complicated version that is suggested just until I get it working. once I know the connection works i'll adapt the simpler wiggler to do the same job so anyone trying to unbrick can build the simple $10 dollar adapter and build themselves. I aleady have a plan to make the soldering job to the jtag pins painless via modding the EM shield. at least now with QMAT purchased I can feel better asking him questions and getting correct answers. Primary JTAG is definitely the way to go. your correct also about the ps_hold pin attached to 10K resistor to the watchdog pin.
 
Last edited:

virdi

Member
Jan 7, 2009
34
0
Tampa
Small step for Man, a giant leap for Android ;)

Ok well purchaed QMAt with JTAG last night since that tool has been written specifically for the job and will help with getting everything figured out, plus i need it for other projects.
...
Primary JTAG is definitely the way to go. your correct also about the ps_hold pin attached to 10K resistor to the watchdog pin.

@BinaryDroid @r3nrut Keep going, good stuff. Thanks for your hard work!
I have my G1 taken apart (no, it's not bricked - I am changing the housing). Do you want me to label the Primary JTAG pinout on one of the high-resolution pictures I am taking?

How close are you to the secondary pinout?

Did you ever find the elusive pdf document with JTAG connection details?
 

scholbert

Senior Member
Aug 1, 2007
1,347
821
Wonderful :D

once I know the connection works i'll adapt the simpler wiggler to do the same job so anyone trying to unbrick can build the simple $10 dollar adapter and build themselves.
Yeah that would be awesome...
To support the MSM7xxx familie in OpenOCD would also be very nice.
I saw lbcoder already posted a link ;)

Anyway, if we use boundary scan mode the software implementation would not be very complicated.
First step would be to build up a header file from the BSD-file of MSM7xxx.
Also simple buffered LPT-adaptor could be used.
Have a look at this package...

Keep on hacking!

scholbert
 

Attachments

  • sjf6400x_ver0.1_20071206.zip
    2.5 MB · Views: 540

twoscoops

Member
Sep 25, 2009
7
0
Have they been verified?

Ok, we know the pinout, but has anyone successfully connected up to these pins and checked them? I.e. can you get a response to the IDCODE command working?

I gave it a quick test (with Segger), but it was not able to see anything on the chain.

For what it's worth, the Segger wants VTref (target reference voltage), and nSRST (target CPU reset signal) which we don't have labelled. I left nSRST disconnected and tied VTref to an external 3.3 source.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    I figured this should be in its own thread so those working on a solution can now focus on the software side of things.

    htc-g1-main-frontside-labeled-1.jpg


    These are the JTAG connection points I traced from the CPU to their test points. i'm almost 90% sure the Primary is still usable. Auxilary JTAG port is Very very hard to get too and i'd imagine even for the technicians that reprogram them at the repair center. I didnt have much luck getting a connection made due to mu lack of JTAG knowledge and incorrect type of JTAG circuit(working on another though). i'm posting up the complete testpoints I spent MANY MANY countless hours and sleepless nights tracing so someone who has done this before can get a recovery procedure made to fix all bricked HTC-dreams. The reason I am doing all of this is not specifically for the Dream but because in the field of work im in, and the type of work I do I could benefit from it both for my personal phones and at work. I did research over the years but could never quite understand how JTAG is used until now. I took my spare fully working beater G1 and unsoldered the CPU with an IR Rework Station(T-870A) at home with the intentions of placing the CPU back on when done. took ALOT longer than I hoped and because of the fact that i had to hold test probes on the contact pads tight so I could flip the board and trace their also, it killed a couple of the pads so thats when I decided to say screw it, still have all the spares for my main Dream, now I can REALLY find the rest of the pins....and a few extras that might be used in the future to add features.

    ********Technical Notes*******

    Their are 4 Mode control pins listed in the pictures.
    Mode 3 is under the SIM slot, accessing requires de-soldering 4 points holding the SIM carrier to the board.
    Mode 0 is NOT a testpoint, but a solder point were a resistor could go to ground. it is VERY hard to solder too directly.
    Watchdog pin can simply be grounded with a resistor in place or with a needle through the shielding which would be ground. its a single solder point.
    Primary JTAG is next to the LCD connector.


    When you see were the pins for AUX are located you will see why I think thats not were the focus should be...their scattered in odd places, also have to remove the sim slot to access the last one which took forever to find.
    Trackball has a hidden test point for the return clock as well, otherwise you need to solder directly to the connector on the main board.

    Note: Return Clock is missing in the Picture for the AUX_JTAG connector...it is located at the top right testpoint just above the trackball pad, otherwise you will need to solder directly to the connector on main board.

    if you need any more just let me know, if anyone wants to add to this please feel free.
    Images are NOT MINE, they are the property of whomever took them, I only traced and added the labels, if their is a problem with using them let me know!

    htc-g1-main-backside-labeled.jpg

    htc-g1-main-frontside-labeled.jpg



    IF anyone wants to donate a bricked G1 board for experimenting or donate in general please feel welcome! email@ irenep@binarytechzone.com
    1
    my Ubuntu install was killed by the latest update

    You're not the only one :mad: 9.10 is a car crash.
    1
    Here are the other test points. if you need any others please let me know! I added them to the first post. Please note some are not on actual test points but single solder points.

    htc-g1-main-frontside-labeled.jpg


    htc-g1-main-backside-labeled.jpg
    1
    Maybe i should go to complete the BSDL software for pure JTAG access... :confused:

    Seeing as the USB-method ***WILL*** require some kind of working code to already exist on the device, a jtag solution will be ideal. Let us fix a totally dead phone.

    I say that this is first priority.
    Second priority is simple solutions to partial failures.
    1
    Its Alive

    Hi All;

    So a successful un-brick

    To continue/confirm my post
    http://xdaforums.com/showpost.php?p=5795214&postcount=252

    I've recently got a Tmobile G1 bricked by the previous owner installing HBOOT 1.33.2005 on top of radio 1.22.12.29.

    This like when rogers phones install the ota zip file causes the SPL to get stuck in "ARM11 Boot Mode: 3"; without a recovery to flash (thus stuck on boot screen)

    The following ought to allow you to correct any phone with 1.33.2005 SPL stuck in this mode. However will require some adjustments depending on the current running radio. (And I've only succeeded on radio 1.22.12.29)

    (Rogers Dream users if you installed the OTA radio 2.22.19.26I did already overwrite the EBI1 radio)

    Instructions obviously preliminary I am still trying to see if we can avoid jtag for this.

    ---
    Note I've copied and simplified the process, see the wiki page:
    http://wiki.cyanogenmod.com/index.php/JTAG_DREAM_AND_MAGIC
    ---

    Prerequisites
    A) a phone working with jtag (I will provide commands for "Open On-Chip Debugger 0.4.0" translate to your setup):

    mww ['phys'] address value [count]
    write memory word

    resume [address]
    resume target execution from current PC or address

    halt [milliseconds]
    request target to halt, then wait up to the specifiednumber of
    milliseconds (default 5) for it to complete

    bp [address length ['hw']]
    list or set hardware or software breakpoint

    rbp address
    remove breakpoint
    B) A working stack for your phone in fastboot *.img format (you will want radio.img hboot.img recovery.img

    C) HTC Serial wire or serial/USB hybrid wire; please ensure you can disconnect the USB/Power separate from the serial if need be

    Procedure

    1) Enter blue light mode and attach both serial wire/console + jtag
    2) Halt CPU
    halt​
    3) enable the CID bypass for your version of the radio

    1.22.12.29: mww 0x00902EB4 0xea000013
    2.22.19.26I: mww 0x009038F0 0xea000013
    3.22.20.17: mww 0x009038F0 0xea000013
    3.22.26.17: mww 0x0090379C 0xea000013
    4) set the cego breakpoint for your radio

    1.22.12.29: bp 0x00901A24 0x4
    2.22.19.26I: bp 0x00902b30 0x4
    3.22.20.17: bp 0x00902b30 0x4
    3.22.26.17: bp 0x009029DC 0x4
    5) resume CPU
    resume​
    6) run 'cego' on the serial oemspl console
    7) if all is well the CPU halted due to the breakpoint.. if its failing to boot android you didn't set the breakpoint correctly.. if its gave an error about an unknown command you didn't apply the CID bypass correctly please pull battery and try again
    8) Clear breakpoint that you set earlier

    1.22.12.29: rbp 0x00901A24
    2.22.19.26I: rbp 0x00902b30
    3.22.20.17: rbp 0x00902b30
    3.22.26.17: rbp 0x009029DC
    9) change BOOT Mode 3 to "FASTBOOT" mode :) (address only for 1.33.2005 SPL and 1.33.2009 SPL)
    mww 0x00000c0c 0x98000C4C​
    10) resume CPU
    resume​
    11) now if your video wire is attached (the wire right over the jtag port..) you will see the boot screen with "FASTBOOT" at the top.. if its not attached.. lets hope that is what you would see and attempt to continue anyway
    12) attach USB wire to phone and on PC run "fastboot devices" to see if we are correctly in fastboot mode
    13) fastboot yourself a working stack

    fastboot flash radio radio.img
    fastboot flash hboot hboot.img
    fastboot flash recovery recovery.img
    14) once all the above complete successfully pull battery/serial/dissable jtag (we need a very cold reboot and it gets confused)
    15) boot phone it will boot in boot mode 3 to recovery; clear cache; and with luck behave... use recovery to flash your desired system as usual.

    If you wish to load an alternate SPL rather then only modify the existing one or avoid the breakpoint; see my rogers solution: http://xdaforums.com/showpost.php?p=5934885&postcount=6

    BTW If this did get you out of a bind I do accept donations to cover costs of phones that can no longer get recovered

    (Now that I have a working jtaged phone there was some other things I wanted to look at)