1 / 30

AT91SAM Android Introduction

AT91SAM Android Introduction. Agenda. Android Introduction What is Android Android History Why choose Android Android4SAM Introduction Android Porting Kernel, Root file system Application Development SDK, NDK & JNI Best Practice Display Performance Improvement

silver
Download Presentation

AT91SAM Android Introduction

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. AT91SAM Android Introduction

  2. Agenda Android Introduction • What is Android • Android History • Why choose Android Android4SAM Introduction Android Porting • Kernel, Root file system Application Development • SDK, NDK & JNI Best Practice • Display Performance Improvement • Other Suggestion & Tools Resources

  3. Agenda Android Introduction What is Android Android History Why choose Android Android4SAM Introduction Android Porting Kernel, Root file system Application Development SDK, NDK & JNI Best Practice Display Performance Improvement Other Suggestion & Tools Resources

  4. Android is an open-source software stack created for mobile devices Open source, based on Linux 2.6. Middleware Android Runtime (Core libraries, Dalvik VM) Various application frameworks Many key applications, under apache license. Android SDK freely available for download Customer can build their feature rich applications Many great applications are already available What is Android

  5. July, 2005 Google acquired Android Sept. 2008 1.0 Released Linux-2.6.25 Apr. 2009 1.5:Cupcake Linux-2.6.27 Sept. 2009 1.6: Donut Linux-2.6.29 Oct. 2009 2.0/2.1 Éclair Linux-2.6.29 HTC G1 Android History (1)

  6. Android History (2) May. 2010 2.2: Froyo Linux-2.6.32 Dec. 2010 2.3: Gingerbread Linux-2.6.35 Feb. 2011 3.0: Honeycomb For Tablet Not open source Android become No.1 in Smartphone ship in 2010

  7. Android Devices And a lot of Android based device appeared:

  8. Why Choose Android • Base Linux Kernel • Robust and Solid • Rich Set of frameworks • Full featured, ready to use • Many key application already exists and using them • Good Development Tools • SDK for application development • NDK for native library support • Support by Google and Android communities • Many Applications Available • Many great application already exist • Android market is growing very fast • Both open source and binary based • Binary format help protect investment on the application

  9. Agenda Android Introduction What is Android Android History Why choose Android Android4SAM Introduction Android Porting Kernel, Root file system Application Development SDK, NDK & JNI Best Practice Display Performance Improvement Other Suggestion & Tools Resources

  10. All information about Android for Atmel SAM9M10 / SAM9G45 SAM9X5 Provides Android4SAM demo Including at91bootstrap, u-boot, Kernel, Android root file system Provides all source code, patches From zero to build an Android4SAM demo Android4SAM – http://www.at91.com/Android4SAM

  11. Android4SAM history Support both AT91SAM9M10-G45-EK & AT91SAM9X5-EK Sep. 2011 Android4SAM 1.2 online Linux-2.6.35 Android 2.3.1_r1 July 2010 Android4SAM 1.0 online Linux-2.6.30 Android 2.0 Android4SAM 2.0 Linux-2.6.35 Android 2.3.5 Nov. 2010 Android4SAM 1.1 updated Linux-2.6.30 Android 2.1_r1

  12. Agenda Android Introduction What is Android Android History Why choose Android Android4SAM Introduction Android Porting Kernel, Root file system Application Development SDK, NDK & JNI Best Practice Display Performance Improvement Other Suggestion & Tools Resources

  13. Android Porting • Hardware platform validation • Kernel porting • Linux Kernel + Android kernel patch • Necessary Drivers • Kernel configuration file • Debugging • Android Root file system porting • Customizing Components • Extra libraries • Debugging • logcat • Take Android4SAM as example • www.at91.com/Android4SAM

  14. Kernel Porting (1) • Get the Linux kernel from mainline • git.kernel.org • Project Name: linux/kernel/git/torvalds/linux.git • Choose version: most of kernel version support Android patch • Using Git • Porting Linux kernel to target platform • Debugging • Enable Linux serial driver • Make sure the minimum system can boot up on you platform • Enable other drivers • Display • Input • NAND Flash • MMC etc. • Example • www.Linux4SAM.org

  15. Kernel Porting (2) • Get Android official Linux kernel • android.git.kernel.org • version: android-3.0, android-2.6.39, android-2.6.38… • Get and Patch the difference between your kernel and Android Kernel • Using diff compare Kernel with Android Kernel • Enable Android requirements driver • Display • Input • Multimedia • Power Management and etc • Android Kernel configuration • Refer to kernel’s /Documentation/android.txt

  16. Get the Android source code Using repo Repo is a tool that makes it easier to work with Git in the context of Android Refer to http://source.android.com/source/downloading.html Customize your platform under device/ folder, create your platform directory Write the configuration file AndroidBoard.mk Product-specific for your product AndroidProducts.mk Include the products .mk file BoardConfig.mk Product-specific compile-time definitions <your product>.mk Features and application include for your product Product name, manufacture, etc Root File System Porting (1)

  17. Root File System Porting (2) • Select device and version • Using lunch • lunch sam9x5-eng (take Android4SAM as example) • or using choosecombo • Provides options for you to select • Build Android Root File System • Make: build the source code • Refer to http://source.android.com/source/building.html • Take Android4SAM as an example • www.at91.com/Android4SAM

  18. Agenda Android Introduction What is Android Android History Why choose Android Android4SAM Introduction Android Porting Kernel, Root file system Application Development SDK, NDK & JNI Best Practice Display Performance Improvement Other Suggestion & Tools Resources

  19. Application Development • Anatomy & Physiology of an Android Applications Application Frameworks Libraries/Dalvik VM Linux Kernel

  20. Using Java Language Based on Android SDK. Available for various host platforms Windows, Mac OS, Linux. IDE Eclipse with ADT More information at: http://developer.android.com/. Application Development - SDK

  21. Why JNI? Hardware operations Reuse existed Linux C / C++ code Native development with NDK Support C / C++ Android NDK is available for various platforms: Windows, Mac OS, Linux. JNI (Java Native Interface) JNI provides the interface for JAVA to call native code Native code needs to declare it as JNI interface Java JNI Native Code C / C++ Application Development – NDK & JNI

  22. Agenda Android Introduction What is Android Android History Why choose Android Android4SAM Introduction Android Porting Kernel Root file system Application Development Best Practice Display Performance Improvement Other Suggestion & Tools Resources

  23. Usual bottleneck of smooth UI in CPU without GPU is: Display. Surface Manager is one of user space libraries handle display. Handle surfaces of different applications into display. This also include 2D/3D graphics on the display. It is also called Surface flinger. A typical scenario of surface flinger Android’s surface flinger try to use Embedded OpenGL to use GPU to improve performance. It will drop back to software implementation if no GPU. This is harmful for smoothness as if don’t have GPU. Display Performance Improvement (1)

  24. Display Performance Improvement (2) • Android4SAM optimization in display • Do memcpy if both source and destination of the same configurations • Test in 0xbench we get 5x improvement of display • Application can get benefit from Android4SAM when • Source configuration is exactly the same as destination • Same size • Color space is RGB565 • No scale • No rotation • Select proper display resolution. Resolution is a key factor for UI experience

  25. Other Suggestion & Tools (1) • Better Understand Android and Your Application • Visit: http://developer.android.com/index.html, Check: • Resource, Dev Guide, Videos, Blog. • While you design your application: • Suggestions from Designing for Performance • Don’t do work that you don’t need to do. • Don’t allocate memory if you can avoid it. • JNI tips. • Avoid using 3D graphics. • Better algorithm is always the key • Avoid Application Not Responding • Follow guide of Designing for Seamlessness.

  26. Smart use of Profiler: For UI: Hierarchy Viewers Identify slow render performance. For Profile: Traceview, dmtracedump When thread/method are started, stopped. What is inside of a method. NDK profiler. Other Suggestion & Tools (2)

  27. Agenda Android Introduction What is Android Android History Why choose Android Android4SAM Introduction Android Porting Kernel Root file system Application Development Best Practice Display Performance Improvement Other Suggestion & Tools Resources

  28. Further Information about Android

  29. More information about AT91SAM OS Ecosystem • AT91SAM Linux Ecosystem • http://www.linux4sam.org • AT91SAM Android Ecosystem • http://www.at91.com/android4sam • AT91SAM WinCE Ecosystem • http://www.at91.com/windows4sam • AT91SAM community forum • http://www.at91.com

More Related