日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

android 7.1 开机速度优化记录

發布時間:2023/12/20 编程问答 27 豆豆
生活随笔 收集整理的這篇文章主要介紹了 android 7.1 开机速度优化记录 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

調試過程中做一些記錄:平臺msm8953 ,android 7.1(部分參考網絡大神的記錄和翻譯老外的文章)

一、

0、驅動層的裁剪? Android native層服務的裁剪 Android frameworks層服務的裁剪? Android APP層的裁剪

1、lk優化,去掉Lk里面的各種延時,目前啟動時間1.3s左右

lk階段可以把顯示部分的初始化去掉,不再顯示logo圖片,節約0.2s左右

2、kernel優化 ,使用user版本的kernel,init進程啟動時間在1s左右,需要繼續裁剪Kernel大小,這樣lk加載內核時間也會縮短

(1) 減少Log輸出

(2)移除不必要的驅動,文件系統,子文件系統,查看 /dev /sys下的節點,移除不必要的功能。例子:如果wlan通過pcie鏈接,sdio接口驅動可以去掉

(3)裁剪設備樹里面不必要的硬件設備。查看生成的.config,移除不必要的選項

(4)優化驅動的probe功能,減少不必要的延時

(5)bootgraph 用來分析內核功能, 在kernel cmdline 增加 initcall_debug ,然后dmesg > boot.log? bootgraph.pl boot.log >? boot.svg

BoardConfig-common.mk:BOARD_KERNEL_CMDLINE += initcall_debug ignore_logleveldriver:.probe_type = PROBE_PREFER_ASYNCHRONOUS,

(6)電源優化

on init# Disable UFS powersavingwrite /sys/devices/soc/${ro.boot.bootdevice}/clkscale_enable 0write /sys/devices/soc/${ro.boot.bootdevice}/clkgate_enable 0write /sys/devices/soc/${ro.boot.bootdevice}/hibern8_on_idle_enable 0write /sys/module/lpm_levels/parameters/sleep_disabled Y on property:sys.boot_completed=1# Enable UFS powersavingwrite /sys/devices/soc/${ro.boot.bootdevice}/clkscale_enable 1write /sys/devices/soc/${ro.boot.bootdevice}/clkgate_enable 1write /sys/devices/soc/${ro.boot.bootdevice}/hibern8_on_idle_enable 1write /sys/module/lpm_levels/parameters/sleep_disabled N on charger# Enable UFS powersavingwrite /sys/devices/soc/${ro.boot.bootdevice}/clkscale_enable 1write /sys/devices/soc/${ro.boot.bootdevice}/clkgate_enable 1write /sys/devices/soc/${ro.boot.bootdevice}/hibern8_on_idle_enable 1write /sys/class/typec/port0/port_type sinkwrite /sys/module/lpm_levels/parameters/sleep_disabled N

參考:google pixel 手機

CONFIG_ANDROID_LOGGER=y CONFIG_IMX134=y CONFIG_IMX132=y CONFIG_OV9724=y CONFIG_OV5648=y CONFIG_GC0339=y CONFIG_OV8825=y CONFIG_OV8865=y CONFIG_s5k4e1=y CONFIG_OV12830=y CONFIG_USB_EHCI_HCD=y CONFIG_IOMMU_IO_PGTABLE_FAST_SELFTEST=y CONFIG_IKCONFIG=y CONFIG_RD_BZIP2=y CONFIG_RD_LZMA=y CONFIG_TI_DRV2667=y CONFIG_CHR_DEV_SCH=y CONFIG_MMC=y CONFIG_MMC_PERF_PROFILING=y CONFIG_MMC_CLKGATE=y CONFIG_MMC_PARANOID_SD_INIT=y CONFIG_MMC_BLOCK_MINORS=32 CONFIG_MMC_TEST=y CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_PLTFM=y CONFIG_MMC_SDHCI_MSM=y CONFIG_MMC_SDHCI_MSM_ICE=y CONFIG_MMC_CQ_HCI=y CONFIG_MSDOS_FS=y # CONFIG_SYSFS_SYSCALL is not set CONFIG_EEPROM_AT24=y # CONFIG_INPUT_MOUSEDEV_PSAUX is not set CONFIG_INPUT_HBTP_INPUT=y # CONFIG_VGA_ARB is not set CONFIG_USB_MON=y CONFIG_USB_STORAGE_DATAFAB=y CONFIG_USB_STORAGE_FREECOM=y CONFIG_USB_STORAGE_ISD200=y CONFIG_USB_STORAGE_USBAT=y CONFIG_USB_STORAGE_SDDR09=y CONFIG_USB_STORAGE_SDDR55=y CONFIG_USB_STORAGE_JUMPSHOT=y CONFIG_USB_STORAGE_ALAUDA=y CONFIG_USB_STORAGE_KARMA=y CONFIG_USB_STORAGE_CYPRESS_ATACB=y CONFIG_SW_SYNC_USER=y CONFIG_SEEMP_CORE=y CONFIG_MSM_SMEM_LOGGING=y CONFIG_IOMMU_DEBUG=y CONFIG_IOMMU_DEBUG_TRACKING=y CONFIG_IOMMU_TESTS=y CONFIG_MOBICORE_DRIVER=y # CONFIG_DEBUG_PREEMPT is not set

?

二、android os部分優化

1、使用bootchart 生成圖片的方式,結果生成的圖片只有可憐的幾項,跟網上相比丟失太多,原因未知。

2、決定使用Logcat來判斷

三、zygote 預加載優化

diff --git a/base/preloaded-classes b/base/preloaded-classes
index fe2fba5..934a089 100644
--- a/base/preloaded-classes
+++ b/base/preloaded-classes
@@ -247,25 +247,25 @@
?[[S
?[[[I
?android.R$styleable
-android.accounts.Account
-android.accounts.Account$1
-android.accounts.AccountManager
-android.accounts.AccountManager$1
-android.accounts.AccountManager$11
-android.accounts.AccountManager$AmsTask
-android.accounts.AccountManager$AmsTask$1
-android.accounts.AccountManager$AmsTask$Response
-android.accounts.AccountManagerCallback
-android.accounts.AccountManagerFuture
-android.accounts.AccountsException
-android.accounts.AuthenticatorException
-android.accounts.IAccountManager
-android.accounts.IAccountManager$Stub
-android.accounts.IAccountManager$Stub$Proxy
-android.accounts.IAccountManagerResponse
-android.accounts.IAccountManagerResponse$Stub
-android.accounts.OnAccountsUpdateListener
-android.accounts.OperationCanceledException
+#android.accounts.Account
+#android.accounts.Account$1
+#android.accounts.AccountManager
+#android.accounts.AccountManager$1
+#android.accounts.AccountManager$11
+#android.accounts.AccountManager$AmsTask
+#android.accounts.AccountManager$AmsTask$1
+#android.accounts.AccountManager$AmsTask$Response
+#android.accounts.AccountManagerCallback
+#android.accounts.AccountManagerFuture
+#android.accounts.AccountsException
+#android.accounts.AuthenticatorException
+#android.accounts.IAccountManager
+#android.accounts.IAccountManager$Stub
+#android.accounts.IAccountManager$Stub$Proxy
+#android.accounts.IAccountManagerResponse
+#android.accounts.IAccountManagerResponse$Stub
+#android.accounts.OnAccountsUpdateListener
+#android.accounts.OperationCanceledException
?android.animation.AnimationHandler
?android.animation.AnimationHandler$1
?android.animation.AnimationHandler$2
@@ -963,15 +963,15 @@ android.hardware.Camera
?android.hardware.Camera$CameraInfo
?android.hardware.Camera$Face
?android.hardware.ConsumerIrManager
-android.hardware.Sensor
-android.hardware.SensorEvent
-android.hardware.SensorEventListener
-android.hardware.SensorManager
+#android.hardware.Sensor
+#android.hardware.SensorEvent
+#android.hardware.SensorEventListener
+#android.hardware.SensorManager
?android.hardware.SerialManager
?android.hardware.SerialPort
-android.hardware.SystemSensorManager
-android.hardware.SystemSensorManager$BaseEventQueue
-android.hardware.SystemSensorManager$SensorEventQueue
+#android.hardware.SystemSensorManager
+#android.hardware.SystemSensorManager$BaseEventQueue
+#android.hardware.SystemSensorManager$SensorEventQueue
?android.hardware.camera2.CameraCharacteristics$Key
?android.hardware.camera2.CameraManager
?android.hardware.camera2.CaptureRequest$Key
@@ -991,7 +991,7 @@ android.hardware.display.IDisplayManager$Stub$Proxy
?android.hardware.display.IDisplayManagerCallback
?android.hardware.display.IDisplayManagerCallback$Stub
?android.hardware.fingerprint.FingerprintManager
-android.hardware.hdmi.HdmiControlManager
+#android.hardware.hdmi.HdmiControlManager
?android.hardware.input.IInputDevicesChangedListener
?android.hardware.input.IInputDevicesChangedListener$Stub
?android.hardware.input.IInputManager
@@ -1009,27 +1009,27 @@ android.hardware.location.ContextHubManager
?android.hardware.location.ContextHubService
?android.hardware.location.IContextHubService
?android.hardware.location.IContextHubService$Stub
-android.hardware.radio.RadioManager
-android.hardware.radio.RadioManager$AmBandConfig
-android.hardware.radio.RadioManager$AmBandConfig$1
-android.hardware.radio.RadioManager$AmBandDescriptor
-android.hardware.radio.RadioManager$AmBandDescriptor$1
-android.hardware.radio.RadioManager$BandConfig
-android.hardware.radio.RadioManager$BandConfig$1
-android.hardware.radio.RadioManager$BandDescriptor
-android.hardware.radio.RadioManager$BandDescriptor$1
-android.hardware.radio.RadioManager$FmBandConfig
-android.hardware.radio.RadioManager$FmBandConfig$1
-android.hardware.radio.RadioManager$FmBandDescriptor
-android.hardware.radio.RadioManager$FmBandDescriptor$1
-android.hardware.radio.RadioManager$ModuleProperties
-android.hardware.radio.RadioManager$ModuleProperties$1
-android.hardware.radio.RadioManager$ProgramInfo
-android.hardware.radio.RadioManager$ProgramInfo$1
-android.hardware.radio.RadioMetadata
-android.hardware.radio.RadioMetadata$1
-android.hardware.radio.RadioModule
-android.hardware.radio.RadioTuner
+#android.hardware.radio.RadioManager
+#android.hardware.radio.RadioManager$AmBandConfig
+#android.hardware.radio.RadioManager$AmBandConfig$1
+#android.hardware.radio.RadioManager$AmBandDescriptor
+#android.hardware.radio.RadioManager$AmBandDescriptor$1
+#android.hardware.radio.RadioManager$BandConfig
+#android.hardware.radio.RadioManager$BandConfig$1
+#android.hardware.radio.RadioManager$BandDescriptor
+#android.hardware.radio.RadioManager$BandDescriptor$1
+#android.hardware.radio.RadioManager$FmBandConfig
+#android.hardware.radio.RadioManager$FmBandConfig$1
+#android.hardware.radio.RadioManager$FmBandDescriptor
+#android.hardware.radio.RadioManager$FmBandDescriptor$1
+#android.hardware.radio.RadioManager$ModuleProperties
+#android.hardware.radio.RadioManager$ModuleProperties$1
+#android.hardware.radio.RadioManager$ProgramInfo
+#android.hardware.radio.RadioManager$ProgramInfo$1
+#android.hardware.radio.RadioMetadata
+#android.hardware.radio.RadioMetadata$1
+#android.hardware.radio.RadioModule
+#android.hardware.radio.RadioTuner
?android.hardware.soundtrigger.SoundTrigger
?android.hardware.soundtrigger.SoundTrigger$ConfidenceLevel
?android.hardware.soundtrigger.SoundTrigger$ConfidenceLevel$1
@@ -1555,24 +1555,24 @@ android.net.wifi.WifiSsid
?android.net.wifi.WifiSsid$1
?android.net.wifi.nan.WifiNanManager
?android.net.wifi.p2p.WifiP2pManager
-android.nfc.IAppCallback
-android.nfc.IAppCallback$Stub
-android.nfc.INfcAdapter
-android.nfc.INfcAdapter$Stub
-android.nfc.INfcAdapter$Stub$Proxy
-android.nfc.INfcCardEmulation
-android.nfc.INfcCardEmulation$Stub
-android.nfc.INfcCardEmulation$Stub$Proxy
-android.nfc.INfcFCardEmulation
-android.nfc.INfcFCardEmulation$Stub
-android.nfc.INfcFCardEmulation$Stub$Proxy
-android.nfc.INfcTag
-android.nfc.INfcTag$Stub
-android.nfc.INfcTag$Stub$Proxy
-android.nfc.NfcActivityManager
-android.nfc.NfcAdapter
-android.nfc.NfcAdapter$1
-android.nfc.NfcManager
+#android.nfc.IAppCallback
+#android.nfc.IAppCallback$Stub
+#android.nfc.INfcAdapter
+#android.nfc.INfcAdapter$Stub
+#android.nfc.INfcAdapter$Stub$Proxy
+#android.nfc.INfcCardEmulation
+#android.nfc.INfcCardEmulation$Stub
+#android.nfc.INfcCardEmulation$Stub$Proxy
+#android.nfc.INfcFCardEmulation
+#android.nfc.INfcFCardEmulation$Stub
+#android.nfc.INfcFCardEmulation$Stub$Proxy
+#android.nfc.INfcTag
+#android.nfc.INfcTag$Stub
+#android.nfc.INfcTag$Stub$Proxy
+#android.nfc.NfcActivityManager
+#android.nfc.NfcAdapter
+#android.nfc.NfcAdapter$1
+#android.nfc.NfcManager
?android.opengl.EGL14
?android.opengl.EGLConfig
?android.opengl.EGLContext

四、app相關優化

1、去除不需要的app以及相關庫

diff --git a/target/product/core.mk b/target/product/core.mk
index c315bb4..7e7c612 100644
--- a/target/product/core.mk
+++ b/target/product/core.mk
@@ -21,21 +21,13 @@
?# core_tiny.mk in addition to core_minimal.mk.
?
?PRODUCT_PACKAGES += \
-??? BasicDreams \
???? BlockedNumberProvider \
???? BookmarkProvider \
-??? Browser2 \
-??? Calendar \
-??? CalendarProvider \
???? CaptivePortalLogin \
???? CertInstaller \
???? Contacts \
-??? DeskClock \
???? DocumentsUI \
???? DownloadProviderUi \
-??? Email \
-??? ExactCalculator \
-??? Exchange2 \
???? ExternalStorageProvider \
???? FusedLocation \
???? InputDevices \
@@ -48,12 +40,9 @@ PRODUCT_PACKAGES += \
???? PicoTts \
???? PacProcessor \
???? libpac \
-??? PrintSpooler \
???? PrintRecommendationService \
???? ProxyHandler \
-??? QuickSearchBox \
???? Settings \
-??? SharedStorageBackup \
???? StorageManager \
???? Telecom \
???? TeleService \
diff --git a/target/product/core_base.mk b/target/product/core_base.mk
index 03d33e1..d02b058 100644
--- a/target/product/core_base.mk
+++ b/target/product/core_base.mk
@@ -33,7 +33,6 @@ PRODUCT_PACKAGES += \
???? libfilterpack_imageproc \
???? libgabi++ \
???? libmdnssd \
-??? libnfc_ndef \
???? libpowermanager \
???? libspeexresampler \
???? libstagefright_soft_aacdec \
diff --git a/target/product/full_base.mk b/target/product/full_base.mk
index 65bdf0f..2f8eef5 100644
--- a/target/product/full_base.mk
+++ b/target/product/full_base.mk
@@ -25,17 +25,12 @@ PRODUCT_PACKAGES := \
???? libWnnEngDic \
???? libWnnJpnDic \
???? libwnndict \
-??? WAPPushManager
?
?PRODUCT_PACKAGES += \
-??? Galaxy4 \
???? HoloSpiralWallpaper \
-??? LiveWallpapers \
-??? LiveWallpapersPicker \
???? MagicSmokeWallpapers \
???? NoiseField \
???? PhaseBeam \
-??? PhotoTable
?
?# Additional settings used in all AOSP builds
?PRODUCT_PROPERTY_OVERRIDES := \
diff --git a/target/product/generic_no_telephony.mk b/target/product/generic_no_telephony.mk
index 5c48358..be3ed0d 100644
--- a/target/product/generic_no_telephony.mk
+++ b/target/product/generic_no_telephony.mk
@@ -21,7 +21,6 @@ PRODUCT_PACKAGES := \
???? Bluetooth \
???? BluetoothMidiService \
???? Camera2 \
-??? Gallery2 \
???? Music \
???? MusicFX \
???? OneTimeInitializer \
diff --git a/target/product/telephony.mk b/target/product/telephony.mk
index e840ba1..60ede56 100644
--- a/target/product/telephony.mk
+++ b/target/product/telephony.mk
@@ -21,7 +21,6 @@ PRODUCT_PACKAGES := \
???? CarrierConfig \
???? Dialer \
???? CallLogBackup \
-??? CellBroadcastReceiver \
???? EmergencyInfo \
???? rild

2、languages_full.mk,locales_full.mk: 去除不需要的語言設置(可以去除res包的大小)

五、Bootanimation

控制動畫包中資源數量及大小,另外考慮縮短循環播放和結尾的時間。

調試手段:
禁用開機動畫:將”debug.sf.nobootanimation”設為”1” device/qcom/msm8996/system.prop
禁用鎖屏:將”def_lockscreen_disabled”設為”true” frameworks/base/packages/SettingsProvider/res/values/defaults.xml

六、提升CPU頻率 - 將所有CPU切換至性能模式

adb shell stop perf-hal-1-0adb shell "echo 1 > /sys/devices/system/cpu/cpu0/online" adb shell "echo 1 > /sys/devices/system/cpu/cpu1/online" adb shell "echo 1 > /sys/devices/system/cpu/cpu2/online" adb shell "echo 1 > /sys/devices/system/cpu/cpu3/online" adb shell "echo 1 > /sys/devices/system/cpu/cpu4/online" adb shell "echo 1 > /sys/devices/system/cpu/cpu5/online" adb shell "echo 1 > /sys/devices/system/cpu/cpu6/online" adb shell "echo 1 > /sys/devices/system/cpu/cpu7/online"adb shell "echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor" adb shell "echo performance > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor" adb shell "echo performance > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor" adb shell "echo performance > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor" adb shell "echo performance > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor" adb shell "echo performance > /sys/devices/system/cpu/cpu5/cpufreq/scaling_governor" adb shell "echo performance > /sys/devices/system/cpu/cpu6/cpufreq/scaling_governor" adb shell "echo performance > /sys/devices/system/cpu/cpu7/cpufreq/scaling_governor"adb shell "echo performance > /sys/class/devfreq/soc:qcom,cpubw/governor" adb shell "echo performance > /sys/class/devfreq/soc:qcom,mincpubw/governor" adb shell "echo performance > /sys/class/devfreq/soc:qcom,memlat-cpu0/governor" adb shell "echo performance > /sys/class/devfreq/soc:qcom, memlat-cpu6/governor"

七、提升GPU頻率

adb shell "echo 0 > /sys/class/kgsl/kgsl-3d0/min_pwrlevel" adb shell "echo 1 > /sys/class/kgsl/kgsl-3d0/force_clk_on" adb shell "echo performance > /sys/class/kgsl/kgsl-3d0/devfreq/governor"

八、

?

?

?

總結

以上是生活随笔為你收集整理的android 7.1 开机速度优化记录的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。

主站蜘蛛池模板: 草在线 | 日本高清视频网站 | 成人国产三级 | 亚洲天堂av免费在线观看 | 牛牛精品一区 | 日韩性av | 国产白浆在线观看 | 中文字幕乱码一区 | 中文字幕网站在线观看 | 亚洲成色网 | 成人网在线免费观看 | 黄色欧美一级片 | 天堂视频在线免费观看 | 日本黄大片在线观看 | 国产成人一区二区三区影院在线 | 成人黄色小说在线观看 | 日韩va在线观看 | 亚洲色婷婷久久精品av蜜桃 | 亚洲呦呦 | 白嫩日本少妇做爰 | 人妻天天爽夜夜爽一区二区三区 | 欧美又大粗又爽又黄大片视频 | 国产精品suv一区 | 操欧洲美女 | 高潮无码精品色欲av午夜福利 | 亚洲视频一区二区在线观看 | 69视频国产 | 欧美一区二区在线视频 | 非洲黑人毛片 | 91九色国产在线 | 日韩不卡在线 | 欧美一卡二卡在线观看 | 91精品欧美一区二区三区 | 国产视频一区在线观看 | 福利片av| 99在线观看免费视频 | 欧美午夜精品久久久久久蜜 | 麻豆成人在线观看 | 内射毛片内射国产夫妻 | 麻豆精品国产精华精华液好用吗 | 日韩免费电影一区 | 亚洲色图吧 | 在线免费观看国产视频 | 94av| 两个人做羞羞的视频 | 超碰在线人 | 日韩成人免费电影 | 国产精品无码一区二区三区免费 | 欧美与黑人午夜性猛交久久久 | 国产美女引诱水电工 | 女同av在线播放 | 午夜免费看视频 | 亚洲综合在线中文字幕 | 午夜伦理剧场 | 一级作爱片| 在哪里可以看毛片 | 中国黄色一级视频 | 精品伊人| 果冻av在线 | 97久久人人超碰caoprom欧美 | 狠狠干天天色 | 制服丝袜天堂 | 欧日韩精品| 亚洲激情综合 | 看91 | 在线成人看片 | 91亚洲国产成人精品一区二三 | 欧美精品色哟哟 | 日本一区二区三区成人 | 国产一二三精品 | 狼人精品一区二区三区在线 | 亚洲欧洲视频在线观看 | 国产人人爱 | 亚洲激情在线观看视频 | 亚洲一区在线不卡 | 嫩草影院菊竹影院 | 亚洲综合在线网 | 日韩福利电影在线观看 | 成人av国产| 日本三级日本三级日本三级极 | 久久99精品波多结衣一区 | 欧美黄色影院 | 色哟哟免费在线观看 | 少妇色欲网 | 天天骑夜夜操 | 男人的天堂中文字幕 | aaaa黄色片| 久久久久国产精品无码免费看 | 国产精品女教师 | 久久久久久午夜 | 小明看国产 | 亚洲男人在线 | 少妇人妻无码专区视频 | 美女主播福利视频 | 波多野结衣不卡 | a v在线视频 | 婚后打屁股高h1v1调教 | 噜噜噜久久,亚洲精品国产品 | 三级黄片毛片 |