On Monday, February 25, 2013 at 10:24 EST,
Oliver Hill <
olly....@gmail.com> wrote:
> Hey guys, I'm looking into putting together a custom ROM, and I'm
> wondering if there's an easy way to define which packages are made in
> a build. I've set up my own device in /device/mycompany/mydevice, but
> at the moment it's just a copy of an existing device. Which file
> should I look at editing to build only the specific packages that I
> want? I think I need to edit a "Product Definition File" and use
> PRODUCT_PACKAGES and a long list, but I'm not sure which file the
> "product definition file" actually is. (I got that from
>
http://www.netmite.com/android/mydroid/development/pdk/docs/build_system.html).
The product definition file is the file in device/mycompany/mydevice
that contains "PRODUCT_NAME := devicename", where 'devicename' is
the first half of the build configuration chosen from the lunch name.
In other words, 'lunch full_yourdevice-eng' means you should be looking
for 'full_yourdevice' being assigned to PRODUCT_NAME.
> Another alternative appears to be editing
> /build/target/product/
core.mk, but I don't know whether that will
> affect a single device or all devices.
It will affect all devices that inherit from that pseudo-product.
> It also doesn't seem to have all packages: my test-goal is to build a
> device without a calculator but I can't track down the
> "PRODUCT_PACKAGES += Calculator" line in the /build/target/product
> directory. Could it even be so simple as to put "PRODUCT_ PACKAGES -=
> Calculator" somewhere?
That would only work if put in the same file that adds Calculator
to PRODUCT_PACKAGES. Products are strictly additive, i.e. a product
can't remove a package that's been put in PRODUCT_PACKAGES by a parent
product.
> In sum, I would really appreciate some help in working out how I can
> go about including or excluding packages in a custom device without
> having to do anything to the source code. I'm sure there must be some
> manifest-esque file in the /device/ directory but I can't for the life
> of me find it!
At least on the master branch, Calculator is added to PRODUCT_PACKAGES
in build/target/product/
generic_no_telephony.mk. If you don't want it
I believe the only way is to modify that file. If you don't want other
products to be affected you'll have to fork that part of the product
tree.
--
Magnus Bäck
ba...@google.com