Secret Android Speedup WORKS

I’ll admit I have yet to perform any scientific calculations on the effectiveness of the following change, I’d have to test it and then revert to the prior setup on my devices to do it correctly. Seat of the pants? This is a great change.

You’ll need to have Android KitKat 4.4.2 on your device for this to work. I believe right now that means having a Nexus 5 phone or a Nexus 7 tablet.

Oracle, Schmoracle

Developer options

Developer options

Oracle sued Google in 2012 claiming that the basis for the Android operating system running Java, the Dalvik virtual machine, infringed on patents oracle had acquired with it’s purchase of Sun Microsystems.

Oracle lost their case, but Google learned a lesson and started building their own runtime.

Google is changing their operating system to use a new runtime that should be immune to further challenges from Oracle.

Compile Once

The prime difference between the two runtimes is the way code (for apps) is compiled and stored on the device. The new Google runtime, “ART”, essentially compiles app code once, storing the machine code app on the device for use as a “native” application.

The ART process is called Ahead-Of-Time compilation. Dalvik uses a “Just In Time” compilation process, so a lot of compiling is done when the app is requested. An advantage to the Dalvik process is that apps can use less storage.

The ART advantage is that start times for applications will be dropped significantly with the potential for better efficiency during execution of the application as well. While the advantage of the change in the compilation process won’t be fully realized until developers figure out how to optimize their code, users should benefit immediately from a faster experience with their devices AND a noticeable improvement in battery life.

Nexus 7 Developer

Change runtime

Change runtime

Before you can access the necessary “developer options” on a Nexus 7 tablet with KitKat 4.4.2 or above, you need to gain access:

  • Open “Settings” menu.
  • Scroll all the way down to the “System” menu section.
  • Click “About Tablet”.
  • Look for “Build number” section and tap it until it announces you’re a developer.

Android Run Time

My Nexus 5 phone was already enabled with developer options. Once you’re on the settings screen, scroll down to the bottom and select “{} Developer options”. Select “Select runtime” from that screen and them select “Use ART” on the popup screen.

Once you’re done with your selection, your device will restart and initialize all your installed applications for use with ART. It could take a few minutes if your device is loaded with apps.

If you want to revert to using the “production” (versus experimental) runtime, repeat the process except select “Use Dalvik”.

So Far, So Good

I have had no application problems with ART, everything on both my devices has run fine.

Startup time for all apps is notably reduced, although I haven’t yet timed the difference any of them. The best example so far is FourSquare, an app that has never leapt open on any screen I’ve had. It opens VERY quickly on both devices now. Other apps perform similarly.

Same thing with battery life, it appears to be improved on both the phone and the tablet. If I had to guess from the small sample of days, I’d say a minimum 10% better battery life.

Google states ART is experimental and to proceed at your own risk. (click here)

Important: Dalvik must remain the default runtime or you risk breaking your Android implementations and third-party applications.

I expect the risk of bricking your device is very low with this release, it’s a good thing to try if you have the ability.

** UPDATE 12/31/2013 ** Looks like “Dish Anywhere” chokes with ART, it fires up but doesn’t connect to the DVR for streaming. With the USA versus Canada World Junior Championship hockey game on, I dropped the Nexus 7 back to Dalvik so I could have it running while working at my desk.