当前位置:   article > 正文

Android11 系统裁剪_android 11裁剪

android 11裁剪

硬件平台:QCS6125

软件平台:Android11

    系统裁剪APP的方式,定义一个build变量,赋予裁剪的APP名字,具体修改如下:

1、build添加变量定义。

  1. diff --git a/core/main.mk b/core/main.mk
  2. index 3bfd8326e..ffe6e44d5 100644
  3. --- a/core/main.mk
  4. +++ b/core/main.mk
  5. @@ -1076,6 +1076,8 @@ define product-installed-files
  6. $(eval ### Filter out the overridden packages and executables before doing expansion) \
  7. $(eval _pif_overrides := $(call module-overrides,$(_pif_modules))) \
  8. $(eval _pif_modules := $(filter-out $(_pif_overrides), $(_pif_modules))) \
  9. + $(eval _pif_dels := $(call get-product-var,$(1),PRODUCT_DEL_PACKAGES)) \
  10. + $(eval _pif_modules := $(filter-out $(_pif_dels), $(_pif_modules))) \
  11. $(eval ### Resolve the :32 :64 module name) \
  12. $(eval _pif_modules_32 := $(patsubst %:32,%,$(filter %:32, $(_pif_modules)))) \
  13. $(eval _pif_modules_64 := $(patsubst %:64,%,$(filter %:64, $(_pif_modules)))) \
  14. diff --git a/core/product.mk b/core/product.mk
  15. index d691617c7..0e78421e1 100644
  16. --- a/core/product.mk
  17. +++ b/core/product.mk
  18. @@ -287,6 +287,9 @@ _product_single_value_vars += PRODUCT_ODM_BASE_FS_PATH
  19. # The first API level this product shipped with
  20. _product_single_value_vars += PRODUCT_SHIPPING_API_LEVEL
  21. +# delete product packages
  22. +_product_single_value_vars += PRODUCT_DEL_PACKAGES
  23. +
  24. _product_list_vars += VENDOR_PRODUCT_RESTRICT_VENDOR_FILES
  25. _product_list_vars += VENDOR_EXCEPTION_MODULES
  26. _product_list_vars += VENDOR_EXCEPTION_PATHS

2、修改device目录下的makefile,添加具体的package

  1. diff --git a/qssi.mk b/qssi.mk
  2. index c037c97..3cbfd41 100644
  3. --- a/qssi.mk
  4. +++ b/qssi.mk
  5. @@ -32,6 +32,27 @@ BOARD_AVB_ENABLE := true
  6. # SHIPPING_API_LEVEL to 28 if it was not set earlier (this is generally set earlier via build.sh per-target)
  7. SHIPPING_API_LEVEL := 30
  8. +PRODUCT_DEL_PACKAGES += \
  9. + PrintSpooler \
  10. + Stk \
  11. + Mms \
  12. + MusicFX \
  13. + Dialer \
  14. + Contacts \
  15. + EasterEgg \
  16. + QuickSearchBox \
  17. + com.qualcomm.location \
  18. + FM2 \
  19. + NQNfcNci \
  20. + SimAppDialog \
  21. + LiveWallpapersPicker \
  22. + DocumentsUI \
  23. + Cam2test \
  24. + SnapdragonMusic \
  25. + DeskClock \
  26. + QDCMMobileApp \
  27. + Calendar
  28. +
  29. $(call inherit-product-if-exists, vendor/qcom/defs/product-defs/system/cne_url*.mk)

修改后,编译一次,看out下相关app是否已经不存在即生效了。

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/繁依Fanyi0/article/detail/174227
推荐阅读
相关标签
  

闽ICP备14008679号