Android Gold Sunshine Automated test-learning process: battery up && down

Source: Internet
Author: User

Chapter: Automation Fundamentals-Battery life Automation test &&

NetEase Cloud Classroom:

http://study.163.com/course/courseLearn.htm?courseId=712011#/learn/video?lessonId=878098&courseId=712011

http://study.163.com/course/courseLearn.htm?courseId=712011#/learn/video?lessonId=878099&courseId=712011

Main content and notes:

The factors and theories that affect mobile phone power:

Here is a table: today's mainstream mobile phone display technology, model and power consumption table:

 
Technology Type Mainstream models Power
LCD Lcd+led Backlight Four stars
TFT-LCD Three stars
Ips Iphone Three stars
Slcd HTC, Samsung Nexus S (19023) Two stars
Oled AMOLED Samsung Nexus S (19020) A Star
Super AMOLED Samsung A Star

The meaning of technical parameters:

1. lcd--LCD screen (liquid crystal display)

2. oled--Organic light-emitting diode (Organic emitting Diode)

The meaning of the parameter inside the type:

1-1) lcd+led Backlight:

(1) LED (Light Emitting diode (light-emitting diode))

(2) backlight (LED backlight refers to the use of LED (light emitting diode) as the backlight of the LCD screen. Compared with the traditional CCFL (cold cathode tube) backlight, LED has the characteristics of low power consumption, low calorific value, high brightness, long life, and is expected to replace the traditional backlight system in recent years.

(3) Backlight specific meaning: in the electronics industry, backlighting is a form of illumination that is often used on LCD displays. The difference between the backlight and the front light is that the backlight is illuminated from the side or back, while the front light is illuminated from the front as the name implies. They are used to increase illumination in low-light environments and brightness on computer monitors and LCD screens to produce light in a similar way to CRT displays.

1-2) TFT-LCD:

TFT (Thin Film transistor) LCD is a thin film field effect transistor LCD. Liquid crystal Flat Panel display, special TFT-LCD, is currently the only display device that catches and exceeds the CRT (CRT is a monitor using cathode ray tube (cathode ray Tube) in brightness, contrast, power consumption, life, volume and weight. It has excellent performance, large-scale production characteristics, high degree of automation and low raw material cost.

1-3) IPS:

IPS (In-plane switching, planar conversion) technology is currently the world's most advanced liquid crystal panel technology. IPS is the surface attached to a layer of resin film, like a person with glasses. Compared to other panel technologies (such as TN panels and VA panels), the IPs screen is special in that it is not pre-directed to the liquid crystal molecules into a light transmission mode, but is directed to become an opaque mode, the number of light transmittance by the direction of the liquid crystal molecular orientation perpendicular to the electrode, the higher the voltage, the more twisted molecules, This allows for precise control of light.

1-4) SLCD:

SLCD is an abbreviation for the English splice Liquid crystal display, which is a special LCD screen for splicing.

2-1) AMOLED:

AMOLED (Active matrix organic light-emitting bipolar body, or actively matrix OLED, English: Active-matrix organic light-emitting diode), is a display technology used in television and mobile devices. The OLED (organic Light emitting bipolar) describes the specific type of thin film display technology-the electromechanical excitation light display, am (Active matrix body or the initiative matrix) refers to the behind the pixel addressing technology. As of 2011, AMOLED technology was used on mobile phones and media players

2-2) Super AMOLED

The AMOLED screen has the advantages of fast response, self-illumination, excellent display performance and lower power consumption. The early AMOLED screen faces a limited panel size and a shorter life span compared to a short TFT, which shortens the gap with innovative technical support. Samsung launched the new super AMOLED (full name: Super Active Matrix/organic Light emitting Diode) Super screen, compared to the traditional AMOLED screen, the previous touch-sensitive layer + display layer of the architecture design, More sensitive handling. In addition, the elimination of the Glass overlay also brings a better display of the sun. The Super AMOLED also features a Mdnie (mobile digital natural image engine) technology that can be viewed from any angle and react quickly.

Note: Bat interview skills--according to official website documents, the words are not much, say to the point is

1) How to reduce the power problem:

(1) Canceling the broadcast

(2) Use WiFi

(3) Reduce Service update Service

2) Why is the Xiaomi phone saving power?

The trick is to minimize the time spent on all resources

For example, reduce as much as possible:

(1) CPU consumption (polling thread?) What is a polling thread? Under what circumstances do I need to poll threads? How do I reduce polling? What is root authority? How do I get it? How does the Android layer handle it?

Be sure to read the Android source code is OK Ah, come on!! Try to go to the official website)

(2) Wake-up frequency (Weaklock, what is Weaklock, function?) What does this mainly mean by waking up? The screen or what? )

(3) network length (failed retry?) Do you mean that failure does not retry? )

(4) screen, GPS, camera use time (how can this be done?) Isn't this supposed to be controlled by people? How long do I want to use the camera? Or do I reduce the need to open before opening? Then close as soon as possible to end, not linger)

(5) SD card reading and writing

Specifically, in the OnPause () method, you can:

(1) Stop CPU-intensive operations, such as animations? How does this stop? What is the animation?

(2) Releasing system resources, such as cameras? When does the camera process exist? Or is the so-called exit actually not quit

Note: The so-called Test power is the ultimate goal is to reduce the power, from the root cause, to understand the reason, to really curb the loss of electricity, or what kind of power steward such tests come out and what is the point?

How willing to test, just try to write code to testing, read the source is the first step!

Note: Interpreting the Android system's no-moral integrity behavior--http://blog.csdn.net/21cnbao/article/details/7686907

(1) responsible for a hung service restart

Android Four components are independent, the interface is turned off (UI main thread exit), Serviece still can run at random

Second, a: the whole battery life-out of the data line (so-called battery life, that is, to try to control the power from all aspects, reduce power loss)

Include the following points: (You have to find the code to see, the main thing is that the competition machine can be a whole machine to handle the same operation, to see the power consumption situation)

1, the screen lit off--difficulties

User habits to cut, establish use cases, probably what users will do?

2. Automatic flight mode switching

3. Automatic switch of network connection (3G and 2G)--Difficulty (reflection)

(1) Conceptual analysis: What is reflection? How exactly do you do reflection in your code?

4. WiFi and Bluetooth turned off

5. Send SMS

6. MMS Sending--difficulties

7. The music player turns off

8. SD Card

9. Video Playback

10. Camera

11. E-Mail

12, call--difficulties

Iii. Process level monitoring readiness knowledge

To save power is to reduce CPU consumption.

Review concept: CPU frequency, CPU time slice

To accurately quantify the CPU consumption of an application, you first need to fix the CPU frequency, and then get the total number of CPU time slices that take the action process

1, Fixed CPU frequency:

/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq

2, before and after the test to obtain the process in the user state and system state consumption of the total number of time slices

Cat/proc/1/stat

Results generated: 1 The sum of the number 6+ 7th after

Four, B: single-process battery life-plug-in USB

Nani? Not understand .... Find the opportunity to continue to chew, mainly to look at the development of documents, but also to write code yourself!!!!

V. Summary

Involves some interview techniques:

1. What are the factors that affect electricity?

(1) Use the material of the mobile phone itself

(2) Broadcast (be sure to create it dynamically when you use it)

(3) 3G and WiFi (with WiFi, less 3G, and spend money and electricity, not fun)

(4) Reduced service

2, how to keep the phone awake state? (Shallow sleep and deep sleep will be different)

3, how to do the battery test? To App-level

4, do the battery test is to consider the instantaneous value or average?

Nonsense, the current average, for example: instantaneous value to 10000, the others are all 1; For example, there is a girl or a boy, there is a moment is beautiful or handsome, but we say he is what kind of, or to pay attention to most of the life of the AH

5, how to do the power comparison? What are the references and standards?

The answer is: to the world mainstream for reference and standards

1, official website: www.goldensunshine.cc
2, Baidu Search: Golden Sunshine Test, find the golden Sun study Materials and official website, video.
3, the official Sina Weibo: Golden Sunshine Woody
4, the official qq:212260449
6, the official YY education channel: 74894998
7, the official CSDN technical information: http://blog.csdn.net/haorenmin2008

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.