Mobile Operating Systems:        Android             Nicos Demetriou  Operating Systems for New Architectures             ...
Outline• Application Development• Experiments  – Emulator, VM, Real device  – Metrics  – Applications  – Results• Conclusi...
Android OS - Application development• Tools needed:   – Android SDK   – Java JDK, Eclipse   – Android Development Tools pl...
Android OS - Application development                                       4
Android OS - Application development• Graphical User Interface  – Layouts and Views (Widgets)  – Only the main thread can ...
Android OS - Application development<manifest xmlns:android="http://schemas.android.com/apk/res/android"package="com.examp...
Android OS - Application development• Bin/  – classes/ holds the compiled Java classes  – classes.dex holds the executable...
Android OS - Application development• src: It contains all source code file (.java file) of  android application• res/   –...
Android OS - Application development• assets: External content reference• libs: Holds any third-party Java JARs your appli...
Android OS - Application development                                       10
Android OS - Application development• Deploying an Android application to apk file                                        ...
Focus on• Testing applications on:  – SDK Emulator  – Real device  – Virtual Machine running Android• Share experience• Co...
Experimenting – SDK Emulator•   Supported in all operating systems•   Android Emulator•   Supports various versions of And...
Experimenting – SDK Emulator• Android Virtual Device manager                                   14
Experimenting – SDK Emulator• How to execute it1. Run as an Android Application in Eclipse2. AVD Manager3. Through termina...
Experimenting – SDK Emulator                               16
Experimenting – Virtual Machine• VMWare Player with Android 2.2• Android OS Image free for various hardware    – http://ww...
Experimenting – Virtual Machine                                  18
Experimenting – Real Mobile Device• Model: Huawei Sonic U8650• Android v2.3.3 (Gingerbread)• Install applications from Goo...
Experimenting – Real Mobile Device                                     20
Experiments – Specifications                        HUAWEI        Emulator  VM              CPU    600MHz (ARMv6)   204MHz...
Experiments - Metrics•   CPU•   Memory•   Filesystem / IO•   Graphics•   Network utilization•   Evaluation    – Benchmark ...
Experiments - Metrics• Benchmark Applications  Application                 CPU   Memory   I/O   Graphics   Network  Quadra...
Experiments - Quadrant Standard Edition• CPU, I/O, 3D graphics Benchmark• Compares your device with other brand  devices  ...
Experiments - Quadrant Standard Edition              Quadrant Standard Edition12000100008000                              ...
Experiments – Linpack for Android• CPU benchmark• Measure of system’s floating point computing  power  – N x N linear equa...
Experiments – Linpack for Android              Single Thread                                      MultiThread80           ...
Experiments – RealPi Benchmark• CPU and memory performance• Calculates the value of Pi to many decimal  places• AGM + FFT ...
Experiments – RealPi Benchmark               RealPi Benchmark3500,003000,002500,00                                        ...
Experiments - Benchmark•   2D Graphic performance•   CPU performance•   Memory performance•   File system performance     ...
Experiments - Benchmark                       Benchmark3500,003000,002500,00                                        VM2000...
Experiments – 0xBench• Comprehensive benchmark suite• C library and system call    – LinPack    – SciMark2•   OpenGL•   2D...
Experiments – 0xBench60                           4500050                         40000                           3500040 ...
Experiments - MemBench• Simple Memory Benchmark• Integer array copy and sum• Runs 4 times                               34
Experiments - MemBench                   MemBench504030                                 VM                                ...
Experiments - An3DBench• Based on jPCT 3d engine• Runs 7 tests from fill rate to complex scenes                           ...
Experiments - An3DBench                                                                                        An3DBench  ...
Experiments - SpeedTest• Discover your Download, Upload, and Ping• Real-time graphs show connection consistency           ...
Experiments - SpeedTest                          SpeedTest9000800070006000                                                ...
Other benchmark applications for           AndroidApplication        CPU   Memory   I/O   Graphics   NetworkAnTuTu Benchma...
Conclusions• Android Application Development  A bit  tricky• CPU is the major factor• Newer versions of Android perform b...
Other options – Blue Stacks                              42
References•   Developing Applications     – http://developer.android.com/tools/building/index.html•   Virtual Machine / Em...
Mobile Operating Systems:        Android             Nicos Demetriou  Operating Systems for New Architectures             ...
Upcoming SlideShare
Loading in …5
×

Mobile operating systems - Application Benchmarking

388 views

Published on

Presenting Android platform testing using various benchmark applications installed on 3 different platforms (VM, SDK Emulator, Mobile Device)
Introduces the basic information on Android Application Development and adb basic commands.

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
388
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
13
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Mobile operating systems - Application Benchmarking

  1. 1. Mobile Operating Systems: Android Nicos Demetriou Operating Systems for New Architectures Fall Semester 2012
  2. 2. Outline• Application Development• Experiments – Emulator, VM, Real device – Metrics – Applications – Results• Conclusions 2
  3. 3. Android OS - Application development• Tools needed: – Android SDK – Java JDK, Eclipse – Android Development Tools plugin• Application components: – Activities: Interactive Tasks – Services: Non-interactive Tasks – Content providers: Database Server – Broadcast receivers: Capture event responses – Intents: Component activation mechanism• Device Emulator inside Android SDK 3
  4. 4. Android OS - Application development 4
  5. 5. Android OS - Application development• Graphical User Interface – Layouts and Views (Widgets) – Only the main thread can directly call View methods – Call-back mechanism for other threads to command the execution of a View method in the main thread• Manifest File (AndroidManifest.xml) – Describes the application and components used 5
  6. 6. Android OS - Application development<manifest xmlns:android="http://schemas.android.com/apk/res/android"package="com.example.android.notepad" > <application android:icon="@drawable/app_notes“ android:label="@string/app_name" > <provider android:name="NotePadProvider" android:authorities="com.example.notepad.provider.NotePad" /> <activity android:name="NoteEditor" android:theme="@android:style/Theme.Light" android:configChanges="keyboardHidden|orientation"> <intent-filter android:label="@string/resolve_edit"> <action android:name="android.intent.action.VIEW" /> <action android:name="android.intent.action.EDIT" /> <action android:name="com.android.notes.action.EDIT_NOTE" /> <category android:name="android.intent.category.DEFAULT" /> <data android:mimeType="vnd.android.cursor.item/vnd.google.note" /> </intent-filter> <intent-filter> <action android:name="android.intent.action.INSERT" /> <category android:name="android.intent.category.DEFAULT" /> <data android:mimeType=“vnd.android.cursor.dir/vnd.google.note" /> </intent-filter> </activity> </application> <uses-sdk android:minSdkVersion="3" android:targetSdkVersion="4"/></manifest> 6
  7. 7. Android OS - Application development• Bin/ – classes/ holds the compiled Java classes – classes.dex holds the executable created from the compiled Java classes – nameapp.ap_ holds your application’s resources, packaged as a ZIP file – nameapp.apk is the actual Android application (where nameapp is the name of your application) 7
  8. 8. Android OS - Application development• src: It contains all source code file (.java file) of android application• res/ – drawable: it contains images or pictures – layout: contains XML files that contain the UI layout used in Project or view window of an application – values: Arrays, colors, dimensions, strings, and styles are declared in XML files – raw: it contains non-complied file (e.g. Audio file .mp3, video file .mpg) 8
  9. 9. Android OS - Application development• assets: External content reference• libs: Holds any third-party Java JARs your application requires• gen: – The R.java file is an index (id) into all the resources defined in the file – This class files are used in source code file or it gives for reference/location user interface object that is used in the source code – Automatically generated files 9
  10. 10. Android OS - Application development 10
  11. 11. Android OS - Application development• Deploying an Android application to apk file 11
  12. 12. Focus on• Testing applications on: – SDK Emulator – Real device – Virtual Machine running Android• Share experience• Compare metrics: – CPU usage – Memory• Using low level commands (adb) 12
  13. 13. Experimenting – SDK Emulator• Supported in all operating systems• Android Emulator• Supports various versions of Android• Functionality of real device (buttons, keyboard)• Android Virtual Device manager – Customize device• Use shell commands through terminal• Used along with Eclipse to debug applications• Device used: Nexus One with Android 2.3/4.0 13
  14. 14. Experimenting – SDK Emulator• Android Virtual Device manager 14
  15. 15. Experimenting – SDK Emulator• How to execute it1. Run as an Android Application in Eclipse2. AVD Manager3. Through terminal: ..Androidandroid-sdkplatform-tools>adb devices ..Androidandroid-sdktools>emulator -avd AndroidEmulator• Basic Commands a) Load .apk files in android-sdkplatform-tools b) ..Androidandroid-sdkplatform-tools>adb install [apk] c) adb shell d) adb pull <file> e) adb push <file> 15
  16. 16. Experimenting – SDK Emulator 16
  17. 17. Experimenting – Virtual Machine• VMWare Player with Android 2.2• Android OS Image free for various hardware – http://www.android-x86.org/download• Live CD or installation on disk• Minor changes to add network support• Little complicate to add USB flash as SDCard• Install applications from SDCard or internet• Customizable hardware 17
  18. 18. Experimenting – Virtual Machine 18
  19. 19. Experimenting – Real Mobile Device• Model: Huawei Sonic U8650• Android v2.3.3 (Gingerbread)• Install applications from Google Play or SDCard• More stable 19
  20. 20. Experimenting – Real Mobile Device 20
  21. 21. Experiments – Specifications HUAWEI Emulator VM CPU 600MHz (ARMv6) 204MHz 1,60GHz Memory 177MB 504MB 882MB Disk 160MB 197MB 2GBDisplay Resolution 320x480 480x720 800x600 Android OS v2.3 v2.3/4.0 v2.2 21
  22. 22. Experiments - Metrics• CPU• Memory• Filesystem / IO• Graphics• Network utilization• Evaluation – Benchmark Applications 22
  23. 23. Experiments - Metrics• Benchmark Applications Application CPU Memory I/O Graphics Network Quadrant Standard Edition x x x x Linpack for Android x RealPi BenchMark x BenchMark x x x x 0xBench x x x x x MemBench x An3DBench x SpeedTest x 23
  24. 24. Experiments - Quadrant Standard Edition• CPU, I/O, 3D graphics Benchmark• Compares your device with other brand devices 24
  25. 25. Experiments - Quadrant Standard Edition Quadrant Standard Edition12000100008000 VM6000 Emulator Emulator 4.04000 Real Device2000 0 CPU Memory IO Graphics 25
  26. 26. Experiments – Linpack for Android• CPU benchmark• Measure of system’s floating point computing power – N x N linear equations Ax = b• Reflection of the Android Dalvik• Results in MFLOPS 26
  27. 27. Experiments – Linpack for Android Single Thread MultiThread80 180 16070 14060 12050 VM 100 VM40 Emulator Emulator Android 4.0 80 Android 4.0 Real Device Real Device30 6020 4010 200 0 MFLOPS Time (s) Norm Res MFLOPS Time (s) Norm Res 27
  28. 28. Experiments – RealPi Benchmark• CPU and memory performance• Calculates the value of Pi to many decimal places• AGM + FFT formula (Arithmetic Geometric Mean 28
  29. 29. Experiments – RealPi Benchmark RealPi Benchmark3500,003000,002500,00 VM2000,00 Emulator1500,00 Android 4.01000,00 Real Device 500,00 0,00 Time for 1000000 digits (s) 29
  30. 30. Experiments - Benchmark• 2D Graphic performance• CPU performance• Memory performance• File system performance 30
  31. 31. Experiments - Benchmark Benchmark3500,003000,002500,00 VM2000,00 Emulator1500,00 Android 4.01000,00 Real Device 500,00 0,00 Total Total CPU Total Total file graphics score memory system score score score 31
  32. 32. Experiments – 0xBench• Comprehensive benchmark suite• C library and system call – LinPack – SciMark2• OpenGL• 2D Canvas• Garbage collection in Dalvik• JavaScript engine• Open source 32
  33. 33. Experiments – 0xBench60 4500050 40000 3500040 3000030 25000 VM VM Emulator Emulator20 20000 Android 4.0 Android 4.0 Real Device Real Device 1500010 100000 5000 0 GarbageCollection 33
  34. 34. Experiments - MemBench• Simple Memory Benchmark• Integer array copy and sum• Runs 4 times 34
  35. 35. Experiments - MemBench MemBench504030 VM Emulator20 Emulator v4.0 Real Device100 Copy MB/sec Add MB/sec 35
  36. 36. Experiments - An3DBench• Based on jPCT 3d engine• Runs 7 tests from fill rate to complex scenes 36
  37. 37. Experiments - An3DBench An3DBench An3DBench 500070 450060 400050 3500 300040 VM VM 2500 Emulator Emulator Emulator v4.030 Emulator v4.0 2000 Real Device Real Device20 1500 100010 5000 High Object Multiple High Keyframe Game level 0 Count (fps) Lihgt (fps) Polygon animation (fps) Total count (fps) (fps) 37
  38. 38. Experiments - SpeedTest• Discover your Download, Upload, and Ping• Real-time graphs show connection consistency 38
  39. 39. Experiments - SpeedTest SpeedTest9000800070006000 VM5000 Emulator4000 Emulator v4.03000 Real Device20001000 0 Ping (ms) Download (kbps) Upload (kbps) 39
  40. 40. Other benchmark applications for AndroidApplication CPU Memory I/O Graphics NetworkAnTuTu Benchmark x x x x xSmartBench 2012 x x x xNBench x xCPUBenchmark xNenaMark xBrowserMark x 40
  41. 41. Conclusions• Android Application Development  A bit tricky• CPU is the major factor• Newer versions of Android perform better• Real devices are more stable• Some applications are not supported by VM and Emulator• But…good for testing No harm to OS 41
  42. 42. Other options – Blue Stacks 42
  43. 43. References• Developing Applications – http://developer.android.com/tools/building/index.html• Virtual Machine / Emulator – http://forum.xda-developers.com/showthread.php?t=1474956 – http://developer.android.com/tools/devices/emulator.html – http://tutorialfor-android.blogspot.com.es/2012/07/how-to-download-apk-from-google-play- to.html – http://www.vladan.fr/how-to-install-android-in-vmware-workstation/ – http://quinxy.com/2011/03/12/running-android-2-2-in-vmware-in-less-than-5-minutes/• Experimenting – http://www.phonearena.com/news/10-useful-Android-benchmark-apps_id26876 – http://www.techhive.com/article/255977/how_to_benchmark_your_android_device.html – http://www.howtogeek.com/111594/how-to-benchmark-your-android-device-5-free-apps/ – http://code.google.com/p/0xbench/• Book & paper – Beginning Android Application Development – Wei-Meng Lee – Evaluating Android OS for Embedded Real-time Systems - Cl´audio Maia, Lu´ıs Nogueira, Lu´ıs Miguel Pinho 43
  44. 44. Mobile Operating Systems: Android Nicos Demetriou Operating Systems for New Architectures Fall Semester 2012

×