Tiliman’s Weblog

January 2, 2010

Android 1.5 on HTC

Filed under: Android — Tags: , , — tiliman @ 10:09 am

Installing Android on HTC was much easier than I had expected.
I only tried installing Android on HTC Diamond. Kaiser,Vogue and Touch Dual are also possible.

To get started with Android on HTC Diamond download the android build from

The steps to install are simple. Just extract the bundle package and copy it to root of your Internal Storage.
Note: Make sure you replace the STARTUP.TXT with diam100.txt from startup-configs directory. The original STARTUP.TXT is for RALPH100
Note: Disable PINCode for your SIM if you have any before using it with Android on HTC.

Disconnect phone from PC and simply run Haret.

Related links



January 1, 2010

AirplaySDK for Cross Mobile OS Game Development

I am totally astonished as to how well AirplaySDK works. The guys at Ideaworks Labs have done it right.

They have made all the right choices when developing an SDK for cross mobile OS game development.

The issue with mobile game development is dealing with all the different Mobile OS plus dealing with different hardware using same OS. Game developers are somewhat lucky if there is OpenGLES implementation available as then they don’t have to worry too much about the rendering part. The sound and file IO and network features still mostly remain as an issue. OpenAL is not supported on most phones for sound. EdgeLib appeared a few years back to solve the problem of IO, Sound and Network features plus to allow software renderer in case OpenGLES is not available. More on EdgeLib in another post.

I tested the kartz sample from AirplaySDK on N82, N80, HTC Diamond, Samsung Omnia.

It is much easier to just list the feature pros and cons of AirplaySDK that I figured out so far by reading and trying out.


  • Native binary without any VM.
  • Good packaging tools for all OS.
  • Fixed point computation as well as floating point available.
  • Speedy Software rendering engine
  • Auto fallback to software rendering when no hardware accelerator present.
  • Sticking to opensource libraries.
  • One Dynamic Engine (ODE) for rigid body physics.
  • Support for multiple Mobile OS including Symbian, iPhone, Windows Mobile, Android,BREW and Linux). Edgelib doesn’t support Anrdoid and BREW.
  • Highly optimised compression of assets for games. Not just simple zip compression but usage of Derbh which uses shared buffer across files. Claims on site say that Metal Gear Solid came down to 1.5MB.
  • Arm debugger/emulator available that runs on Windows. Debugging is much easier this way.
  • Windows emulator allows testing of software in various different scenerios (tilt/compass/keypad/touch/resolution)
  • VS Studio programmers would love it as they can use VS with this SDK. Very tight integration.
  • UI development possible for softwares other than games. This is interesting feature but as the Core System API is not extensive, it won’t be possible for creating full applications. Only simple apps can be built. There is possibilty of extensions that can do OS dependent API calls but this system is not exposed to developers to create their own extensions. There seems to be discussion of this opening up on AirplaySDK Forum.
  • Extensions available (only for iPhone) for some of iPhone specific API
  • Phone Orientation awareness and auto rotation of GUI.
  • Human Interface limitations/possiblities awareness. Can detect touch screen and keypad and control based on that.
  • Handling of phone events (incoming call/notifications) without extra code.
  • UI code for input is intelligent enough to display touch keypad on touch UI systems without any extra work. MoSync can’t do that. EdgeLib has no support for UI controls/widgets.


  • No support for OSX/XCode for development yet. It is planned though.
  • Integrates best with visual studio which can be costly. Although express edition is free and should be enough
  • Not very extensive API for core OS like System API.

My Test Results

Omnia Kartz Running in Portrait at 20 fps. Left/Right sides of screen can be used to steer.

OMNIA Kartz Running in Landscape at 18.65 fps. Left/Right sides of screen can be used to steer.

N82 running Kartz sample at 20 fps and steering with keypads. N82 has vfp

HTC Diamond running Kartz sample with 11.4 fps. HTC Diamond has no vfp/hardware acceleration

N80 running Kartz sample at 9.7 fps and steering is with keypad. N80 has no hardware accelration/vfp.

OS Independent Mobile Software Development with MoSync


MoSync is truely amazing platform for cross platform development for Mobile Phone Softwares. It comes as a full IDE based on Eclipse. It supports currently Windows Mobile, Symbian, Blackberry (Java),Moblin and J2ME. Support for iPhone,Maemo and Android is planned. MoSync was made opensource a while ago and seems to have very active developers. The best thing is that it creates a binary instead of creating some sort of virtual machine code and thus slowing down the whole application.

In my experience as much as 80% of code needs be ported between platforms. Symbian’s disregard of providing standard C API initially and later requirement to install OpenC on phones with your software, overall confusing the install process for user, made it sub-optimum to use OpenC. The userinterface coding takes a long time on most phones even if there is standard API for core system like IO/Network.

Now MoSync promises that you can make one UI code and use it on other phones, as well as MoSync API translates to Core OS API which means no need to spend time in porting at all.

Test Results on a few phones

This sounded too good to be true so I had to try and spend a night playing with it. The IDE is based on Eclipse. I tried their UI samples on HTC Diamond, Samsung Omnia and N82.

Here are my findings

  • There was no need to install each SDK for Symbian, Windows Mobile or Black berry.
  • The binaries are made per Mobile phone and not per OS.This is a little inconvenience as they are not always compatible on different phones running same OS as I found out with Samsung Omnia.

    HTC Diamond with MAUIEx sample displaying a grid of images

    HTC Diamond MoSync Main interface (Diamond has higher resolution than Omnia)

  • HTC Diamond binary was a native exe and when installed ran fine. Although the selection of items had to be done with keypad.
  • The same HTC Diamond Windows Mobile binary when installed on Samsung didn’t run and crashed. The cab was created by MoSync. This is strange as it is same OS.
  • The simple example which outputs keycodes when keys are pressed was not able to recognise back button on HTC Diamond.
    Omnia MoSync landscape didn't show properly

    Omnia MoSync landscape didn't show properly

    Omnia MoSync Main Screen MAUIEx sample (jar file)

  • When I compiled same code for Samsung Omnia, to my surprise, I got Java (jad/jar) files instead of native binaries. The UI ran fine but as it was not touch UI, I had to reboot phone.
  • The HTC Diamond exe took over whole of screen on Samsung Omnia before crashing and had the taskbar on top hidden. Icouldn’t get that taskbar back and had to reboot phone. This is very scaryif all UI apps built with MoSync do it. This would mean that Windows Mobile Certification test will fail as they require ability to go to “Today Screen”(main screen of phone) using Start menu. More on that later.

    N82 Symbian Native BInary MoSync MAUIEx Clock sample

    N82 Symbian Native binary running MAUIEx created using MoSync

  • The N82 was also a native binary that functioned pretty well as it is not a touch screen and soft-keys (keypad) was mapped perfectly fine.
  • The UI development with MoSync has same limitation where support for both touch UI and keypad UI has to be coded by developer making it less automatic porting.

Final Thoughts

All in all MoSync would reduce development time by reducing the code portability needed but the need to test on each phone is highly increased due to uncertain behavior of same app on different phones. Again stressing here on HTC Diamond Windows Mobile app not able to run on Omnia which almost never happens with traditional development. I will play more with MoSync and create more entries on blog if I find something interesting or contradicting to my these initial findings.

November 9, 2009

Posssible Privacy bug in Facebook?

Filed under: Facebook — tiliman @ 7:07 pm


Today I was browsing through list of friends of one of my friends (Friend_A). I found a profile of another person (Person_A). I wanted to view his pictures but his privacy settings didn’t allow viewing his albums/pictures. I couldn’t see Photos tab on profile page.

Later my friend (Friend_A) sent a link to (Person_A)’s picture on facebook and I was able to view it using that link. I was able to go through his albums completely without any issue.

I sent the same link to my another friend and he was able to view all pictures too even though he was not even 2nd level link to that person.

Is this possibly a bug in Facebook?

December 20, 2008

Replacing SMS on a Phone using Kannel SMS Gateway

Filed under: GSM — Tags: , , , , , — tiliman @ 11:35 am

What is Replace Message?

The 3GPP (ETSI) standard for GSM communication specifies a way to replace an existing message on a mobile phone by sending another message. I had a requirement to use this functionality with Kannel connected to an SMS GW that communicates over SS7/MAP.

Using Kannel to Replace Message

Sending a self destruct or replaceable message is pretty easy with Kannel as long as your SMSC supports it.

Send first SMS with pid=65

Send second SMS with pid=65



Quest for correct PID value

The documentation of Kannel doesn’t provide any information about the method at all. It however mentions the field PID that can be set while sending SMS. Looking at some forums related to NowSMS gateway, it appeared that PID can be used to send such SMS.

The next issue was to find out what exact value to provide as NowSMS GW allows a value of between 41--47 in decimal. This doesn’t work with Kannel.

3G TS 23.040 V3.2.0 (1999-10) on page 52-53 states this: TP-Protocol-Identifier (TP-PID)
The TP-Protocol-Identifier parameter serves the purposes indicated in subclause 3.2.3. It consists of one octet, and the
bits in the octet are used as follows:
In the case where bit 7 = 0, bit 6 = 1, bits 5..0 are used as defined below
5 .. . .0
000000 Short Message Type 0
000001 Replace Short Message Type 1
000010 Replace Short Message Type 2
000011 Replace Short Message Type 3
000100 Replace Short Message Type 4
000101 Replace Short Message Type 5
000110 Replace Short Message Type 6
000111 Replace Short Message Type 7

Here is explanation of Replace Short Message from standard

The Replace Short Message feature is optional for the ME and the SIM but if implemented it shall be performed as
described here.
For MT short messages, on receipt of a short message from the SC, the MS shall check to see if the associated Protocol
Identifier contains a Replace Short Message Type code.
If such a code is present, then the MS will check the originating address and replace any existing stored message having
the same Protocol Identifier code and originating address with the new short message and other parameter values. If
there is no message to be replaced, the MS shall store the message in the normal way. The MS may also check the SC
address as well as the Originating Address. However, in a network which has multiple SCs, it is possible for a Replace
Message type for a SM to be sent via different SCs and so it is recommended that the SC address should not be checked
by the MS unless the application specifically requires such a check.

According to this 01000001 or in decimal 65 would give me Replace Short Message Type 1 and it can go upto 71.
I have tested this on Samsung, Nokia, HTC and iPhone. Seems to work fine on all of these.

October 7, 2008

MP3 to Audio Cassette Player

Filed under: Gadgets — Tags: , , , , , — tiliman @ 9:32 am

I always thought that whenever someone buys a car sound system, it should allow connecting of mp3 players as input device. The car I got doesn’t have that type of sound system and I didn’t want to buy a new system for that.
Yesterday, I found out that there exists a car cassette adapter that allows you to connect your mp3 player to a sound system which only supports audio cassettes or audio CDs with no external input source. Rare in modern world but most builtin systems are like that in smaller cars in Pakistan.

In Karachi, Pakistan, it can be bought for 250 PKR (2.5 Euros). The cassette has an audio cable to connect to your favorite mp3 player and of course has no tape in it. Its head does the magic of playing music by faking as a real cassette with rolling magnetic tape over it.
Here are pictures of the adapter I bought.

July 19, 2008

Thailand, not so nice after all

I recently got opportunity to go to Thailand and stay in Bangkok for a month. Actually, I am writing this entry from Bangkok.

Thailand is considered a very good tourist place but I find it hard to believe that Thai people really care about tourists. Here is why

Worst home internet ever

Thailand has probably the worst internet in one of modern countries. I am not myself from a very modern country (Pakistan) but still we get much better connection and more bandwidth (international) than Thailand. Our lag in Pakistan with servers around the world is much lower than Thailand. I mostly have to do remote management of servers in Europe and ABC Islands.
Thailand internet service providers (ISPs) mostly give you packages on ADSL from 128Kbps to 2Mbps. In reality the bandwidth is really different. When they promise 1Mbps you only get 256K  for international traffic and 1Mbps is applicable for traffic within Thailand. 256K or even 512K is pretty low in modern world specially when you have to pay for 1Mbps connection, 650 baht (20 USD) for first 6 months and 1000 baht (30 USD) after first 6 months. My SSH sessions are really painful to work on. The connection after midnight gets much better.

Over 95% Cheating Taxi drivers

I have had some experience with taxi drivers in different countries including China (Guangzhou, Shenzhen) but I have not seen such cheating taxi drivers ever.  The drivers will always take you the long way. When you are new in city, you will not notice that as you will not recognise different streets and the area where you are residing.  After 2-3 times of going out you will notice that you will be on the road where your residence is but driver will take left/right turn and then will circle around the area of your residence before taking you to your residence. The idea is simply to make more money of course.  This is not rare and I won’t be exaggerating to say that this happens 95% of the time. I have tried shouting at driver to take left or right when I saw the road to my residence but Mr Driver would either show a blank face pretending to not understand even the basic hand gestures or will try to explain in 1 to 2 words that there is more traffic this way. This is really bad and discouraging for tourists indeed.

Language Barrier

This is one of the biggest issues in Thailand. Just like China, very few people speak English and even a lot of sign-boards, instructions, maps and ingredients (note: halal and kosher food seekers) are in Thai. People even in shops don’t speak much English and use of calculator is important while negotiating for price. I know this can be interesting but for most part this is frustrating as when you really need to go somewhere and nobody can explain proper directions.
Thai websites are mostly in Thai only. Even big companies like AIS (Mobile/Internet company) have English sections but when clicked half of items in flash remain in Thai. A lot of websites only put Under Construction for their English version of website. Even the 404 pages are in Thai. Happens a lot with buddybb.

July 17, 2008

FilesToBeDeleted issue while installing update on Windows Mobile

Filed under: Windows Mobile — Tags: , , — tiliman @ 3:46 pm

I just got stuck with the problem where an update of my software on windows mobile which contains a com dll gets wrong (Default) registry entry in InproceServer32’s default key.
The key was something like

and value being inserted by CAB was

This similar issue was experienced by someone else here in this post
but no solution was posted in replies.

Anyway, one good and complicated solution is to write your own installer code like this one

The solution I used was much easier. In my CAB inf file I inserted the reg key with the value that it really should have, like this


This solved the problem. After installation/updation the right DLL value was inserted and new DLL started to work as usual.

« Newer Posts

Blog at WordPress.com.