may be there are someways:
1: put their own resources under the folder "frameworks\base\core
\res", mix with android's original resources, although it works, but
idont think it is a best way?
2: make their own resource apk like "framework-res.apk", it can
separate their own resources from android's original res, but i don't
kown how to implements it, and i don't kown whether it is feasible.
3: some else?
i think the second is the best, but i don't kown how to implements
it.
2 would be best, but currently we don't support shared libraries with
resources so you can't really do it.
In cupcake you can define PRODUCT_PACKAGE_OVERLAYS in your product makefile
to specify one or more directories that will be merged in with the base
platform directories. For example:
You can use this to replace any resource in the tree, both in the framework
and in specific packages, by just putting them in a directory corresponding
to the same path where you find them in the platform tree.
Also when adding new resources to the frameworks that you want to use in
your own apps that are built into the system image, you can use the magic
syntax "@*android:type/name" to reference them without having to make them
public. You can likewise find private resources in Java at
com.android.internal.R.
On Thu, Feb 19, 2009 at 12:05 AM, cht <caoht...@gmail.com> wrote:
> may be there are someways:
> 1: put their own resources under the folder "frameworks\base\core
> \res", mix with android's original resources, although it works, but
> idont think it is a best way?
> 2: make their own resource apk like "framework-res.apk", it can
> separate their own resources from android's original res, but i don't
> kown how to implements it, and i don't kown whether it is feasible.
> 3: some else?
> i think the second is the best, but i don't kown how to implements
> it.
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.
On Thu, Feb 19, 2009 at 11:07 AM, Dianne Hackborn <hack...@android.com> wrote:
> 2 would be best, but currently we don't support shared libraries with
> resources so you can't really do it.
> In cupcake you can define PRODUCT_PACKAGE_OVERLAYS in your product makefile
> to specify one or more directories that will be merged in with the base
> platform directories.
Glad to see this overlay mechanism. Very nice.
How can I test this?
I created a vendor/mycompany/mycompany.mk
------------
PRODUCT_PACKAGES := \
VoiceDialer
> You can use this to replace any resource in the tree, both in the framework
> and in specific packages, by just putting them in a directory corresponding
> to the same path where you find them in the platform tree.
> Also when adding new resources to the frameworks that you want to use in
> your own apps that are built into the system image, you can use the magic
> syntax "@*android:type/name" to reference them without having to make them
> public. You can likewise find private resources in Java at
> com.android.internal.R.
> On Thu, Feb 19, 2009 at 12:05 AM, cht <caoht...@gmail.com> wrote:
>> may be there are someways:
>> 1: put their own resources under the folder "frameworks\base\core
>> \res", mix with android's original resources, although it works, but
>> idont think it is a best way?
>> 2: make their own resource apk like "framework-res.apk", it can
>> separate their own resources from android's original res, but i don't
>> kown how to implements it, and i don't kown whether it is feasible.
>> 3: some else?
>> i think the second is the best, but i don't kown how to implements
>> it.
> 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.
> 2 would be best, but currently we don't support shared libraries with
> resources so you can't really do it.
> In cupcake you can define PRODUCT_PACKAGE_OVERLAYS in your product makefile
> to specify one or more directories that will be merged in with the base
> platform directories. For example:
> You can use this to replace any resource in the tree, both in the framework
> and in specific packages, by just putting them in a directory corresponding
> to the same path where you find them in the platform tree.
> Also when adding new resources to the frameworks that you want to use in
> your own apps that are built into the system image, you can use the magic
> syntax "@*android:type/name" to reference them without having to make them
> public. You can likewise find private resources in Java at
> com.android.internal.R.
> On Thu, Feb 19, 2009 at 12:05 AM, cht <caoht...@gmail.com> wrote:
> > may be there are someways:
> > 1: put their own resources under the folder "frameworks\base\core
> > \res", mix with android's original resources, although it works, but
> > idont think it is a best way?
> > 2: make their own resource apk like "framework-res.apk", it can
> > separate their own resources from android's original res, but i don't
> > kown how to implements it, and i don't kown whether it is feasible.
> > 3: some else?
> > i think the second is the best, but i don't kown how to implements
> > it.
> 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.
On Mon, Feb 23, 2009 at 8:31 PM, Nick <nickp...@gmail.com> wrote:
> Out of curiosity, does the overlay apply to any type of file like Java
> files in the framework that an OEM may want to modify?
> Thanks,
> Nick
> On Feb 19, 2:07 pm, Dianne Hackborn <hack...@android.com> wrote:
> > 2 would be best, but currently we don't support shared libraries with
> > resources so you can't really do it.
> > In cupcake you can define PRODUCT_PACKAGE_OVERLAYS in your product
> makefile
> > to specify one or more directories that will be merged in with the base
> > platform directories. For example:
> > You can use this to replace any resource in the tree, both in the
> framework
> > and in specific packages, by just putting them in a directory
> corresponding
> > to the same path where you find them in the platform tree.
> > Also when adding new resources to the frameworks that you want to use in
> > your own apps that are built into the system image, you can use the magic
> > syntax "@*android:type/name" to reference them without having to make
> them
> > public. You can likewise find private resources in Java at
> > com.android.internal.R.
> > On Thu, Feb 19, 2009 at 12:05 AM, cht <caoht...@gmail.com> wrote:
> > > may be there are someways:
> > > 1: put their own resources under the folder "frameworks\base\core
> > > \res", mix with android's original resources, although it works, but
> > > idont think it is a best way?
> > > 2: make their own resource apk like "framework-res.apk", it can
> > > separate their own resources from android's original res, but i don't
> > > kown how to implements it, and i don't kown whether it is feasible.
> > > 3: some else?
> > > i think the second is the best, but i don't kown how to implements
> > > it.
> > 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.
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.
i find that attrs.xml files can not be overlayed
it will make an error
attrs.xml error atribute "direction" has already benn difiend.
i test the overlay on Launcher app
any other file types can be overlayed successfully.
i define the overlay path in my own product file
and copy the original Launcher app to the corresponding overlay path
the attrs.xml file failed,
delete the attrs.xml file it works.
i want to know if the attrs.xml files can be overlayed?
On Wed, Feb 25, 2009 at 6:28 PM, cht <caoht...@gmail.com> wrote:
> i find that attrs.xml files can not be overlayed
> it will make an error
> attrs.xml error atribute "direction" has already benn difiend.
> i test the overlay on Launcher app
> any other file types can be overlayed successfully.
> i define the overlay path in my own product file
> and copy the original Launcher app to the corresponding overlay path
> the attrs.xml file failed,
> delete the attrs.xml file it works.
> i want to know if the attrs.xml files can be overlayed?
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.
Cht, this is a great thread that you have started. For the rest of us
who are trying to do things very similar to yourself (overlaying the
Android base code), but don't exactly know where to start (aside from
directly hacking at the code), could you outline what steps you took
in your process of modifying the Launcher app. I know you are not yet
successful, but maybe if you share your exact steps, I could try the
same and have sucess and can share my results.
Thanks,
Nik
On Feb 25, 8:28 pm, cht <caoht...@gmail.com> wrote:
> i find that attrs.xml files can not be overlayed
> it will make an error
> attrs.xml error atribute "direction" has already benn difiend.
> i test the overlay on Launcher app
> any other file types can be overlayed successfully.
> i define the overlay path in my own product file
> and copy the original Launcher app to the corresponding overlay path
> the attrs.xml file failed,
> delete the attrs.xml file it works.
> i want to know if the attrs.xml files can be overlayed?
i put some res files in the framework res overlay dir
vendor/mycompany/base/frameworks/base/core/res/res/
when i make the framework-res module on the command line , it faild
"make: [out/target/common/obj/apps/framework-res_intermediates/pachage-
export.apk] segmentation fault"
the framework res can not be overlayed???
--------------------------------------------------------------------------- ---------
hi Nik
just like Dianne Hackborn reply to my first post
i make a dir for my overlay res under the android source root dir
the path looks like:
android_root/vendor/mycompany/base
android_root/vendor/mycompany/product
and just for test we define PRODUCT_PACKAGE_OVERLAYS := vendor/
mycompany/base vendor/mycompany/product
in the build/target/product/generic.mk
if you test Launcher app
put the Launcher app under
vendor/mycompany/base/packages/apps/
on the command line >make Launcher
if you test framework res
put the overlay res under rvendor/mycompany/base/frameworks/base/core/
res/res/ path
>make framework-res
but it faild
-------------------------------------------------------------------
hi Dianne Hackborn
the direction attribute is defined is not defined by framework
it is defined by the original Laucnher app which under pachages/apps/
Laucher
and i copy the Launcher app to my overlay path
you said it will replace the original files, it is that?
i find that, image files will be replaced, but attrs.xml file will be
merged not replace, is it?
Yes it can be overlayed, we use that for doing different builds for
different devices, such as setting up default configurations for hard vs.
soft keyboard devices. The aapt shouldn't outright crash, so somebody will
need to debug that -- if you want, just change the build system to run it
with "gdb" and you can get a stack crawl to see what happened. (Look for
$(APPT) in build/core/definitions.mk for the place where it is invoked.)
On Wed, Feb 25, 2009 at 10:51 PM, cht <caoht...@gmail.com> wrote:
> and another problem
> i put some res files in the framework res overlay dir
> vendor/mycompany/base/frameworks/base/core/res/res/
> when i make the framework-res module on the command line , it faild
> "make: [out/target/common/obj/apps/framework-res_intermediates/pachage-
> export.apk] segmentation fault"
> the framework res can not be overlayed???
> --------------------------------------------------------------------------- ---------
> hi Nik
> just like Dianne Hackborn reply to my first post
> i make a dir for my overlay res under the android source root dir
> the path looks like:
> android_root/vendor/mycompany/base
> android_root/vendor/mycompany/product
> and just for test we define PRODUCT_PACKAGE_OVERLAYS := vendor/
> mycompany/base vendor/mycompany/product
> in the build/target/product/generic.mk
> if you test Launcher app
> put the Launcher app under
> vendor/mycompany/base/packages/apps/
> on the command line >make Launcher
> if you test framework res
> put the overlay res under rvendor/mycompany/base/frameworks/base/core/
> res/res/ path
> >make framework-res
> but it faild
> -------------------------------------------------------------------
> hi Dianne Hackborn
> the direction attribute is defined is not defined by framework
> it is defined by the original Laucnher app which under pachages/apps/
> Laucher
> and i copy the Launcher app to my overlay path
> you said it will replace the original files, it is that?
> i find that, image files will be replaced, but attrs.xml file will be
> merged not replace, is it?
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.
On Thu, Feb 26, 2009 at 3:47 PM, cht <caoht...@gmail.com> wrote:
> ok i build it base on the android source code up to date 2009-02-21
> master branch.
> may be i have to use another version code.
> hope for fixing it ASAP.
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.