With Android 4.4 KitKat we have already seen quite a few new features including a modernized phone dialer, improved Google Now integration and faster multi-tasking. What you might not know is that deep inside KitKat there is also a hidden experimental feature that could forever change Android as we know it.
The new ‘feature’ goes by the name ART, as in Android Runtime. The goal of ART is to replace the aging Dalvik runtime, and is the fruits of over two years of work from Google.
While the first whispers about ART residing in KitKat go back to as early as last week, earlier today Android Police dug in a bit deeper to bring us a bit more information on what to expect and how to even test out the new runtime for yourself. Although ART isn’t turned on by default in Android 4.4 KitKat, it can be found within Developer options and can easily be switched on.
Of course there’s a reason Google has yet to make ART the default runtime. Right now, ART is still very much a work in progress, and Google warns that using it can cause system instability and can risk breaking apps.
With Dalvik, each and every time you open an app, a bunch of code needs to be compiled using the Just-in-Time compiler. This method takes a pretty hefty toll on your smartphone, as the process itself isn’t particularly efficient.
That’s where ART comes in. Instead of doing all this compiling work each and every time you open an app, ART uses a Ahead-of-Time compilation method that pre-compiles bytecode into machine language from the moment that you first install an app.
Because ART no longer needs to run all that interpreted code when starting up an app, the end result is that apps will launch quicker and will run more smoothly. While ART will likely get even better as Google continues to work on it, in the current KitKat build, ART reportedly was able to cut down execution times in half for nearly every application thrown at it.
With apps launching more efficiently, less stress is put on our mobile device’s processors and other components, and this leads to not only a better Android experience but less power usage as well, meaning that ART could indirectly help out by extending battery life.
On the downside, the AOT method takes up a bit more space when installing apps and results in a much longer installation time for more complex apps — though it sounds like the benefits far outweigh these minor annoyances.
If you are currently running Android 4.4 KitKat, testing out ART is as easy as going to Settings> Developer Options> Select Runtime.
Keep in mind that ART isn’t fully ready for primetime just yet, so test it at your own risk. It’s also worth noting that if you are using a ROM, there is a chance that the gapps package could cause serious crashing issues — so again, proceed at your own risk.
While it’s nice to see Google allowing developers to test out ART on Android 4.4 KitKat, the bigger takeaway is that the days of Dalvik are almost over and we could soon be looking at a new era for Android, one where some of the so-called app/UI lag is behind us for good.
When can we expect ART to arrive as the default in Android? While we’d love to say something definitive like “you’ll see it in Android 4.5″, the honest answer is that it will arrive when it’s ready. That said, if Google has enough confidence to let folks take it for a spin in KitKat, the official transition to ART might not be terribly far off.
What do you think of ART based on what we currently know? Excited about the idea of seeing a Dalvik-free Android future?
Like this post? Share it!
wow, it’s cool. i hope new versions of Android with ART will be compatible with smartphones in sale now.
Hey Andrew Grush, I tried it on my N5 and noticed a substantial difference in the opening of apps. I would love it if you folks at AA would do a side by side comparison video of Dalvik vs, ART. That way I would know if I took the placebo pill or not :)
Why don’t you make a comparison video?
I’m interested in this as well and would be greatly appreciative! I am sure others would be too as the majority of us do not have access to 4.4 or a N5 yet.
I only have one N5 which makes comparison difficult. I was hoping the geeks at AA would have a couple lying around to do it with :)
You just record the same N5 twice and you are good. I’ll try it on my roomates phone later.
Is it possible that the camera app is working faster as well now?
did you notice improvements in battery life
Only had it half a day before changing.
You mean battery lasted only half a day
No, sorry. I only had it half a day before switching to ART so I can’t compare.
“On the downside, the AHT method takes up a bit more space when installing apps and results in a much longer installation time for more complex apps — though it sounds like the benefits far outweigh these minor annoyances.”
AHT should say ART.
Great read, Andrew – don’t forget to proof-read your work before publishing!
I’m interested to see if this will in fact make a noticeable difference once I get my hands on 4.4.
not really, AHT refers to Ahead-of-Time compilation, not the new ART ;)
Correct, Javier — I’m refering to Ahead-of-Time compilation. Though to be fair to Dan, I still made a typo. It should be AOT not AHT… fixing now. :)
Right, JIT vs AOT :)
I noticed WhatsApp decided to crash and won’t even install… I think we can blame ART for that…? Anyone seeing the same?
yep me too, I’m on Nexus 4, android 4.4 with ART on, whatsapp issue on it.
Sounds like some solid work Google! Once again it proves that KitKat isn’t the minor upgrade people talk about
That’s awesome! Can’t wait. Although I’ve never experienced the “so-called app/UI lag” on any high-end smart phone.
Download Facebook->Open Facebook->Scroll->LAG regardless of how powerful of a smartphone you have.
Agreed. Although Google “fasterbook” for examples of how fb is dragging its feet with lag.
First casualty I found is WhatsApp… Can anyone else confirm that it’s effectively not working when switching to ART?
Yup. Same here. Instantly crashed in the background and wouldn’t restart. Shame really as that’s a showstopper for me.
Did you try to uninstall and re-install it? As I understood, the AOT compilation happens during installation so figured it’s worth the try.
Not yet. Enabling AOT forced the phone to optimise all apps anyway so I’m guessing it wouldn’t help
You’re probably right then
Update: Turned the new runtime back on, all apps updated. Uninstalled WhatsApp. Re-downloaded WhatApp – the install of which seemed to take a LOT longer than usual and then it crapped out with a package error. So WhatsApp not only won’t run, it straight up won’t install on the new runtime. Back to Dalvik we go….for now :)
Further update: DO NOT UPDATE YOUR RUNTIME IF YOU EVER WANT TO RUN WHATSAPP AGAIN!!!
I now cannot reinstall the app at all, even after several reboots and installation attempts. I’ve even tried downloading the apk directly from the developer.
It would seem that enabling this runtime makes some permanent updates to your phone that could harm installation of apps, even if you switch back to the old runtime.
Are you getting Error 24 when trying to reinstall from Google Play? Try this fix in either case: http://forum.xda-developers.com/showthread.php?t=2027663
Yup. Actually error -24 :D Slight problem with the instructions on your link:
1. I’m not rooted.
2. There’s nothing in /data let alone another folder called data
Unfortunately you need to be rooted to see the contents of that folder under /. You’re going to have to factory reset I suppose.
Gnnnnnnnnn. That’s really annoying! :D I’ve had this phone 2 days and I’m already having to reset everything?! ffs.
When KitKat comes to S4A I’m going to stay ART
I’ll use those apps that are ART compatible.
It sounds like the performance will be marvellous
I hope my battery life doubles…
I had the same problem, but i can install whatsup in dalvik from Google Play Web
Well this is scary, I use whatsapp big time and currently my phone is updating to the new runtime
I should’ve read the comments first :o.
nope it’s probably some odex or other app files that were left over that aren’t letting the package manager install it
try to install via adb and look up the error code given
Yes because a master reset is soooo hard to do.
Didn’t say it was hard but its undeniably time consuming and frustrating. Plus, you’re guaranteed to lose a few things in the process: game progress and the like.
That’s funny – just switched over to ART, confirmed the issue with whatsapp, went back to dalvik and I have no issues with whatsapp. Started as normal.
“the end result is that apps will launcher quicker…” It should be launch
Also “On the downside, the AOT method ” should be ART :)
No, AOT= Ahead of Time comilation
Oops I didn’t even read that part, I just saw AOT when everywhere else there’s ART :)
Oh and *compilation >:D
I think a question most of us have is: how stable is it? Is it stable enough to use in a daily basis?
Can someone that has been using ART share the experience?
It’s not super stable, but stable enough. One app crashed. (Whatsapp)
I tried ART and the phone was definetly a lot smoother, but some apps kept crashing.
This is some exciting stuff. I’m really looking forward to this. Hopefully the android team can have this ready for the next major OS release. o/
Can’t find this option in my developer options. Using a 2012 nexus 7 WiFi only