android – 从构建中删除AOSP应用程序

android – 从构建中删除AOSP应用程序,第1张

概述首先,我正在尝试使用 Android源代码构建 Android平台,而不使用LiveWallpapers,Calendar,Contacts,Calculator,Phone,Settings等股票应用程序. 为了做到这一点,我正在修改/ build / target / product /中的make文件,特别是包含需要构建的所有应用程序和库的变量PRODUCT_PACKAGES. 例如,我删除 首先,我正在尝试使用 Android源代码构建 Android平台,而不使用liveWallpapers,Calendar,Contacts,Calculator,Phone,Settings等股票应用程序.

为了做到这一点,我正在修改/ build / target / product /中的make文件,特别是包含需要构建的所有应用程序和库的变量PRODUCT_PACKAGES.

例如,我删除了以下行:

DeskClock \Bluetooth \Calculator \Calendar \

来自PRODUCT_PACKAGES:=文件generic_no_telephony.mk.

但是,当我在闪存后运行我的平板电脑时,我仍然可以找到电子邮件,声音和电子邮件等应用程序.语音记录器等我在重建之前已经清理过了.
我是否需要删除其他make文件中的更多条目?

在这里,您可以看到我在build / target / product /中对make文件所做的所有修改:

diff --git a/target/product/core.mk b/target/product/core.mkindex 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.mkindex 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.mkindex 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=truediff --git a/target/product/generic_no_telephony.mk b/target/product/generic_no_telephony.mkindex 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.confdiff --git a/target/product/large_emu_hw.mk b/target/product/large_emu_hw.mkindex 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.mkindex 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.confdiff --git a/target/product/sdk.mk b/target/product/sdk.mkindex 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.mkindex 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 := \
解决方法 我认为那些模块(包)可能包含在其他应用程序中,在.mk文件中的LOCAL_required_MODulES中指定.我会尝试找出模块的包名,然后搜索所有.mk文件.

您可以使用LOCAL_OVERRIDES_PACKAGES在其AndroID.mk中添加新模块,存根和禁用模块,而不是在许多文件夹中修改AOSP中的.mk文件.如果模块仍然出现在目标中,您可能需要向LOCAL_OVERRIDES_PACKAGES添加另外的模块,这些模块通过LOCAL_required_MODulES添加了不需要的软件包.

对不起,我不知道更好的方法.

packages / apps文件夹包含大多数应用程序.mk文件,但在一般情况下,您可能还需要检查设备,供应商和硬件文件夹.

补充:我刚刚发现envsetup.sh提供了mgrep命令来搜索makefile(包括* .mk),所以你可以尝试这个来找到.mk引用的DeskClock包:

build@1c1b9d217b9d:~/androID/cm12.1$mgrep DeskClock./packages/apps/DeskClock/AndroID.mk:20:LOCAL_PACKAGE_name := DeskClock./packages/apps/DeskClock/tests/AndroID.mk:12:LOCAL_PACKAGE_name := DeskClockTests./packages/apps/DeskClock/tests/AndroID.mk:14:LOCAL_INSTRUMENTATION_FOR := DeskClock./build/target/product/core.mk:26:    DeskClock \

所以你看到DeskClock包含在core.mk的构建中

虽然envsetup.sh的帮助部分没有提到mgrep命令,但是’hmm’命令(envsetup.sh的帮助)报告了 – 我在这里引用它来刺激我们更深入地学习AOSP工具)):

build@1c1b9d217b9d:~/androID/cm12.1$hmmInvoke ". build/envsetup.sh" from your shell to add the following functions to your environment:- lunch:   lunch <product_name>-<build_variant>- tapas:   tapas [<App1> <App2> ...] [arm|x86|mips|armv5|arm64|x86_64|mips64] [eng|userdeBUG|user]- croot:   Changes directory to the top of the tree.- cout:    Changes directory to out.- m:       Makes from the top of the tree.- mm:      Builds all of the modules in the current directory,but not their dependencIEs.- mmm:     Builds all of the modules in the supplIEd directorIEs,but not their dependencIEs.           To limit the modules being built use the Syntax: mmm dir/:target1,target2.- mma:     Builds all of the modules in the current directory,and their dependencIEs.- mmp:     Builds all of the modules in the current directory and pushes them to the device.- mmmp:    Builds all of the modules in the supplIEd directorIEs and pushes them to the device.- mmma:    Builds all of the modules in the supplIEd directorIEs,and their dependencIEs.- mms:     Short circuit builder. Quickly re-build the kernel,rootfs,boot and system images           without deep dependencIEs. Requires the full build to have run before.- cgrep:   Greps on all local C/C++ files.- ggrep:   Greps on all local Gradle files.- jgrep:   Greps on all local Java files.- resgrep: Greps on all local res / *.xml files.- sgrep:   Greps on all local source files.- godir:   Go to the directory containing a file.- cmremote: Add git remote for CM Gerrit RevIEw- cmgerrit: A Git wrapper that fetches/pushes patch from/to CM Gerrit RevIEw- cmrebase: Rebase a Gerrit change and push it again- aospremote: Add git remote for matching AOSP repository- cafremote: Add git remote for matching Codeaurora repository.- mka:      Builds using SCHED_BATCH on all processors- mkap:     Builds the module(s) using mka and pushes them to the device.- cmka:     Cleans and builds using mka.- repolastsync: Prints date and time of last repo sync.- reposync: Parallel repo sync using ionice and SCHED_BATCH- repopick: Utility to fetch changes from Gerrit.- installboot: Installs a boot.img to the connected device.- installrecovery: Installs a recovery.img to the connected device.Look at the source to vIEw more functions. The complete List is:mgrep                           cmka                            get_symbols_directory           lunch                           repopicksgrep                           cmrebase                        getBUGreports                   m                               reposynctreegrep                        cmremote                        getdriver                       make                            resgrep_lunch                          core                            getlastscreenshot               makerecipe                      runhatadb_get_product_device          coredump_enable                 getprebuilt                     mangrep                         runtestadb_get_traced_by               coredump_setup                  getscreenshotpath               mk_timer                        sepgrepadd_lunch_combo                 cout                            getsdcardpath                   mka                             set_java_homeaospremote                      cproj                           gettargetarch                   mm                              set_sequence_numberbreakfast                       croot                           gettop                          mma                             set_stuff_for_environmentbrunch                          dddclIEnt                       ggrep                           mmm                             setpathscafremote                       dopush                          godir                           mmma                            setTitlecgrep                           eat                             hmm                             mms                             smoketestcheck_bash_version              findmakefile                    installboot                     omnom                           stackscheck_product                   fixup_common_out_dir            installrecovery                 pez                             startvIEwservercheck_variant                   gdbclIEnt                       is                              pID                             stopvIEwserverchoosecombo                     gdbclIEnt_old                   isvIEwserverstarted             print_lunch_menu                systemstackchooseproduct                   gdbwrapper                      jgrep                           printconfig                     tapaschoosetype                      get_abs_build_var               key_back                        qpID                            tracedmdumpchoosevariant                   get_build_var                   key_home                        repodiffcmgerrit                        get_make_command                key_menu                        repolastsync

您可以在envsetup.sh中检查mgrep的实现,以获取新的grep搜索的想法))

总结

以上是内存溢出为你收集整理的android – 从构建中删除AOSP应用程序全部内容,希望文章能够帮你解决android – 从构建中删除AOSP应用程序所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/1135234.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-30
下一篇2022-05-30

发表评论

登录后才能评论

评论列表(0条)

    保存