Introduction to Android system attributes and android attributes

Source: Internet
Author: User

Introduction to Android system attributes and android attributes

 

View the Android source code and you will find that the Code contains a large number of SystemProperties. set ()/SystemProperties. get (); these two interfaces can be used to read/set system attributes. As the name suggests, system attributes must be globally shared to the entire system.

Attribute system is an important feature of android. It runs as a service and manages system configurations and statuses. All these configurations and statuses are attributes. Each attribute is a key-value pair, and its type is a string. These attributes may be the usage status of some resources, the execution status of processes, and the special attributes of the system ......

You can run the adb shell command:

Adb shell getprop <key>: view the status values of all properties on the mobile phone.

Or getprop init. svc. bootanim is used to check the status of an attribute.

Use setprop init. svc. bootanim start to set the status of an attribute

 

Special attributes:

If the attribute name starts with "ro.", this attribute is regarded as a read-only attribute. Once set, the attribute value cannot be changed.

If the attribute name starts with "persist.", when this attribute is set, its value will also be written to/data/property.

If the attribute name is "net. ", when this attribute is set," net. the change attribute will be automatically set to add to the last modified attribute name (this attribute is used by the netresolve module to track in the net. * Any changes in attributes .)

The "ctrl. start" and "ctrl. stop" attributes are used to start and stop services. Each service must be defined in/init. rc. When the system is started, the init. rc and the init daemon will parse the init. rc and start the Attribute Service. Once you receive a request to set the "ctrl. start" attribute, the property service uses this attribute value as the service name to locate the service and start the service. The startup result of this service will be placed in the "init. svc. <service name>" attribute. The client application can poll the attribute value to determine the result.

 

  Use adb to play the boot Animation

1 adb shell setprop service.bootanim.exit 02 3 adb shell setprop ctl.start bootanim4  

  End playing the boot Animation

1 adb shell setprop ctl.stop bootanim2 3 adb shell setprop service.bootanim.exit 1

 

 

 

Recommended: http://www.cnblogs.com/bastard/archive/2012/10/11/2720314.html

 

Related Article

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.