enabling OTA updates for my device

104 views
Skip to first unread message

Jay Freeman (saurik)

unread,
Dec 2, 2008, 4:44:01 AM12/2/08
to android...@googlegroups.com
So, let's say that I've succeeded in getting Android running on my device. Is OTA updates from Google something that only really large-scale providers like T-Mobile are going to be able to do? -J

Jean-Baptiste Queru

unread,
Dec 2, 2008, 8:53:52 AM12/2/08
to android...@googlegroups.com
As I understand, the short answer is that right now "it's Google-specific".

I have a bit of second-hand knowledge about the update system, though
(since I do have some first-hand knowledge of code that it works
directly with). That still second-hand knowledge, though, so take it
with a grain of salt:

-the first step is to determine that there's an update available.
That's the Google-specific part, and that's also the part that I'm the
least familiar with. The basic idea about how it's implemented right
now is that the device sends information about itself to an update
server (e.g. IMEI + current version) and the server responds whether
an update is available for that specific device, along with the URI
for that update.

-the second step is to download the actual bits, typically into
/cache. Using the download manager is the recommended option here
(because it's been pretty well tested, and because it deals reasonably
well with managing space on /cache for that specific case), though I
guess that there are other options.

-the third step is to reboot into recovery mode with the proper
information passed into the recovery code. I don't think that this
code is Google-specific, but it's not open-source and it might be
version-specific, so if you rebuild it by looking at the recovery code
you could end up with something that doesn't work on future versions.
I guess it'd be good if that could be covered by system class (to deal
with the compatibility issue), but it's not my decision to make (and I
guess it won't happen in the immediate future).

-you can of course sprinkle just about any UI you want along the
various steps of the process.

JBQ

Dianne Hackborn

unread,
Dec 2, 2008, 1:10:39 PM12/2/08
to android...@googlegroups.com
It probably doesn't even make sense to utilize the Google OTA server -- Google is supplying updates currently for the G1, which are a specific build configuration signed with certificates owned by the people who make that device (HTC and T-Mobile).  You wouldn't want that OTAed on to a phone with your own build, because the certificates wouldn't match what is installed and all hell would break loose when it boots with the new certificates if you even hacked it to install the update at all.  And even if you got that all to work, what you'd be receiving is the standard G1 build, losing whatever you have customized.

I'm not sure what you are wanting to accomplish, but generally you would either want to work with Google to supply your own system images to your own phones through their update servers, or you can look at the code in the device for talking with those servers and implement your own; I don't think it is a super-complicated server protocol, though probably a little convoluted to follow.
--
Dianne Hackborn
Android framework engineer
hac...@android.com

Note: please don't send private questions to me, as I don't have time to provide private support.  All such questions should be posted on public forums, where I and others can see and answer them.

Jay Freeman (saurik)

unread,
Dec 2, 2008, 3:00:00 PM12/2/08
to android...@googlegroups.com
I am not saying that I want to install Google's existing OTA, T-Mobile signed updates on my device. I am saying that I am wondering how Google is intending to structure relationships to use their OTA infrastructure for other vendors. In essence I "want to work with Google to supply [my] own system images to [my] own phones through their update servers", and am wondering if there has been any thought put into that process on their side, past T-Mobile and the G1. -J

Dianne Hackborn

unread,
Dec 2, 2008, 3:03:06 PM12/2/08
to android...@googlegroups.com
I'm sure there has, but that's probably not something most if any of us here know about.  If you are working on shipping a device, you should probably get in contact through the OHA.

zoneson chen

unread,
Dec 2, 2008, 4:40:49 PM12/2/08
to android...@googlegroups.com
Hi Dianne,

If we would like to provide the revision service to our customers, do we have to go through OHA?  If not, would you mind pointing us where is the code to handle the OTA trigger from T-Mobile in G1 case?

Thanks,

Zoneson

Jean-Baptiste Queru

unread,
Dec 2, 2008, 4:43:23 PM12/2/08
to android...@googlegroups.com
The OTA trigger code in the G1 is proprietary to Google and isn't in
the open-source code.

JBQ

zoneson chen

unread,
Dec 2, 2008, 4:56:45 PM12/2/08
to android...@googlegroups.com
JBQ,

Thanks!  Does the proprietary mechanism trigger the release checking and downloading similar to manual upgrade?

Thanks,

Zoneson

Jean-Baptiste Queru

unread,
Dec 2, 2008, 5:00:39 PM12/2/08
to android...@googlegroups.com
I'm not quite sure what you mean. The only "manual" upgrade process
I'm aware of goes through an update.zip file on the SD card, loaded
via alt-s in recovery, and that process bypasses just about
everything.

JBQ

zoneson chen

unread,
Dec 2, 2008, 5:58:05 PM12/2/08
to android...@googlegroups.com
JBQ,

I thought that we could force the upgrade from G1 directly,  In fact, I was wrong.  It looks like that I need AnyCut in order to do it.

Would you mind pointing us where is the starting code in open source after the proprietary trigger?

Thanks,

Zoneson

Jean-Baptiste Queru

unread,
Dec 2, 2008, 6:06:15 PM12/2/08
to android...@googlegroups.com
Even then you can't force an upgrade, you can just force the G1 to
immediately check whether an update is scheduled for that specific
device. If your individual device isn't scheduled for an update,
checking for an update won't change anything about that.

I'd say that parts of the open-source stuff is DownloadProvider, and
part is recovery (I don't know where recovery actually lives).

JBQ

zoneson chen

unread,
Dec 2, 2008, 6:14:23 PM12/2/08
to android...@googlegroups.com
JBQ,

Thank you for the answers!  They could be good enough to us to dig into the code and see how we should design it.

Thanks,

Zoneson

twebb

unread,
Jan 29, 2009, 4:08:16 PM1/29/09
to android-porting
I'm considering using the OTA update method for updating code on a new
device, but not using Google's OTA server(s). So effectively my
update sequence would start after the update.zip file arrives on the
device (ignore how it got there for the moment). Can someone (JBQ?)
describe the update sequence from that point on? From what I gather,
it begins by rebooting into recovery mode. However, I can't seem to
find bootloader code that is checking for various boot commands
(including "boot-recovery") that would begin this whole process. Any
suggestions for understanding this process, or is going through the
code the only way?
Reply all
Reply to author
Forward
0 new messages