Clear how-to instructions for building android-core-apps and then UPDATING running images.

Visto 522 veces
Saltar al primer mensaje no leído

dug

no leída,
13 jul 2010, 14:36:5913/7/10
a Android Building
My Working Environment: Froyo

Something which I can't find is a complete practical guide focused on
how to work with Android Core Apps, like, packages/apps/Email for
example.

What I really want to do is look over the shoulder of an engineer on
the Android team to see how he sets up his environment to do it.

None of the topics in http://source.android.com are focused on this. I
only found build/core/build-system.html by accident. But that file is
out of date as far as I can tell, and incomplete in this regard. (With
respect to out of date, for example, 'make targets' does not work, and
there is no 'templates' directory which it talks a lot about.)

Here are two work flows spelled out, the parts I managed to figure out
by existing document I marked with (YES). The stuff Iam still trying
to figure out is marked with (MISSING).

CORE APP/EMULATOR WorkFlow:

1. Build the tree (YES: but only after I happened to notice build/
core/build-system.html! No on-line ref to this!)
2. Bring up the emulator (YES)
3. Make a change to a package, for example, packages/apps/Email
(YES)
4. Rebuild just that piece. (YES: mmm packages/apps/Email)
5. Now update the existing running emulator with your change
(MISSING: all the stuff I could find on this mostly doesn't work)

CORE APP/DEVICE WorkFlow:

Same as above but:
1. Build the tree (YES: sort of, once I found out about the lunch
command).
2. Flash your device with the images created by your build (YES:
but only after hunting down on the web how to do it)
5. Update the existing device with the core Android app WITHOUT
needing to reflash the phone. (MISSING: I am not sure this is even
possible. If it isn't it would be nice to know).

I have been spending over a week on this so far, and have learned a
lot by scouring the net, and by reading here and there. But it has
been hard, and I am encountering gotcha issues I have had to figure
out myself, and I am sure there are more to come. I suspect if there
was a single document written by an Google Android Engineer, posted
online, which does this presumably all the time, it would have saved
me a lot of time.

So is build/core/build-system.html going to be updated in the next
release? How about adding a new section on-line that talks about this?

Do you want me to spell out all the problems and stuff lacking I found
so far? Would that be helpful?

Thanks,
Doug Selph

Manfred Moser

no leída,
13 jul 2010, 15:09:4513/7/10
a android-...@googlegroups.com
Having something like that available would be great. Maybe even with
an attached wiki.

manfred

> --
> You received this message because you are subscribed to the "Android Building" mailing list.
> To post to this group, send email to android-...@googlegroups.com
> To unsubscribe from this group, send email to
> android-buildi...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>

Ying Wang

no leída,
15 jul 2010, 2:57:1215/7/10
a android-...@googlegroups.com
Hi Doug,
  It would be great if you can send out the list of problems you encountered.
  I think I am the best fit for the "Google Android Engineer" you mentioned.
  I used to consider revamping the build-system.html, but never got the time to realize it.. 
  I still can not promise when I will do it. sorry.
  The build system is in active development as well, so even with a revamping it may get out of date soon :-)

thanks!


On Tue, Jul 13, 2010 at 11:36 AM, dug <dougla...@gmail.com> wrote:

FrankG

no leída,
15 jul 2010, 3:04:2515/7/10
a Android Building
Concerning the CORE APP/DEVICE WorkFlow:

IMHO this depends also from the concrete platform.
The different vendors might use an adapted build process
because the have different hardware .. so you might use other build
switches.

Also the flash tools can be very different, some may allow you to
provide
certain addresses for the x-loader, the boot loader, the kernel and so
on,
other use internaly fixed ones.

So in mye eyes it depends also from the concrete hardware.

But I completly agree a guide with details what can be done in which
way with typical
scenarios would be a great help.

Thanks !
Frank



On 13 Jul., 21:09, Manfred Moser <mosa...@gmail.com> wrote:
> Having something like that available would be great. Maybe even with
> an attached wiki.
>
> manfred
>
>
>
> On Tue, Jul 13, 2010 at 11:36 AM, dug <douglasse...@gmail.com> wrote:
> > My Working Environment: Froyo
>
> > Something which I can't find is a complete practical guide focused on
> > how to work with Android Core Apps, like, packages/apps/Email for
> > example.
>
> > What I really want to do is look over the shoulder of an engineer on
> > the Android team to see how he sets up his environment to do it.
>
> > None of the topics inhttp://source.android.comare focused on this. I
> >http://groups.google.com/group/android-building?hl=en- Zitierten Text ausblenden -
>
> - Zitierten Text anzeigen -

ashughes

no leída,
15 jul 2010, 11:28:1515/7/10
a Android Building
Anthony has created an Android platform wiki at http://androidguts.com/
It would be great if you all could contribute to it, especially Ying
(or any other Google Android engineers!) I look forward to seeing you
all there.

Thanks,
Andrew
> > > None of the topics inhttp://source.android.comarefocused on this. I
> > > only found build/core/build-system.htmlby accident. But that file is
> > > So is build/core/build-system.htmlgoing to be updated in the next
> > > release? How about adding a new section on-line that talks about this?
>
> > > Do you want me to spell out all the problems and stuff lacking I found
> > > so far? Would that be helpful?
>
> > > Thanks,
> > > Doug Selph
>
> > > --
> > > You received this message because you are subscribed to the "Android Building" mailing list.
> > > To post to this group, send email to android-...@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-buildi...@googlegroups.com
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-building?hl=en-Zitierten Text ausblenden -

dug

no leída,
19 jul 2010, 10:42:2519/7/10
a Android Building
Ying,
Thanks for the response.

First the "easy" stuff is two things in the build-system.html
document that is out of date in froyo:

1. "make targets" does not work.
2. The document talks a lot about using templates from 'templates/
apps' but there is no such directory.

Now for the some random deficiencies:

* In froyo, for me, a 'simulator' build fails. The first of a series
of failures had to do with it not being able to find 'strlcpy'.
* I didn't see anywhere a formal explanation of what a 'simulator'
build was. I still am not sure. My confusion stems from the existence
of the emulator. I first I thought it was a special build for use with
the emulator. But that's not correct. What is?

I finally figure the following out, but a formal explanation would
be nice:

* The difference 'lunch' and 'choosecombo'.
* That to build for an actual device you choose a 'passion' target.
* That to build for the emulator you need to say 'make PRODUCT-sdk-
sdk'. And that this will create a a directory called 'out/hosts/linux-
x86/sdk/android-sdk_eng.tip_linux-x86'; which can be used as the
ANDROID_SDK_ROOT.
* Speaking of which, there are various important environment
variables: ANDROID_SDK_ROOT, ANDROID_SDK, SDK_HOME. It would be nice
to know the official list and what they affect. It doesn't haven't to
be comprehensive. Just the most important ones.
* That different combos produce different results in different
directories in 'out'. I think. That is, I know that 'PRODUCT-sdk-sdk'
target produces a unique result in out. I think. And I also think that
a 'passion' target overwrites different files in out, from a 'eng'
build. But I don't know about 'debug' and 'release' and the others.
This is important to know because you want to know if you are wasting
compile time by switching around different builds. Right now, to make
sure I am not, I have completely separate top trees representing
choosecombo's. But is that necessary?

The things I was not able to figure out but I managed to work
around:

* How to update a running emulator with a new core app, like Phone,
for example. When I tried this it failed. After a lot of different
things, I decided to give up and just rebuild the emulator image
(using make PRODUCT-sdk-sdk) and then restart the emulator. But I was
close. Here were the problems:
+ When I tried to flash the new APP .apk image into the emulator
(into /system/app), I got an out of space error. That is, even if I
deleted the APP first. The space was not reclaimed; so the new .apk
wouldn't take. I was able to work around this by creating the
emulator's system.img with a bunch of dummy junk. Then after I deleted
it I was able to copy in the new .apk. But, for the phone app this
just caused the program to die. I played around a lot with deleting
the dalvik-cache file; but that didn't seem to work. I eventually gave
up. It would be nice to know, in theory anyway, if flashing a new CORE
app into a running emulator is possible. Perhaps my choice of the
phone app was just unlucky.

* A common error I got when I started the emulator was:

emulator: ERROR: could not find required kernel image (kernel-qemu).
emulator: Your ANDROID_SDK_ROOT is probably wrong:...

What I finally figured out was that it was looking for
$ANDROID_SDK_ROOT/platforms/android-8/...
BUT my environment had the name of the directory as 'android-2.2'.
All I did was create a soft link from android-8 to android2.2 and it
started working.

Okay, I am probably forgetting something. But hopefully the above
is helpful.
Thanks,
Doug


On Jul 15, 1:57 am, Ying Wang <wangy...@android.com> wrote:
> Hi Doug,
>   It would be great if you can send out the list of problems you
> encountered.
>   I think I am the best fit for the "Google Android Engineer" you mentioned.
>   I used to consider revamping the build-system.html, but never got the time
> to realize it..
>   I still can not promise when I will do it. sorry.
>   The build system is in active development as well, so even with a
> revamping it may get out of date soon :-)
>
> thanks!
>
>
>
> On Tue, Jul 13, 2010 at 11:36 AM, dug <douglasse...@gmail.com> wrote:
> > My Working Environment: Froyo
>
> > Something which I can't find is a complete practical guide focused on
> > how to work with Android Core Apps, like, packages/apps/Email for
> > example.
>
> > What I really want to do is look over the shoulder of an engineer on
> > the Android team to see how he sets up his environment to do it.
>
> > None of the topics inhttp://source.android.comare focused on this. I
> > android-buildi...@googlegroups.com<android-building%2Bunsubscrib e...@googlegroups.com>

Kristopher Giesing

no leída,
11 ago 2010, 13:31:0211/8/10
a Android Building
Here's what I've been doing to build and test changes to the Email
package:

$ make Email
$ make
$ ./out/host/darwin-x86/bin/emulator
<quit emulator>

This clobbers the emulator every time, but at least it's reliable. I
haven't tried reinstalling the Email package but I'll probably start
trying to do that soon. The out of memory problem may be solvable by
using the -partition-size parameter; for my non-OS development I ended
up replacing the emulator with a shell script that adds that parameter
and forwards all other arguments (I couldn't otherwise figure out how
to get the ADT plug-in for Eclipse to add that flag).

- Kris

pincrespo

no leída,
19 ago 2010, 12:26:2819/8/10
a Android Building

Maybe, it can be helpful this page: http://pdk.android.com/

FrankG

no leída,
19 ago 2010, 15:18:4819/8/10
a Android Building
I think this page is helpful, but IMHO in some parts out of date.

I.e. concerning prebuild, signed apps.

Good luck !

Frank

jotobjects

no leída,
9 sept 2010, 17:41:289/9/10
a Android Building
Is that page the same as this one from the porting tab on
source.android.com?

http://source.android.com/porting/index.html

Andrew Hughes

no leída,
10 sept 2010, 10:46:1010/9/10
a android-...@googlegroups.com
Looks like it (except for the non-squished logo). Also, I finally figured out that you can click on the arrows to expand the categories under "System" since clicking on the names doesn't work.

--
You received this message because you are subscribed to the "Android Building" mailing list.
To post to this group, send email to android-...@googlegroups.com
To unsubscribe from this group, send email to
android-buildi...@googlegroups.com
Responder a todos
Responder al autor
Reenviar
0 mensajes nuevos