Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
584 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 Reply

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...