I know it's a very big question to ask :), I'm just asking out of curiosity. Is it possible for someone to build a phone OS? Can someone guide me through this please. For example, how to choose a H/W and how should you test your code, is it possible buy some device (eg HTC) and just try the code with it? The good thing here is Linux Kernel is there so one won't start from scratch.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.
In short: hardly possible, unless you restrict yourself.
Google "OpenMoko" and "Neo FreeRunner", learn from their extremely open platform. Maybe reuse parts of it.
I suggest that you don't want to develop a kernel of the OS, but rather adapt an existing OS for smartphone use and create the userland somehow akin to iPhone's or Android's. This alone is a giant task.
While it is certainly possible to build a phone OS by personal effort, it will take so much time that the OS is going to be long obsolete by the time it's usable. A group effort is preferable in this very fast-paced field.
Also, state your goal. Building a "phone OS" for academic purposes is one thing. It takes simplicity, transparency, small list of conceptions well demonstrated. Developing a commercially usable "phone OS" is totally different: it needs hardware adaptability, maintainability, heavy (and probably ugly) optimizations, very serious UI work.
Commercial hardware is mostly closed, and getting specs requires money and signing of NDAs. This limits the ability of enthusiasts to target off-the-shelf smartphones; it yields to reverse-engineering sometimes, sometimes it doesn't. Take a look at Cyanogen and Android modders community in general. They have a mature open-source software stack (Linux, Android) already targeted for phones, and phones developed with this stack in mind. It still takes significant efforts to create a custom build for a particular phone. Doing this with your own immature stack should prove much harder. Address the Neo instead :)