
+ POLITECNICO DI TORINO Bachelor Degree Course in Computer Engineering Bachelor Degree Thesis Development of a tool to measure smartphone’s battery consumption Supervisors Candidates Assistant Prof. Luca Ardito Tristán Armendáriz Irigaray Research Assistant. Riccardo Coppola Student Number: s267000 Academic Year 2018-2019 Contents List of Tables iii List of Figures iv 1 Introduction 1 2 Background and related work 5 2.1 Energy issues........................6 2.2 Tools and techniques for measurement..........7 3 Study design 11 3.1 Instruments......................... 11 3.1.1 Dumpsys with batterystats............. 11 3.1.2 Vysor and SikuliX.................. 14 3.1.3 Appium with Java................. 16 3.2 Usage profiles and scenarios description.......... 26 4 Procedure 33 5 Tests, results and conclusion 55 5.1 Description of the test................... 55 5.2 Issues during the execution of the tests.......... 56 5.3 Results............................ 58 5.4 Conclusion.......................... 63 A Tables about scenario´s details 65 Bibliography 75 ii List of Tables 5.1 Xiaomi Redmi Note 5 - Spotify app consumption.... 59 5.2 Samsung GT-I9300 - Spotify app consumption...... 60 5.3 Motorola Nexus 6 - Spotify app consumption....... 61 A.1 SCENARIO 1 – StandBy consumption.......... 66 A.2 SCENARIO 2 - Music: Spotify.............. 67 A.3 SCENARIO 3 - Multimedia video: Vimeo........ 68 A.4 SCENARIO 4 - Multimedia video: Netflix........ 69 A.5 SCENARIO 5- OpenCamera: Use of the camera..... 70 A.6 SCENARIO 6 - Social Networks: Instagram....... 71 A.7 SCENARIO 7 - Use of email: K9 Mail.......... 72 A.8 SCENARIO 8 - Web navigation: Opera Browser..... 73 A.9 SCENARIO 9 - Data Transfer: Dropbox......... 74 iii List of Figures 3.1 Initial screen view of the program "Appium Server"... 17 3.2 View of the "Appium Server" program running the server 17 3.3 Assigning capabilities in our Java project......... 19 3.4 Connecting to the Appium server............. 20 4.1 Example of description of commands........... 34 4.2 Example of execution of adb commands.......... 34 4.3 Example of the method created for executing commands and reading the response.................. 35 4.4 Example of the loop created for scenario execution and saving statistics....................... 37 4.5 Example of screenshot taken by "UIAutomatorViewer". 40 4.6 Hierarchy of the elements of the current activity..... 41 4.7 Information needed to identify an element within the hi- erarchy............................ 41 4.8 Example of the instructions created in Java to be exe- cuted in the scenario class................. 42 4.9 Example of the method for executing an adb command. 43 4.10 Java code for reading “batterystats.txt” file and getting the battery consumption.................. 44 4.11 Java code for creating the connection with the database. 46 4.12 Java code for inserting into database all the data.... 47 4.13 Java code reading from database all the data....... 50 4.14 Java code to add data to the "dataset".......... 51 4.15 Java code to assign the "dataset step and all the charac- teristics of the chart.................... 51 4.16 Java code for modifying the appearance of the chart... 52 4.17 Java code to create the “.png” file............. 53 iv 5.1 Final chart with the results of the test.......... 62 v Chapter 1 Introduction Nowadays, the smartphone has become a fundamental and essential part of the day-to-day people and an almost indispensable tool which we use, on average, about 5 hours per day. One of the biggest problems that users usually find on these devices is the short life of the battery and the high battery consumption of certain applications in our daily use. People depends every day on charging the phone, two or three times per day on some smartphones. This is also the main problem which manufacturers find when they are designing these phones be- cause they always try to combine the highest hardware performance in the shortest possible space. The obstacle is always the size of the smartphones., which has to be limited. Due to the increasing development of technology in recent years, it has been possible to implement much more powerful electronic components in an ever smaller space. This is why the development of mobile phone batteries has had to deal with a shrinking and limited space. For all this, it is difficult to increase the capacity of the batteries that are deployed in mobile phones, because the higher the capacity the bat- tery has, the greater the size it is. It is also important for manufacturers to try to improve the consump- tion of all hardware components of the device, but it is very complicated due to the technological development of these components, because the 1 1 – Introduction higher the power of a component is available, the higher the energy consumption of the device is. They have more and more power but also have a higher consumption. As a result, during these last years there has been an attempt to improve the optimization of the software that each manufacturer introduces to the device. Therefore, this project has as its main objective the compar- ison of consumption that each application has in each different model, to see which software optimizes better the energy consumption. The thesis "Development of a tool to measure smartphone’s battery consumption" aims to provide to the user with a software tool to mea- sure the battery consumption of different applications and services in different models of smartphones and, with it, make it easier for users to decide to choose between different devices. This is a thesis proposed by Luca Ardito, professor at DAUIN (De- partment of Control and Computer Engineering) and it is supported by Riccardo Coppola, research assistant PhD student. This thesis is structured as follows: 1. Background and related work: The first part of this thesis includes some work done previously by professors of the Polytechnic Univer- sity of Torino and people outside this university who have devel- oped different research on energy consumption. It is about trying to contextualize the development of this thesis and getting some tools already studied to help us achieve our goal. 2. Study design: In this section will be talked about the study that have been carried out on all the elements to develop this thesis. It will be split in two: in the first we will talk about all the tools which have been studied and use, and in the second about the different user usage profiles of the devices. The first part consists about in- vestigating and using the APIs provided by the Android Operating System (or with third party hardware if needed) to achieve exact data about the battery consumption of each application and the hardware components (screen, CPU, network connections ...) and 2 1 – Introduction looking for a tool which automatically executes these scenarios on each device, to get the same execution on each device and, with it, get valid results. In the second part, there will be planned and described different scenarios which contain different daily usages of a smartphone and studying which are the most common apps people use. 3. Procedure: The next step will be, with the tools which have been already studied, to create a tool programmed to automate the con- nection with the device and the execution of each scenario a certain number of times. Will be collected all the interesting data and saved it on different local databases, from which we will get the data we are interested in to show the user. 4. Results: After saving the results of the different tests in our databases, the next step is to find the best way to show to the user these data, building charts and creating tables and there will be detailed the problems and issues that have been encountered throughout the time of development of this thesis. Finally, there will be an analyse of all the data and try to understand each value to get a conclusion. 3 4 Chapter 2 Background and related work Before starting to study people’s smartphone usage profiles, it seems right to give a background for the development of this thesis. We have collected some information about other works and studies about energy consumption of different devices and the measurements that previously have been done. They serve as a base and a previous study about the consumption and optimization of the battery of Android devices. We can divide the structure of the related work into two sections: In the first part we will talk about the problems of energy consumption, specifically portable devices such as smartphones and computers, and the development in their study in recent years. In the second section we will talk about the tools and techniques that have been used to measure this consumption in the different devices, and some tools which are used on this thesis to automatize processes. 5 2 – Background and related work 2.1 Energy issues As we mentioned in the introduction, the increasing development of portable device technology has achieved high performance of hardware components and this has influenced the high-power consumption of end devices. At the same time, development has also taken place in the fields of energy efficiency of components and in software efficiency. The development and improvement of all hardware components (high CPU speed, more efficient displays, more powerful data storage, Wi- Fi/GPRS/UMTS network adapters, advanced 3D graphics, etc) have clearly affected energy consumption. In this section, we will talk about different studies that have been car- ried out on the energy problems of the devices in general and how the different authors report about them. Along these last years there has been a period in which there is a great development of the mobile technology and the beginning of the migra- tion of different services that before were made with the computer and now it is possible to make them with a mobile device, such as online chats.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages82 Page
-
File Size-