minimum steps to build framework_intermediates/classes.jar

653 views
Skip to first unread message

Joe Moore

unread,
Aug 17, 2011, 12:37:06 PM8/17/11
to Android Building
I would like to script building out/target/common/obj/JAVA_LIBRARIES/
framework_intermediates/*.jar for for multiple SDK versions. The key
is that I would like the real implementations to stay in intact, not
the stripped and "Stub!" throwing jars. I don't think Google/Android
distributes this version of the jars anywhere.

Ideally I would strip this process down to the minimum number of steps
(and time) needed to generate these jars. After quite a bit of
searching and trying different things I'm not clear which project
houses the code that generates classes.jar, classes-full-debug.jar,
and friends or if there is a specific build target I can call to build
them and nothing else (or stop the build at that point).

Any advice would be greatly appreciated.

Magnus Bäck

unread,
Aug 17, 2011, 4:05:48 PM8/17/11
to android-...@googlegroups.com
On Wednesday, August 17, 2011 at 18:37 CEST,
Joe Moore <joe....@gmail.com> wrote:

> I would like to script building out/target/common/obj/JAVA_LIBRARIES/
> framework_intermediates/*.jar for for multiple SDK versions. The key
> is that I would like the real implementations to stay in intact, not
> the stripped and "Stub!" throwing jars. I don't think Google/Android
> distributes this version of the jars anywhere.

You could extract them from system.img found in the SDK.

> Ideally I would strip this process down to the minimum number of steps
> (and time) needed to generate these jars. After quite a bit of
> searching and trying different things I'm not clear which project
> houses the code that generates classes.jar, classes-full-debug.jar,
> and friends or if there is a specific build target I can call to build
> them and nothing else (or stop the build at that point).

All these jar files are make targets, so e.g.

make out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes.jar

would get you that file (and very little else).

--
Magnus B�ck Opinions are my own and do not necessarily
SW Configuration Manager represent the ones of my employer, etc.
Sony Ericsson

Joseph Moore

unread,
Aug 17, 2011, 5:13:17 PM8/17/11
to android-...@googlegroups.com
This is super helpful! 

Regarding "You could extract them from system.img found in the SDK" -- I'm in the middle of Googling for this now, by on a Mac trying to mount this image give a "no mountable file system" error. I've tried converting the image to some other formats and get the same error when trying to mount those. Do you know how to either mount or extract this .img on a Mac?

Thanks, 

-- Joe

On Wed, Aug 17, 2011 at 1:05 PM, Magnus Bäck <magnu...@sonyericsson.com> wrote:
On Wednesday, August 17, 2011 at 18:37 CEST,
    Joe Moore <joe....@gmail.com> wrote:

> I would like to script building out/target/common/obj/JAVA_LIBRARIES/
> framework_intermediates/*.jar for for multiple SDK versions. The key
> is that I would like the real implementations to stay in intact, not
> the stripped and "Stub!" throwing jars.  I don't think Google/Android
> distributes this version of the jars anywhere.

You could extract them from system.img found in the SDK.

> Ideally I would strip this process down to the minimum number of steps
> (and time) needed to generate these jars. After quite a bit of
> searching and trying different things I'm not clear which project
> houses the code that generates classes.jar, classes-full-debug.jar,
> and friends or if there is a specific build target I can call to build
> them and nothing else (or stop the build at that point).

All these jar files are make targets, so e.g.

make out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes.jar

would get you that file (and very little else).

--
Magnus Bäck                   Opinions are my own and do not necessarily

SW Configuration Manager      represent the ones of my employer, etc.
Sony Ericsson

--
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

Magnus Bäck

unread,
Aug 18, 2011, 2:46:21 AM8/18/11
to android-...@googlegroups.com
On Wednesday, August 17, 2011 at 23:13 CEST,
Joseph Moore <joe....@gmail.com> wrote:

> Regarding "You could extract them from system.img found in the SDK" --
> I'm in the middle of Googling for this now, by on a Mac trying to
> mount this image give a "no mountable file system" error. I've tried
> converting the image to some other formats and get the same error when
> trying to mount those. Do you know how to either mount or extract this
> .img on a Mac?

You can use the unyaffs tool for this. Sorry for not mentioning it from
the start.

http://code.google.com/p/unyaffs/

--
Magnus B�ck Opinions are my own and do not necessarily

Rado ANDRIATSIMANDEFITRA

unread,
Aug 17, 2011, 7:14:59 PM8/17/11
to android-...@googlegroups.com
the same error when trying to mount those. Do you know how to either mount or extract this .img on a Mac?

It may happen that system.img is an yaffs2 image and your kernel doesn't support it. I'm not a mac specialist so I can't tell you how to mount it on a Mac but I've encountered the same problem few months ago and you can get the file inside system.img from an emulator or a developer device. Then you can pull its content from /system. /system is the mount point of system.img if i'm not wrong



--
Radoniaina ANDRIATSIMANDEFITRA
Stagiaire Supelec
Équipe CIDre
Master 2 Sécurité des systèmes d'informations
Université de Rouen

Joe Moore

unread,
Aug 18, 2011, 12:18:56 PM8/18/11
to Android Building
I used unyaffs to extract the .img file and while I did find the jars
under framework/ they are dex'ed.

$ jar -tf framework.jar
META-INF/
META-INF/MANIFEST.MF
classes.dex
preloaded-classes

I was hoping to get the jars with real implementations without
spending an hour+ syncing and building. I have been trying to find a
magic combination of projects I can sync to just generate
framework_intermediates/classes.jar in the minimum time. I realize now
that even this is not quite good enough because I'd like the @hide
annotations to be respected, which they are not in
framework_intermediates/*.jar -- perhaps they are elsewhere?


On Aug 17, 4:14 pm, Rado ANDRIATSIMANDEFITRA <andri...@gmail.com>
wrote:
> the same error when trying to mount those. Do you know how to either mount
>
> > or extract this .img on a Mac?
>
> It may happen that system.img is an yaffs2 image and your kernel doesn't
> support it. I'm not a mac specialist so I can't tell you how to mount it on
> a Mac but I've encountered the same problem few months ago and you can get
> the file inside system.img from an emulator or a developer device. Then you
> can pull its content from /system. /system is the mount point of system.img
> if i'm not wrong
>
> On Wed, Aug 17, 2011 at 1:05 PM, Magnus Bäck
> <magnus.b...@sonyericsson.com>wrote:
>
>
>
>
>
>
>
>
>
> > On Wednesday, August 17, 2011 at 18:37 CEST,
> For more options, visit this group athttp://groups.google.com/group/android-building?hl=en
Reply all
Reply to author
Forward
0 new messages