Android and openness is something we talk about all the time, but the recent developments in the industry point towards inherent flaws with this very premise. Be it from bloggers, political institutions or corporations, Android is seemingly not open enough. The “War on Openness” is ironically becoming an open war, where many players are increasing their stakes and scope to try and land a bigger hold - or at the very least, restrict Google’s - on what is the world’s...
Speed Up Your Nexus Device with Qualcomm-Optimized KitKat Dalvik and Bionic Libraries
Ever wonder how despite its less than jaw dropping specifications, the Moto X still manages to score quite well in many benchmarks? Unlike some of the other major OEMs out there, Motorola doesn’t rely on benchmark-specific application detection and questionable “optimizations.” Rather, they actually employ genuine speed tweaks, in the form of optimized Bionic and Dalvik libraries.
But before delving further to learn about how you can use optimized libraries to improve the performance on your own Qualcomm-based Nexus device, let’s spend a few minutes talking about these libraries in question. After all, you should know what you’re getting into when incorporating any new system-level tweaks and mods.
Let’s start with Bionic. Bionic (libbionic) was originally created by Google for use in Android, as a derivative of the standard GNU C library originally found in BSD (glibc). Bionic differs from the standard C library in that it is a much smaller library than the GNU C library. Furthermore, it is designed for relatively low powered CPUs like mobile devices. In practice, it is used for various basic math and memory operations.
Now, let’s take a look at Dalvik. Dalvik is the virtual machine used in Android that has much in common with Java virtual machine. But rather than executing standard Java class files, Dalvik relies on DEX files. This is the same DEX that you’ve undoubtedly already heard of when talking about ODEXED and DEODEXED ROMs.
You may also recall how we broke the news on the new ART runtime compiler introduced into Android 4.4 KitKat. ART, which serves as a drop-in replacement for the Dalvik VM, is far more optimized thanks to ahead-of-time compilation rather than Dalvik’s just-in-time compilation. ART compatibility isn’t quite 100% yet, but it is already good enough for many. And while ART necessarily requires greater storage space usage on installed apps, the performance gains may be worth the added storage footprint. Unfortunately though, the popular Xposed Framework is not compatible with ART—and it won’t be for quite some time, if ever.
So what does any of this have to do with the real world performance gains we all crave? Simple: Loading more optimized libraries can potentially result in improved performance. To see this in action, let’s take a look at a particular thread by XDA Senior Member kszaq, which demonstrates how more optimized Bionic and Dalvik libraries can be used on various Qualcomm-based Nexus devices to improve performance.
Where do these optimized libraries come from? The optimized Bionic library comes from the open source Code Aurora Foundation, and the optimized Dalvik library comes from the Moto X. So why weren’t these just implemented into stock Android? That’s a bit harder to answer. The Dalvik optimizations from the Moto X are closed source, so it makes sense that Google would not want to include this in the AOSP and in devices with official AOSP support. The Bionic optimizations from the Code Arora Foundation, on the other hand, are open source. But perhaps, Google simply did not want to have these hardware-specific optimizations a part of the Android as a whole.
If you’ve been wanting to optimize your Qualcomm-based Nexus device’s performance but don’t want to use ART, you should consider implementing these optimized Dalvik and Bionic libraries. Make your way over to the original thread to get started. Just be sure that you have a Nandroid backup before flashing these, as there’s no simple “undo button” when modifying system libraries.
Please note, however, that this only is of benefit to Qualcomm-powered devices. Naturally, CAF’s optimizations will not have any beneficial effect on non-Qualcomm hardware. Furthermore, the Moto X’s Dalvik optimizations are largely unnecessary on non-Nexus devices, as other vendors also use hardware-specific Dalvik optimizations. Basically, you’ll only find this useful for the Google Nexus 5, Nexus 4, and Nexus 7 (2013)—all of which are powered by various Snapdragon chipsets. And it should go without saying that these optimizations are only valid for near-stock, AOSP-derived KitKat ROMs.
Want something on the XDA Portal? Send us a tip!
Smartphone cameras have advanced so tremendously over the past few years that they have almost completely replaced point and shoot digital cameras for the most of us. Furthermore, since our smartphones are always with us, the majority of us end up taking tons of photos throughout the lifespan of our devices. But what happens to all the old photos you take? Do you store them on an external hard-drive or keep them backed up to an online cloud service like Flickr? Let us know what your favorite way of storing old photos is and why.
Before the release of Android 5.0 Lollipop, the Holo Design guidelines served as the official reference for Android design, right from IceCream Sandwich to KitKat. However, updates to the guidelines were few and far between, leading to a lack of synchronization between Android design and current UI/UX trends. Google seems to have learned from their mistake the last time around, and earlier this week, a significant update was released for the Material Design guidelines, marking the second revision in less...