11.07.2015 Views

System Introspection for System Analysis on Mobile Devices

System Introspection for System Analysis on Mobile Devices

System Introspection for System Analysis on Mobile Devices

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Figure 4.2: The different layer of B<strong>on</strong>SAI - The top layer c<strong>on</strong>tainselements <str<strong>on</strong>g>for</str<strong>on</strong>g> complex behaviors, the middle layerholds functi<strong>on</strong>al comp<strong>on</strong>ents <str<strong>on</strong>g>for</str<strong>on</strong>g> base tasks and the bottomlayer c<strong>on</strong>trols low level hardware comp<strong>on</strong>ents [FromWachsmuth et al. (2011)]Open Handset Alliance 8 . The architecture behind Android provides an operatingsystem, middle-ware and several key applicati<strong>on</strong>s placed in differentlayers (Figure 4.3). Android applicati<strong>on</strong>s can be written with the Java programminglanguage through the Android SDK 9 . Android comes with support<str<strong>on</strong>g>for</str<strong>on</strong>g> wireless c<strong>on</strong>necti<strong>on</strong>s (Bluetooth, WIFI, EDGE, 3G), hardware comp<strong>on</strong>ents(cameras, GPS, accelerometer) and media support. Android relies <strong>on</strong> a Linuxkernel which acts as abstracti<strong>on</strong> layer between hardware and software.Android offers an open development plat<str<strong>on</strong>g>for</str<strong>on</strong>g>m to allow developers the creati<strong>on</strong>of rich and innovative applicati<strong>on</strong>s. Each Android applicati<strong>on</strong>s runs withinits own life cycle (Figure 4.4) and is called activity. An activity c<strong>on</strong>sists ofa class c<strong>on</strong>taining the logic and an XML file describing the layout of the activity.The life cycle describes the different states of an activity presented bydifferent methods. The <strong>on</strong>Create()-method is called <strong>on</strong>ce an activity startsand initializes the comp<strong>on</strong>ents. The <strong>on</strong>Start()-method is triggered when allc<strong>on</strong>figurati<strong>on</strong> of the creati<strong>on</strong> state has ended. Once started the activity runsin the <str<strong>on</strong>g>for</str<strong>on</strong>g>eground of the device within the <strong>on</strong>Resume()-method. In this methodthe interacti<strong>on</strong> with the user takes place. If the user stops the activity it is notdirectly destroyed. The state of the activity is changed to <strong>on</strong>Pause() and then<strong>on</strong>Stop(). In this state the operati<strong>on</strong> system places the activity in the background.If the activity is requested again the <strong>on</strong>Restart()-method is called. Ifthe activity has been terminated by the operati<strong>on</strong> system due to the need ofresources the <strong>on</strong>Create()-method is called if the activity is requested. If theactivities interacti<strong>on</strong> is finally finished the <strong>on</strong>Destroy()-method is called andthe activity ends. One applicati<strong>on</strong> can c<strong>on</strong>tain several activities to provide interacti<strong>on</strong>with the user. The operating system there<str<strong>on</strong>g>for</str<strong>on</strong>g>e decides which activityis running in <str<strong>on</strong>g>for</str<strong>on</strong>g>eground and sends unused activities to the background.8 http://www.webcitati<strong>on</strong>.org/5wiFwDWLg - Open Handset Alliance9 http://www.webcitati<strong>on</strong>.org/5wrOKYh2w - Android Developer Guide15

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!