Doze白名单与deviceidle.xml:咨询该文件的生成主体
About
/data/system/deviceidle.xml's Managing Component Hey there! Let me break this down clearly for you:
The file /data/system/deviceidle.xml is generated and maintained by the DeviceIdleController—a core system service in the Android framework that handles all logic tied to Doze mode and the app whitelist you're interacting with.
Here are some key details to keep in mind:
- When you run the command
adb shell dumpsys deviceidle whitelist +PACKAGE, you’re triggering an IPC call to theDeviceIdleController’s internal APIs. This service updates the whitelist entries and then persists the latest configuration directly todeviceidle.xml. - It’s not just adb commands that modify this file: if a user manually adjusts battery optimization settings (like adding an app to the "Don't optimize" list) or an app requests Doze exemption via the
PowerManagerAPI, theDeviceIdleControllerwill also update this XML file to reflect those changes. - Important note: This is a system-exclusive configuration file. Regular apps don’t have direct write access to it—any changes must go through official system interfaces, otherwise your edits will either be overwritten by the system or won’t take effect at all.
内容的提问来源于stack exchange,提问作者david
相关产品推荐
相关产品推荐

