Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
586 views
in Technique[技术] by (71.8m points)

android - How do I set the default properties in an AOSP build?

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...