Will Verduzco · Dec 27, 2013 at 11:30 pm

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!

Will Verduzco

willverduzco is an editor on XDA-Developers, the largest community for Android users. Will Verduzco is the Portal Administrator for the XDA-Developers Portal. He has been addicted to mobile technology since the HTC Wizard. But starting with the Nexus One, his gadget love affair shifted to Google's little green robot. He is also a Johns Hopkins University graduate in neuroscience and is now currently studying to become a physician. View willverduzco's posts and articles here.
Mario Tomás Serrafero · Jul 3, 2015 at 11:10 am · 3 comments

New Snapdragons: Some Context & Contrast

It hasn’t been a good year for Qualcomm so far. Every device featuring the Snapdragon 810 has had a less-than-stellar fate, be it because of overheating complaints or actual decreased sales. HTC is in a particularly worrisome situation, and Sony’s Z4 is slipping down Japanese charts just over a week after its release. The G Flex 2, Mi Note Pro and Z3+ all saw complaints as well. Even MediaTek is seemingly getting an advantage over this.   But a particularly...

XDA NEWS
Aamir Siddiqui · Jul 3, 2015 at 10:12 am · 1 comment

Google To Launch Next Gen Android One On July 14

The first gen of Android One devices to be launched in India in September 2014 were decent starter smartphones, featuring budget specs and a promise of fast updates. However, the phones did not pick up as big a response as Google hoped. Now, as per a report by The Economic Times, it appears that Google is rethinking their strategy towards Android One in India. The first gen Android One devices focused on first time smartphone users, but were flawed in...

XDA NEWS
Jimmy McGee · Jul 3, 2015 at 06:00 am · 2 comments

Droid Turbo Lollipop OTA, 2015 Moto G Leaked – XDA TV

Android Lollipop for the Droid Turbo has been released. That and much more news is covered by Jordan when he reviews all the important stories from this week. Included in this week's news is the announcement of the 2015 edition of the Moto G and be sure to check out the article talking about Android Lollipop for the Huawei Ascend Mate 2. That's not all that's covered in today's video! Jordan talks about the other videos released this week on...

XDA NEWS
Share This