Synthesis for Developing Apps on Mobile Platforms



Similar documents
Programming the Android Platform. Logistics

Overview of CS 282 & Android

Android Architecture. Alexandra Harrison & Jake Saxton

Lecture 1 Introduction to Android

Introduction to Android

Introduction to Android

Introduction to Android Development. Jeff Avery CS349, Mar 2013

The Android Platform

Synthesis for Programming on Mobile Platforms

Smartphone market share

An Introduction to Android

Android Developer Fundamental 1

ITG Software Engineering

Lecture 17: Mobile Computing Platforms: Android. Mythili Vutukuru CS 653 Spring 2014 March 24, Monday

ANDROID BASED MOBILE APPLICATION DEVELOPMENT and its SECURITY

Android Fundamentals 1

ANDROID PROGRAMMING - INTRODUCTION. Roberto Beraldi

An Introduction to Android. Huang Xuguang Database Lab. Inha University

Graduate presentation for CSCI By Janakiram Vantipalli ( Janakiram.vantipalli@colorado.edu )

Android Geek Night. Application framework

Workshop on Android and Applications Development

Example of Standard API

Reminders. Lab opens from today. Many students want to use the extra I/O pins on

Hacking your Droid ADITYA GUPTA

Development. SriSeshaa Technologies. Table of Contents

ANDROID PROGRAMMING - INTRODUCTION. Roberto Beraldi

Building an Android client. Rohit Nayak Talentica Software

An Introduction to Android Application Development. Serdar Akın, Haluk Tüfekçi

ANDROID OPERATING SYSTEM

Mobility Introduction Android. Duration 16 Working days Start Date 1 st Oct 2013

Analysis of advanced issues in mobile security in android operating system

Programming with Android

Introduction to Android Programming (CS5248 Fall 2015)

Mobile Application Development Android

Android Operating System

Getting started with Android and App Engine

Programming with Android: System Architecture. Dipartimento di Scienze dell Informazione Università di Bologna

A Short Introduction to Android

ECWM511 MOBILE APPLICATION DEVELOPMENT Lecture 1: Introduction to Android

NAS 242 Using AiMaster on Your Mobile Devices

Understanding Android s Security Framework

CS378 -Mobile Computing. Android Overview and Android Development Environment

Generate Android App

Introduction to Android Android Architecture Software Development Purpose of the project Location Based Service (LBS) Android. Location class Google

Mobile applications security Android OS (case study) Maciej Olewiński. Cryptographic Seminar r.

Specialized Android APP Development Program with Java (SAADPJ) Duration 2 months

Overview. The Android operating system is like a cake consisting of various layers.

Getting Started with Android Programming (5 days) with Android 4.3 Jelly Bean

TUTORIALS AND QUIZ ANDROID APPLICATION SANDEEP REDDY PAKKER. B. Tech in Aurora's Engineering College, 2013 A REPORT

A GUI Crawling-based technique for Android Mobile Application Testing

GETTING STARTED WITH ANDROID DEVELOPMENT FOR EMBEDDED SYSTEMS

Creating and Using Databases for Android Applications

Android Development: Part One

Homework 9 Android App for Weather Forecast

Dr. Android and Mr. Hide: Fine-grained Permissions in Android Applications

Issues in Android on Mobile Platform and Their Resolution

UNIVERSITY AUTHORISED EDUCATION PARTNER (WDP)

International Engineering Journal For Research & Development

QUIRE: : Lightweight Provenance for Smart Phone Operating Systems

Android Operating System:

Module Title: Software Development A: Mobile Application Development

Praktikum Entwicklung Mediensysteme (für Master)

Mobile Devices - An Introduction to the Android Operating Environment. Design, Architecture, and Performance Implications

Android Mobile App Building Tutorial

INTRODUCTION TO ANDROID CSCI 4448/5448: OBJECT-ORIENTED ANALYSIS & DESIGN LECTURE 11 02/15/2011

Fast remote data access for control of TCP/IP network using android Mobile device

Android Programming and Security

Understand and Build Android Programming Environment. Presented by: Che-Wei Chang

ANDROID INTRODUCTION TO ANDROID

Performance Analysis of Android Platform

Beginner s Android Development Tutorial!

RoverPal - A Mobile Payment Application

How To Install An Aneka Cloud On A Windows 7 Computer (For Free)

Android Application Development. Daniel Switkin Senior Software Engineer, Google Inc.

The power of root on Android emulators

Технологии Java. Android: Введение. Кузнецов Андрей Николаевич. Санкт-Петербургский Государственный Политехнический Университет

Mobile App Testing Guide. Basics of Mobile App Testing

Student Attendance Through Mobile Devices

Mobile Devices - An Introduction to the Android Operating Environment. Design, Architecture, and Performance Implications

Introduction to Android: Hello, Android! 26 Mar 2010 CMPT166 Dr. Sean Ho Trinity Western University

ECWM511 MOBILE APPLICATION DEVELOPMENT Lecture 1: Introduction to Android

Jovision Android Monitoring Software Operational Manual

Android Application for Vehicle Theft Prevention and Tracking System

1. Introduction to Android

Jonathan Worthington Scarborough Linux User Group

Extending Tizen Native Framework with Node.js

Introduction to Android Development. Ed Burnette

Android Application Development - Exam Sample

Multi-core Programming System Overview

Frameworks & Android. Programmeertechnieken, Tim Cocx

Android Development. Marc Mc Loughlin

Getting Started. Version 3.1 Last updated 2014/3/10. Orbweb ME: Getting Started

Intelligent Power Protector User manual extension for Microsoft Virtual architectures: Hyper-V 6.0 Manager Hyper-V Server (R1&R2)

E-Commerce on Android OS

Android Development Tools for Eclipse

Dell UPS Local Node Manager USER'S GUIDE EXTENSION FOR MICROSOFT VIRTUAL ARCHITECTURES Dellups.com

Transcription:

Synthesis for Developing Apps on Mobile Platforms Jeff Foster University of Maryland, College Park Armando Solar-Lezama Massachusetts Institute of Technology

Schedule for session Jeff Foster and Armando Solar-Lezama, Overview of current plans and work Thibaud Hottelier, Programming By Demonstration: But what if the user is fallible? Joel Galenson, CodeHint demo 2

Android Popularity Android most popular smartphone platform 70.1% of the market in 4Q12 850K Android apps on Google Play (Apr. 2013) 40 billion apps downloaded (Apr. 2013) Apps can be distributed by anyone Easy to install app from any site Android makes a good research platform 3

The Android Platform A software stack for mobile devices Operating system, middleware & key applications Use Android SDK to create applications Libraries & development tools Lots of documentation http://developer.android.com (Thanks to Adam Porter for the next batch of slides)

Android Architecture http://developer.android.com/guide/basics/what-is-android.html

Dalvik Virtual Machine Applications typically written in Java Do not run in a standard Java virtual machine dx program transforms java classes into.dexformatted bytecodes Bytecode executed in Dalvik Virtual Machine Applications typically run in their own processes, inside their own instance of the the Dalvik VM

Dalvik Virtual Machine (cont.) Dalvik VM designed to run on a handset Slow CPU Little RAM e.g., 64Mb total, ~10Mb available at runtime No swap space Limited battery life

Dalvik Design Choices Register- rather than stack-based More compact.dex files More efficient execution One.dex file for multiple classes More compact.dex files Modified garbage collection to improve memory sharing Optimizations applied at installation time

Application Framework Window Manager Manages top-level window s look & behavior View system lists, grids, text boxes, buttons, etc. Content Providers Inter-application data sharing Activity Manager Application lifecycle and common navigation stack

Application Framework (cont.) Package manager Manages application packages Telephony manager State of telephony services Resource Manager Manages non-code resources: strings, graphics, and layout files Location manager Access to system location services Notification Manager Notify users when events occur

Applications Standard apps include: Home main screen Contacts contacts database Phone dial phone numbers Browser view web pages Email reader Gmail & others Your App!

Building an Application See: developer.android.com/guide/developing/building/ index.html

Running an Application By default, each application: assigned a unique Linux user ID executes in its own Linux process By default, each process runs its own Dalvik virtual machine Android manages process creation & shutdown Starts process when any of the application's code needs to be executed Shuts down when process is no longer needed and system resources are required by other applications

Application Components An App can have multiple entry points i.e., not just main() method App comprises components that the system can instantiate and run as needed Several key component classes, discussed next

Activity Primary class for interacting with user Usually implements a focused task Usually Involves one screenful of data Typically supports one thing a user can do View an email message Show a login screen Applications can include several activities

Activity Stack developer.android.com/guide/topics/fundamentals/tasks-andback-stack.html 16

Service Runs in the background to perform long-running or remote operations Does not have a visual user interface

BroadcastReceiver Component that listens for broadcast announcements (events) Events implemented as Intent instances Does not have a visual user interface

Content Providers Store & retrieve data across applications Uses database-style interface Example Contacts

Other Interesting Things on Android Intents interprocess communication mechanism Also used to start up new Activities Fragments layout for tables vs. phones Permissions protects sensitive capabilities 20

Tools for Android We ve been doing some work on Android security As a result, we ve built up several tools for working with Android apps To explain those tools, brief aside into this other research 21

Permissions on Android Permissions associated with resources and OS features Internet, GPS, telephony, Permissions granted at install time once granted, apps can use such permissions any way they want 22

Finer-grained Permissions Goal: Introduce finer-grained permissions E.g., Gasbuddy has full access to Internet But only needs access to gasbuddy.com Benefits of finer-grained permissions Help app developers improve apps robustness against security exploits attest to apps proper usage of permissions Help users understand how apps use permissions Also, aim to do this without changing platform 23

Example Finer-grained Permissions Internet è InternetURL(d) InternetURL(gasbuddy_com) GPS è TruncatedLoc(d) Resolution up to distance d Phone state è PhoneState(p) PhoneState(UniqueID) 24

Our Tool Chain org.apk install time runtime Redexer/ Dr. Android Mr. Hide services RefineDroid enh.apk Process boundary RefineDroid infers how permissions are used in the app Redexer/Dr. Android retrofits the app with fine-grained permissions 25 Mr. Hide enforces fine-grained permissions at runtime

RefineDroid infers how permissions are used string analysis to search URL-like strings constant propagation to determine key parameters to privileged APIs e.g. for system settings: tsystemservice( SERVICE); Id(); elistener() {...}, TEN CALL STATE); state Uri uri = Uri.parse ( my ringtone.mp3 ); RingtoneManager.setActualDefaultRingtoneUri( this, RingtoneManager.TYPE ALARM, uri); String path = uri. tostring (); Settings.System.putString( getcontentresolver (), Settings.System.RINGTONE, path); (c) System settings 26 etected by RefineDroid

Redexer/Dr. Android hidelib.dex classes.dex Bytecode Rewriter input.apk manifest.xml Manifest Rewriter output.apk Dalvik Rewriter for Android injects hidelib.dex modifies the app s bytecode to use Mr. Hide removes Android perms. and adds Mr. Hide perms. 27

Mr. Hide Process boundary app System.Settings.putString( ) hidelib.settings.putstring( ) Mr. Hide services System.Settings.putString( ) hidelib Kernel boundary Sensitive Android APIs the Hide interface to the droid environment services interact with a client app and resources client-side library a drop-in replacement for sensitive APIs 28

TroyD Scripted test automation for Android def test_station click Continue click I have a Pandora account edit (0, account@... ) edit(1, password... ) click Sign In menu assert_text Antonio Salieri acts = getactivities finish puts acts end 29

Synthesis to the Rescue Synthesis for tool developers Developing these tools introduces challenges that synthesis can address Synthesis for expert programmers Next generation of tools to help transition from checking to synthesis Synthesis for the end user Can every phone user be a developer? 30

Better tools through synthesis Case Study: SymDroid Symbolic execution for Dalvik bytecode Uses µ-dalvik, an easy-to-analyze representation Challenges App code is tightly tied to the Android framework Framework is big and complex Symbolic execution of the framework is infeasible Hand creation of models is brittle and expensive Can you synthesize a model of Android? 31

Synthesizing an android model Application Android Framework Idea: Multimodal synthesis Record interactions between framework and application Sketch a high-level view of the model State high-level properties of the synthesized model 32

Android model as a reactive program Inputs External events Timers, user gestures, Include method being called + parameters Application calls Application return Outputs Calls from the framework to the application Model is not just an FSM Basic building blocks include FSMs, Stacks, internal datastructures User-provided sketch helps guide the choice of building blocks Leverage known design patterns 33

Synthesis Challenges Conveying Structure Sketch is too low level We need a DSL based on design patterns Scalability Early experiments are encouraging Modularity will be crucial Client-Synthesis feedback loop Model should only be as complex as required by the analysis 34

Synthesis tools for programmers Build on experience with synthesis tools for frameworks Prospector, MatchMaker Key problems How to describe what you want How to cope with complexity Technical directions Combining Data driven techniques with logic-based engines 35

Synthesis for End Users Can we make a programmer of every android user? 36

End