android introduction - eth z · android introduction. distributed systems – pratical exercises |...

11
Distributed Systems – Pratical Exercises 1 | Distributed Systems – HS 2016 Leyna Sadamori Leyna Sadamori [email protected] Android Introduction

Upload: dinhtram

Post on 05-Apr-2018

219 views

Category:

Documents


2 download

TRANSCRIPT

Distributed Systems – Pratical Exercises 1|Distributed Systems – HS 2016Leyna Sadamori

Leyna [email protected]

Android Introduction

Distributed Systems – Pratical Exercises 2|Distributed Systems – HS 2016Leyna Sadamori

The Universe of Android Programming

Android Architecture

Development Tools

Software Engineering

https://developer.android.com/guide/index.html

Distributed Systems – Pratical Exercises 3|Distributed Systems – HS 2016Leyna Sadamori

§ Linux kernel§ Use key security features of linux§ Hardware drivers for well-known kernel

§ Android Runtime§ Similar to Java virtual machine

Platform Architecture

Distributed Systems – Pratical Exercises 4|Distributed Systems – HS 2016Leyna Sadamori

Android Runtime

Source Code

Compile

Java Bytecode

.java .class

Compile

Dalvik Bytecode

.dex

JVM ART

§ ART and DEX files optimized for low-memory devices

§ Ahead-of-time (AOT) andjust-in-time (JIT) compilation

§ Optimized garbage collection

Distributed Systems – Pratical Exercises 5|Distributed Systems – HS 2016Leyna Sadamori

Android Framework

Activities

Services

Intents

Sensor Manager

Location Manager

Strings

Media

LayoutBluetooth Manager

… ……

App ComponentsHardware API Resources

Distributed Systems – Pratical Exercises 6|Distributed Systems – HS 2016Leyna Sadamori

Android Key Terms

§ «Activity»§ Logical unit of a user activity

(like window in a computer program)§ Usually full-screen

§ «View»§ Hierarchical UI element§ Combined in layouts and

extended to Widgets with more functionality

§ «Service»§ Background activity without UI, e.g., music player or FTP server

Distributed Systems – Pratical Exercises 7|Distributed Systems – HS 2016Leyna Sadamori

Android Key Terms

§ «Intent»§ Asynchronous message to bind components§ Starts or switches between «Activities»§ Intent Filters are used to only act on specific Intents

§ «BroadcastReceiver»§ Listens for global events (Intents)

e.g., «headphones were plugged» sent by the system§ Can be used to pass system events for further processing§ Can inform the user about system events

Distributed Systems – Pratical Exercises 8|Distributed Systems – HS 2016Leyna Sadamori

Activity Lifecycle

§ Multi-Tasking§ OS keeps apps alive

as long as possible§ On memory shortage,

processes are killedaccording to their priority

§ Essential states of an activity§ Running (resumed)§ Paused§ Stopped§ Finished/killed

Distributed Systems – Pratical Exercises 9|Distributed Systems – HS 2016Leyna Sadamori

§ SDK Tools§ Development and debug tools, emulator, etc.

§ SDK Platforms§ APIs for target platforms

§ Build Tools§ Support libraries

§ Libraries to support backward compatibility

Development Tools

Distributed Systems – Pratical Exercises 10|Distributed Systems – HS 2016Leyna Sadamori

Android Versions

VS HS2016

VS HS2015VS HS2014VS HS2013

§ Very dynamic environment§ Hard to keep up with changes§ Compatibility issues

§ Since Android 4.0 stable release rhythm (~ yearly)

Distributed Systems – Pratical Exercises 11|Distributed Systems – HS 2016Leyna Sadamori

Now: Android Live Hacking