white paper

1

Android: Opportunities and Challenges

The emergence of Android paves the way for new opportunities for the world’s mobile phone manufacturers to take advantage of the trend created by Apple with its iPhone, moving the user back to the center. The only problem is that Android is a work in progress.

The Emergence of Android written by the manufacturer. Other What is Android? Android is a -based applications can be purchased and platform for mobile and small form downloaded by users as they need factor devices. There are two things that the functionality. In this regard, smart- distinguish Android from other Linux phones are more like ordinary PCs. distributions – It is a single-user system But Android is significantly different and it is adapted for use on mobile from other smart-phones. All interfaces platforms. The Open Handset Alliance are open to anyone who wants to organization and its members are behind write applications. The manufacturer is the concept, and its main sponsor, unable to maintain their own proprietary which has also adopted a significant interfaces to specific functionality with­- role, is Google. out countering the entire Android Perhaps Android’s most important concept. Quite the opposite, in fact; all characteristic is openness. Not only is functionality is accessible to all and most of the platform code open source; manufacturers are encouraged to but also, all applications are of equal publish any extensions. value. If, for example, users don’t like separate threads in the same instance, the browser supplied, they’re free to Inside Android at least for mobile platforms. The main replace it with another browser of their All Android applications are written in instance of Dalvik is known as Zygote choice. There are already thousands the Java programming language. They and is started on system launch. As of applications which add or replace are then compiled in two stages, first soon as an application is to start, a copy inbuilt functionality. using an ordinary Java compiler and of the Zygote is created by means Despite the new opportunities for then using a Dex compiler. Dex stands of a fork() call and the application then mobile phone manufacturers, a tricky for Dalvik executable format. The finished runs in the new instance. balancing act is ensuing. Manufacturers code is then executed in a virtual This particular layout, which involves are on one hand trying to rush Android machine known as Dalvik. every application having its own instance devices to market as quickly as possible, Dalvik is often referred to as a Java – or its own process in the operating while at the same time managing their machine. However, this is not quite system – paves the way for a very specific legacy phone platform investments. correct since Dalvik doesn’t run Java solution in order to achieve a robust Android-based mobile phones bytecode at all; it runs its own variant, system. By combining this with the fact belong to the “smart-phones” segment. known as Dex code. The internal layout that Android is a single-user system, While traditional “feature phones” will also differs in a number of respects. separate user and group identities are often be based on a real-time operating Dalvik is a register-based machine used for every application. Furthermore, system with all of the functionality – i.e. like most modern CPUs – while provided by the manufacturer, smart- Java machines are stack-based. More- phones are based on an application over, every application is run in its own operating system such as Linux, instance of the virtual machine, while or Windows CE and only base applications Java machines traditionally run in

Enea is a global software and services company focused on solutions for communication-driven products. With 40 years of experience Enea is a world leader in the development of software platforms with extreme demands on high-availability and performance. Enea’s expertise in real-time operating systems and high availability shortens development cycles, brings down product costs and increases system reliability. Enea’s vertical solutions cover telecom handsets and infrastructure, medtech, automotive and mil/aero. Enea is listed on Nasdaq OMX Nordic Exchange Stockholm AB. For more information please visit enea.com or contact us at [email protected]. www.enea.com white paper

2

very restrictive rights are set and appli­ library and is protected by a BSD For instance, it will not be possible to use cations are unable to access anything licence instead of the GPL licence Yaffs2 on modern flash memory types automatically other than their own which protects many of the other without some major development resources. libraries used in Linux. This means that work. In the long run, mobile manu- However, it is possible to share mobile phone manufacturers can add facturers may have look for other file resources. This is controlled by asking functionality to the C library without systems even though there are no clear the user when installing the application having to publish their source code. open source alternatives at present. whether – for example – their own A lot of other code that is included Another challenge faced by smart- phonebook should be accessible, or in the Android concept is protected by phone manufacturers involves the whether the application should be the Apache licence, but there are also actual system layout. These are often permitted to access anything via the parts protected by GPL or LGPL and based on a System-On-Chip (SoC), network. other common open source licenses. where several CPUs – which are often Inter Process Communication (IPC) The wide range of licences used in the running several different operating systems is another area where Android differs platform poses a risk for manufacturers. – have to be able to communicate from other Linux-based systems. While The Bionic C library is by no means efficiently. Android does not include the classic IPC functions are accessible, revolutionary, but it has some inte- any clear directives for the hardware, the preferred IPC is a technology called resting properties besides the license other than minimum requirements for Binder. In many respects, Binder is an stated above. While the library can be the memory and CPU speed. A typical object-oriented communication channel linked statically or dynamically to the smart-phone layout includes a power- like COM or CORBA. However, in Android’s C application, each process will get its ful application processor running – for version Binder is a lot less generic, and own copy of the entire library, placed in example – Linux and a radio processor instead is specially adapted for precisely the process’ address space. This means running a robust, real-time operating this platform. that the code has to be really compact. system such as Enea OSE. This combi- One subsystem in Android that To meet this requirement, a number of nation often includes one or more DSPs has received a lot of publicity is the C special cases have been removed and that offloads the radio cpu by executing library, which is used for all native code. only necessary functionality has been the more complex algorithms. The DSP To avoid the typical license problems implemented. For instance, C++ support often runs another operating system which normally affects companies is very limited. Quite simply, native such as Enea OSEck. To achieve a reliable when they develop products based services and system functionality have telephone, communication paths on Linux, the Android team developed to be written in C. between the various processors have their own version of the standard C The Android team does not view to be robust and effective. Enea’s LINX library. This library is called the Bionic C this as a big problem since they do product can be used to resolve these not really recommend anyone to write problems. LINX simply links together native code. Telephone manufacturers the application operating system with and application developers will be other operating systems. LINX for Linux sticking to Java. The Android team has has been released with open source however recently released an NDK, or code. There are also other solutions native development toolkit, so their available. view on native code may have changed somewhat. Opportunities, Another of the classical problems but Many Challenges for developers of more advanced The biggest problem with Android embedded systems is file systems is that it is not a complete platform, performance. The best file systems for despite the fact that Android phones Linux require the block device to be of are already on the market. For instance, hard disk type. But this is not the case there is still not full support for blue- in smart-phones and other small form tooth, functionality which a lot of users factor devices. Instead, a file system think should obviously be included customised for a block device of flash these days. Nor is it entirely clear how memory type is required. The most manufacturers are supposed to extend common flash file systems for Linux at the platform for their own requirements the moment have problems with either without breaching the public interfaces. performance or stability. The recom- mended file system for Android is called Yaffs2, and with this some success has been achieved in resolving many problems, but others have been added. white paper

3

At present, it is not possible to add with a great deal of commitment, but more open and resemble PCs more, refinements such as a more advanced everyone who looks more in depth at the risks of viruses and other malware camera API without first acquiring Android has to form their own opinions increase. When installing applications, approval from the Android alliance. of whether the information they find is users have to approve the rights given The fact that the platform is not reliable. to each application, but then it is up to complete yet is quite obvious from the The hardware requirements are also the developer of that application not limited documentation available. The too modest. According to the specifi- to abuse these rights. application layer, with all its Java inter- cation, you need at least 128 MB RAM, faces, is very well documented; but for 256 MB flash and a CPU operating at a Conclusions anyone who is interested in the rest of minimum of 200 MHz. Despite its problems, Android is the platform, there is only document­ However, Android is intended the hottest thing to have happened in ation in the form of source code, as primarily as a platform for the high end the mobile industry in a long time, and well as forums and blogs. Of course, segment, which will surely mean that most mobile manufacturers have major it is great to have a large community most manufacturers will feel obliged to projects in the pipeline. It also creates exceed the minimum requirements by some exciting new challenges and a good margin. opportunities for service companies Another problem area is how the and operators. income for the third party applications will be handled. Android has its own For more information: software store, known as Android Market, www.enea.com/android which is fully controlled by Google. It is not known whether the income from Android market is distributed between The Android logo is reproduced from members of the Open Handset Alliance, work created and shared by Google and but this is highly likely to be a matter for used according to terms described in the dispute. Creative Commons 3.0 Attribution License. And finally, there is the question of security. As mobile phones become

Enea®, Enea OSE®, Netbricks®, Polyhedra® and Zealcore® are registered trademarks of Enea AB and its subsidiaries. Enea OSE®ck, Enea OSE® Epsilon, Enea® Element, Enea® Optima, Enea® Optima Log Analyzer, Enea® Black Box Recorder, Enea® LINX, Enea® Accelerator, Polyhedra® Flashlite, Enea® dSPEED Platform, Enea® System Manager, Accelerating Network Convergence™, Device Software Optimized™ and Embedded for Leaders™ are unregistered trademarks of Enea AB or its subsidiaries. Any other company, product or service names mentioned above are the registered or unregistered trademarks of their respective owner. WP52 082009. © Enea AB 2009.