2. Agenda
Introduction to
o Android mobile operating system
o Android app
o Android app sandboxing
o Android app development platform
o Android emulators and advance techniques
o Android device administration
o Sample App
2
3. Android is a mobile operating
system (OS) based on the Linux
kernel and currently developed
by Google.
3
4. Initially developed by Android, Inc.,
which Google backed financially and
later bought in 2005, Android was
unveiled in 2007.
This was along with the founding of the Open Handset
Alliance— a consortium of hardware, software, and
telecommunication companies devoted to advancing open
standards for mobile devices.
4
5. The main hardware platform for Android is the
ARM architecture (ARMv7 and ARMv8-A architectures).
x86 and MIPS architectures are also officially supported
Since Android 5.0 "Lollipop", 64-bit variants of all
platforms are supported.
5
17. Android 5.0 "Lollipop"
Android Runtime (ART) with ahead-of-time (AOT) compilation and
improved garbage collection (GC), replacing Dalvik that combines bytecode
interpretation with trace-based just-in-time (JIT) compilation.
Support for 64-bit CPUs
Material design
Project Volta, for battery life improvements
17
18. Android 5.1.1
Device protection: if a device is lost or stolen it will remain locked until the owner
signs into their Google account, even if the device is reset to factory settings.
18
22. The Android SDK tools compile your code—
along with any data and resource files—into
an APK: an Android package, which is an
archive file with an .apk suffix.
22
23. .apk file is the containers for app binaries.
.dex files these are all the app’s .class files
converted to Dalvik byte code.
compiled resources (resources.arsc)
uncompiled resource
Binary version of AndroidManifest.xml
An .apk file contains all of the information necessary to run your application on a device or
emulator.
23
25. App are made from components.
Android instantiates and runs them as needed.
25
26. The two fundamental concepts about Android app framework
App provide multiple entry points
o From one component you can start another component
using an intent. You can even start a component in a
different app, such as an activity in maps app to show an
address.
Apps adapt to different devices
o You can create different XML layout files for different
screen sizes and the system determines which layout to
apply based on the current device’s screen size.
26
30. Android OS is a multi-user Linux system
Each app is a different user.
30
31. Android OS is a multi-user Linux system
Each app is a different user.
System assigns each app a unique Linux User ID
31
32. Android OS is a multi-user Linux system
Each app is a different user.
System assigns each app a unique Linux User ID
This User ID doesn’t change during app’s life on a device.
32
33. Android OS is a multi-user Linux system
Each app is a different user.
System assigns each app a unique Linux User ID
This User ID doesn’t change during app’s life on a device.
This User ID is used only by the system and is unknown to the app.
33
34. Android OS is a multi-user Linux system
Each app is a different user.
System assigns each app a unique Linux User ID
This User ID doesn’t change during app’s life on a device.
This User ID is used only by the system and is unknown to the app.
System sets permissions for all the files in an app so that only the User ID assigned
to that app can access them.
34
35. Android OS is a multi-user Linux system
Each app is a different user.
System assigns each app a unique Linux User ID
This id doesn’t change during app’s life on a device.
This User ID is used only by the system and is unknown to the app.
System sets permissions for all the files in an app so that only the User ID assigned
to that app can access them.
Each process has its own virtual machine (VM), so an app's code runs in isolation
from other apps.
35
36. Android OS is a multi-user Linux system
Each app is a different user.
System assigns each app a unique Linux User ID
This id doesn’t change during app’s life on a device.
This User ID is used only by the system and is unknown to the app.
System sets permissions for all the files in an app so that only the User ID assigned
to that app can access them.
Each application is given a dedicated data directory which only it has permission
to read and write to
Each process has its own virtual machine (VM), so an app's code runs in isolation
from other apps.
By default, every app runs in its own Linux process. Android starts the process
when any of the app's components need to be executed, then shuts down the
process when it's no longer needed or when the system must recover memory for
other apps.
36
38. Zygote is a daemon whose goal is to launch Apps.
38
39. Automatically generated UIDs for applications start at 10000 (AID_APP), and the
corresponding usernames are in the form
app_XXX or
uY_aXXX (on Android versions that support multiple physical users),
39
40. The data directory of the email application is named after its package name and is created
under /data/data/ on single-user devices.
40
41. Thus, applications are isolated, or sandboxed,
both at the process level (by having each run in a
dedicated process) and at the file level (by having a private
data directory).
This creates a kernel-level application sandbox, which
applies to all applications, regardless of whether they are
executed in a native or virtual machine process.
41
42. Apps that are signed with same certificate can share data, user ID, as well as run in
a single process. They just need to specify same sharedUserId and process.
42
48. Based on Eclipse
Based on IntelliJ Community Edition
Windows
•Microsoft® Windows® 8/7/Vista/2003 (32 or 64-bit)
48
49. Based on Eclipse
Based on IntelliJ Community Edition
Windows
•Microsoft® Windows® 8/7/Vista/2003 (32 or 64-bit)
Mac OS X
Mac® OS X® 10.8.5 or higher, up to 10.9 (Mavericks)
49
50. Based on Eclipse
Based on IntelliJ Community Edition
Windows
•Microsoft® Windows® 8/7/Vista/2003 (32 or 64-bit)
Mac OS X
Mac® OS X® 10.8.5 or higher, up to 10.9 (Mavericks)
Linux
GNOME or KDE desktop
Tested on Ubuntu® 14.04, Trusty Tahr
50
60. Emulator
Can emulate many different device/user characteristics, such as
Network speed/latencies
Battery Power
Location coordinates
60
61. VGA means Video Graphics Array, and has a resolution of 640*480 pixels.
QVGA means Quarter Video Graphics Array and has a resolution of 320*240 pixels.
HVGA means Half Video Graphics Array, and has a resolution of 480*320 pixels.
WVGA (Wide Video Graphics Array) with a resolution of 800*480 pixels
FWVGA (Full Wide Video Graphics Array) at 854*480 pixels
The only difference between WVGA and FWVGA is the screen aspect ratio. WVGA has
15:9, and FWVGA is 16:9. 16:9 is better for HD movie watching
61