Just An Application

November 7, 2008

Dalvik Running Standalone On MacOSX

Filed under: Android, Dalvik, Java, Java VM, MacOSX — Tags: , , , , — Simon Lewis @ 5:35 pm

When the source for Google’s Dalvik Java VM became available as part of the Android open source release I thought I would see whether it was possible to build and run it standalone, i.e not as part of Android.

The answer is yes, and here’s a shot of it running in the debugger under Xcode on MacOSX to prove it


Unfortunately the canonical HelloWorld application on its own doesn’t make for particularly interesting viewing

With verbose logging on the output is certainly a lot more voluminous.

Here’s the debugger window scrolled to different positions to show all of it






  1. Just out of curiosity, how hard was it to break Dalvik out of the build system and do this?

    Comment by John — April 17, 2009 @ 10:25 am

    • It was fairly easy to put together an Xcode project to build the various libraries
      plus an executable. Disentangling the Dalvik code from Android proper and
      working out exactly what to build was a bit trickier. I have a lot of experience
      in doing similar things with other VMs and OSes which helps.

      Attempting to do something similar without a GCC based compiler, which I have
      also done, I at least got it to boot under the Symbian OS, is a lot lot harder as the
      code relies quite heavily on some GCC specific features.

      Comment by Simon Lewis — April 18, 2009 @ 7:39 am

  2. Thanks Simon! Digging around the Android build and Dalvik, I suspected disentangling Dalvik from the rest of Android would be tricky–it looked awfully interwoven. I appreciate you taking the time to comment on this. Good luck with the Symbian effort!

    Comment by John — April 19, 2009 @ 7:43 pm

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Create a free website or blog at WordPress.com.

%d bloggers like this: