Configure multi-Mandarin and default language

Source: Internet
Author: User
Tags gmt time zone
1. First, find out four system attributes

 

Default read-only language

[Ro. Product. locale. Language]: [En]

[Ro. Product. locale. region]: [us]

 

Value modified after the user changes the language settings

[Persist. SYS. Language]: [zh]

[Persist. SYS. Country]: [CN]

These two files are stored in the/data/property directory of the file system (in fact, each newly set property will be named by the property name, the attribute value is included in this directory). If the attribute with the same name exists in/system/build. in prop, and in/data/property, then according to the read order of the attribute

The overwrite principle of the same name. The final value is in/data/property.

 

After changing the language settings on your phone, run the ADB shell getprop command to view the system attributes.

Persist. SYS. Language and persist. SYS. Country are both changed to the set language.

Ro. Product. locale. Language and Ro. Product. locale. region cannot be changed.

 

 

Ii. My modification methods

 

The setting is successful on device/qcom/msm7627_qrd/system. Prop.
Add:

Persist. SYS. timezone = Asia/Shanghai
Persist. SYS. Language = ZH
Persist. SYS. Country = Cn

It is correct to switch the host again and restore the factory settings.

System. the content of prop will be copied to system during compilation. IMG/system/build. prop (for system. it is not clear how prop is copied. Only Google recommends

Vendor uses this file under the product to set the required system property) and writes it to out/target/product/msm7627_qrd/recovery/root/default. prop, so the factory settings are restored.

PS: For more information about the functions of MK files under the product, see

Http://www.kandroid.org/android_pdk/build_new_device.html


There are many ways to configure the language, such as http://stackoverflow.com/questions/5814754/how-to-set-default-ime-in-porting-android, but this may be wrong ^_^

 

Iii. Time Zone

The time zone is managed by bionic C library in Android.

Timezone management:

The name of the current timezone is taken from the TZ environment variable, if defined. Otherwise, the system property named 'persist. SYS. timezone 'is checked instead.
The zoneinfo timezone database and index files are located under directory/system/usr/share/zoneinfo, instead of the more POSIX-compliant path of/usr/share/zoneinfo.

Wiki of timezone: http://en.wikipedia.org/wiki/list_of_zoneinfo_timezones.btw:my incorrect modification method

1. Add system/CORE/rootdir/etc/init. qcom. RC

Setprop persist. SYS. timezone Asia/Shanghai

Result: The persist. SYS. timezone file can be generated under/data/property at startup, but the file will be overwritten every time the system is started, so that the timezone can be restored.


2. Add the following content to device/qcom/msm7627_qrd/msm7627_qrd.mk:

Additional_build_properties + = persist. SYS. timezone = Asia/Shanghai

Result: persist can also be generated under/data/property. SYS. in the timezone file, after the settings are changed, the system will not overwrite the system when it is restarted. However, once the factory settings are restored, the timezone becomes the default GMT Time Zone >_<! ~!

Additional_build_properties: Specify (ADD) additional attribute files;

 

Iv. Summary Generally, the ultimate goal of setting properties is to compile and present it in system/build. Prop. If the property you need in this file is compiled, it should be OK. The source of this file is currently only visible in two parts, one is buildinfo. sh. The other is system. prop. For System/build. the parsing source code of prop is in system/CORE/init/property_service.c.V. Other References

1. The language modification is very detailed.

Http://blog.csdn.net/dahailantian1/archive/2011/01/16/6144676.aspx

However, this article adds the property to this variable product_property_overrides: =/

Persist. SYS. Language = zh/
Persist. SYS. Country = cn. You have not tried OK!

2. a deep understanding of Android system property: http://blog.csdn.net/tekkamanitachi/archive/2009/06/18/4280982.aspx

Vi. Supplement

Device/qcom/msm7627_qrd/system. PropSimilar modifications include

# Added: Set Default Ring

Ro.config.ringtone1_noises1.ogg

Ro.config.icationication_sound?tinkerbell.ogg

# Added by Yue: LCD is 480x800. After this parameter is set, the icon will be displayed normally. Otherwise, it will be very small.

Ro. SF. LCD _density = 240


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.