Just discovered this gem here: http://www.betaversion.org/~stefano/linotype/news/110/

  1. Android apps are developed in Java
  2. Android itself is licensed in APL, but Sun's source is licensed in GPL.
  3. Furthermore, Java is not open-sourced in mobile environments.
  4. How did Google do it?

Turns out that Android

  1. Uses Java as a development language but does not use Java bytecode or Java virtual machine for deployment.
  2. Has a virtual machine called Dalvik which does not claim to be a JVM
  3. First uses a regular java compiler to generate regular java bytecode (say, javac or the built-in Eclipse compiler) and then converts that bytecode into Dalvik’s bytecode (the “dx” tool does this: converts .class/.jar into .dex files)
  4. Supports only a subset of Java SE (AWT/Swing and JavaME classes are omitted) classlib. Instead of using Sun's implementation, it uses Apache Harmony's implementation.

That's quite a tour de force.