RK3326 android10.0(Q) 系统精简瘦身

删除无用APk

系统备份、cts测试相关、系统壁纸备份

build/make/target/product/base_system.mk

@@ -41,7 +41,6 @@ PRODUCT_PACKAGES += \
     ashmemd \
     atrace \
     audioserver \
-    BackupRestoreConfirmation \
     bcc \
     blank_screen \
     blkid \
@@ -59,8 +58,6 @@ PRODUCT_PACKAGES += \
     ContactsProvider \
     content \
     crash_dump \
-    CtsShimPrebuilt \
-    CtsShimPrivPrebuilt \
     debuggerd\
     device_config \
     dmctl \
@@ -261,7 +258,6 @@ PRODUCT_PACKAGES += \
     viewcompiler \
     voip-common \
     vold \
-    WallpaperBackup \
     watchdogd \
     wificond \
     wifi-service \
@@ -373,7 +369,6 @@ PRODUCT_PACKAGES_DEBUG := \
 # The set of packages whose code can be loaded by the system server.
 PRODUCT_SYSTEM_SERVER_APPS += \
     SettingsProvider \
-    WallpaperBackup

浏览器、日历、联系人、邮箱、Android键盘、初始化相关、快速搜索框

build/make/target/product/handheld_product.mk

@@ -22,18 +22,11 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/media_product.mk)
 
 # /product packages
 PRODUCT_PACKAGES += \
-    Browser2 \
-    Calendar \
     Camera2 \
-    Contacts \
     DeskClock \
-    Email \
     Gallery2 \
-    LatinIME \
     Launcher3QuickStep \
-    OneTimeInitializer \
     Provision \
-    QuickSearchBox \
     Settings \
     SettingsIntelligence \
     StorageManager \

基本互动屏保、书签数据库、日历数据库、文件管理器、安卓彩蛋、短信管理服务、音乐音效控制、NFC、OSU帐号登录、代理配置、运营商对话框、系统跟踪、用户字典数据库

build/make/target/product/handheld_system.mk

@@ -32,45 +32,31 @@ $(call inherit-product-if-exists, frameworks/base/data/keyboards/keyboards.mk)
 $(call inherit-product-if-exists, frameworks/webview/chromium/chromium.mk)
 
 PRODUCT_PACKAGES += \
-    BasicDreams \
     BlockedNumberProvider \
     Bluetooth \
     BluetoothMidiService \
-    BookmarkProvider \
     BuiltInPrintService \
-    CalendarProvider \
     cameraserver \
     CaptivePortalLogin \
     CertInstaller \
     clatd \
     clatd.conf \
-    DocumentsUI \
     DownloadProviderUi \
-    EasterEgg \
     ExternalStorageProvider \
     FusedLocation \
     InputDevices \
     KeyChain \
     librs_jni \
     ManagedProvisioning \
-    MmsService \
     MtpDocumentsProvider \
-    MusicFX \
-    NfcNci \
-    OsuLogin \
-    PacProcessor \
     PrintRecommendationService \
     PrintSpooler \
     ProxyHandler \
     screenrecord \
-    SecureElement \
     SharedStorageBackup \
-    SimAppDialog \
     Telecom \
     TelephonyProvider \
     TeleService \
-    Traceur \
-    UserDictionaryProvider \
     VpnDialogs \

壁纸选择器

build/make/target/product/mainline.mk

@@ -32,6 +32,5 @@ PRODUCT_PROPERTY_OVERRIDES += \
 
 PRODUCT_PACKAGES += \
     PhotoTable \
-    WallpaperPicker \

客制化书签主页

build/make/target/product/mainline_system.mk

@@ -30,7 +30,6 @@ PRODUCT_PACKAGES += \
 # Applications
 PRODUCT_PACKAGES += \
     LiveWallpapersPicker \
-    PartnerBookmarksProvider \
     PresencePolling \
     RcsService \
     SafetyRegulatoryInfo \

HTML查看器

build/make/target/product/media_system.mk

@@ -29,7 +29,6 @@ PRODUCT_PACKAGES += \
     drmserver \
     ethernet-service \
     fsck.f2fs \
-    HTMLViewer \
     libfilterpack_imageproc \
     libwebviewchromium_loader \
     libwebviewchromium_plat_support \

计算器、音乐

device/rockchip/common/device.mk

@@ -60,8 +60,8 @@ endif
 PRODUCT_AAPT_CONFIG ?= normal large xlarge hdpi xhdpi xxhdpi
 PRODUCT_AAPT_PREF_CONFIG ?= xhdpi
 
-PRODUCT_PACKAGES += \
-    ExactCalculator
+# PRODUCT_PACKAGES += \
+#     ExactCalculator
 
 ########################################################
 # Kernel
@@ -1063,7 +1063,6 @@ else # tablet
         SoundRecorder
 ifneq ($(strip $(BUILD_WITH_GOOGLE_GMS_EXPRESS)),true)
 PRODUCT_PACKAGES += \
-    Music \
     WallpaperPicker
 endif # tablet without GMS-Express
 endif

device.mk 中包含了一些RK定制apk,通过

$(call inherit-product-if-exists, vendor/rockchip/common/device-vendor.mk)

引入编译,这个看你编译后设备上运行的apk,找到对应mk进行裁剪

4K视频播放器、街景测试、设备测试

vendor/rockchip/common/apps/apps.mk

@@ -45,8 +45,8 @@ PRODUCT_PACKAGES += \
        Rk3grVideoPlayer
 else
 ifneq ($(strip $(TARGET_BOARD_PLATFORM_PRODUCT)), box)
-PRODUCT_PACKAGES += \
-    Rk4kVideoPlayer
+# PRODUCT_PACKAGES += \
+#     Rk4kVideoPlayer
 endif
 endif
 endif
@@ -63,20 +63,20 @@ endif
 endif
 
 
-ifeq ($(strip $(BOARD_HAS_STRESSTEST_APP)), true)
-    PRODUCT_PACKAGES += \
-    StressTest 
+# ifeq ($(strip $(BOARD_HAS_STRESSTEST_APP)), true)
+#     PRODUCT_PACKAGES += \
+#     StressTest 
 
-ifneq ($(filter atv box, $(strip $(TARGET_BOARD_PLATFORM_PRODUCT))), )
-PRODUCT_PACKAGES += \
-    RKDeviceTest
+# ifneq ($(filter atv box, $(strip $(TARGET_BOARD_PLATFORM_PRODUCT))), )
+# PRODUCT_PACKAGES += \
+#     RKDeviceTest
 
-else
-PRODUCT_PACKAGES += \
-    DeviceTest
+# else
+# PRODUCT_PACKAGES += \
+#     DeviceTest
 
-endif
-endif
+# endif
+# endif

删除无用字体

字体相关介绍可参考

Android系统字体加载流程

Android 系统字体

10.0 和之前低版本还是有些差异的,可以查看编译 out 目录下 system\fonts 中所编译的字体文件

注释 frameworks/base/data/fonts/fonts.xml 中成对字体组

注释 external/noto-fonts/Android.mk 中不需要编译字体文件 .ttf .otf

字库文件说明 可到 字客网 进行详细查询


思源宋体
NotoSerif-Regular.ttf 
NotoSerif-Bold.ttf 
NotoSerif-Italic.ttf 
NotoSerif-BoldItalic.ttf
阿德拉姆文
NotoSansAdlam-Regular.ttf 
阿霍姆文
NotoSansAhom-Regular.otf 
安那托利亚象形文字拉丁文
NotoSansAnatolianHieroglyphs-Regular.otf 
NotoSansAvestan-Regular.ttf 
巴厘文
NotoSansBalinese-Regular.ttf 
NotoSansBamum-Regular.ttf 
巴萨瓦赫文
NotoSansBassaVah-Regular.otf 
巴塔克文
NotoSansBatak-Regular.ttf 
拉丁文 孟加拉文
NotoSansBengali-Bold.otf 
NotoSansBengali-Medium.otf 
NotoSansBengali-Regular.otf 
孟加拉文
NotoSansBengaliUI-Bold.otf 
NotoSansBengaliUI-Medium.otf 
NotoSansBengaliUI-Regular.otf 
NotoSansBhaiksuki-Regular.otf 
拉丁文
NotoSansBrahmi-Regular.ttf 
爪哇文
NotoSansBuginese-Regular.ttf 
布希德文
NotoSansBuhid-Regular.ttf 
加拿大土著统一音节文字
NotoSansCanadianAboriginal-Regular.ttf 
卡里亚文
NotoSansCarian-Regular.ttf 
孟加拉文缅甸文
NotoSansChakma-Regular.otf 
占文
NotoSansCham-Bold.ttf 
NotoSansCham-Regular.ttf 
切罗基文
NotoSansCherokee-Regular.ttf 
希腊文
NotoSansCoptic-Regular.ttf 
苏美尔-阿卡德楔形文字
NotoSansCuneiform-Regular.ttf 
塞浦路斯文
NotoSansCypriot-Regular.ttf 
德塞莱特文
NotoSansDeseret-Regular.ttf 
古埃及象形文字
NotoSansEgyptianHieroglyphs-Regular.ttf 
爱尔巴桑文
NotoSansElbasan-Regular.otf 
埃塞俄比亚文
NotoSansEthiopic-Bold.ttf 
NotoSansEthiopic-Regular.ttf 
格拉哥里文
NotoSansGlagolitic-Regular.ttf 
NotoSansGothic-Regular.ttf 
NotoSansGujarati-Bold.ttf 
NotoSansGujarati-Regular.ttf 
NotoSansGujaratiUI-Bold.ttf 
NotoSansGujaratiUI-Regular.ttf 
NotoSansGurmukhi-Bold.ttf 
NotoSansGurmukhi-Regular.ttf 
NotoSansGurmukhiUI-Bold.ttf 
NotoSansGurmukhiUI-Regular.ttf 
NotoSansHanunoo-Regular.ttf 
NotoSansHatran-Regular.otf 
NotoSansImperialAramaic-Regular.ttf 
NotoSansInscriptionalPahlavi-Regular.ttf 
NotoSansInscriptionalParthian-Regular.ttf 
NotoSansJavanese-Regular.ttf 
NotoSansKaithi-Regular.ttf 
NotoSansKannada-Bold.ttf 
NotoSansKannada-Regular.ttf 
NotoSansKannadaUI-Bold.ttf 
NotoSansKannadaUI-Regular.ttf 
NotoSansKayahLi-Regular.ttf 
NotoSansKharoshthi-Regular.ttf 
NotoSansKhmerUI-Bold.ttf 
NotoSansKhmerUI-Regular.ttf 
NotoSansLao-Bold.ttf 
NotoSansLao-Regular.ttf 
NotoSansLaoUI-Bold.ttf 
NotoSansLaoUI-Regular.ttf 
NotoSansLepcha-Regular.ttf 
NotoSansLimbu-Regular.ttf 
NotoSansLinearA-Regular.otf 
NotoSansLinearB-Regular.ttf 
NotoSansLisu-Regular.ttf 
NotoSansLycian-Regular.ttf 
NotoSansLydian-Regular.ttf 
NotoSansMalayalam-Bold.otf 
NotoSansMalayalam-Medium.otf 
NotoSansMalayalam-Regular.otf 
NotoSansMalayalamUI-Bold.otf 
NotoSansMalayalamUI-Medium.otf 
NotoSansMalayalamUI-Regular.otf 
NotoSansMandaic-Regular.ttf 
NotoSansManichaean-Regular.otf 
NotoSansMarchen-Regular.otf 
NotoSansMeeteiMayek-Regular.ttf 
NotoSansMeroitic-Regular.otf 
NotoSansMiao-Regular.otf 
NotoSansMongolian-Regular.ttf 
NotoSansMro-Regular.otf 
NotoSansMultani-Regular.otf 
NotoSansMyanmar-Bold-ZawDecode.ttf 
NotoSansMyanmar-Regular-ZawDecode.ttf 
NotoSansMyanmarUI-Bold-ZawDecode.ttf 
NotoSansMyanmarUI-Regular-ZawDecode.ttf 
NotoSansNabataean-Regular.otf 
NotoSansNewa-Regular.otf 
NotoSansNewTaiLue-Regular.ttf 
NotoSansNKo-Regular.ttf 
NotoSansOgham-Regular.ttf 
NotoSansOlChiki-Regular.ttf 
NotoSansOldItalic-Regular.ttf 
NotoSansOldNorthArabian-Regular.otf 
NotoSansOldPermic-Regular.otf 
NotoSansOldPersian-Regular.ttf 
NotoSansOldSouthArabian-Regular.ttf 
NotoSansOldTurkic-Regular.ttf 
NotoSansOriya-Bold.ttf 
NotoSansOriya-Regular.ttf 
NotoSansOriyaUI-Bold.ttf 
NotoSansOriyaUI-Regular.ttf 
NotoSansOsage-Regular.ttf 
NotoSansOsmanya-Regular.ttf 
NotoSansPahawhHmong-Regular.otf 
NotoSansPalmyrene-Regular.otf 
NotoSansPauCinHau-Regular.otf 
NotoSansPhagsPa-Regular.ttf 
NotoSansPhoenician-Regular.ttf 
NotoSansRejang-Regular.ttf 
NotoSansRunic-Regular.ttf 
NotoSansSamaritan-Regular.ttf 
NotoSansSaurashtra-Regular.ttf 
NotoSansSharada-Regular.otf 
NotoSansShavian-Regular.ttf 
NotoSansSinhala-Bold.otf 
NotoSansSinhala-Medium.otf 
NotoSansSinhala-Regular.otf 
NotoSansSinhalaUI-Bold.otf 
NotoSansSinhalaUI-Medium.otf 
NotoSansSinhalaUI-Regular.otf 
NotoSansSoraSompeng-Regular.otf 
NotoSansSundanese-Regular.ttf 
NotoSansSylotiNagri-Regular.ttf 
NotoSansSyriacEastern-Regular.ttf 
NotoSansSyriacEstrangela-Regular.ttf 
NotoSansSyriacWestern-Regular.ttf 
NotoSansTagalog-Regular.ttf 
NotoSansTagbanwa-Regular.ttf 
NotoSansTaiLe-Regular.ttf 
NotoSansTaiTham-Regular.ttf 
NotoSansTaiViet-Regular.ttf 
NotoSansTamil-Bold.otf 
NotoSansTamil-Medium.otf 
NotoSansTamil-Regular.otf 
NotoSansTamilUI-Bold.otf 
NotoSansTamilUI-Medium.otf 
NotoSansTamilUI-Regular.otf 
NotoSansTelugu-Bold.ttf 
NotoSansTelugu-Regular.ttf 
NotoSansTeluguUI-Bold.ttf 
NotoSansTeluguUI-Regular.ttf 
NotoSansThaana-Bold.ttf 
NotoSansThaana-Regular.ttf 
NotoSansTibetan-Bold.ttf 
NotoSansTibetan-Regular.ttf 
NotoSansTifinagh-Regular.ttf 
NotoSansUgaritic-Regular.ttf 
NotoSansVai-Regular.ttf 
NotoSansYi-Regular.ttf
NotoNaskhArabic-Regular.ttf 
NotoNaskhArabic-Bold.ttf 
NotoNaskhArabicUI-Regular.ttf 
NotoNaskhArabicUI-Bold.ttf 
NotoSansArmenian-Regular.otf 
NotoSansArmenian-Bold.otf 
NotoSansArmenian-Medium.otf 
NotoSansDevanagari-Regular.otf 
NotoSansDevanagari-Bold.otf 
NotoSansDevanagari-Medium.otf 
NotoSansDevanagariUI-Regular.otf 
NotoSansDevanagariUI-Bold.otf 
NotoSansDevanagariUI-Medium.otf 
NotoSansGeorgian-Regular.otf 
NotoSansGeorgian-Bold.otf 
NotoSansGeorgian-Medium.otf 
NotoSansHebrew-Regular.ttf 
NotoSansHebrew-Bold.ttf 
NotoSansSymbols-Regular-Subsetted.ttf 
NotoSansSymbols-Regular-Subsetted2.ttf 
NotoSansThai-Regular.ttf 
NotoSansThai-Bold.ttf 
NotoSansThaiUI-Regular.ttf 
NotoSansThaiUI-Bold.ttf
NotoSerifArmenian-Bold.otf 
NotoSerifArmenian-Regular.otf 
NotoSerifBengali-Bold.ttf 
NotoSerifBengali-Regular.ttf 
NotoSerifDevanagari-Bold.ttf 
NotoSerifDevanagari-Regular.ttf 
NotoSerifEthiopic-Bold.otf 
NotoSerifEthiopic-Regular.otf 
NotoSerifGeorgian-Bold.otf 
NotoSerifGeorgian-Regular.otf 
NotoSerifGujarati-Bold.ttf 
NotoSerifGujarati-Regular.ttf 
NotoSerifGurmukhi-Bold.otf 
NotoSerifGurmukhi-Regular.otf 
NotoSerifHebrew-Bold.ttf 
NotoSerifHebrew-Regular.ttf 
NotoSerifKannada-Bold.ttf 
NotoSerifKannada-Regular.ttf 
NotoSerifKhmer-Bold.otf 
NotoSerifKhmer-Regular.otf 
NotoSerifLao-Bold.ttf 
NotoSerifLao-Regular.ttf 
NotoSerifMalayalam-Bold.ttf 
NotoSerifMalayalam-Regular.ttf 
NotoSerifMyanmar-Bold.otf 
NotoSerifMyanmar-Regular.otf 
NotoSerifSinhala-Bold.otf 
NotoSerifSinhala-Regular.otf 
NotoSerifTamil-Bold.otf 
NotoSerifTamil-Regular.otf 
NotoSerifTelugu-Bold.ttf 
NotoSerifTelugu-Regular.ttf 
NotoSerifThai-Bold.ttf 
NotoSerifThai-Regular.ttf

删除无用语言包

frameworks/base/core/res/res/values/locale_config.xml

删除其中不需要语音列表,注意以为一组,这里只保留了中文相关

<resources>

    <string-array translatable="false" name="supported_locales">
        <item>en-US</item> <!-- English (United States) -->
        <item>zh-Hans-CN</item> <!-- Chinese (Simplified, China) -->
        <item>zh-Hans-HK</item> <!-- Chinese (Simplified, Hong Kong) -->
        <item>zh-Hans-MO</item> <!-- Chinese (Simplified, Macau) -->
        <item>zh-Hans-SG</item> <!-- Chinese (Simplified, Singapore) -->
        <item>zh-Hant-HK</item> <!-- Chinese (Traditional, Hong Kong) -->
        <item>zh-Hant-MO</item> <!-- Chinese (Traditional, Macau) -->
        <item>zh-Hant-TW</item> <!-- Chinese (Traditional, Taiwan) -->
    </string-array>

</resources>

这样修改后只是系统设置中系统–语音和输入法–语音–添加语音列表中只展示中文相关,

N9fkgf.png

对应的资源文件并未删除依旧打包到了 system.img 中,依旧占用系统空间。接下来继续删除

frameworks/base/core/res/res/ 多余的资源文件夹,和刚刚的 locale_config.xml 保留对应

猜你喜欢

转载自blog.csdn.net/u012932409/article/details/106792906