Removing AOSP apps from build

2,494 views
Skip to first unread message

Eydolol

unread,
Nov 18, 2013, 10:06:55 AM11/18/13
to android-...@googlegroups.com

First, I'm trying to build an android platform from the android source code without basic apps (most of AOSP ones like LiveWallpapers, Calendar, Contacts, Calculator, Phone, Settings...).

In Order to do it, I'm modifying makefiles in /build/target/product/ , especially variable PRODUCT_PACKAGES which is containing all apps and libs that need to be built.

For example, i deleted the lines :

DeskClock \
Bluetooth \
Calculator \
Calendar \

From PRODUCT_PACKAGES := in the file generic_no_telephony.mk

However, when i run my tablet after flashing etc, i still find some apps (like Email, Sound & Speech Recorder etc...) (i've already cleaned before rebuilding). If someone know if i have to delete something from other specific files, feel free to tell me ! I really want to do it properly.

Thank you !

Here you can see all the modifications i've made on makefiles in build/target/product/ :

diff --git a/target/product/core.mk b/target/product/core.mk
index 1d62eb8..5474f6a 100644
--- a/target/product/core.mk
+++ b/target/product/core.mk
@@ -25,23 +25,13 @@ PRODUCT_PROPERTY_OVERRIDES := \
 PRODUCT_PACKAGES += \
     ApplicationsProvider \
     BackupRestoreConfirmation \
-    BasicDreams \
     Browser \
-    Contacts \
-    ContactsProvider \
     DefaultContainerService \
-    DownloadProvider \
-    DownloadProviderUi \
-    HTMLViewer \
     Home \
     KeyChain \
-    MediaProvider \
     PackageInstaller \
-    PicoTts \
     SettingsProvider \
     SharedStorageBackup \
-    TelephonyProvider \
-    UserDictionaryProvider \
     VpnDialogs \
     abcc \
     apache-xml \
diff --git a/target/product/full_base.mk b/target/product/full_base.mk
index b2e3189..94d6d48 100644
--- a/target/product/full_base.mk
+++ b/target/product/full_base.mk
@@ -21,24 +21,10 @@
 
 PRODUCT_PACKAGES := \
     libfwdlockengine \
-    OpenWnn \
-    PinyinIME \
     libWnnEngDic \
     libWnnJpnDic \
     libwnndict \
-    VideoEditor \
-    WAPPushManager
-
-PRODUCT_PACKAGES += \
-    Galaxy4 \
-    HoloSpiralWallpaper \
-    LiveWallpapers \
-    LiveWallpapersPicker \
-    MagicSmokeWallpapers \
-    NoiseField \
-    PhaseBeam \
-    VisualizationWallpapers \
-    PhotoTable
+
 
 # Additional settings used in all AOSP builds
 PRODUCT_PROPERTY_OVERRIDES := \
diff --git a/target/product/full_base_telephony.mk b/target/product/full_base_telephony.mk
index 5899c8c..8c8c7c3 100644
--- a/target/product/full_base_telephony.mk
+++ b/target/product/full_base_telephony.mk
@@ -19,9 +19,6 @@
 # build quite specifically for the emulator, and might not be
 # entirely appropriate to inherit from for on-device configurations.
 
-PRODUCT_PACKAGES := \
-    VoiceDialer
-
 PRODUCT_PROPERTY_OVERRIDES := \
     keyguard.no_require_sim=true \
     ro.com.android.dataroaming=true
diff --git a/target/product/generic_no_telephony.mk b/target/product/generic_no_telephony.mk
index f139cbd..5f544b2 100644
--- a/target/product/generic_no_telephony.mk
+++ b/target/product/generic_no_telephony.mk
@@ -20,27 +20,16 @@
 PRODUCT_POLICY := android.policy_phone
 
 PRODUCT_PACKAGES := \
-    DeskClock \
     Bluetooth \
-    Calculator \
-    Calendar \
     CertInstaller \
     DrmProvider \
-    Email2 \
-    Exchange2 \
     FusedLocation \
-    Gallery2 \
     InputDevices \
     LatinIME \
     Launcher2 \
-    Music \
-    MusicFX \
     Provision \
-    Phone \
-    QuickSearchBox \
     Settings \
     SystemUI \
-    CalendarProvider \
     bluetooth-health \
     hostapd \
     wpa_supplicant.conf
diff --git a/target/product/large_emu_hw.mk b/target/product/large_emu_hw.mk
index 27ebc96..54c53ca 100644
--- a/target/product/large_emu_hw.mk
+++ b/target/product/large_emu_hw.mk
@@ -20,25 +20,14 @@
 PRODUCT_POLICY := android.policy_mid
 
 PRODUCT_PACKAGES := \
-    CarHome \
-    DeskClock \
     Bluetooth \
-    Calculator \
-    Calendar \
     CertInstaller \
     DrmProvider \
-    Email2 \
-    Exchange2 \
-    Gallery2 \
-    LatinIME \
     Launcher2 \
-    Music \
     Provision \
-    QuickSearchBox \
     Settings \
     Sync \
     Updater \
-    CalendarProvider \
     SyncProvider \
     bluetooth-health \
     hostapd \
diff --git a/target/product/mini.mk b/target/product/mini.mk
index b69c917..9486c50 100644
--- a/target/product/mini.mk
+++ b/target/product/mini.mk
@@ -54,15 +54,11 @@ PRODUCT_PROPERTY_OVERRIDES += \
 # Please keep this list sorted alphabetically
 PRODUCT_PACKAGES += \
     ApplicationsProvider \
-    ContactsProvider \
     DefaultContainerService \
     DownloadProvider \
     DownloadProviderUi \
-    MediaProvider \
     PackageInstaller \
     SettingsProvider \
-    TelephonyProvider \
-    UserDictionaryProvider \
     abcc \
     apache-xml \
     audio \
@@ -161,8 +157,6 @@ PRODUCT_PACKAGES += \
     Bluetooth \
     FusedLocation \
     InputDevices \
-    LatinIME \
-    Phone \
     Provision \
     hostapd \
     wpa_supplicant.conf
diff --git a/target/product/sdk.mk b/target/product/sdk.mk
index 1edff57..294b9d8 100644
--- a/target/product/sdk.mk
+++ b/target/product/sdk.mk
@@ -18,40 +18,23 @@ PRODUCT_POLICY := android.policy_phone
 PRODUCT_PROPERTY_OVERRIDES :=
 
 PRODUCT_PACKAGES := \
-    Calculator \
-    DeskClock \
-    Exchange2 \
     FusedLocation \
-    Gallery \
-    Music \
-    Mms \
-    OpenWnn \
     libWnnEngDic \
     libWnnJpnDic \
     libwnndict \
-    Phone \
-    PinyinIME \
     Protips \
     SoftKeyboard \
     SystemUI \
     Launcher2 \
-    Development \
-    DevelopmentSettings \
-    DrmProvider \
     Fallback \
     Settings \
     SdkSetup \
     CustomLocale \
     sqlite3 \
     InputDevices \
-    LatinIME \
     CertInstaller \
-    LiveWallpapersPicker \
     ApiDemos \
     GestureBuilder \
-    CubeLiveWallpapers \
-    QuickSearchBox \
-    WidgetPreview \
     monkeyrunner \
     guavalib \
     jsr305lib \
@@ -59,13 +42,7 @@ PRODUCT_PACKAGES := \
     jsilver \
     librs_jni \
     ConnectivityTest \
-    GpsLocationTest \
-    CalendarProvider \
-    Calendar \
-    SmokeTest \
-    SmokeTestApp \
-    rild \
-    LegacyCamera
+    rild
 
 
 # Define the host tools and libs that are parts of the SDK.
diff --git a/target/product/telephony.mk b/target/product/telephony.mk
index 89ed20a..a92ed03 100644
--- a/target/product/telephony.mk
+++ b/target/product/telephony.mk
@@ -18,7 +18,6 @@
 # to products that have telephony hardware.
 
 PRODUCT_PACKAGES := \
-    Mms \
     rild
 
 PRODUCT_COPY_FILES := \

Magnus Bäck

unread,
Nov 18, 2013, 12:19:52 PM11/18/13
to android-...@googlegroups.com
On Monday, November 18, 2013 at 10:06 EST,
Eydolol <y.noueld...@gmail.com> wrote:

> First, I'm trying to build an android platform from the android source
> code without basic apps (most of AOSP ones like LiveWallpapers,
> Calendar, Contacts, Calculator, Phone, Settings...).
>
> In Order to do it, I'm modifying makefiles in /build/target/product/ ,
> especially variable PRODUCT_PACKAGES which is containing all apps and
> libs that need to be built.
>
> For example, i deleted the lines :
>
> DeskClock \Bluetooth \Calculator \Calendar \
>
> From PRODUCT_PACKAGES := in the file generic_no_telephony.mk
>
> However, when i run my tablet after flashing etc, i still find some
> apps (like Email, Sound & Speech Recorder etc...) (i've already
> cleaned before rebuilding). If someone know if i have to delete
> something from other specific files, feel free to tell me ! I really
> want to do it properly.

While PRODUCT_PACKAGES indeed is the official way to specify which
packages should be installed, it's not the only way packages get
selected for installation. The LOCAL_REQUIRED_MODULES variable allows
modules to declare dependencies against other modules. Running

find . -name Android.mk | xargs grep LOCAL_REQUIRED_MODULES

on KitKat reveals that packages/apps/{Browser,Mms}/Android.mk both
depend on SoundRecorder, for example.

I don't see any such dependencies to the email app so your case is
likely to be more complicated. Futher digging into the related make
variables might be necessary.

[...]

--
Magnus Bäck
ba...@google.com

Kenfe-Mickael Laventure

unread,
Nov 18, 2013, 5:58:54 PM11/18/13
to android-...@googlegroups.com
Rebuilding Android doesn't remove already built/installed packages.

To get rid of them, you will need to do a fresh install using the following commands:
  - make installclean
  - make

That should fix your issue hopefully.
Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
Message has been deleted
0 new messages