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?

1 Answer 1

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
6
  • 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 9, 2015 at 9:36
  • 2
    Most of them are in settings provider, it has an apk and also dynamic DB in /data/..
    – skoperst
    Jun 9, 2015 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, 2015 at 13:23
  • @skoperst How about default system language? Thanks.
    – Dr.jacky
    May 7, 2016 at 4:53
  • 1
    And don't forget the vendor repositories like vendor/xos/, vendor/cm/or vendor/aosp/
    – xdevs23
    Nov 14, 2016 at 13:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.