on Aug 20th, 2008OSGi on an iPhone
So, I broke down and got an iPhone recently… which has been great… except if you want to write your own applications on it… that are Java-based… and run on top of OSGi. How do we fix this problem? Well, first, we need to jailbreak the iPhone. Once that is done, we can install OpenSSH onto the iPhone and have the ability to use the excellent Remote System Explorer (RSE) from the Ganymede release train:
RSE allows us to effectively edit files on the iPhone, easily transfer things and also provides a nice familiar terminal to interact with the iPhone. So now that we can move files, move a copy of Equinox (org.eclipse.osgi) over to the iPhone. Also make sure that you have a copy of JamVM on the iPhone otherwise we can’t launch Equinox. So once we have JamVM and Equinox on the iPhone, you can launch Equinox in console mode:
Cool huh? After a bit of hacking, I was also able to create a package for the Cydia installer so I get a fancy Equinox application on my iPhone:
So, after some work, it’s possible to get a bare-bones OSGi framework running on an iPhone. I plan on doing some more hacking… like figuring out if I can get the Rich Ajax Platform (RAP) project running on the iPhone. If I do, I’ll blog more. There’s also some Java/Objective-C bindings out there to interact with the iPhone’s graphics capabilities. If you’re interested in collaborating, feel free to comment on this blog post.



Every time someone I consider a hero uses one of the most closed and proprietary solutions in the world, I die a little inside.
Why use or support a platform that has to be “jail broken”?
- Don
@Donald, I have a saying that when Apple farts, it smells like flowers to people. On a serious note, it’s the engineer in me that likes to tinker with things… mmm… flowers…
You should have waited a few months and got an Android phone where you can do this without voiding your warranty. Now if someone would get Equinox running on the Dalvik VM…
@Doug, you must have been in another session…
http://www.eclipsecon.org/2008/index.php?page=sub/&id=380
Are you going to upload the Equinox Cydia package to some official repository or publish it elsewhere?
@Markus, once I get the package in a decent enough form, I will attempt to do that.
Well, then only eRCP with eSWT is missing. Once we have that, I am a happy bee
Great work Chris! We should grab a frosty brew soon if you’re still in Austin - would like to run some ideas your way…
@Mike, sure, I just shot you an email.
Hi Chris,
I did some funny experiments with OSGi on the iPhone a while ago for this paper: http://www.iks.inf.ethz.ch/publications/files/middleware08.pdf
I ran Concierge with a special renderer that generates an AJAX-driven interface from an abstract R-OSGi UI description. Worked quite nicely, so I guess RAP should be possible as well. I have not tried the ObjectiveC binding so far.
Cheers,
Jan.