35

Where can I change the default Android device properties in my custom AOSP build?

For example:

  • GPS - ON;
  • Sync - ON;
  • Brightness - AUTO;
  • Bluetooth - OFF;
  • WiFi - OFF;
  • Sound - default sound;
  • Vibrate when ring - OFF;

These settings should be defined in the build so they are already in their correct state once build is loaded.

Is there a centralized file/folder for all the settings? Or a Settings application that gathers by itself settings from all Android platform modules?

Veaceslav Gaidarji
  • 4,261
  • 3
  • 38
  • 61

1 Answers1

61

There are two main places I usually check for defaults:

/frameworks/base/packages/SettingsProvider/res/values/defaults.xml

and:

/frameworks/base/core/res/res/values/config.xml

Its also worth checking the device directory for overlays which just override the original files:

/device/<company-name>/<product-name>/overlay/frameworks/base/core/res/res/values/config.xml

Default wallpaper usually hardcoded to:

/frameworks/base/core/res/res/drawable-nodpi/default_wallpaper.jpg

Default volume levels for various streams(int[] DEFAULT_STREAM_VOLUME):

/frameworks/base/media/java/android/media/AudioSystem.java
skoperst
  • 2,259
  • 1
  • 23
  • 35
  • 1
    thanks for info. I would like to know locations of these config files in built Android....like /data/xxx, Do you know? I want changed values, like default value for volume is 10, user changes to 15. So where should i read property having value 15. – JRC Jun 09 '15 at 09:36
  • 2
    Most of them are in settings provider, it has an apk and also dynamic DB in /data/.. – skoperst Jun 09 '15 at 21:16
  • what about enable roaming or set lock mode (none, slide, ...) ? it didn't find it in these 2 files. – alexislg Dec 20 '15 at 13:23
  • @skoperst How about default system language? Thanks. – Dr.jacky May 07 '16 at 04:53
  • Its the first language in the locale list in the device makefile. The result is stored in build.prop – skoperst May 07 '16 at 07:39
  • 1
    And don't forget the vendor repositories like `vendor/xos/`, `vendor/cm/`or `vendor/aosp/` – xdevs23 Nov 14 '16 at 13:36