MTK Android Settings "about the phone" Information parameter modification

Source: Internet
Author: User

In the file Packages/apps/settings/src/com/android/settings/deviceinfosettings.java

Setstringsummary ("Build_number", Build.display);

Specifies the setting--about the device--version number.

Build.display is the DISPLAY variable in the Build class, in file Frameworks/base/core/java/android/os/build.java:

public static final String DISPLAY = getString ("Ro.build.display.id");

When the Android system runs, it will read the corresponding string in the/system/build.prop file;

Ro.build.display.id in File build/tools/buildinfo.sh: (General modifications can be directly in the buildinfo.sh to modify the settings "about the phone" information, special as follows)

echo "Ro.build.display.id= $BUILD _display_id"

The build/tools/buildinfo.sh file will write the contents to the/system/build.prop file for Java files to read

and build_display_id in the file Build/core/makefile:

BUILD_DISPLAY_ID: = $ (build_id). $ (Build_number)

Where build_id is assigned in BUILD/CORE/BUILD_ID.MK

build_id: = Openmaster

Build_number is assigned in BUILD/CORE/VERSION_DEFAULTS.MK:

Build_number: = eng.$ (USER). $ (shell date +%y%m%d.%h%m%s)

Therefore, the compilation Time field appears in the version number.

Ro.build.display.id the Build.prop file that remains under system after compiling.

Summary: To modify the version number, you can modify the 1 by two sections. Modify the Java file so that it is written directly to death; 2. Modify the compilation system;

============================

Tracking Method :

1. First open MID under 中文版, view Setting--about tablet--- Build number

2, to source/packages/apps/settings/res/, Grep-rn "Buildnumber"./Find the following information

./values/strings.xml:1798: <string name= "Build_number" >build number</string>

3, then Grep-rn "Build_number"./Find the following information

./xml/device_info_settings.xml:117: <preference android:key= "Build_number"
./xml/device_info_settings.xml:119:android:title= "@string/build_number"

4, Vim./xml/device_info_settings.xml, find the following information

<!--detailed build version--
<preference android:key= "Build_number"//This key is specified in the Java file Build_number
Style= "? Android:preferenceinformationstyle"
Android:title= "@string/build_number"
android:summary= "@string/device_info_default"/>

Explanation: The above title part is the title name displayed in mid, and key is the content of the title, next to the Java file to find the corresponding key build_number;

5, the current directory packages/apps/settings/src/, the implementation of Grep-rn "Build_number"./Find the following information

./com/android/settings/deviceinfosettings.java:57:

private static final String Key_build_number = "Build_number";

6, Vim./com/android/settings/deviceinfosettings.java, through Key_build_number find the following information in the current file:

Setstringsummary (Key_build_number, Build.display);

For example:

Setstringsummary (Key_device_model, "gt-s7582");
Setstringsummary (Key_build_number, "IMM761. S7582ZCAL2G ");//Old values IMM761. S7582zcalk2

MTK Android Settings "about the phone" Information parameter modification

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.