Android Lollipop and Nexus 9 launch, officially unveiling NVIDIA Tegra K1 64 bit
Google launches Android 5.0 "Lollipop" with full ARMv8-A 64 bit and OpenGL 3.1 + AEP support on the Nexus 9 tablet powered by the NVIDIA® Tegra® K1 64 bit mobile processor.
In what is surely the most casually cool approach to a product and major OS launch in living memory, Google posted a blog last Wednesday to unveil Android version 5.0 (named Lollipop) and a suite of new Nexus products. Leading the Lollipop charge is the Nexus 9 tablet powered by the NVIDIA Tegra K1 64 bit mobile processor. The Nexus 9 ushers in a host of next generation features including ARMv8-A for the first time on Android and OpenGL ES 3.1 with AEP for the first time on a Nexus device. The performance of both the dual-core 64 bit CPU and the 192 CUDA core NVIDIA Kepler GPU in the Nexus 9 give developers unparalleled performance in a mobile device.
Android Upgrades to 64 bit
Utilizing NVIDIA's custom designed 64 bit Denver CPU, Google has upgraded the Android kernel, framework, SDK & NDK, and core services to the ARMv8-A 64 bit architecture. In addition to the commonly quoted advantage of more easily addressing RAM of greater than 4GB, ARMv8-A provides a host of new features:
- New AArch64 execution state and A64 instruction set.
- 31 general-purpose 64 bit registers.
- Dedicated stack pointer (SP) and zero register.
- New program counter (PC) that is no longer accessible as a register.
- Most instructions accept either 32 bit or 64 bit arguments.
- SIMD/NEON has 32 128 bit registers which are also accessible via VFPv4.
- SIMD/NEON now supports double-precision floating point.
- New cryptography instructions for accelerated AES and SHA-1/SHA-256 (Google is using these for full disk encryption on new 64 bit Android Lollipop devices including Nexus 9).
Java applications run automatically as 64-bit apps without modification. Apps written in native code (C/C++) and compiled with older versions of the NDK run as 32 bit but can be recompiled as 64 bit with NDK r10c which supports the ARVv8-A ABI.
Tegra K1 and Android Lollipop Unleash Next-Gen Mobile Graphics
At GDC in March, Khronos announced OpenGL ES 3.1 which brought a host of new graphics features to mobile 3D developers. This was a great step but NVIDIA knew that developers wanted more. Google answered the call with the Android Extension Pack (announced at Google IO in June) and NVIDIA is the first vendor to support AEP; AEP is available on the Nexus 9 and will be on SHIELD tablet when it updates to Android 5.0.
AEP adds full-scale OpenGL functionality and extensions including geometry shaders and tessellation. With OpenGL ES 3.1 and AEP, mobile developers can get desktop level rendering and implement advanced rendering methods such as global illumination and some techniques from AZDO. For those wanting to profile or debug 3D games and apps, be sure to check out NVIDIA's free Tegra Graphics Debugger.
To get up to speed with cutting edge graphics on Android, check out the GameWorks OpenGL Samples. And as an example of what is now possible on Android with the Tegra K1 processor, take a look at "Rivalry", the stunning demo Epic Games created with Unreal Engine 4, AEP and the Tegra K1 Kepler GPU.
ART Ousts Dalvik
To further improve Android's already svelte feel and battery efficiency, Google has switched to a new Java runtime in Lollipop. The Android Run Time ("ART") uses a mix of ahead-of-time (AOT), just-in-time (JIT) and interpreted code. ART generally results in faster and more efficient execution of Java code, is fully 64 bit compatible and has improved garbage collection. There are few things to note with the new runtime:
- ART is typically faster favoring AOT over JIT compilation.
- App installation may take slightly longer due to AOT compiling.
- ART is more strict when using the Java Native Interface (JNI) to run C/C++ code; JNI code which ran without errors on Kitkat may crash on Lollipop.
- Java and C/C++ native code now share the stack. If your Java or native code sets custom stack sizes, carefully review your code. In particular check calls to
pthread_attr_setstacksize()and any explicit stack sizes used in Java's
- Code from some obfuscators, optimizers and custom build tools which generate non-standard code or code which is incompatible with compacting garbage collection may exhibit issues.
Android TV Launches
One of the highlights of Google IO 2014 was the announcement of Android TV. NVIDIA has been working with Google on Android TV and sees it as an exciting new platform for game and application developers. With Android 5.0, Android TV officially launches and it's time to prepare for the coming of Android TV devices.
To assist developers in getting started, NVIDIA has put together the handy Android TV Developer Guide to supplement Google's new SDK documentation. Be sure to check it out, dust off your game controllers, and get ready for Android in your users' living rooms!
The first thing you notice when using Lollipop is the new UI. It is made using the new Material Design specification and does an amazing job of making interactions on the device far smoother and more interactive. Filled with subtle movements and contrasting colors, the UI pops and has a great modern feel.
While Material Design may not fit for game developers who are maintaining a theme in their game with a custom UI, it's a great option for those using the core Android UI system. For apps and games that use the system UI, we highly recommend switching to this new, fresh approach. Google has even open sourced all the system icons for use on Android, the web or wherever you see fit.
Lollipop has a new camera API that's particularly attractive for developers doing computer vision, augmented reality or other tasks that require higher end image formats. The Camera2 API provides methods to capture full resolution raw images in YUV or Bayer RAW formats at up to 30fps. Developers also now have access to H.265 video encode and decode.
Android's notifications have always been a strong point and with Lollipop they again drive the industry forward. Lollipop notifications can now include additional metadata to assist the system ranking and ordering them. They can also optionally appear on the lock screen and, as enabled in Android 4.x, can include custom actions for user interaction.
To say there's a lot in Lollipop is an understatement! The above are the highlights for developers and we'll be covering more goodies (like the new Battery Historian tool) in the coming weeks as devices running Lollipop become more readily available.
Finally, with all the new features, speed-ups and enhancements come a few gotchas for developers. We're in the process of compiling a list of common issues found in our QA testing of Nexus 9. Check back in a few days for a post on things to watch out for on Android Lollipop.