Removing packages from AOSP build

1,159 views
Skip to first unread message

Will Newton

unread,
Feb 4, 2018, 9:25:28 PM2/4/18
to android-porting
Hi,

I'm trying to avoid including some packages in the build of my device but not having much luck. I added a section like this to the Android.mk in my device directory:

include $(CLEAR_VARS)                                                                                                                                                                                              
LOCAL_PACKAGE_NAME := package-overrides                                                                                                                                                                            
LOCAL_OVERRIDES_PACKAGES := \                                                                                                                                                                                      
        Browser2 \                                                                                                                                                                                                 
        Calendar \                                                                                                                                                                                                 
        Email \                                                                                                                                                                                                    
        Music \                                                                                                                                                                                                    
        SoundRecorder                                                                                                                                                                                              
include $(BUILD_PACKAGE)

But all the packages still get built and installed. Is there a way I can make sure the packages are not included?

I've found various discussions of this online but none with a definitive answer and the build process is complex in this area.

Thanks,

Will Newton

unread,
Feb 5, 2018, 1:04:47 PM2/5/18
to Joey Troy, android-porting
On Mon, Feb 5, 2018 at 3:10 AM, Joey Troy <jo...@joeytroy.com> wrote:
> Best place to edit is in the build folder to remove all the extra apps
>
> https://android.googlesource.com/platform/build/+/master/target/product/core.mk

I could edit that file and it would do what I want, but it would be
forking upstream code for what seems to me like it should be a fairly
simple standard function. Is there a way to do this without having to
modify core Android code? i.e. do it in device/...

Thanks,
>> --
>> --
>> unsubscribe: android-porti...@googlegroups.com
>> website: http://groups.google.com/group/android-porting
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "android-porting" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to android-porti...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.

Joey Troy

unread,
Feb 5, 2018, 1:04:47 PM2/5/18
to will....@gmail.com, android-porting

Best place to edit is in the build folder to remove all the extra apps

https://android.googlesource.com/platform/build/+/master/target/product/core.mk


On Sun, Feb 4, 2018, 7:25 PM Will Newton <will....@gmail.com> wrote:

Joey Troy

unread,
Feb 5, 2018, 1:04:48 PM2/5/18
to Will Newton, android-porting

Will,

I get what your saying. I am not sure of any other way to not force the install of the apps. Since it sounds like your making your own custom release, it maybe best to do periodict repo merges to make sure you are staying in sync with the project to edited repos you have.

Satish Patel

unread,
Feb 8, 2018, 12:17:30 PM2/8/18
to jo...@joeytroy.com, Will Newton, android-porting
Hi,

Other alternative way would be,
 - create a local manifest inside .repo/local_manifests/<custom_manifest>.xml
 - create tags to remove AOSP modules which you do not want for your build
 - add entry for the modules, which you would like to replace instead

This will ensure along with standard AOSP, you stuff gets synced and *not required AOSP* module will not come in to real picture :)

--
satish


>> website: http://groups.google.com/group/android-porting
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "android-porting" group.
>> To unsubscribe from this group and stop receiving emails from it, send an

>> For more options, visit https://groups.google.com/d/optout.

website: http://groups.google.com/group/android-porting

---
You received this message because you are subscribed to the Google Groups "android-porting" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-porting+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Regards,
satish patel
Reply all
Reply to author
Forward
0 new messages