Android property build. Prop Generation Process
This part is onlineArticleGood analysis:
Http://blog.csdn.net/thl789/article/details/7014300 reprinted over
Android build. the prop file is a variety of properties (LCD density/Language/Compilation Time, etc.) collected during Android compilation .), after compilation, the file is generated in the out/target/product/<board>/system/directory.
During Android runtime, you can use property_get () [C/C ++ domain]/systemproperties_get * () [Java domain] to read these attribute values.
Build. Prop is generated by the make system parsing build/CORE/makefile.
1) define various variables in makefile, which will be used in the next step.
For example:
Product_default_language = "$ (calldefault-locale-language, $ (product_locales ))"\
Product_default_region = "$ (calldefault-locale-region, $ (product_locales ))"\
...
2) Call build/tools/buildinfo. Sh in makefile to execute the script and output it to build. Prop.
Buildinfo. Sh is simple, just echo some attributes, such:
Echo "Ro. Product. locale. Language = $ product_default_language"
Echo "Ro. Product. locale. region = $ product_default_region"
...
Ro. Product. locale. Language/Ro. Product. locale. region are some attributes, and values are followed by equal signs. Product_default_language are defined in other. mk files.
3) In makefile, add $ (target_device_dir)/system. Prop to build. Prop.
It exists in many directories and will be collected and appended to build. Prop, for example:
./Device/Samsung/maguro/system. Prop
./Device/Samsung/crespo4g/system. Prop
./Device/Samsung/Crespo/system. Prop
./Device/qcom/msm8660_surf/system. Prop
./Device/qcom/msm7630_surf/system. Prop
./Device/qcom/msm8625/system. Prop
./Device/qcom/msm8960/system. Prop
./Device/qcom/msm7627a/system. Prop
......
4) collect the attributes in additional_build_properties and append them to build. Prop.
Additional_build_properties collects the attributes defined in product_property_overrides.
Additional_build_properties: = \
$ (Additional_build_properties )\
$ (Product_property_overrides)
Product_property_overridesIn build/target/product/CORE. mk:
Product_property_overrides: = \
Ro.config.icationication_sound=onthehunt.ogg \
Ro.config.alarm_alertw.alarm_classic.ogg
Through the analysis of the build. Prop generation process, we can know where to modify the original attributes or add custom attributes, that is
2) buildinfo. Sh;
3) system. Prop;
4) additional_build_properties or product_property_overrides.
However, it is recommended that you change it to system. Prop or product_property_overrides, which corresponds to the modification of a specific platform or product.