views:

269

answers:

2

I'm considering opening up a project to create an i-phone virtual machine for android 2.0 (read motorola droid) before i do so i have some questions:

  1. Does one already exist that i just missed?

  2. Can the the Droid's Arm Cortex A8 down-clocked to 550MHz (thanks wikipedia) handle an I-Phone abstraction layer?

  3. Performance wise the best thing to do is write the app in C++, but for the health of the system, would it be better to put the iphone vm on top of the dalvik vm? Which approach would be better and why.

+2  A: 
  1. No
  2. No, not even close
  3. Its moot, frankly regardless to the language you write it in, you won't even get close to a usable speed. I suppose to actually answer the question, as close to the metal as possible. Again, its a fools errand anyways.
Serapth
+8  A: 

Does one already exist that i just missed?

No.

Can the the Droid's Arm Cortex A8 down-clocked to 550MHz (thanks wikipedia) handle an Iphone?

No, but the CPU is not strictly the issue.

Performance wise the best thing to do is write the app in C++, but for the health of the system, would it be better to put the iphone vm on top of the dalvik vm? Which approach would be better and why.

It is conceivable you could create an Objective-C implementation in C/C++ that could run on Android via the Android NDK, but NDK libraries have limited system access, meaning you would not be able to do much in Objective-C.

It is conceivable that your Objective-C implementation could run as a standalone application on rooted hardware, and therefore have access to more of the system, but then you pretty much aren't running Android anymore.

It is inconceivable to create an Objective-C implementation that will run on the Dalvik VM and have performance similar to a native implementation of Objective-C on the iPhone.

Note that I have not even discussed implementing the Cocoa libraries and such, as I have no idea how you could do that in reasonable time without copyright infringement, which will get you sued into oblivion (see: Apple v. Pystar). The only way to avoid this is a total cleanroom implementation, and the WINE folk will point out how they have been trying to do this for Windows for around 17 years and have had incomplete success.

If your goal is to write applications once that run across Android and iPhone, consider PhoneGap, Appcelerator Titanium Mobile, and similar toolkits.

CommonsWare
I suppose I was being unclear. My goal unfortunately is not to write apps for the I-Phone and android. My goal is to be able to run an I-Phone application on an android system, without access to source code. As far the CPU is concerned i realize it is not the only issue, but i considered it the limiting reagent.Thank you for your answer, i'm not used to coding for embedded devices hence my apparent ignorance. Cocoa lib's aside, how system expensive would a just in time compiler for o-c byte-code to dalvik byte-code be?
JERiv
Copyright infringement isn't your only concern in trying to recreate the Cocoa frameworks. Apple has filed several patent applications on elements like Core Animation: http://www.freepatentsonline.com/y2008/0030504.html
Brad Larson
It's one thing to reproduce the APIs so that you can cross-compile Cocoa applications (GNUStep and Cocotron have been working towards this for years), and another entirely to create a complete system emulator for the iPhone, runtime on up. Much simpler videogame systems have taken many man-years to write approximate emulators for, typically requiring system specs far above those of the original systems.
Brad Larson