Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.
Android and IntelinsideChristoph JechlitschekSoftware and Services GroupIntel Corporation
Agenda         •Android* on IA Momentum         •Developing Android Apps for IA         •App Development with x86 NDK
Smartphones with Intel Inside    Megafon Mint            Lenovo K800      Orange San Diego    Russia                  Chin...
Why Intel® Atom™ processors & Android?         Enhanced Video and Graphics         • 2D/3D HW accelerated graphics perform...
Focusing on Mobile ExperiencesApplications & Services, Operating Systems, Platforms and Silicon     BRAND         EXPERIEN...
Agenda         •Android* on IA Momentum         •Developing Android Apps for IA         •App Development with x86 NDK
Android* on Intel® Atom™ processor-based platforms                     Applications        Apps                      Home ...
Android* Optimizations for Intel® Atom™-based devices        Performance Tuning                       Power Reduction • Da...
Performance Gains from optimizations              Dalvik Runtime Optimizations                                            ...
Faster Emulation and Prebuilt Atom ImagesPre-built Atom Images• Android SDK manager has x86 emulation  images built-in• To...
Intel® Graphics Performance Analyzers (Intel® GPA)              System Analyzer                                           ...
Using Intel® Graphics Performance Analyzers 1. Install APK   2. Run Intel® GPA System Analyzer   3. View Profile          ...
Agenda         •Android* on IA Momentum         •Developing Android Apps for IA         •App Development with x86 NDK
Android* Native Development Kit (NDK) Build scripts/toolkit to incorporate native  c/c++ code in Android Apps via JNI Wh...
Android* Application Overview                                                Dalvik ApplicationAndroid NDK Application    ...
Adding Native Code to Android * AppsStandard Android* Project Structure                                                Nat...
Creating NDK-based Apps: Code Re-use Example 1. Create default Android* App project ~/labs/lab2$ android create project --...
Sample Native Code for CPUID
Code Re-use Example (cont’d)    2. Define JNI Native Calls in Java* source to access CPUID native code    3. Declare call ...
Code Re-use Example (cont’d)  4. Build with “ant” to generate Java* classes  5. Use “javah” to generate JNI headers
Code Re-use Example (cont’d)   6. Implement native source stub based on generated header stub  7. Create Android.mk build ...
Code Re-use Example (cont’d)  8. Compile native sources with “ndk-build” script : specify APP_ABI=x86  9. Rebuild the fina...
Porting Existing NDK-based AppsA simple 4-step process:1. Recompile existing native module with APP_ABI=all2. Update the p...
Porting Existing NDK-based Apps (cont’d)3. Repackage the project into final APK file       - Example: Using “ant debug” fo...
NDK Tips: Let the NDK Do the Hard Work• Include all ABIs in jni/Application.mk                                    Build AR...
NDK Tips: Use “Fat Binaries”   • Fat Binaries are .apk files that supports multiple ABIs   • Use “APP_ABI := armeabi armea...
Install Will Select The Right .so                                              Use lib/armeabi libraries                  ...
Intel Legal InformationINFORMATION IN THIS DOCUMENT IS PROVIDED IN CONNECTION WITH INTEL® PRODUCTS. NO LICENSE, EXPRESS OR...
Intel Technology is Used in a Broad Range  of leading Smartphones and Tablets …        K800                               ...
Nächste SlideShare
Wird geladen in …5
×

Android and Intel Inside

1.064 Aufrufe

Veröffentlicht am

Android* on IA Momentum, Developing Android Apps for IA, App Development with x86 NDK

Veröffentlicht in: Technologie
  • Gehören Sie zu den Ersten, denen das gefällt!

Android and Intel Inside

  1. 1. Android and IntelinsideChristoph JechlitschekSoftware and Services GroupIntel Corporation
  2. 2. Agenda •Android* on IA Momentum •Developing Android Apps for IA •App Development with x86 NDK
  3. 3. Smartphones with Intel Inside Megafon Mint Lenovo K800 Orange San Diego Russia China Unicom UK, FranceLava Xolo Motorola Razr I ZTEIndia Europe, Latin America Grand X IN
  4. 4. Why Intel® Atom™ processors & Android? Enhanced Video and Graphics • 2D/3D HW accelerated graphics performance optimized for Intel Atom Processors • Full HD support(1080p) for local video playback and HW-accelerated video encode/decode for multiple formats (H.264, MPEG-4, H.263, Flash, etc.) • SW-optimized audio codecs for more efficient CPU utilization Connectivity, Security and Mobility across devices • Connectivity & mobility through WiFi Direct and WiDi support • Wind River, an Intel subsidiary, offers solution accelerators for DLNA, SyncML, additional Bluetooth profiles, etc. • Built-in HW assist for secure boot and full disk encryption. Performance Leadership • Fast web page loading , optimized for Intel Atom processor • Best multi-tasking performance enabled by Intel® Hyper-Threading Technology • Hundreds of Intel software engineers working to optimize Android on Atom Design-in and Application Enabling • Intel technical support for design in and custom application enabling • Intel® System Software Tools 1.0 for Android for power and performance tuning • Applications developed to Android SDK APIs run “as is” on all Intel platforms • Most Android NDK applications run on Atom with simple recompile
  5. 5. Focusing on Mobile ExperiencesApplications & Services, Operating Systems, Platforms and Silicon BRAND EXPERIENC SECURITY TECHNOLOG ES Y + 2012 2013 2014 32nm 22nm 14nm #7 Largest And More Dedicated Security Company Entertainment Business Education Gaming Basic
  6. 6. Agenda •Android* on IA Momentum •Developing Android Apps for IA •App Development with x86 NDK
  7. 7. Android* on Intel® Atom™ processor-based platforms Applications Apps Home Contacts Phone Browser … Application Framework Experience Activity Windows Content View … Manager Manager Providers System Notifica- User Package Telephony Resource Location tion Manager Manager Manager Manager Manager Libraries Android Runtime Surface Media Core Middleware Manager Framework SQLite Libraries Dalvik OpenGL | ES FreeType WebKit Virtual Machine SGL SSL libc … Linux Kernel Operating Display Camera Flash Binder System Driver Driver Memory (IPC) Driver Driver Keypad WiFi Audio Power Driver Driver Drivers Manage- ment
  8. 8. Android* Optimizations for Intel® Atom™-based devices Performance Tuning Power Reduction • Dalvik VM runtime optimization • Power Management for Android • x86 trace-based JIT and Native • OpenGL ES 1.1/2.0 Driver Code Generation • Enriched memory management • HW Overlay (e.g., garbage collection) • HW Accelerated Media • JNI streamlining decode/encode • Tuning of native libraries • Library to integrate w/ Android & reference implementation (MIX) • Bionic optimizations • Standard SoC • Javascript & HTML5 optimization drivers, middleware and applications optimized for power Intel has a rich history optimizing Java for IA. We’ve applied that knowledge to Dalvik Java with impressive results
  9. 9. Performance Gains from optimizations Dalvik Runtime Optimizations Android* Native Library 1.8 No SSE2 with SSE No Trace JIT1 Trace JIT enabled 1.6 7 1.4 6 1.2 Performance 5 4 1Performance 3 0.8 2 0.6 1 0.4 0 0.2 Linpack CaffeineMark 0 Up to 6x Improvement! HTML5 HTML5 HTML5 HTML5 JetBoy* Album Slideshow Zoom Fancy Show Animation Stress Slideshow(SA) Significant improvements in both web (HTML5) and Java* workloads due to optimizations for Intel Source: Intel Software and Solutions Group SSE instructions in Android graphics libraries. 1 Intel Z670 reference design with Honeycomb 2 SSE = Streaming SIMD Testing on Medfield (Z2460) CDK with Gingerbread.
  10. 10. Faster Emulation and Prebuilt Atom ImagesPre-built Atom Images• Android SDK manager has x86 emulation images built-in• To emulate an Atom-based Android phone, install the “Intel Atom x86 System Image” available in the Android SDK Manager• http://software.intel.com/en-us/articles/installing-the-intel- atom-tm-android-x86-emulator-image-add-on-from-the- android-sdk-manager/Much Faster Emulation• Intel® Hardware Accelerated Execution Manager (HAXM) for Mac and Windows uses Intel® Virtualization Technology (VT) to accelerate x86 emulation by an order of magnitude• VT is supported in Linux* (KVM) for x86• http://software.intel.com/en-us/articles/intel-hardware- accelerated-execution-manager/
  11. 11. Intel® Graphics Performance Analyzers (Intel® GPA) System Analyzer • Provides real-time performance analysis of your OpenGL-ES* applications • Conduct real-time experiments with OpenGL-ES* state overrides • Triage system-level performance with CPU, Power and GPU metricsNote: Public release of Intel GPA for Android* is targeted for 2H-2012
  12. 12. Using Intel® Graphics Performance Analyzers 1. Install APK 2. Run Intel® GPA System Analyzer 3. View Profile on development machine
  13. 13. Agenda •Android* on IA Momentum •Developing Android Apps for IA •App Development with x86 NDK
  14. 14. Android* Native Development Kit (NDK) Build scripts/toolkit to incorporate native c/c++ code in Android Apps via JNI Why Use NDK? • Performance intensive tasks • e.g.: signal-processing/custom-algorithms • Differentiated app that takes advantage of direct CPU/HW access • e.g.: specialized games • Software Code reuse • Legacy Code • Huge legacy IA code base & libraries
  15. 15. Android* Application Overview Dalvik ApplicationAndroid NDK Application Java Native Java Library Source Compile Compile with Javac with Javac Dynamic Java Native Android Library Library Class App Class Application File Compile and Create C header Link C Code with Javah -jni Makefile C Source Header Code File
  16. 16. Adding Native Code to Android * AppsStandard Android* Project Structure Native Sources - JNI Folder 1. Create JNI folder 3. Create Android.mk for native sources with build rules 2. Reuse or create native c/c++ sources NDK will automatically create ABI lib folder. 4. Build Native code using NDK-BUILD script.
  17. 17. Creating NDK-based Apps: Code Re-use Example 1. Create default Android* App project ~/labs/lab2$ android create project --target android-13 --activity CPUIdApp -- package com.example.cpuid --path .
  18. 18. Sample Native Code for CPUID
  19. 19. Code Re-use Example (cont’d) 2. Define JNI Native Calls in Java* source to access CPUID native code 3. Declare call to Load native lib cpuid.so (“cpuid”)
  20. 20. Code Re-use Example (cont’d) 4. Build with “ant” to generate Java* classes 5. Use “javah” to generate JNI headers
  21. 21. Code Re-use Example (cont’d) 6. Implement native source stub based on generated header stub 7. Create Android.mk build rules for compiling native code with NDK
  22. 22. Code Re-use Example (cont’d) 8. Compile native sources with “ndk-build” script : specify APP_ABI=x86 9. Rebuild the final APK with ant, and optional install on emulator!
  23. 23. Porting Existing NDK-based AppsA simple 4-step process:1. Recompile existing native module with APP_ABI=all2. Update the project to use Android* platform of choice (e.g. ICS target API is “Android-15”)
  24. 24. Porting Existing NDK-based Apps (cont’d)3. Repackage the project into final APK file - Example: Using “ant debug” for demo purposes4. Install/Test the App (APK) on x86 Android* emulator or device
  25. 25. NDK Tips: Let the NDK Do the Hard Work• Include all ABIs in jni/Application.mk Build ARM v5… Build ARM v7a… Build ARM x86…• The NDK will generate highly optimized code for all target ABIs
  26. 26. NDK Tips: Use “Fat Binaries” • Fat Binaries are .apk files that supports multiple ABIs • Use “APP_ABI := armeabi armeabi-v7a x86” in Application.mk – Can use “APP_ABI := all” since NDK version r7 libs/armeabi Source Code ndk-build apkbuilder libs/armeabi-v7a …Application.mkwith multiple ABIs libs/x86
  27. 27. Install Will Select The Right .so Use lib/armeabi libraries Use lib/armeabi-v7a libraries Use lib/x86 libraries• Android Market will automatically filter applications based on ABI support
  28. 28. Intel Legal InformationINFORMATION IN THIS DOCUMENT IS PROVIDED IN CONNECTION WITH INTEL® PRODUCTS. NO LICENSE, EXPRESS ORIMPLIED, BY ESTOPPEL OR OTHERWISE, TO ANY INTELLECTUAL PROPERTY RIGHTS IS GRANTED BY THIS DOCUMENT.EXCEPT AS PROVIDED IN INTEL’S TERMS AND CONDITIONS OF SALE FOR SUCH PRODUCTS, INTEL ASSUMES NO LIABILITYWHATSOEVER, AND INTEL DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY, RELATING TO SALE AND/OR USE OF INTEL®PRODUCTS INCLUDING LIABILITY OR WARRANTIES RELATING TO FITNESS FOR A PARTICULARPURPOSE, MERCHANTABILITY, OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTYRIGHT. INTEL PRODUCTS ARE NOT INTENDED FOR USE IN MEDICAL, LIFE SAVING, ORLIFE SUSTAINING APPLICATIONS.Intel may make changes to specifications and product descriptions at any time, without notice.All products, dates, and figures specified are preliminary based on current expectations, and are subjectto change without notice.Intel, processors, chipsets, and desktop boards may contain design defects or errors known as errata, which may cause the product todeviate from published specifications. Current characterized errata are available on request.Intel, Intel logo, Intel Atom, Intel Atom Inside,, Intel Inside, and Intel Inside logo are trademarks of Intel Corporation in the U.S. and othercountries.Android is a registered trademark of Google, Inc.Java and all Java based trademarks and logos are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and othercountries.For more complete information about performance and benchmark results, visit www.intel.com/benchmarksOther names and brands may be claimed as the property of others.Copyright © 2012 Intel Corporation.
  29. 29. Intel Technology is Used in a Broad Range of leading Smartphones and Tablets … K800 San DiegoTab Xoom

×