[PDF] [PDF] Analyzing the User Interface of Android Apps - The IMDEA Software

In ANDROID apps, many UI elements are statically declared in a layout file, but can also be created, enabled, or disabled dynamically in code Modeling UI control 



Previous PDF Next PDF





[PDF] UI WIDGETS AND LAYOUTS, SOME EXAMPLE

the View tree by asking each component to draw itself in a pre-order traversal way children to do the same There are five basic types of Layouts: • Frame, Linear, Relative, Table, and Absolute blank space on your screen that you can later fill with a single object —for example, a picture that you'll swap in and out



[PDF] Android-UI-Designpdf

3 Android UI: Layouts with View Groups and Fragments 38 Android gives some key components that can be used to create user interface that follows



[PDF] Android - Graphical User Interfaces - Cleveland State University

They are used to create interactive UI components such as buttons, checkboxes, labels, text fields, etc Layouts are invisible structured containers used for holding other Views and nested layouts The View class is the Android's most basic component from which users interfaces can be created



[PDF] Android UI Design + Examples - General Purpose Computations on

Lists all app components and screens Android Studio graphical layout editor Android UI using XML Layouts ○ Layout? Pattern in which multiple widgets 



[PDF] Analyzing the User Interface of Android Apps - The IMDEA Software

In ANDROID apps, many UI elements are statically declared in a layout file, but can also be created, enabled, or disabled dynamically in code Modeling UI control 



[PDF] Creating a User Interface using XML - KTH

Remember, in an Android, a View can be an atomic UI component, a Button, TextView or such, or it can be a container, ViewGroup, for example a layout 



Android UI

Chapter 2: Android UI Layouts: Layout Containers and the ViewGroup Class Java SE is a development environment infrastructure component, and is thus not  



[PDF] Programming Android UI - U A B

Activity : UI component typically corresponding to one screen They contain views = UI controls like buttons, labels, editable text and layouts = view



[PDF] Android - Components I

Android Studio1 ▷ The official IDE for Android app development ▷ Based off the IntelliJ IDEA ▷ Custom build system for apps called Gradle ▷ Rich layout 



[PDF] Programmation sous Android

LinearLayout : placer les éléments sur une ligne Une fois le logiciel ouvert, cliquez sur le bouton Android SDK Manager pour ouvrir l'outil de

[PDF] android layout design

[PDF] android layout inspector

[PDF] android layout managers

[PDF] android layout padding

[PDF] android layout tutorial

[PDF] android layout types

[PDF] android layoutinflater

[PDF] android layout_gravity

[PDF] android layout_gravity vs gravity

[PDF] android layout_weight

[PDF] android mobile app automation testing tools

[PDF] android mobile app security testing checklist

[PDF] android mobile application architecture diagram

[PDF] android mobile application security testing tools

[PDF] android pc client server example

Analyzing the User Interface of Android Apps

Konstantin Kuznetsov

♣·Vitalii Avdiienko♣·Alessandra Gorla♠·Andreas Zeller♣

CISPA, Saarland University,

Saarbrücken, Germany♠

IMDEA Software Institute,

Madrid, Spain

ABSTRACTWhen interacting with Android apps, users may not always get what they expect. For instance, when clicking on a button labeled "upload picture", the app may actually leak the user location while uploading photos to a cloud service. In this paper we presentBACK- STAGE, a static analysis framework that bindsUIelements to their corresponding callbacks, and further extractsactions, in the form of Android sensitiveAPIcalls, that may be triggered by events on suchUIelements. We illustrate how the analysis implemented by BACKSTAGEworks, and we compare it with similar frameworks.

CCS CONCEPTS

•Software and its engineering→Automated static analysis

•Theory of computation→Program analysis;

ACM Reference Format:

Konstantin Kuznetsov♣·Vitalii Avdiienko♣·Alessandra Gorla♠·Andreas Zeller♣. 2018. Analyzing the User Interface of Android Apps. InProceedings "18),4 pages. https://doi.org/10.1145/3197231.3197232

1 INTRODUCTION

Users interact with Android mobile apps through their user inter- faces, but it is often unclear whether the actual underlying behavior why the actual behavior di?ers from the expected one: App devel- opers may intentionally hide some undesired behavior to the ?nal user to secretly collect sensitive information. The actual behavior may di?er from the expected one even when app developers have good intentions, but have little experience with goodUIdesign. As an example, consider Figure 1, showing a menu in the Android Health Tracker Liteapp. Users can export their data to a CSV ?le, resulting in a "?le saved" message con?rming the successful export. However, when users choose the "Send User Data By Email" but- ton, they obtainthe very same message.Just a few seconds later, a mail dialog pops up that allows to send the just saved ?le, but the message is still confusing. Finally, the actual behavior may di?er Permission to make digital or hard copies of part or all of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for pro?t or commercial advantage and that copies bear this notice and the full citation on the ?rst page. Copyrights for third-party components of this work must be honored.

For all other uses, contact the owner/author(s).

MOBILESoft "18, May 27-28, 2018, Gothenburg, Sweden

©2018 Copyright held by the owner/author(s).

ACM ISBN 978-1-4503-5712-8/18/05.

https://doi.org/10.1145/3197231.3197232Figure 1: Health Tracker Lite app. The same message "File saved" is shown for export as well as for the email actions. from what users expect because of an implementation bug in the app. Whatever the scenarios, and whatever the motivation might be, in order to fully test, analyze, or simply understand the behavior of Android apps there needs to be a technique that can analyze the app"sUIand the code associated to it as a whole thing.

The challenges include:

Obtaining the set ofUIelements.

InANDROIDapps, manyUI

elements are statically declared in a layout ?le, but can also be created, enabled, or disabled dynamically in code.

Modeling UI control ?ow.

The control ?ow ofANDROIDapps

is determined by the lifecycle and interactions of the UI ele- ments which are de?ned be means of associated event handling callbacks.

ObtainingUIelement contents.

Contents ofUIelements may

also be de?ned or updated from code, again calling for analysis of callback code. In principle, this data could be obtained dynamically, usingUI event generationto systematically explore the user interface of an app-but then one would struggle to achieve high coverage [3]. In this paper, we presentBACKSTAGE, a static analysis framework that runs the following analyses on a givenANDROIDapp:

Analysis ofUIElements.

BACKSTAGEdeterminesallUIelements

that are declared in the app, either in the (static) layout ?le, or created dynamically from within callbacks. For theHealth Trackerapp, for instance,BACKSTAGEdetermines theUIbuttons shown in Figure 1, as they would be declared in the layout ?le.

Analysis ofUIcontrol ?ow.

By associating and analyzing the

callback functionsthat would be activated with aUIelement, BACKSTAGEcan determine howUIelements invoke or activate each other. In theHealth Trackerapp, for instance,BACKSTAGE ?nds that the "Send User Data by Email" and "Export to CSV ?le" buttons both invoke a Toast noti?cation message.

Analysis of reachable Android API calls.

Using the identi?ed

callbacks as entry points,BACKSTAGEcan see whichsensitive

MOBILESo? "18, May 27-28, 2018, Gothenburg, Sweden Kuznetsov et al.Android API calls can be reached. We refer to sensitive API

calls as that subset of the whole Android framework API that can perform concerning operations, such as accessing user"s sensitive data (e.g. precise location and phone number), sending text messages or making phone calls. With these analyses in place,BACKSTAGEcan 1) identify buttons such as "Send User Data by Email" and "Export to CSV ?le", 2) retrieve their corresponding labels (even when dynamically set),

3) identify that the callbacks associated to the buttons both lead

to the temporary "File saved" message visible in Figure 1, and a FileWriteAPI call. When such message appears, the app executes

APIcalls thatBACKSTAGEconsiders.

The association of natural language text ofUIelements toAPI calls opens several possibilities for mining and analyzing apps. BACKSTAGE, for instance, is used to detect stealthy behavior [1] (similar to [4]), or to detect usability issues, as in the case of the

Health Tracker app.

BACKSTAGEcan provide a complete association between bothUI elements, their code, and their contents, whether declared statically or created and updated dynamically.

2 ANALYZING UI AND CODE

BACKSTAGEtakes as input the APK of anANDROIDapp, which includes the bytecode and resources such as thelayout ?lesthat declare the individualUIelements in each activity. It produces as outputthe set ofUIelements, each elementeassociated with: parentsPofein theUIhierarchy tree, as well as the activity, to which elementebelongs; •the visible label in natural language textlofe; thecallbacksCassociated withe, including theAPIs and in- tentsAthat may be reached from such callbacks; otherUIelementsM, e.g. noti?cation messages, that would be activated as a result of activatinge. Thus, eachUIelementeis represented by a tuplee(l,P,C,A,M).

BACKSTAGEfollows three main steps:

(1) It retrieves the set ofUIelements that the app de?nes, and it identi?es the callbacks that are associated to them (Section 2.1), (2)Using the callbacks as entry points, it retrieves the list of reach- able sensitive AndroidAPIcalls and intents (Section 2.2), and (3) It analyzes the content ofUIelements to collect the natural language text associated to them (Section 2.3). None of these analyses is trivial, given the complexity of the An- droidGUI[7].

2.1 Mapping UI Elements to Callbacks

severalUIelements, such as buttons and text ?elds, organized in a hierarchy. Each app may contain multiple activities (and typically does so). The layout of the activity is usually declared inXML?les residing inlayoutfolder. Developers can bind an activity to a layoutXML?le thanks to theActivity:setContentView(layoutFileId) method. As an example of a layout ?le, consider Listing 1. BACKSTAGEparses theXMLlayout ?les to determine the set of declaredUIelements, together with their callbacks and their (yet

1

2

3