码迷,mamicode.com
首页 > 移动开发 > 详细

android 系统裁剪 ?

时间:2020-07-02 16:05:22      阅读:58      评论:0      收藏:0      [点我收藏+]

标签:ref   apidemos   music   noi   ota   编译   star   arch   calllog   

  有时候编译android镜像会用到一些不需要的app和系统服务,咱们测验将其裁剪出去。
  ####1、源码目录
  build/target/product/*
  在此下面有不少*.mk文件,这一找到相应的app进行规避修改:android
  diff–gita/target/product/core.mkb/target/product/core.mk
  indexafae7c0..7b1dae7100644
  —a/target/product/core.mk
  +++b/target/product/core.mk
  @@-27,17+27,12@@PRODUCT_PACKAGES+=\
  org.simalliance.openmobileapi.xml\
  BasicDreams\
  BlockedNumberProvider\
  -BookmarkProvider\
  -Browser2\
  -Calendar\
  CalendarProvider\
  CaptivePortalLogin\
  CertInstaller\
  -Contacts\
  DeskClock\
  DocumentsUI\
  DownloadProviderUi\
  -Email\
  ExactCalculator\
  ExternalStorageProvider\
  FusedLocation\
  @@-54,7+49,6@@PRODUCT_PACKAGES+=\
  PrintSpooler\
  PrintRecommendationService\
  ProxyHandler\
  -QuickSearchBox\
  Settings\
  SharedStorageBackup\
  Telecom\
  diff–gita/target/product/full_base.mkb/target/product/full_base.mk
  index65bdf0f..da6eb4f100644
  —a/target/product/full_base.mk
  +++b/target/product/full_base.mk
  @@-29,10+29,6@@PRODUCT_PACKAGES:=\
  PRODUCT_PACKAGES+=\
  Galaxy4\
  -HoloSpiralWallpaper\
  -LiveWallpapers\
  -LiveWallpapersPicker\
  -MagicSmokeWallpapers\
  NoiseField\
  PhaseBeam\
  PhotoTable
  diff–gita/target/product/generic_no_telephony.mkb/target/product/generic_no_telephony.mk
  index5c48358..4f9b27a100644
  —a/target/product/generic_no_telephony.mk
  +++b/target/product/generic_no_telephony.mk
  @@-20,10+20,6@@
  PRODUCT_PACKAGES:=\
  Bluetooth\
  BluetoothMidiService\
  -Camera2\
  -Gallery2\
  -Music\
  -MusicFX\
  OneTimeInitializer\
  Provision\
  SystemUI\
  diff–gita/target/product/sdk_base.mkb/target/product/sdk_base.mk
  indexfa257ae..13997ad100644
  —a/target/product/sdk_base.mk
  +++b/target/product/sdk_base.mk
  @@-18,23+18,16@@PRODUCT_PROPERTY_OVERRIDES:=
  PRODUCT_PACKAGES:=\
  ApiDemos\
  -CubeLiveWallpapers\
  CustomLocale\
  Development\
  -Dialer\
  EmulatorSmokeTests\
  Fallback\
  -Gallery\
  GestureBuilder\
  Launcher3\
  -LegacyCamera\
  librs_jni\
  libwnndict\
  libWnnEngDic\
  libWnnJpnDic\
  -LiveWallpapersPicker\
  -Mms\
  -Music\
  OpenWnn\
  Protips\
  rild\
  diff–gita/target/product/telephony.mkb/target/product/telephony.mk
  indexe840ba1..5c05fa1100644
  —a/target/product/telephony.mk
  +++b/target/product/telephony.mk
  @@-19,7+19,6@@
  PRODUCT_PACKAGES:=\
  CarrierConfig\
  -Dialer\
  CallLogBackup\
  CellBroadcastReceiver\
  EmergencyInfo\
  关于一些服务能够修改frameworks/base/services/java/com/android/server/SystemServer.java
  将里边的相关的systemserver.java去掉。
  例如:
  mContentResolver=context.getContentResolver();
  //Slog.i(TAG,”CameraService”);
  //mSystemServiceManager.startService(CameraService.class);
  来源:志在指尖

android 系统裁剪 ?

标签:ref   apidemos   music   noi   ota   编译   star   arch   calllog   

原文地址:https://www.cnblogs.com/hite/p/13225248.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!