Details about Dev Phone 1

1736 views
Skip to first unread message

Ben Leslie

unread,
Dec 11, 2008, 7:55:02 AM12/11/08
to android-...@googlegroups.com
Hi all,

I'm waiting for my dev phone to turn up, but in the mean time does
anyone know if there is page somewhere with details on the phone?

Specifically I'm interested in:

1/ Hardware specs (I assume this is exactly the same as the G1)
a/ is there a UART header?
b/ is there a JTAG header?

2/ Bootloader details:
a/ is http://android.git.kernel.org/?p=platform/bootloader/legacy.git;a=summary
the bootloader on the device?
b/ can we load development images over USB?
c/ can we interact w/ bootloader over USB and/or UART for automated
booting etc?
d/ can we reflash the bootloader itself? (see also 1b for when things
go wrong!)

3/ What is the flash layout

Any details or references appreciated.

Cheers,

Benno

Mike Lockwood

unread,
Dec 11, 2008, 8:17:25 AM12/11/08
to android-...@googlegroups.com
On Thu, Dec 11, 2008 at 7:55 AM, Ben Leslie <be...@benno.id.au> wrote:
>
> Hi all,
>
> I'm waiting for my dev phone to turn up, but in the mean time does
> anyone know if there is page somewhere with details on the phone?
>
> Specifically I'm interested in:
>
> 1/ Hardware specs (I assume this is exactly the same as the G1)

Yes

> a/ is there a UART header?

It is possible to access the UART via the USB port, using the pins
normally used for the wired headset. But I don't know if they
included the cable for that with the developer phone. This can be used
to access the kernel debugger or for getting a serial console on the
device. (the serial console support is what caused the root exploit
that was fixed in RC30).

> b/ is there a JTAG header?

I don't think so, unless you are really good with a soldering iron.

The bootloader came from HTC, and HTC has not released the source
code. It might use some of that code, but it is not the same.

> the bootloader on the device?
> b/ can we load development images over USB?

Yes, you will be able to use the fastboot tool to flash new images to
the device over USB.

> c/ can we interact w/ bootloader over USB and/or UART for automated
> booting etc?

Sure, we have testing scripts written in python that automate fastboot
and adb for automated testing and reflashing of multiple devices
simultaneously.

> d/ can we reflash the bootloader itself? (see also 1b for when things
> go wrong!)

Yes, you can reflash the bootloader with fastboot. But I would not
recommend doing that (unless HTC releases a bug fix release to the
bootloader). As I mentioned, the source for the bootloader has not
been released, so it doesn't make sense to try to modify it.

>
> 3/ What is the flash layout

I don't have the details handy, but from memory, here is the list of partitions:

boot (for the bootloader)
system (for /system)
userdata (for /data)
recovery (for installing system updates)
cache (for /cache, which is used to store system updates and files
downloaded by the download manager)
splash1 (splash screen that is shown for about 1 second at boot)
splash2 (splash screen that is shown until the android logo comes up).

--
Mike Lockwood
Google android team

Mike Lockwood

unread,
Dec 11, 2008, 8:46:43 AM12/11/08
to android-...@googlegroups.com

Oops, I forgot two:

radio (ARM9 firmware)
cpld (complex programmable logic device)

Ben Leslie

unread,
Dec 11, 2008, 9:05:04 AM12/11/08
to android-...@googlegroups.com
On Fri, Dec 12, 2008 at 12:17 AM, Mike Lockwood <lock...@android.com> wrote:
>
> On Thu, Dec 11, 2008 at 7:55 AM, Ben Leslie <be...@benno.id.au> wrote:
>>
>> Hi all,
>>

Tanks for the thorough answer Mike.

>> a/ is there a UART header?
>
> It is possible to access the UART via the USB port, using the pins
> normally used for the wired headset. But I don't know if they
> included the cable for that with the developer phone. This can be used
> to access the kernel debugger or for getting a serial console on the
> device. (the serial console support is what caused the root exploit
> that was fixed in RC30).

Ahh, ok. So I'm guessing the "USB" is really an HTC ExtUSB port, which
has a pin-out as described:
http://www.tracyandmatt.co.uk/blogs/index.php/2006/09/10/htc_hermes_usb_connector_pin_config

I'm also assume that at boot there are some GPIOs set up so that the
UART pins come out over what would normally be the audio pins? And
sometime during the boot process the GPIO swaps them across?

Assuming I'm kind of on track, is there a pinout for the ExtUSB port,
so I can create my own ExtUSB -> UART cable?

(The reasons for the questions is that I want to do some hacking
really on in the boot process, and need some output to see what I'm
doing, and writing a whole USB stack, even if just client-side, is
more work than I really want to get into. UARTs are nice and simple
;).

Cheers,

Benno

Mike Lockwood

unread,
Dec 11, 2008, 10:44:18 AM12/11/08
to android-...@googlegroups.com
On Thu, Dec 11, 2008 at 9:05 AM, Ben Leslie <be...@benno.id.au> wrote:
> On Fri, Dec 12, 2008 at 12:17 AM, Mike Lockwood <lock...@android.com> wrote:
>> On Thu, Dec 11, 2008 at 7:55 AM, Ben Leslie <be...@benno.id.au> wrote:

>>> a/ is there a UART header?
>>
>> It is possible to access the UART via the USB port, using the pins
>> normally used for the wired headset. But I don't know if they
>> included the cable for that with the developer phone. This can be used
>> to access the kernel debugger or for getting a serial console on the
>> device. (the serial console support is what caused the root exploit
>> that was fixed in RC30).
>
> Ahh, ok. So I'm guessing the "USB" is really an HTC ExtUSB port, which
> has a pin-out as described:
> http://www.tracyandmatt.co.uk/blogs/index.php/2006/09/10/htc_hermes_usb_connector_pin_config

Yes, that looks right. I'm not sure how the audio pins are mapped to
the UART though.

> I'm also assume that at boot there are some GPIOs set up so that the
> UART pins come out over what would normally be the audio pins? And
> sometime during the boot process the GPIO swaps them across?

Yes, if the dev phone has the same bootloader I am using, then the
UART will be enabled by default. If you enter the bootloader with the
Back button down, you will see diagnostic output on the UART when you
are flashing with fastboot. If you enter the bootloader with the
Camera button down, then you get a simple serial console that lets you
set some NVRAM parameters (and possibly other features I'm not aware
ov).

> Assuming I'm kind of on track, is there a pinout for the ExtUSB port,
> so I can create my own ExtUSB -> UART cable?

Yes, you should be able to build a cable that gives you simultaneous
USB and serial access to the device.

Nick Pelly

unread,
Dec 16, 2008, 1:53:59 AM12/16/08
to android-...@googlegroups.com
On Thu, Dec 11, 2008 at 6:05 AM, Ben Leslie <be...@benno.id.au> wrote:

On Fri, Dec 12, 2008 at 12:17 AM, Mike Lockwood <lock...@android.com> wrote:
>
> On Thu, Dec 11, 2008 at 7:55 AM, Ben Leslie <be...@benno.id.au> wrote:
>>
>> Hi all,
>>

Tanks for the thorough answer Mike.

>>  a/ is there a UART header?
>
> It is possible to access the UART via the USB port, using the pins
> normally used for the wired headset.  But I don't know if they
> included the cable for that with the developer phone. This can be used
> to access the kernel debugger or for getting a serial console on the
> device. (the serial console support is what caused the root exploit
> that was fixed in RC30).

Ahh, ok. So I'm guessing the "USB" is really an HTC ExtUSB port, which
has a pin-out as described:
http://www.tracyandmatt.co.uk/blogs/index.php/2006/09/10/htc_hermes_usb_connector_pin_config

Yes, those audio pins should be correct as well.
 

I'm also assume that at boot there are some GPIOs set up so that the
UART pins come out over what would normally be the audio pins? And
sometime during the boot process the GPIO swaps them across?

It's actually a little more complex than that - we want to keep these pins mux-ed to the UART for as long as possible to assist in kernel lockups via the low level fiq debugger on that UART. So we leave it mux-ed to the UART - even after boot. Only once board-trout-h2w.c detects the correct pull-down imepedance for a headset do we mux the pins to audio.

Operating a serial debugger and the H2W cable detect on the same pins is a little tricky. For generic UART usage I would turn off the headset detection - CONFIG_H2W.



Assuming I'm kind of on track, is there a pinout for the ExtUSB port,
so I can create my own ExtUSB -> UART cable?

You already have it :)

Nick
Android Systems Engineer

Ben Leslie

unread,
Dec 20, 2008, 1:03:35 AM12/20/08
to android-...@googlegroups.com

Umm, I think I'm missing something :( or I'm just plain thick. I was
wondering which pins on:

http://www.tracyandmatt.co.uk/blogs/index.php/2006/09/10/htc_hermes_usb_connector_pin_config

would end up matching the UART TxD and RxD (and GND).

Thanks,

Benno

Nick Pelly

unread,
Dec 20, 2008, 3:05:49 AM12/20/08
to android-...@googlegroups.com

From memory, 3 is RX, TX maybe 4 or 5 - but that's easy to figure out
with a scope.

>
> Thanks,
>
> Benno
>

Ben Leslie

unread,
Dec 21, 2008, 4:50:42 PM12/21/08
to android-...@googlegroups.com

Ok, thanks. Time to break out the scope then.

Thanks,

Benno

Ben Leslie

unread,
Dec 24, 2008, 2:35:40 AM12/24/08
to android-...@googlegroups.com
I'm wondering if anyone has figured out where you can actually buy an
11 pin mini usb (a.k.a EMU, a.k.a ExtUSB) plug. Unfortunately the
plugs that come with the phone are missing the pins that I need, which
is a little frustrating.

Cheers,

Benno

Reply all
Reply to author
Forward
0 new messages