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
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.
> 2/ Bootloader details:
> a/ is http://android.git.kernel.org/?p=platform/bootloader/legacy.git;a=summary
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
Oops, I forgot two:
radio (ARM9 firmware)
cpld (complex programmable logic device)
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
>>> 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.
Tanks for the thorough answer Mike.
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,
>>
Ahh, ok. So I'm guessing the "USB" is really an HTC ExtUSB port, which
>> 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).
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?
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
From memory, 3 is RX, TX maybe 4 or 5 - but that's easy to figure out
with a scope.
>
> Thanks,
>
> Benno
>
Ok, thanks. Time to break out the scope then.
Thanks,
Benno
Cheers,
Benno