What does the /data/system folder store and its significance?


Question

I know that /data partition contains user-generated data (/data/app - user apps, /data/data - app data, etc).



But what is the /data/system folder used for, and does it have any significance in the boot procedure (e.g. - boot scripts, etc)?



A sub-folder-wise explanation would be preferred.


Answer

data/system folder contains system configuration files critical to maintaining device's state. Access to the directory is restricted by the system apps only, so if the device is not rooted the folder content can't be seen.



Below is the list of files residing in the directory with a brief description. Note that the list is not completely full and also may vary depending on the OS version.




  • appops.xml - a configuration file used by the AppOps service which controls application permissions;

  • called_pre_boots.dat - a file used by ActivityManager to hold pre-boot broadcast receivers;

  • batterystats.bin - a binary used by the BatteryStats service to keeps power statistics of application installed;

  • gesture.key - lockscreen pattern;

  • inputmethod/ - a directory used to store IME configuration. Contains subtypes.xml with IME locales, keyboard layout sets etc;

  • locksettings.db - a SQLite database containing the lock screen settings;

  • netpolicy.xml - a configuration file used by the NetworkPolicyManagerService;

  • netstats/ - a directory used to hold NetworkStatsService statistics;

  • packages.list - a file used by the PackageManager service containing the list of all packages (apks) installed in the system (same as executing pm list packages within shell);

  • packages.xml - a file used by the PackageManager service to hold metadata of all installed packages, like UIDs, requested permissions etc;

  • profiles.xml - a configuration file to keep metadata of device profiles including sound mode, airplane mode, vibration etc.;

  • password.key - password hash;

  • usagestats/ - a directory used to store files for the UsageStats service. Contains usage-history.xml that holds info on all apps and its components with the last time a user used them;

  • users/ - a directory used for multi-user support. Contains userlist.xml which keeps info on all users in the system (0 - is a device owner/primary user); e.g. a sub-directory users/0/ holds info on the user account (accounts.db), widgets (appwidgets.xml), wallpaper (wallpaper_info.xml) etc.


Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes