android 系统裁剪 ?
Posted 林口
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了android 系统裁剪 ?相关的知识,希望对你有一定的参考价值。
有时候编译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 系统裁剪 ?的主要内容,如果未能解决你的问题,请参考以下文章