Mono on Android - With Gratuitous Shaky Cam Action

I thought I had Mono working; however, that was just on the emulator. The phone was failing due some triple combo exception (StackOverflow, OutofMemory, NullReference) that was ultimately related to my temporary hack/kludge. Getting it working on a phone took a couple more tweaks and fixes provided by Miguel de Icaza and Mark Chricton. The following video shows me natively compiling a simple hello world application using gmcs and then running it. Performance comparisons coming soon (for real this time)! (Note: The initial load times on mono and gmcs are abysmal since the Debian install is running off the SD card. That shouldn't affect execution time once everything is loaded into memory.)

10 comments:

mdi said...

Hey!

Would it be possible for you to post the instructions to build Mono for the G1?

Koush said...

Absolutely. I wasn't able to get the trunk to build, and 2.0.1 had some minor bugs in 2 files that Mark Chricton pointed out. So, I'm using a tweaked version of that. But I'll get the instructions and changes written up soon.

As I mentioned in a previous post, Mono is running on a Debian install that runs side by side with Android-- I am trying to find a way to statically build it, or make it use Android's linker so it doesn't error out with "not found" when not running from a Debian bash prompt.

Anonymous said...

Today G1 Mobile Phone has been a demand of the day. Its features make it the king of all mobile phones in the market today. As per the records mobile phone has become necessarily for life and if we talk about which is the best Mobile Phone then it’s the Google’s Android that is counted first.

עידו said...

Could it also be ported to Palm's WebOS ?

Anonymous said...

Can WinForms applications run on Android using Mono?

Anonymous said...

I'm a new developper in mono.
When I enter :

gmcs Program.cs

It tells me :

permission denied.

What to do please. I'm very interested in developping in .net languages...

Unknown said...

Hi!
I've tried getting your mono port to work on my HTC Hero with MoDaCo custom ROM 2.8 Core.
I'm running in to some problems.
1: When running mono it starts copying files and tries to run /system/bin/chmod on them. It seems that the chmod is not in that folder and the script fails. As a workaround I've manually run chmod on the files from a ssh an restarted mono, which continues where it last failed.
2: Trying to run ./mono test.exe I get this
# ./mono test.exe
Hello World!

Unhandled Exception: System.TypeInitializationException: An exception was thrown by the type initializer for System.Net.WebRequest ---> System.Configuration.ConfigurationErrorsException: Error Initializing the configuration system. ---> System.ExecutionEngineException: SIGILL
at System.Collections.Hashtable..ctor () [0x00000] in :0
at System.Configuration.Configuration..ctor (System.Configuration.InternalConfigurationSystem system, System.String locationSubPath) [0x00000] in :0
at System.Configuration.InternalConfigurationFactory.Create (System.Type typeConfigHost, System.Object[] hostInitConfigurationParams) [0x00000] in :0
at System.Configuration.ConfigurationManager.OpenExeConfigurationInternal (ConfigurationUserLevel userLevel, System.Reflection.Assembly calling_assembly, System.String exePath) [0x00000] in :0
at System.Configuration.ClientConfigurationSystem.get_Configuration () [0x00000] in :0
--- End of inner exception stack trace ---
at System.Configuration.ClientConfigurationSystem.get_Configuration () [0x00000] in :0
at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection (System.String configKey) [0x00000] in :0
at System.Configuration.ConfigurationManager.GetSection (System.String sectionName) [0x00000] in :0
at System.Net.WebRequest..cctor () [0x00000] in :0
--- End of inner exception stack trace ---
at test.MainClass.Main (System.String[] args) [0x00000] in :0

Am I missing something here?

/Frank

Koush said...

Hi Frank, could you tell me where your chmod is located?

Koush said...

Also, did you download the latest version of Mono off the Market?

Unknown said...

Sorry if this seems a stupid question - I'm fairly new to android, though not Mono. I can't seem to figure out how to run Mono on my phone. I downloaded mono from the marketplace Monday (20100607), and I put a .NET application on my phone, but I don't know how to run it. If I click the mono app, it puts up a bunch of diagnostics saying it is installed/extracted fine, and I can't do any more. If I open up a terminal emulator on my phone, and type 'mono', it says 'mono' cannot be found. Is there another method of executing it?