Reputation: 6960
I've faced with problem that on my phone alot of services running.
Is there any way to build Android image for Nexus4 without all preinstalled packages.
Default build
./build/envsetup.sh
lunch full_mako
make -j32
build image with preinstalled services.
Upvotes: 0
Views: 314
Reputation: 4686
You can pick and choose which packages are included in a build. Packages (apks) and libraries get added through various make files in via the variable PRODUCT_PACKAGES.
The easiest way to see this is to go into build/target/product/ and look at some of the make files in here. If you check out core.mk you will see that it is mostly just filled with adding various packages to every build.
In some cases these files can overlap, based on what kind of build you are making, but in order to have a build where there are no preinstalled services or packages, launcher or anything, I would start by determining which packages you need and don't need and cutting them out of these make files. Grep will be your friend here. Ultimately if you want to maintain this you will probably want to create a new build target which loads a different set of make files. This process will also involve a fair amount of trial and error.
Finally, make sure you call make installclean between builds.
Upvotes: 1