Tag Archives: Android

Android vs. Linux – Which OS is better?

Is Android A Better OS Than Linux?

Android has established itself as an important operating system for mobile devices. Google developed Android as an open source OS based on the Linux kernel. Google selected the Linux kernel because of its proven driver model, existing drivers, process and memory management, networking support and several other core operating system services. However, the Google team had to make several changes to make Android capable of operating mobile devices successfully. Differences with standard Linux are highlighted here.

The target architecture

Although the Linux kernel supports several architectures, right now, Android supports only two: ARM and x86. The ARM platform is more prevalent on mobile phones while the Android-x86 targets mainly the Mobile Internet Devices or MIDs used for general-purpose desktop/laptop/server computing systems. This being the fundamental difference between the two Operating Systems, it provides a strong insight into further divergence between the two.

Modifications in the kernel

Android does not use the standard Linux kernel straightaway, but uses it with some enhancements. These include alarm driver, shared memory driver, inter-process communication interface, power management, low memory killer, kernel debugger and logger. Google has contributed all the kernel enhancements back to the open source community under GPL.

Bionic C library

The GNU C library used by most Linux distributions makes use of the Native POSIX Thread Library or NPTL, which offers high performance, especially in server applications. However, disk space footprint and memory requirements of NPTL are far too large for resource-limited systems such as mobile devices.

This led Google to create a new C library called Bionic. It has fast execution paths, avoids edge cases and remains a simple implementation. As mobile devices are single user systems, for security reasons Google has removed the settings for groups and passwords, keeping only a unique user id and group id. Bionic operates with the limited CPU and memory resources available on Android platforms.

The Dalvik Virtual Machine

Android uses a virtual machine to run applications. Most top cell manufacturers such as Samsung, Motorola and Nokia use J2ME, a mobile optimized version of the Java virtual machine. In contrast, Android uses the Dalvik Virtual Machine, which is a standard Java platform. The dex files used by Dalvik are more compact and optimized to perform well on mobile devices with slow CPUs, limited memory, no swap space and limited battery power.

File system

Most desktop/laptop/server applications use magnetic hard disks, which the standard Linux systems manage with the latest Ext journaling file system. However, magnetic drives are physically too large, too fragile and consume too much power. To provide a robust file system, embedded systems use solid-state memory devices such as NOR for code execution and NAND for storage. Block erasure and memory are important features of solid-state memory, which the Ext file system does not handle. Therefore, Android uses an optimized Linux flash file system called YAFFS and this deals with lifetime limitations, bad block management and error correction for maintaining data integrity in NAND flash systems.

Power management

Standard Linux systems manage power though APM or ACPI. Android does not use either, relying more on its own PowerManager module, which is a Linux power extension. The module has low-level drivers for controlling the peripheral supported such as screen display and backlight, keyboard backlight and button backlight.

How does an Android process sense motion?

The Android 4.4 Operating System from Google is able to track your motion in real-time. You can test this with the Google-map application when traveling – your current position as shown on the map will shift as you move. Although this was feature available earlier as well, Google has mandated that 4.4 version onwards, Android will be using this function in the background while it has turned the application processor off. Google has introduced this change to save battery life.

To comply with this mandate, manufacturers will now have to offload this function from the application processor and transfer it to a sensor hub. In anticipation of this mandate from Google, InvenSense has already transferred those functions into their patented DMP or Digital Motion Processor, which they have announced as their six-axis MEMS combo processor for an accelerometer and a gyroscope. Therefore, smart sensors will be providing the real-time contextual awareness functions in the background of your smartphone, while its screen is switched off.

This can be done in one of two ways. One of them may be to allow several new sensor functions to be run in a sensor hub. However, this has the disadvantage of adding cost to the product. A much better way, followed by InvenSense, is to include the processing within the sensor itself, which means smartening up the sensors. The MPU-8515 is a six-axis digital motion processor developed by InvenSense for this purpose.

Inside the MPU-6515, there is a three-axis gyroscope along with a three-axis accelerometer housed within the same package. With an enhanced version of their DMP built into their MPU, InvenSense is able to handle the specific functions that the Android operating system mandates running external to the application processor. With the MPU-6515, sensors can remain on for more time and supply more real-time data for location and context awareness yet reduce battery consumption.

In practice, the Android operating system shuts down the application processor when there is no activity input from the screen. It wakes up only when it receives a significant motion interrupt while rejecting false triggers to switch the application processor back on. Significant motions include pedometric functions such as detecting and counting steps while running in the background.

Processing information accurately when the application processor is turned off involves inertial location tracking. That requires processing rotation vectors involving six axes. The MPU-6515 does this by amalgamating the outputs of three axes from the gyroscope and three axes from the accelerometer sensors and buffering them periodically between the significant motion interrupts using a new batch mode.

The MPU-6515 can work in both modes – with a hub or in a hub less mode. This additional functionality is helpful for situations where the Android operating system has turned off both the application processor and the hub. Using this combo gyroscope and accelerometer chip with enhanced digital motion processor, InvenSense has been able to enhance its handling of contextual awareness for the Android operating system.

Manufacturers can easily use the MPU-6515, measuring a mere 3x3x0.9 mm, in smartphones, wearables, tablets and in devices for Internet of Things. Those using the earlier device from InvenSense, the MPU-6500 can easily replace the older chip as both are pin-compatible.

How Are Sensor Hubs Helping Android?

The duties of a sensor hub are rather specific. They usually take the form of an additional micro-controller unit, a coprocessor or a DSP that integrates data from various sensors and processes them for the benefit of the main central processor. Not only does this technology off-load several jobs from the main central processing unit of a product, it saves battery consumption and provides an upward jump in its performance.

Most smartphone, tablet and wearable manufacturers including application developers are targeting mobile devices in the near future that will always be aware of their surroundings and activities. This will lead to providing meaningful results and content to the user. Inputs for the Always-on Context Awareness will be delivered by numerous sensors located within a mobile device, a separate micro-controller or a sensor hub fusing and computing their data.

PNI Sensor Corp. is making such a tiny 2×2 millimeter package as a sensor hub. It is by far the smallest, smartest and the lowest power-consuming implementation of a sensor hub. Consuming barely 200µA, this sensor hub implements the complete sensors function for the latest KitKat Version 4.4, as mandated by Google. Furthermore, PNI has incorporated all the KitKat functions without implementing an extra processor. This will greatly extend the battery lives of Android devices, even if they are using all their functions 24×7.

Android device manufacturers have two other choices. They could write their own fusion software and have them run on processors such as from Atmel or ARM. They could even license such software from others. On the other hand, OEMs could use smart sensors that have some functions implemented on-chip, while running the rest on the application processor. However, both the above methods are power-hungry and likely to consume up to ten times the power compared to the solution offered by PNI.

SENtral-K hub (the K standing for Google’s KitKat), from PNI can handle all the hardware connections from the MEMS sensors, while managing the virtual sensor functions in the software including the dedicated state-machine logic. The hub uses a tiny processor, the Synopsys ARC, along with specialized state-machines. Together, they achieve 140-thousand FLOPS or floating-point operations every second, while consuming less than 200µA at 1.8V. Being sensor agnostic, SENtral-K allows OEMs to select the lowest power consuming sensors from all different suppliers. This includes sensors such as for ambient light, pressure, proximity, magnetometer, gyroscope, accelerometers and many more.

SENtral-K combines all the outputs from the raw sensors and provides KitKat with the necessary functions it demands. These include functions such as step-detect, step-count, significant motion, linear acceleration including all the functions based on location and others that Google wants to incorporate at all times for their apps such as Google Now. The tiny chip comes fully pre-programmed to handle all functions demanded by Google’s KitKat 4.4.

For example, SENtral-K is capable of handling Android 4.4 KitKat functions such as those with nine degrees of freedom or DOF – 3-axis magnetometer, 3-axis gyro and 3-axis accelerometer. It can also handle six DOF – accelerometer and gyro or accelerometer and magnetometer. Other functions it can handle include Timestamp, Data Batching, Uncalibrated Sensor, Calibrated sensor, Significant Motion, Step Detect/Count, Linear Acceleration and Gravity.

What is the difference between Linux and Android

Those of you who use the Linux OS on their desktops know that it is vastly different from the Android OS typically used on the mobile phone or tablet. One of the glaring differences one notices in the two OSs is that Android is geared heavily towards the touch operation, whereas Linux is limited to operations with a keyboard and mouse. However, both operating systems have a common origin and share the same kernel.

Linux can be best defined as an operating system suitable for running on a fixed or limited function device – for example, embedded Linux on a smart refrigerator or toaster. This allows the device to take full advantage of the massive processing power of Linux and utilize the peripherals to the utmost. When used on a fixed function device, embedded Linux has unparalleled operating efficiency and performance, uses minimum memory footprint and power, while providing the user with the utmost ease in using the device for its intended purpose.

Smartphones and tablets, although embedded devices, are definitely not fixed-function (different models with myriad functionality). The sheer volume of these devices tends to skew the traditional definition of embedded Linux. With increase in the capabilities of the hardware, the definition of embedded Linux also undergoes a change, especially where limitations in storage and processor capabilities are concerned.

On the other hand, Android, although a desktop-like Linux mobile OS and platform, allows users (manufacturers) to define their own usage patterns. It also allows vendors to update and upgrade the platform dynamically. However, some applications blur the distinction between Android and embedded Linux.

One of the examples of this type of application can be seen in the television set-top box. This used to be a fixed function device running on embedded Linux. With the increase in functionality and dynamism of the TV, the set-top box now has app downloads and software upgrades similar to Android devices. Moreover, Android is undergoing changes similar to what embedded Linux is facing. It is growing beyond being just a tablet operating system or a mobile communication system.

What many people do not know is Android and Linux both use the same kernel. However, Android focuses on the vertical integration of its user space components with the Linux kernel itself. In most respects, Android can be seen as another flavor of embedded Linux – just as each embedded Linux is tailored to the architecture of the CPU, peripherals, SoC support and purpose of the device it is expected to run on.

The specialty of Android lies in its ability to be customized and optimized, yet maintaining common components and standardized APIs. This allows the environment of application development to be more consistent. Of course, that also means the Android core images have a very large footprint to maintain this consistency or standardization. Additionally, this increases the surface for vulnerability profiles.

With Android, you have a large amount of functionality. Of late, some of the leading developments for supporting new graphic accelerators and SoCs appear first in Android environment. They are then pushed upstream to the other projects involving the Linux kernel.

Tracking sleep, activity & food – the Jawbone UP app

Imagine being able to track every calorie you burn, every calorie you consume and every minute you are sleeping? We came across the Jawbone UP and are just amazed at the capabilities this app possesses. It needs to be coupled with the UP wristband to function (available on their site for about $129 or on ebay for less than $100). The app is compatible with iPhone and Android.

Here’s some of the amazing features:

Sleep and nap tracking – it tracks your sleep including the amount of light sleep vs deep sleep.

Power Nap – need a power nap? UP will let you get one in and wake you up after the perfect amount of sleep is achieved (26.5 minutes according to the UP web site).

Smart Alarm – UP will wake you up at the best possible time in your sleep cycle – this will help you feel more awake and refreshed.

Food and Drink Tracker – helps you keep track of what you eat and drink to get the whole picture of your health.

Activity Tracker – UP tracks every calorie you burn, every activity you do.

There are many more features (like a mood tracker) that you can also monitor but the bottom line is that this system helps you keep track of every bit of your lifestyle and delivers information to help you live a healthier life and encourages you to keep moving forward. Sound interesting to you? We’re hooked! We love the idea and are placing our order today for our first one. We’ll keep you posted on our experience with it.

Android smartphone sales up a whopping 886%

Research firm, Canalys, reports that Android platform smartphone sales increased an amazing 886% in the 2nd quarter.

An even bigger accomplishment is the fact that Android based phones now account for 34% of the market – topping all other platforms including Apple’s popular iPhone platform.

The press release from Canalys also reports that Android devices combined reached almost 475,000 units in Q2 2010 from no presence in the country a year ago. The Google-backed Android is available in phones from HTC, Motorola, Samsung, Sony Ericsson and LG, among others.

In total, the US market for smartphones is the largest established market in the world, and it still continues to show rapid growth. In the 2nd quarter of 2010, there were 14.7 million smart phone units shipped.

Keeping up with the newest smartphones

Buy a smartphone in May, chances are that you can buy a bigger – better – upgraded – faster – prettier – cooler phone in June. It’s been that way for years with PCs and notebook computers so why should the smartphone market be any different?

I’m still waiting on my backordered HTC Incredible, but we already have 3 of them in service on our plan.They’ve quickly become the all-time favorite phone at West Florida Components. Powered by a 1GHz processor, these phones are fast! Other favorite features are the 8MP camera, the GPS and the large touch screen. We’re already watching and waiting to see what other gee-whiz features will be added on to this Android-based phone in V2 but we all agree the single biggest improvement they could make to this phone would be an improved battery. Then we won’t have to close down unused apps to preserve battery life.

One thing is for sure: by the time my backordered HTC Incredible finally arrives, the next ‘gotta-have-it’ phone will already be available. That gives me another 2 years to figure out which phone I just have to have next!