XMPP and WCF .Net – Introduction
Hummm… XMPP and WCF? Is this not a blog page about Android or other Google related stuff. That’s partly true but as a Microsoft .Net developer I am more interested in combining the best of both world. I like Google and Microsoft products. I really like the open source vision of Google. But when it comes to development tools I prefer using Microsoft.
So that’s me, living between both worlds. Using the best of both worlds to develop good implementations. And that is where this new blog post are about.
Some time ago Google launched Google Wave presentation (http://wave.google.com/help/wave/about.html) When I watched the presentation, I was (and still am) impressed.
At my previous job, we developed a real time location aware application. A huge amount of data was collected by the location systems, was processed by the server and was made visible on the clients. The made visible part is a tricky one, because we wanted to make use of protocols which where cross platform like SOAP. The result was a polling mechanism which sends requests on interval basis to the server to get new data.
We knew that this was not the best implementation. At that time (almost 3 years ago) we were also thicking about as a possible solution. XMPP stands for Extensible Messaging and Presence Protocol (http://xmpp.org/). A protocol which was developed already in 1999 and is based on XML. I think that the popularity of this protocol was getting a boost when Google launched their Google Talk client in augustus 2005.
I found a presentation on the Web about XMPP (http://www.slideshare.net/kellan/beyond-rest) which has a nice slide (shown in the image below). This reminds me of an episode of the Smurfs (http://en.wikipedia.org/wiki/The_Smurfs) where the Smurfs are on a long trip.
Brainy Smurf: Is it much further, Papa Smurf?
Papa Smurf: Not much further my little smurfs.
Jokey Smurf: (different location) Is it much further, Papa Smurf?
Papa Smurf: Not much further my little smurfs.
Grouchy Smurf: (third location) Is it much further, Papa Smurf?
Papa Smurf: (exasperated) Yes…it is!
So when all Smurfs are requesting data from Papa Smurf, Papa Smurf becomes overloaded. A better solution would be a Publish Subscribe implementation (http://en.wikipedia.org/wiki/Publish/subscribe). XMPP has such extension: http://xmpp.org/extensions/xep-0060.html. This way the clients (little smurfs) don’t become bored (they can do other things) and Papa Smurfs don’t get distracted or even overloaded.
The protocol of Google Wave is based on this model. The protocol makes use of the XMPP protocol together with some extensions. Installation document of the Google Wave Federation Prototype server can be found at http://code.google.com/p/wave-protocol/wiki/Installation Of course Google is using Java or Phyton for the example clients, and that is exactly the part where my love for Microsoft fits in. I am really interested in building a Google Wave protocol client within .Net
Because XMPP is involved, the first step would be to develop a XMPP client in .Net. There are some XMPP libraries available for .Net but those don’t have a flexible extension model. And when looking at Windows Communication Foundation, there are already some parts available for setting up the connection and send/retrieve messages. Developing an XMPP library based on the WCF technology is the first goal of these new blog posts.
What’s next?
Before looking at a WCF implemtation, it is good to know how XMPP works. Therefore I will develop a sample client which makes use of the .Net TcpClient to initiate and send/retrieve messages (no WCF involved). To test this client I will install a XMPP server called OpenFire (http://www.igniterealtime.org/projects/openfire/index.jsp). Check this blog often for new updates… and remember Papa Smurf, we are not there yet!
BTW I love to retrieve comments on this (or my other blogposts). Your feedback is really important!
Read more from the Uncategorized category. If you would like to leave a comment, click here: 1 Comment. or stay up to date with this post via RSS, or you can
Trackback from your site.
Today (or yesterday late) I started download and building the source of Chromium OS again. As a described inside my blog and at http://groups.google.com/group/chromium-os-discuss/browse_thread/thread/ba8ddf13edece9a6/647d2632e8c2d615?lnk=raot I got a blue gradient screen after login. One of the reponse of this post said something about the different version of the gtk library which are used http://code.google.com/p/chromium-os/issues/detail?id=676 Ubuntu 9.10 makes use of libgtk2.0 2.18.3 while Chrome OS is packaged with 2.17.2. So building the code went fine but when running you get errors inside the log file var/log/slim.log You don’t get this issue when using the pre built browser binary (because this one is compiled with the right package). But my idea was that I wanted to build the Chromium OS completly from source. Because I did not want to make another chroot environment for building the browser code, I created a new virtual machine (within VMWare) and this time I use Ubuntu 9.04 I updated my previous blog post and this time I get a browser after login. Still the system is far away from stable (but this is probally because it is a very early version) and performs not that smooth (probally lack of drivers). But it is working. So check out the previous (updated) blog post (http://www.johandekoning.nl/index.php/2009/11/23/building-chromium-os/) and I hope it helps you when building the system by your own. Of course it is possible to ask question or give feedback by posting comments. Read more from the Uncategorized category. If you would like to leave a comment, click here: 1 Comment. or stay up to date with this post via RSS, or you can
Trackback from your site.
Note: for my first build I used Ubuntu 9.10. It looks like there are some issues with using this version so for my second build I am using Ubuntu 9.04. Some of the part of this blogpos became obsolete because those issues don’t exists anymore. I marked those part as red. When updating this blog I am using the revision 33052 of the browser code. I don’t know which revision I am using of the OS code While I have no time to complete the build proces for Android 1.6 (looking at the Google application part), I quickly start looking today at building the Chromium OS (for which the source code was released today (20 november 2009)). Within this blog post, I will summarize the steps I took to build the Chromium OS. I used the steps described at http://www.chromium.org/chromium-os/building-chromium-os Just like Android, I prefer to use an Ubuntu environment as development/build environment. Android could not be build on a Windows OS, it looks like this is possible for Chromium OS. But still setting up an Ubuntu environment is quite easy. I use VMWare server to make an Ubuntu virtual machine. With Android I used Ubuntu 8.04. This time I am using the Ubuntu 9.04 version. The document suggests Ubuntu 9.10, but it looks like that building the browser part is not completly possible because of the gtk library used (details at http://code.google.com/p/chromium-os/issues/detail?id=676). Installation of Ubuntu is executing a next-next-finish Wizard, keeping things as default as possible (partition table) and supplying some information when needed (user login). After installation of Ubuntu, I always perform a sudo apt-get update and sudo apt-get upgrade to get the latest version of the installed packages. Because I am using VMWare, I also install the VMWare tools. Because the VMWare tools supplied by VMWare server are not compatible with Ubuntu 9.10, I choose the Open VMWare version by following the instructions which are listed here http://langui.sh/2009/10/05/ubuntu-9-10-in-vmware/ I tried to installed the Open VMWare tools (like it did on my first attempt building Chromium with 9.10) but it looks like Open VMWare is not compatible with 9.04. I tried the normal VMWare tools supplied by VMWare server and those are working fine. To build Chromium, several libraries are needed to compile the source code. There is a package list shown at http://code.google.com/p/chromium/wiki/LinuxBuildInstructionsPrerequisites To simplify the installation of those packages, there is a script supplied which will automatically install the requires software. This script can be found at http://src.chromium.org/svn/trunk/src/build/install-build-deps.sh Save this script on you local harddrive at a location which is easy to find/remember (for example your home directory). To execute this script, use the following commands from a terminal window The script will ask if you want the debugging symbols to be installed. I choose No because at this moment I don’t want to debug the code of the system libraries. The code repostitory is not only on SVN but makes also use of git. So you also have to install the git-core package With ubuntu 9.04 I did not have any issues with installin msstcorefonts The install_build_deps.sh script will also install the msttcorefonts package. Installation of this package did not succeed because of (dns) time outs (the files are downloaded from sourceforge). To get rid of those timeouts, change the file at /var/lib/dpkg/info/ttf-mscorefonts-installer.postinst. Remove the -dns-timeout=10 part at line 148. The Chromium OS has two components: the browser and the operating system. Because, although that is my idea, you want to build the complete solution, we also download the source of the browser part to get everything. This step is optional because you can also use a pre-built binary version of this Chromium-based browser (more details at http://sites.google.com/a/chromium.org/dev/chromium-os/building-chromium-os/getting-the-chromium-os-source-code) To get the browser source, a package of scripts (depot_tools) need to be installed. Those script are used to manage checkouts and perform code review. One of the tools used inside this package is gclient to retrieve the Chromium code. The depot_tools can be retrieved in multiple ways (SVN or as a download) I use the SVN method by executing the method (from the home directory ~/) This will create a directory (together with the scripts) called depot_tools inside your home folder (~/depot_tools). Add this location to your PATH. I add this to the .profile file Add to the the end of the file Save and exit the text editor. To activate this change (without rebooting), reload the .profile file (from the ~/ location) Check your PATH by executing the echo $PATH command. You should get something like this Create a directory inside your home location called chromium. This location will hold the source which belongs to the browser (part of the OS). Code retrieval is done with the gclient tool. Configure this tool by executing The first url is the SVN location. The second url is a reference to the revision number which should be downloaded (SVN works with revision numbers). The http://chromium-status.appspot.com/lkgr holds a reference to the revision which succesfully passed the unit tests (in debug mode). This way you will download not the latest version, but a version that builds (most of the time). You can also make use of another revision reference http://build.chromium.org/buildbot/continuous/LATEST/REVISION. This is a reference to the revision that passes both unit tests and layout tests. This version will probally an older version than the lkgr one, because layout tests will take some time to run on the server. It is also possible to specify a different revision number (by supplying a revisionnumber) but this is not part of this blog post and you will probally want to use the LKGR one. The status of the source tree can be found at http://build.chromium.org/buildbot/waterfall/console (when it is green/open you should be able to compile the code) Retrieve the source by executing the following command. Code retrieval will take some time Because you will use the code for building the Chromium OS, you need to supply the deps argument Create a directory for the OS source. I use a location within my home directory called chromiumos Code retrieval from the Git repository is also done with the gclient (and will also take some time) After the code is retrieved for both parts (browser and OS), it is time to build the Chromium OS. The different build scripts are inside the ~/chromiumos/chromiumos.git/src/scripts directory Chromium OS builds only it a seperate environment (chroot environment). This way the build result does not (or less) depend on the, in our case, Linux environment installed. To prepare this chroot environment, the first step will be the retrieval of the different packages which will be used to create this environment. From the scripts directory, execute the following command to make a local repository of the packages. This will take some time After the local repository is created, it is time to set up the chroot enviroment The Chromium OS will be build within the seperate chroot environment. But before we can start to build the OS, you need to build the browser. This step is not needed when you use the binary pre-built version of the browser. When building the browser, I got two build issues. I solved them by making some changes in the code. So before building the browser from the source, you have to make some changes. When building the browser code (revision 33052) I did not get this issues written below. It is possible that the source code is updated (patches are merged inside revision) or that the issues are related to package version (like the gcc). So fixing both issues can be skipped. When building the source, I got an error like ‘<anonymous>’ is used uninitialized in this function inside the cookies_tree_model.cc file. This issue can be fixed by applying a patch (details at http://codereview.chromium.org/414025/show) Download the patch file issue414025_1_2.diff from http://codereview.chromium.org/download/issue414025_1_2.diff and save it inside the ~/chromium/src/ directory. Apply the patch by running Another build issue is related to the conflict_resolver.css file (~/chromium/chrome/browser/sync/engine/conflict_resolver.cc). This error is related to the fact that the compiler has some difficulties with understanding the type std::string. This issue can be solved by adding an #include <string> to the file. Open ~/chromium/chrome/browser/sync/engine/conflict_resolver.cc inside your favorite text editor and add the following string (somewhere at the beginning of the file, i.e under #include <map>) Save the file and exit the texteditor After both issues fixed, it is time to build the browser code. This is done by executing Whereby the –chrome_dir argument references to the source location of the browser code. Compiling/building will take some time. Because the Chromium OS is build within its own build environment, it is time to enter this prepared enviroment. Run Inside the chroot environment there are two configuration steps which can be taken to make it easier to work with the Chromium OS (within this development stage). When the Chromium OS boots, you get a login screen where you enter your Google account username and password. It is possible (and I confirm that this was the case for me) that authentication is not working (no network connection, lack of network driver support). By creating a local test user, you are able to login with this username (and empty password). To create this local user account (from within the chroot environment): Change USERNAME to the username you want to use. When you want to enter a terminal from within the Chromium OS and you want to perm task as sudo, you have to type in a password. This password is normally random generated (for security). You can define your own sudo password by executing (from within the chroot environment): Next step will be building the packages and kernel for Chromium OS. Both is done from within the chroot enviroment by executing the following commands: Instead of running above commands, you can also execute ./build_all.sh. This will not only build the platform packages and kernel, but will also create the Chromium OS image (which can be copied to an USB key or VMWare/VirtualBox). When runnin build_all.sh, you can skip the next step From within the chroot environment, create the Chromium OS image by executing The script will end with something like The output directory where the image will be stored, is generated by the script. This number will probally be different on your environment. The Chromium OS is now successfully build and you should be able to copy and run it from an USB key or use it within VMWare. Using the image is explained in the following steps Before using the image (copy to USB or use within VMWare), you can check the image content by mounting it locally. Make sure that you exit the chroot enviroment first by running the exit command. You will be back in your own system environment. Mount the image by running the following commands. Replace SUBDIR with the unique generated number for your build (i.e. 999.999.32609.064708-a1) Get a list of the installed packages by running Exit the image and unmount the image (when finished exploring the image content) Because at the moment I don’t have a 4GB USB key available, I did not performed those steps yet (details at http://sites.google.com/a/chromium.org/dev/chromium-os/building-chromium-os/build-instructions). Copying the image to the USB key is done by running the command I got an USB key (8GB) and copyied the image by running the command This command will copy the latest build to the device /dev/sdb. If you want to copy not the latest build or if the location of the USB key is different, run the following command Whereby the SUBDIR should be replaced by the unique generated number, and the USBKEYDEV to the device for the USB key. I will post my results (update this blogpost) when I performed the copy to USB key steps. The Chromium OS image can also be used within VMWare by converting it to an vmware disk (.vmdk). You can also use this disk within Sun VirtualBox. To make converting possible, you should install the qemu package After the qemu package is installed, run the image_to_vmware.sh script. This will convert the latest build to the ~/chromiumos/chromiumos.git/src/build/images/SUBDIR/ide.vmdk location (SUBDIR is the unique generated number for the build). If you want to specify the build and or the location where the VMWare image should be stored, then use the command: I copied this image to my Vista enviroment (to get it outside Ubuntu) and created a new Virtual Machine within VMWare Server. As operating type, I selected Ubuntu. Don’t create a new disk but use an existing one (the ide.vmdk file). Make sure that you change the disk options/type to IDE (and not SCSI). When running ChromiumOS within VMWare, I got the login screen after a couple of seconds. I am not able to login with my Google account (get a message that there is no network connecting). Login with the local user account (with empty password) is possible but after login it shows nothing (only a blue gradient screen). I hope I can solve this issue soon (first need to know what causes this issue). I will also try to arrange some USB key, to check if it is VMWare related With my new build (25 november) it is still not possible to login with my google account. Login with the local account is possible and this time a browser is visible. Still the system is slow (except from the boot part), especially the internet connection (takes more than 10 seconds to load a page) and also the systems completly freeze at certain times (so you should perform a reboot). And some new screens (after logged in). I succesfully build the ChromiumOS (browser and OS) but am not able to use the system after login. I will try the USB key installation first to see if the blue gradient screen issue also occurs there. To solve my issue, I started a thread at the Chromium discussion group. Because this is my first post in this group, the moderator should first check my post (so it is not there yet) http://groups.google.com/group/chromium-discuss Hope to give an update / solve this issue soon. Please let me know if you encounter the same problems Update 23 november 2009: my post is accepted and can be found at http://groups.google.com/group/chromium-os-discuss/browse_thread/thread/ba8ddf13edece9a6# I got a response that somebody else had the same issue. So still not solved… Update 25 november 2009: I am able to succesfully build the Chromium OS and it is also possible to use it. The system is not responding very smoothly and freezes often. Also the internet connection is really slow. One of the problems could be the lack of driver support. I also booted the OS from the USB key, but it still performs slow. At the moment I am really impressed about the boot time. In a couple of seconds VMWare/PC shows the boot screen. Love to see this fast boot in other distributions so that it can be used for media center functionality. It is not my plan for now to get involved in the development of this OS. So the next step for me will be to check new revisions at interval basis to get an idea about the progress made. I am also interested in the future of this OS to see whats the big thing behind this OS and if it will be used by a large group of people. Read more from the Uncategorized category. If you would like to leave a comment, click here: 7 Comments. or stay up to date with this post via RSS, or you can
Trackback from your site.
Note 30 july 2009: updated the post. It now reflects the changes made to the repository (dream is now called dream-open) Note 13 july 2009: Vladimir Stepanov post a reply today, telling me that the media files are already part of the source tree and can be found at ~/mydroid/fameworks/base/data/sounds. Adding the media files is a lot easier this way. I changed this blogpost about how to include those media files inside the system image. This will be (for now) the last post of the building Android 1.5 for the Android Dev Phone. In the previous posts I explained how to prepare your building environment (Ubuntu 8.04), get the source and make it ready for building, building the source and finaly flash it to your device. Your own build should be working fine, but comparing to the official builds you are missing the Google applications like GMail, Google Maps, Android Market and YouTube. Besides the applications missing there are also no ringtones available on your device. In this blogpost you will extract the Google Applications and media files from the official HTC Android 1.5 image (this can be done by extracting them from your device or with the use of unyaffs). The extracted files will be added to your own Android image. This results in an Android build which is almost the same as the HTC version. Note: it is also possible to install the applications and add the media files while your device is running. But the purpose of this blog post is to create your own image which can be flashed over and over again (or even exchanged between other Android Dev Phone users) Audio Files In the official HTC image (http://www.htc.com/www/support/android/adp.html) a system/media directory exists which contains audio files for the alarms, notifications, ringtones and ui. These audio files are also part of the source tree but are not included by default. Inside the ~/mydroid/frameworks/base/data/sounds folder you will find the different audio files. Together with those audio files there are two build scripts: OriginalAudio.mk and AudioPackage2.mk (containing a larger audio pack). Just rename one of those two script to Android.mk. You can create a new image by running the make command from ~\mydroid location. The make command will not compile everything again. Only the changed files. In our case nothing will be recompiled, only the media files will be added to the system.img. After the make command is finished you can flash the new image to your phone. If you are already running your own build, you only need to flash the system.img. You can found more details about the flash process at the Flashing The Phone blogpost. Google Applications Besides the missing audio files, are also the closed source Google Applications not installed. The following list of applications are not installed Note: the HTC image does have more application installed by default. But I think those are not relevant for your own build but HTC related: BugReport.apk, DebugTool.apk, FieldTest.apk, HtcLog.apk and QxdmLog.apk. Let me know if you think (with some information) that these packages should be part of your own build. Also the use/need of the Ftp.apk package is not clear. And I did not add the SystemUpdater.apk because this is your own build so you should provide updates for it (and not HTC/Google). The Google applications make use of extra libraries and permission files. So also these files should be part of our build: Just like with the media files, the extracting of these files can be done with adb or unyaffs. The keep thing seperated, I decided to put the extracted files inside the ~/mydroid/vendor/google directory. Because the google directory does not exist, go to the ~/mydroid/vendor location and create the google folder. Extracting with adb The procedure for extracting the files with the adb tool is the same as with the media files. Just create a new script called extract-google-files.sh inside the ~/mydroid/vendor/google folder. Place the following commands inside the file Save and exit the editor. Make sure that your device is connected to Ubuntu. Execute the script by executing the command (from the location ~/mydroid/vendor/google) The different files, needed for the Google applications, will be extracted from your device and placed inside app, etc or framework directory. The build script should be updated so that those files are included inside your own build. This will be explained further in this blog post. First I will explain how to get the files with the use of unyaffs. Extracting with unyaffs For the media files I already explained how to use the unyaffs tool. So I presume that the system image is extracted inside the ~/htc directory. You only need to copy the files to the ~/vendor/google location. This will need some more commands than with the media files. The different files needed for the application are now placed inside the app, etc and framework directory (at ~/mydroid/vendor/google). Next step is to edit the buildscripts Changing the build script for the Google applications The htc_dream.mk build script should be edited. I decided to change the htc_dream.mk build script so that it does not depend on the build/target/product/generic.mk script (which depends on the build/target/product.core.mk file). The reason I do this, is that I don’t want to have the generic providers be part of my own build. Those providers will be replaced with the Google specific version (so the ContactsProvider is not needed anymore because the GoogleContactsProvider will be used instead). I could off course remove them from the generic.mk and core.mk files, but I don’t want to edit those files to keep things seperated. Because the core.mk also contains packages which I don’t want to be part of the build, I cannot change the dependency of the htc_dream.mk from generic.mk to core.mk. So the dependencies will be completly removed. At the point also the SdkSetup package is not needed anymore, because we are using the SetupWizard package. (The SdkSetup package does some small things like making it possible to make phone calls. This functionality is also part of the SetupWizard package). To add the Google applications a PRODUCT_COPY_FILES section should be added to the htc_dream.mk file. We use PRODUCT_COPY_FILES because the packages are already in a binary format and only need to be copied to the system image. One of the packages is the NetworkLocation package. This package contains functionality to determine your position based on network GSM cells. To get this package working an extra build property should be set. This can be done by adding the PRODUCT_PROPERTY_OVERRIDES variable to the htc_dream.mk file which contains the property ro.com.google.locationfeatures=1 The complete htc_dream.mk script (which can be find inside the ~/mydroid/vendor/htc/dream-open location) is placed below. Save the file and exit the editor. The build script for the google applications is now ready. Before running the make command again remove the ~/mydroid/out/target/product/dream-open/system directory first. If you don’t remove this directory when you remove packages (like the SdkSetup) from your build, those packages will still be copied to your final build. The system directory contains the binary version of your system image but when you remove this directory the binary files will not be recompiled again (there are intermediates version inside the ~/mydroid/out/target/product/dream/obj directory Now you can run the make command again (from the ~\mydroid locatin). Like I already said, the make command will not compile everything again. Only the changed files. In our case nothing will be recompiled, only the google files will be added to the system.img. After the make command is finished you can flash the new image to your phone. If you are already running your own build, you only need to flash the system.img. You can found more details about the flash process at the Flashing The Phone blogpost. What’s next? If you start your device with the image containing the Google applications files, the Setup Wizard will be shown. Complete the steps of this wizard to connect your Google Account to your device. You will now have an image running that contains the different Google applications which should run correctly (also the Calendar application should work now). So that brings us to the end of the Building Android 1.5 series. I hoped you liked it and got enough information for making your own build. If not, just post a reply on one of the blog posts so that I can give you more details. Although this is the final post of this blogpost serie, I will continue writing about Android (and other technologies). So look at my website often or follow me on Twitter to get updates. Blogpost in the Building Android 1.5 serie Read more from the Uncategorized category. If you would like to leave a comment, click here: 18 Comments. or stay up to date with this post via RSS, or you can
Trackback from your site.
With the Android 1.1 and Android 1.5 images for the Android Dev Phone 1 (ADP1), Google Latitude is not available by default. It is possible to enable Latitude inside the Google Maps application by adding one record to a settings database. At http://forum.xda-developers.com/showthread.php?p=3438480#post3438480 there are several steps described to enable Latitude. Adding a record to a settings database and updating a XML file (MapsActivity.xml) are needed to make Latitude available as menu item inside the Google Maps application. Updating the MapsActivity.xml file is not that easy. The adb shell does not support a copy command and there is also no editor available inside the shell. With the use of cat it is possible to make a copy of the MapsActivity.xml to the sdcard of your Android device: Next you should mount the sdcard, edit the file on your desktop pc, unmount the sdcard and replace the MapsActivity.xml with the one which you changed on your sdcard: Because editing needs a lot of actions, I found a different way of enabling Latitude by only adding the record to the database. I performed the following steps on a device running Android 1.5, but I think it will also work on the Android 1.1 version.
By clearing the data of the Maps application (with the Clear data option) the /data/data/com.google.android.apps.maps/shared_prefs/ is removed containing settings for the map application. By adding the record to the database and starting the Maps application again, the /data/data/com.google.android.apps.maps/shared_prefs/ is generated again. Because of the maps_enable_friend_finder flag set to true (1) the MapsActivity.xml is also generated which enables Latitude. Read more from the Uncategorized category. If you would like to leave a comment, click here: 2 Comments. or stay up to date with this post via RSS, or you can
Trackback from your site.
Compiling the source code for creating your own Android build is not supported within a Windows operating system (I don’t know if it is possible by the use of Cygwin). Because my notebook is running Windows XP, I use VMWare Server 2.0 which runs a Ubuntu 8.10 (Desktop) as virtual machine. VMWare makes it possible to connect USB devices inside your virtual machine. Because I want to connect my Android Dev Phone to Ubuntu, I performed the following steps to make that possible. VMWare hardware configuration When creating a virtual machine (or before starting the virtual machine) make sure that the USB controller is added to the hardware list. If this is not the fact. Add the USB Controller by choosing Add hardware and select the USB Controller from the Hardware type list. Sharing the USB device Connect your Android Dev Phone to your computer and start the Ubuntu Virtual Machine by pressing the Play button inside the VMWare Server web interface. When booting the Virtual Machine you will notice that a new icon (with an USB sign) is placed on the toolbar inside the VMWare Web Interface next to the Restart button. When you click on this icon a context menu will be shown with a list of devices that are plugged inside the host OS (in my case connected to Windows XP). Mark the checkbox in front of the High Android Phone to make it available inside Ubuntu. Udev configuration You can perform a check, to see that the Android Dev Phone is shared with Ubuntu, by opening a Terminal (inside Ubuntu. Open a VMWare Remote Console to make use of the Ubuntu) and type the following command A list of USB devices will be shown. For example: The Android Dev Phone is the device with the name High Tech Computer Corp (HTC). Make a note of the first part of the device ID (in this case 0bb4) because this is needed for the udev rule. Create a new file (as root) with the following content Make sure that the text after {idVendor} is the same as the device id found when using the lsusb command. Save and exit the editor To make execution of the rule possible, perform a chmod To make the rule active, restart udev Final check To check if the device is available use the adb tool (which is part of the Android SDK. Download and installation instructions at http://code.google.com/android) This will return a list of attached devices. You should now be able to use the different tools of the Android SDK (and application deployment with the use of Eclipse) within Ubuntu running inside VMWare Server. Read more from the Uncategorized category. If you would like to leave a comment, click here: 9 Comments. or stay up to date with this post via RSS, or you can
Trackback from your site.
De Nederlandse Spoorwegen heeft sinds enkele maanden een mobile website (http://m.ns.nl) waarmee je een reis kunt plannen maar ook de actuele vertrektijden kan opvragen van treinen die vanaf een bepaald station vertrekken. Handig om op je mobiel te kijken of de trein vertraging heeft. Een nadeel van een mobiele telefoon vind ik persoonlijk dat het intypen van tekst toch enige ervaring/tijd vereist. Op het moment dat ik klaar ben met het station in te typen voor de actuele vertrektijden is de trein al gearriveerd (of al drie keer langsgeweest). Google heeft afgelopen vrijdag een nieuwe versie van Google Gears uitgebracht (http://gears.google.com). Google Gears biedt onder andere als uitbreiding op je webbrowser de mogelijkheid om gegevens van een website tijdelijk offline beschikbaar te stellen (indien de website hiervan gebruik maakt). In de nieuwe versie is Google Gears ook voorzien van een Geolocatie module. Met behulp van deze module kun je aan de hand van het ipadres een grove schatting maken van de locatie van de gebruiker. Deze informatie kan je gebruiken in een webpagina (de gebruiker zal Google Gears geïnstalleerd moeten hebben en zal bij het eerste bezoek de vraag krijgen of je de locatie gegevens wilt delen). Google Gears werkt buiten de desktop ook op Windows Mobile. Google Gears, Windows Mobiles, NS Reisplanner… dat biedt de mogelijkheid om een lijstje stations weer te geven aan de hand van de locatie. De afwijking, 25 km (wat ik nu op mijn mobiel kreeg), is hierbij geen probleem omdat ik maximaal 10 stations binnen die cirkel (gesorteerd op degene welke het dichtste bij is) weergeef. Door een station te selecteren zal vervolgens de actuele vertrektijden pagina van het betreffende station geopend worden (wat gewoon de pagina van de mobiele NS website is). Uiteraard is zo’n verhaal erg boeiend, maar uitproberen is altijd leuker: http://www.johandekoning.nl/treinplanner. Google Gears moet hiervoor zijn geinstalleerd maar als dit niet het geval is zal er een download link verschijnen. Binnenkort zal ik in een nieuw (Engels) blog item de technische details vertellen over de werking van deze locatie gebaseerde treinplanner Vandaag (27 augustus) de applicatie getest onderweg van huis naar het werk. Bij Amsterdam Amstel was de afwijking volgens Google Gears maar 500 meter. Het lijkt er naar mijn mening op dat bij de smartphones ook gebruik wordt gemaakt van de netwerk gegevens (afstand tot de mast). Read more from the Uncategorized category. If you would like to leave a comment, click here: 1 Comment. or stay up to date with this post via RSS, or you can
Trackback from your site.
I really like the Google Docs application. Working together with a team on a spreadsheet is really useful for status overviews. Love to see that this is working without browser plugins. I was really surprised to see the direct updates when a colleague was editing a cell of the shared spreadsheet. Working together with web based collaboration tools makes it easy to share information directly to each other. At work we use Drupal to share information. Adding new content is easy and you can do it anywhere you want without installing software. Only an Internet connection is required. When it comes to software development, I miss the functionality of creating diagrams within the web based collaboration tools. For example the steps I have to take to show an UML diagram within the webpage document: What if i made a mistake or want to update these diagrams? Or what if a colleague wants to update them? It should be possible to make such an editor. UML can for example be converted to XMI which makes it possible to use for a webbased diagram editor to work with. I tried searching for such a web based tool but at this moment could not find anything useful. Do they exist? Or should i try to create a proof of concept to see if it is possible? BTW: besides creating diagrams online, I also want to see the functionality of pasting an image within the webdocument. Clipboard functionality is limited inside a browser (because of security reasons). Would this be possible by the use on a Firefox plugin? The website should have some (AJAX) method implemented which accept a BASE64 encoded string containing the image data. This image data was stored on the clipboard. Don’t see any security risks because the user triggers the paste operation and websites only implements these methods on parts for which the user is logged in. So another research topic: is a FireFox plugin capable of making access to the clipboard? Read more from the Uncategorized category. If you would like to leave a comment, click here: 1 Comment. or stay up to date with this post via RSS, or you can
Trackback from your site.
Building Chromium OS – update
/opt/google/chrome/chrome symbol lookup error: /opt/google/chrome/ chrome undefined symbol: gdk_x11_window_get_drawable_impl
Building Chromium OS
Installation of Ubuntu
Prerequisites
chmod a+x install-build-deps.sh
sudo ./install-build-deps.sh
This script installs all tools and libraries needed to build Chromium.
For most of the libraries, it can also install debugging symbols, which
will allow you to debug code in the system libraries. Most developers
won't need these symbols.
Do you want me to install them for you (y/N)
Skipping installation of debugging symbols.
sudo apt-get install git-core
Issue with msstcorefonts
if ! wget --continue --tries=1 --connect-timeout=15 --read-timeout=300 $QUIET_ARG --directory-prefix . --no-directories --no-background $URLROOT$ff ; then
Getting the browser source code
Install depot_tools scripts
svn co http://src.chromium.org/svn/trunk/tools/depot_tools
gedit ~/.profile
export PATH=$HOME/depot_tools:$PATH
. .profile
/home/jcdekoning/depot_tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
Get the source code
mkdir ~/chromium
cd ~/chromium
gclient config http://src.chromium.org/svn/trunk/src http://chromium-status.appspot.com/lkgr
gclient sync --deps="unix,chromeos"
Getting the OS source
mkdir ~/chromiumos
cd ~/chromiumos
gclient config http://src.chromium.org/git/chromiumos.git
gclient sync
Build Chromium OS
cd ~/chromiumos/chromiumos.git/src/scripts
Local package repository
./make_local_repo.sh
Create chroot environment
./make_chroot.sh
Build browser
Patch 414025
patch -p0 -i issue414025_1_2.diff
Conflict_resolver.cc issue
#include <string>
Build the browser code
./build_chrome.sh --chrome_dir ~/chromium
Enter chroot build environment
./enter_chroot.sh
Chromium OS configuration
Enable a local user account
( cd ../platform/pam_google && ./enable_localaccount.sh USERNAME )
Shared user password
./set_shared_user_password.sh
Build the packages and kernel
./build_platform_packages.sh
./build_kernel.sh
Building the image
./build_image.sh
Done. Image created in /home/jcdekoning/trunk/src/build/images/999.999.32609.064708-a1
To copy to USB keyfob, outside the chroot, do something like:
./image_to_usb.sh --from=~/chromeos/src/build/images/999.999.32609.064708-a1 --to=/dev/sdb
To convert to VMWare image, outside the chroot, do something like:
./image_to_vmware.sh --from=~/chromeos/src/build/images/999.999.32609.064708-a1
Using the image
Exit chroot
Check the package list
cd ~/chromiumos/src/build/images/SUBDIR
sudo mount -o loop rootfs.image rootfs
sudo chroot rootfs
dpkg -l
exit
sudo umount rootfs
Copy image to a USB key
./image_to_usb.sh
./image_to_usb.sh --from=~/chromiumos/src/build/images/SUBDIR --to=/dev/USBKEYDEV
Use/convert image for VMWare
sudo apt-get install qemu
./image_to_vmware.sh
./image_to_vmware.sh --from=~/chromiumos/chromiumos.git/src/build/images/SUBDIR \ --to=~/chromiumos/chromiumos.git/src/build/images/SUBDIR/ide.vmdk
What’s next…
Building Android 1.5 – Google Apps and audio files
mv ~/mydroid/frameworks/base/data/sounds/OriginalAudio.mk ~/mydroid/frameworks/base/data/sounds/Android.mk
checkin.apk (needed for login with Google Account)
Gmail.apk
GmailProvider.apk (the synchronization module for GMail)
GoogleApps.apk
GoogleContactsProvider.apk (replacement for the ContactsProvider. This version will synchronize with your Google Contacts)
GooglePartnerSetup.apk
GoogleSettingsProvider.apk
GoogleSubscribedFeedsProvider.apk (replacement for the SubscribedFeedsProvider.apk)
gtalkservice.apk (for Google Talk)
Maps.apk (Google Maps)
MediaUploader.apk
NetworkLocation.apk (for determining your location based on network cells)
SetupWizard.apk (for setting up your Google Account connected with your device)
Street.apk (Google Maps StreetView)
Talk.apk (Google Talk application)
Vending.apk (Android Market applicatioN)
VoiceSearch.apk (Voice Search)
YouTube.apk (YouTube application)
com.google.android.gtalkservice.jar (is placed inside the framework directory of the system image and will be used with GoogleTalk)
com.google.android.maps.jar (also part of the framework and is use by Google Maps)
com.google.android.gtalkservice.xml (permission file for gtalkservice library, placed inside the etc\permissions directory)
com.google.android. maps.xml (permission file for maps library, placed inside the etc\permissions directory)
cd ~/mydroid/vendor
mkdir google
cd google
#!/bin/sh
mkdir -p app
adb pull /system/app/checkin.apk app/checkin.apk
adb pull /system/app/Gmail.apk app/Gmail.apk
adb pull /system/app/GmailProvider.apk app/GmailProvider.apk
adb pull /system/app/GoogleApps.apk app/GoogleApps.apk
adb pull /system/app/GoogleContactsProvider.apk app/GoogleContactsProvider.apk
adb pull /system/app/GooglePartnerSetup.apk app/GooglePartnerSetup.apk
adb pull /system/app/GoogleSettingsProvider.apk app/GoogleSettingsProvider.apk
adb pull /system/app/GoogleSubscribedFeedsProvider.apk app/GoogleSubscribedFeedsProvider.apk
adb pull /system/app/gtalkservice.apk app/gtalkservice.apk
adb pull /system/app/Maps.apk app/Maps.apk
adb pull /system/app/MediaUploader.apk app/MediaUploader.apk
adb pull /system/app/NetworkLocation.apk app/NetworkLocation.apk
adb pull /system/app/SetupWizard.apk app/SetupWizard.apk
adb pull /system/app/Street.apk app/Street.apk
adb pull /system/app/Talk.apk app/Talk.apk
adb pull /system/app/Vending.apk app/Vending.apk
adb pull /system/app/VoiceSearch.apk app/VoiceSearch.apk
adb pull /system/app/YouTube.apk app/YouTube.apk
mkdir -p etc/permissions
adb pull /system/etc/permissions/com.google.android.gtalkservice.xml etc/permissions/com.google.android.gtalkservice.xml
adb pull /system/etc/permissions/com.google.android.maps.xml etc/permissions/com.google.android.maps.xml
mkdir -p framework
adb pull /system/framework/com.google.android.gtalkservice.jar framework/com.google.android.gtalkservice.jar
adb pull /system/framework/com.google.android.maps.jar framework/com.google.android.maps.jar
./extract-google-files.sh
mkdir -p ~/mydroid/vendor/google/app
cp ~/htc/app/checkin.apk ~/mydroid/vendor/google/app/checkin.apk
cp ~/htc/app/Gmail.apk ~/mydroid/vendor/google/app/Gmail.apk
cp ~/htc/app/GmailProvider.apk ~/mydroid/vendor/google/app/GmailProvider.apk
cp ~/htc/app/GoogleApps.apk ~/mydroid/vendor/google/app/GoogleApps.apk
cp ~/htc/app/GoogleContactsProvider.apk ~/mydroid/vendor/google/app/GoogleContactsProvider.apk
cp ~/htc/app/GooglePartnerSetup.apk ~/mydroid/vendor/google/app/GooglePartnerSetup.apk
cp ~/htc/app/GoogleSettingsProvider.apk ~/mydroid/vendor/google/app/GoogleSettingsProvider.apk
cp ~/htc/app/GoogleSubscribedFeedsProvider.apk ~/mydroid/vendor/google/app/GoogleSubscribedFeedsProvider.apk
cp ~/htc/app/gtalkservice.apk ~/mydroid/vendor/google/app/gtalkservice.apk
cp ~/htc/app/Maps.apk ~/mydroid/vendor/google/app/Maps.apk
cp ~/htc/app/MediaUploader.apk ~/mydroid/vendor/google/app/MediaUploader.apk
cp ~/htc/app/NetworkLocation.apk ~/mydroid/vendor/google/app/NetworkLocation.apk
cp ~/htc/app/SetupWizard.apk ~/mydroid/vendor/google/app/SetupWizard.apk
cp ~/htc/app/Street.apk ~/mydroid/vendor/google/app/Street.apk
cp ~/htc/app/Talk.apk ~/mydroid/vendor/google/app/Talk.apk
cp ~/htc/app/Vending.apk ~/mydroid/vendor/google/app/Vending.apk
cp ~/htc/app/VoiceSearch.apk ~/mydroid/vendor/google/app/VoiceSearch.apk
cp ~/htc/app/YouTube.apk ~/mydroid/vendor/google/app/YouTube.apk
mkdir -p ~/mydroid/vendor/google/etc/permissions
cp ~/htc/etc/permissions/com.google.android.gtalkservice.xml ~/mydroid/vendor/google/etc/permissions/com.google.android.gtalkservice.xml
cp ~/htc/etc/permissions/com.google.android.maps.xml ~/mydroid/vendor/google/etc/permissions/com.google.android.maps.xml
mkdir -p ~/mydroid/vendor/google/framework
cp ~/htc/framework/com.google.android.gtalkservice.jar ~/mydroid/vendor/google/framework/com.google.android.gtalkservice.jar
cp ~/htc/framework/com.google.android.maps.jar ~/mydroid/vendor/google/framework/com.google.android.maps.jar
PRODUCT_PROPERTY_OVERRIDES := \
ro.config.notification_sound=F1_New_SMS.ogg \
ro.com.google.locationfeatures=1
PRODUCT_PACKAGES := \
framework-res \
Browser \
Contacts \
Launcher \
HTMLViewer \
Phone \
DownloadProvider \
GoogleSearch \
MediaProvider \
SettingsProvider \
TelephonyProvider \
UserDictionaryProvider \
PackageInstaller \
Bugreport \
AlarmClock \
AlarmProvider \
Calendar \
Camera \
DrmProvider \
LatinIME \
Mms \
Music \
Settings \
Sync \
Updater \
CalendarProvider \
SyncProvider \
Calculator \
Email \
ImProvider \
VoiceDialer
PRODUCT_COPY_FILES := \
vendor/google/app/checkin.apk:system/app/checkin.apk \
vendor/google/app/Gmail.apk:system/app/Gmail.apk \
vendor/google/app/GmailProvider.apk:system/app/GmailProvider.apk \
vendor/google/app/GoogleApps.apk:system/app/GoogleApps.apk \
vendor/google/app/GoogleContactsProvider.apk:system/app/GoogleContactsProvider.apk \
vendor/google/app/GooglePartnerSetup.apk:system/app/GooglePartnerSetup.apk \
vendor/google/app/GoogleSettingsProvider.apk:system/app/GoogleSettingsProvider.apk \
vendor/google/app/GoogleSubscribedFeedsProvider.apk:system/app/GoogleSubscribedFeedsProvider.apk \
vendor/google/app/gtalkservice.apk:system/app/gtalkservice.apk \
vendor/google/app/Maps.apk:system/app/Maps.apk \
vendor/google/app/MediaUploader.apk:system/app/MediaUploader.apk \
vendor/google/app/NetworkLocation.apk:system/app/NetworkLocation.apk \
vendor/google/app/SetupWizard.apk:system/app/SetupWizard.apk \
vendor/google/app/Street.apk:system/app/Street.apk \
vendor/google/app/Talk.apk:system/app/Talk.apk \
vendor/google/app/Vending.apk:system/app/Vending.apk \
vendor/google/app/VoiceSearch.apk:system/app/VoiceSearch.apk \
vendor/google/app/YouTube.apk:system/app/YouTube.apk \
vendor/google/etc/permissions/com.google.android.gtalkservice.xml:system/etc/permissions/com.google.android.gtalkservice.xml \
vendor/google/etc/permissions/com.google.android.maps.xml:system/etc/permissions/com.google.android.maps.xml \
vendor/google/framework/com.google.android.gtalkservice.jar:system/framework/com.google.android.gtalkservice.jar \
vendor/google/framework/com.google.android.maps.jar:system/framework/com.google.android.maps.jar
# Overrides
PRODUCT_NAME := htc_dream
PRODUCT_DEVICE := dream-open
PRODUCT_MANUFACTURER := htc
PRODUCT_BRAND := generic
PRODUCT_POLICY := android.policy_phone
rm -rf ~/mydroid/out/target/product/dream-open/system
Enable Latitude on Android
cat /data/data/com.google.android.apps.maps/shared_prefs/com.google.android.maps.MapsActivity.xml > /sdcard/MapsActivity.xml
cat /sdcard/MapsActivity.xml > /data/data/com.google.android.apps.maps/shared_prefs/com.google.android.maps.MapsActivity.xml
Don’t worry, the different xml files in this folder will be auto generated again with Latitude (Friend Finder) enabled.


Android Dev Phone, Ubuntu and VMWare Server


lsusbBus 002 Device 001: ID ld6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 004: ID 0bb4:0c02 High Tech Computer Corp.
Bus 001 Device 001: ID ld6b:0002 Linux Foundation 2.0 root hubsudo gedit /etc/udev/rules.d/50-android.rulesSUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"sudo chmod a+rx /etc/udev/rules.d/50-android.rulessudo /etc/init.d/udev restartadb devicesList of devices attached
HT845GZ51782 deviceLocatie gebaseerde NS Reisplanner

Searching for a webbased diagram editor






