removing pre build applications when building android gingerbread source code?

2,710 views
Skip to first unread message

bhavani sankari

unread,
May 16, 2011, 3:46:59 AM5/16/11
to Android Building
hi all

I've developed a android app for a device.I have built my app along
with other apps of gingerbread in linux.Now what i want to do is, to
keep my app alone and remove all other
apps(calender,messaging.........etc).how to achieve this?

I tried commenting out apps in generic.mk file..but i got apps
partially removed.
Still(Browser,contacts,spareparts,speechrecorder,<myapp>) launches.

I tried renaming above apps Android.mk files to Android.Still these
apps launches

Anyone succeeded in removing phone apps?
Any suggestions?


Thanks
Bhavani


Jean-Baptiste Queru

unread,
May 16, 2011, 11:33:55 AM5/16/11
to android-...@googlegroups.com
The first part is that you probably want to build a user build. Some
apps add themselves to userdebug and eng builds in addition to what's
specified in product configuration files.

As for the other apps, you need to hunt them in your product
hierarchy. Depending on what you build, some might be in full.mk, some
might be in generic.mk, some might be in core.mk.

You'll quickly notice that the Android build system is designed to be
additive, not subtractive. In a theoretical world, core.mk is the
minimum to get a system up an running to the point where it can run
apps, generic.mk adds the apps that every device is expected to use,
and later build configs add more apps (e.g. full.mk attempts to add
every app that's in AOSP). In reality some modules are missing from
core.mk to the point where it doesn't work. My gut feeling is that
SystemUI is the culprit and should be in core.mk, but I haven't had
time to test that theory. I'll gladly review changes that make core.mk
run.

JBQ

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

--
Jean-Baptiste M. "JBQ" Queru
Software Engineer, Android Open-Source Project, Google.

Questions sent directly to me that have no reason for being private
will likely get ignored or forwarded to a public forum with no further
warning.

Magnus Bäck

unread,
May 16, 2011, 1:38:25 PM5/16/11
to android-...@googlegroups.com
On Monday, May 16, 2011 at 09:46 CEST,
bhavani sankari <bhava...@gmail.com> wrote:

> I've developed a android app for a device.I have built my app along
> with other apps of gingerbread in linux.Now what i want to do is, to
> keep my app alone and remove all other
> apps(calender,messaging.........etc).how to achieve this?
>
> I tried commenting out apps in generic.mk file..but i got apps
> partially removed.
> Still(Browser,contacts,spareparts,speechrecorder,<myapp>) launches.
>
> I tried renaming above apps Android.mk files to Android.Still these
> apps launches

I'm guessing you forgot to delete the files from the already staged
system partition ($OUT/system/app). Just because you purge a module
from the list of modules that make will build and install for you
doesn't mean that files already installed will be removed to reflect
the new configuration.

Instead of hacking the makefiles in build/target/product you could
make modifications to PRODUCT_PACKAGES in the makefile of your own
device:

PRODUCT_PACKAGES := $(filter-out Mms Browser,$(PRODUCT_PACKAGES))

That way you don't have to worry about which file each application is
listed, plus you don't have to patch the files in platform/build.git
in the first place.

Note that this won't "forbid" an application from being installed. If
another application is set to depend on it via LOCAL_REQUIRED_MODULES
it will still be installed regardless of what PRODUCT_PACKAGES contains.

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

Ying Wang

unread,
May 16, 2011, 2:17:43 PM5/16/11
to android-...@googlegroups.com
On Mon, May 16, 2011 at 10:38 AM, Magnus Bäck <magnu...@sonyericsson.com> wrote:
On Monday, May 16, 2011 at 09:46 CEST,
    bhavani sankari <bhava...@gmail.com> wrote:

>  I've developed a android app for a device.I have built my app along
> with other apps of gingerbread in linux.Now what i want to do is, to
> keep my app alone and remove all other
> apps(calender,messaging.........etc).how to achieve this?
>
> I tried commenting out apps in generic.mk file..but i got apps
> partially removed.
> Still(Browser,contacts,spareparts,speechrecorder,<myapp>) launches.
>
> I tried renaming above apps Android.mk files to Android.Still these
> apps launches

I'm guessing you forgot to delete the files from the already staged
system partition ($OUT/system/app). Just because you purge a module
from the list of modules that make will build and install for you
doesn't mean that files already installed will be removed to reflect
the new configuration.

Instead of hacking the makefiles in build/target/product you could
make modifications to PRODUCT_PACKAGES in the makefile of your own
device:

   PRODUCT_PACKAGES := $(filter-out Mms Browser,$(PRODUCT_PACKAGES))
I am afraid this won't work.
After the device's product config makefile is evaluated, PRODUCT_PACKAGES will just have some placeholder in its value, something like this:
@inherit:build/target/product/core.mk
It's in a later phase int the build system that those placeholders get expanded.

 

That way you don't have to worry about which file each application is
listed, plus you don't have to patch the files in platform/build.git
in the first place.

Note that this won't "forbid" an application from being installed. If
another application is set to depend on it via LOCAL_REQUIRED_MODULES
it will still be installed regardless of what PRODUCT_PACKAGES contains.

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

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

bhavani sankari

unread,
May 17, 2011, 8:50:03 AM5/17/11
to Android Building
Thanks for all of your suggestions.
I tried deleting system folder created in out/<product/ path and
renamed corresponding app Android.mk to Android.
I got most of the apps removed except Dev tools,Downloads ,spareparts
and <Myapp>.
Do you know where these app Android.mk exists?
I couldnt find these apps(Downloads,Spareparts,Dev tools) Android.mk
files?

Regards
Bhavani

On May 16, 11:17 pm, Ying Wang <wangy...@android.com> wrote:
> On Mon, May 16, 2011 at 10:38 AM, Magnus Bäck
> <magnus.b...@sonyericsson.com>wrote:
>
>
>
> > On Monday, May 16, 2011 at 09:46 CEST,

Ying Wang

unread,
May 17, 2011, 4:37:09 PM5/17/11
to android-...@googlegroups.com
These commands can help you:
$. build/envsetup.sh
$mgrep Downloads

Ratnakumari Golla

unread,
Aug 25, 2014, 2:46:25 AM8/25/14
to android-...@googlegroups.com

HAI

I have already removed apps from make files in build/target/product directory  .

for example : removed the lines from core.mk generic.mk full.mk telephony.mk etc

But after rebuilding the android i still found some apps (like google,speech recorder,voice search,email,etc)..can anyone tell me the perfect solution to remove AOSP apps completely from build android..



thank you!!!

AB

unread,
Feb 15, 2015, 1:27:29 PM2/15/15
to android-...@googlegroups.com, wang...@android.com
Is there a way to evaluate value of PRODUCT_PACKAGES right here instead of deferring it later?
Reply all
Reply to author
Forward
0 new messages