Google Android

49 views
Skip to first unread message

Chris Boyle

unread,
Oct 21, 2008, 6:14:45 AM10/21/08
to NestedVM
Might I suggest this patch: http://chris.boyle.name/projects/android-puzzles/nestedvm-android.diff

As you can see at the directory containing it, this allows the
NestedVM runtime to be used quite successfully on Google Android. :-)

Thanks,
--
Chris Boyle

Brian Alliet

unread,
Oct 21, 2008, 3:18:03 PM10/21/08
to Chris Boyle, NestedVM
On Tue, Oct 21, 2008 at 03:14:45AM -0700, Chris Boyle wrote:
> Might I suggest this patch:
> http://chris.boyle.name/projects/android-puzzles/nestedvm-android.diff

Thanks! I'll apply it when I get home.

I'm not too familiar with Android or the Dalvik VM (although you've
piqued my interest, I'll be checking it out soon), but if you take a
quick scan though Platform.Jdk{12,13,14} and see what operations it
supports you can probably do better than playing it safe with 1.1.

Just out of curiosity, what are you using NestedVM for on Android?

-Brian

Dieter Krachtus

unread,
Oct 21, 2008, 3:24:27 PM10/21/08
to Brian Alliet, Chris Boyle, NestedVM
I guess he uses it to port puzzles to Andoid ;)
http://chris.boyle.name/projects/android-puzzles

Brian Alliet

unread,
Oct 21, 2008, 3:40:10 PM10/21/08
to Dieter Krachtus, Chris Boyle, NestedVM
On Tue, Oct 21, 2008 at 09:24:27PM +0200, Dieter Krachtus wrote:
> I guess he uses it to port puzzles to Andoid ;)
> http://chris.boyle.name/projects/android-puzzles

Heh. Good detective work. Why didn't I think of stripping the patch
filename off the URL. :)

Looks like a fun project. The biggest challenge will probably be
integrating the Java UI with the NestedVM backend (although if the
puzzle app has a decently good UI abstraction layer it might not be too
bad). Chris - be sure you post here if you have any questions on how to
do this. We'd be glad to help.

-Brian

Brian Alliet

unread,
Oct 21, 2008, 3:49:38 PM10/21/08
to Dieter Krachtus, Chris Boyle, NestedVM
Duh - I see Simon Tatham's puzzle app already runs on NestedVM. Don't
mind me. I'm just a little slow. I think it might be time to go home...

-Brian

Chris Boyle

unread,
Oct 21, 2008, 3:53:59 PM10/21/08
to NestedVM
On Oct 21, 8:24 pm, Dieter Krachtus <dieter.krach...@gmail.com> wrote:
> I guess he uses it to port puzzles to Andoid ;)http://chris.boyle.name/projects/android-puzzles

Indeed. :-)

Michael Schierl already used it to port the puzzles to Java applets,
which you can see at http://www.chiark.greenend.org.uk/~sgtatham/puzzles/
(click on any of the images). I was just following on from that to a
different UI (and a slightly different VM). The puzzles themselves
(the portable puzzle collection) are written in C, their usual model
(http://www.chiark.greenend.org.uk/~sgtatham/puzzles/devel/intro.html)
being:

frontend (e.g. gtk.c) <--> "middle end" <--> backend (an individual
puzzle, e.g. lightup.c)

Michael wrote a frontend nestedvm.c, which calls and is called by
Java.

I didn't have to do anything especially weird to get NestedVM happy on
Android. Android applications are compiled with a standard Java
compiler and then all the classes are translated together into a file
called classes.dex using tool called dx (the --dex option). This tool
seemed happy with class files produced by the NestedVM Compiler,
except that dx ate half a gig of RAM, but I'm told that's normal for
any serious amount of Java.
Reply all
Reply to author
Forward
0 new messages