Wednesday, January 14, 2009

mBS for Android Updates

Today ProSyst released the updated (0.2) version of mBS for Android, the Android port of the leading embedded implementation of OSGi Framework and services. The updated version can now be run on Android SDK 1.0 R2 as well as on the T-Mobile G1 device. Just like the previous version, this release is free of charge for non-commercial use.

Release Content

The 0.2 version contains:
  • mbs.apk - the updated version of mBS for Android
  • mconsole-proff-6.1.41.zip - ProSyst mConsole remote management tool
  • demo.zip - Bundles demonstrating the use of OSGi services on top of Android
  • readme.htm - Detailed installation instruction for the release and the demos
  • License_Eula_ProSyst.txt

The changes made to mBS for Android

Classloading Changes
The Android platform does not allow to define classes using ClassLoader.defineClass(byte[]). Therefore the classloading mechanisms in mBS for Android had to be updated.

The Android platform provides special utility class for loading classes from external DEX files, class name is dalvik.system.DexFile. For this purpose new Class Provider was implemented, which uses the Android DexFile utility. When we start the mBS for Android application the starting process goes through the following steps:

  1. The Android platform activates the main activity of the mBS Android application.
  2. The main activity loads /res/raw/mbs_image.zip as resource and extracts it in the data directory of the application. The data directory is /data/data/com.prosyst.mbs.android.starter/app_mbs.
  3. When the mBS image is extracted in the file system of the Android platform the main activity creates special java.lang.ClassLoader, which uses the dalvik.system.DexFile for loading classes from the serverjvm15.jar.
  4. After the class loader is created the main activity loads the Start class of the mBedded Server and invokes its main(String[]) method in separated thread.
  5. The the main method call is finished the mBedded Server application is started on the Android platform and the main activity updates the status of the provided information, the startup time and the used memory.
For debug purposes the output of the mBS is redirected to /data/data/com.prosyst.mbs.android.starter/app_mbs/bin/vms/mbs.log file, which can be opened using the Android SDK tools.
Network Permissions
In the previous version of the mBS Android application there was no need to add any permissions to the application for its normal work. In Android v1.0 the mBS needs special permissions for opening any server sockets. Therefore the following line was added in the AndroidManifest.xml file:

...
<uses-permission android:name="android.permission.INTERNET" />
...

Signed Application Package
In the previous version of mBS Android application its was allowed to install Android applications, which are not signed. In Android v1.0 it is not allowed to install such application. Therefore the new version of mBS Android application is signed.

Future Plans

ProSyst is working on additional demos and tools that help to leverage this technology. This release was created as a proof of concept to demonstrate the feasibility of using mBS on Android. However, ProSyst can productize this version if there is a significant interest in using this technology.

5 comments:

Anonymous said...

you have a nice site.thanks for sharing this site. various kinds of ebooks are available here

http://feboook.blogspot.com

hiro3tech said...

I'm so interested in OSGi on Android.
I'm trying to evaluate mBSMobile-2.0 in Android Emulator thanks to your efforts.
I downloaded mBS Mobile 2.0 for Android Runtime,but I can`t find out two files, mconsole-proff-6.1.41-19-12-2007.zip
and demo.zip.
Can I get these files?
I appreciate it for your cooperation in advance.

Android app developer said...

Come to your blog is my pleasure, your commodity abounding of affluent colors of life; and acceptation with life, affluent in abstract knowledge. Look advanced to your updates.

foxinfosoft said...

your site is very informative
Thank you
iPhone application development

foxinfosoft said...

your site is very informative & Gracefully.Thank you
Mobile application development
iPhone application development
iPad application development
Android application development
Joomla web development
web application development
iPhone game development
iPad game development
android game development