Search This Blog

Sunday, December 07, 2008

RTOS Course, It was more than amazing

Peace be upon you

How are you guys? I have been busy for while in many things, I have just finished RTOS course, let us begin with simple thing which is What is RTOS? simply it is Real Time Operating System, the course was all about concepts and main ideas behind it, What I understand from this course is that it is all about time, time is most critical issue in the Real Time Operating System, Also Multitasking is very important issue, anyways I will write more detailed post about it, here is some photos taken from the lab.


This is the development kit that we use.

This is the output of the application that I have wrote, I have wrote it after doing the workshop, it was very tight as availability of time, 

My application was XBM reader, the XBM format is Array of image information, I have got this image form the internet, the other part of the application was gradient effect in the back ground, it is in lines each line wide is 40 pixel, it toggle lines, one start with Whites end with orange, and the other one starts with black ends with dark blue.

here is the code of the drawing function, this function is very effective because it has direct access to LCD  memory.

The nice thing about this thing is it is very fast, the OS starts in less than one second, also drawing was very fast because of the nature of the device, the device work by memory, which means, if you want to run anything you get to its memory location and start what ever you want, it is WIDE OPEN, waiting for whatever you want.

Thanks for your time, 

BR
Ahmed Essam

Saturday, November 15, 2008

iPhone, Totally joke in Egypt

Peace be upon you 

How are you? I am sorry for long time "unposting", I am busy as hell :D.

anyways, Yesterday iPhone had been released in Egypt, it is nice but it is very bad when you know some details.

in Apple web site you will find this 2 nice logos for our "beloved" Mobile network operators

as far as I remember that Steve Jobs said that the iPhone will not Exceed the 200$, which is more than nice.

Here is the shock coming, when you check the websites for the operators you will see that you will have to pay 
3850 for the 8 G, which means 692 USD, :D
4450 for the 16 G, which means 800 USD :D:D:D:D:D

check the below snaps from the web sites
Vodafone "OFFER"

Mobinil Offer

The nice thing is after you pay all that money, you can't use that phone out side the network, which means, it only works on single SIM (MobiJoke, VodaFool) 

Mmmmm, so I don't like to be A Joke (MobiJoke) nether Fool (VodaFool) nether iDiot (Being iPhone user)
because it is not fair, simply you can get this device with same amount work any where in the world, 
please check the "Apple Hong Kong" store and see it
also here is snap from the Site




Mmm, Vodafone called me, Let us see the tons of jokes they told me.
I will tell you the bottom lines to save your time, it was 9 minutes call

"Me, The phone is too much, I have friend get it with same amount and works with any network"
this one is real, I know some one who get it from Italy and guess what it works here, guess what too, he can get to store and download "WHATEVER"
"Vodafone Guy, Hahaha, this is can't be, the government will track him and take it from him"
"Me, Why, Because of the GPS, don't u know that kids in Egypt can get n95, which has GPS"
"VF G, yes, but"
"Me, iPhone GPS has been dimmed by software methods, which means, if it cracked, it will WORK"
"VF G, but the phone can't work here in Egypt too, it will only work for the region that it sold within"
"Me, I SAW IT WORKING IN EGYPT, and the guy gets the 16 G white phone, with 4300 LE"

anyways, here is what I mean, this people are kidding, I don't know why I am thinking about reconsidering everything related to Apple.

I am sure that Apple knows, everything going on and they agree with it, 

I hope that Egyptian guys, DO NOT BUY this crap, until it gets to as promised, this always happen, Greedy resellers with greedy government 

even if it gets to the promised price I will not get it, I prefer Nokia, they have much experience in what mobile needs, not with device without "Copy and Paste"

anyways, I hope that you miss me as I miss you :)

Thanks for your time.

BR
Ahmed Essam

P.S: Sorry for the linguistic mistakes, :)

Thursday, November 13, 2008

Nice videos for "Steve Balmer"

YouTube has tons of things like this for Steve Balmer, it is really nice, I like this guy :D

he is Amazing

Ballmer sells windows1.0


Steve Ballmer Sells Windows XP



Steve Ballmer on Vista and MacBook Air @ MIX08



Math Matters to Microsoft CEO Steve Ballmer

Thursday, September 18, 2008

Debugging in Windows live

(The post is not completed yet, and I don't feel like I want to write more, please pray for me.)
Peace be upon you

While I was digging in windows stuff I have found very good way to debug in Windows, but in first place why you or me may need to debug in windows, simply because of crash analysis, sometimes you need to know from the crash came, the source of the problem as long as you are sure that you didn't do anything wrong, you go deeper to have a run with the system over the debugging way, it will end up with clear conclusion about the problem and causes, let see how to do it.








First when you start up the Windows press F8 and select debugging mode from the boot menu




After that you may need to generate a crash as test crash to practice your self on such thing, to do so you have to do small trick that is provided by Microsoft ,


go to registry editor (Regedit) and navigate to this path


HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ i8042prt \ Parameters


Then add the DWORD Value and name it "CrashOnCtrlScroll" and set its value to 1
restart your machine, and Press Ctrl and press Scroll Lock twice, then you will get this nice BSOD (Blue Screen Of Death)


if you enable the Debugging mode this screen will be waiting until you start debugging it.


to start debugging the machine, you have to connect the crashed machine with the debugging machine and connect them together through the serial cable,


Thursday, August 21, 2008

iPhone with Arabic

Peace be upon you

how are you guys? I am very sorry for the long time not posting, but I am really so busy this days, anyways, let us head to the point.

I have got a new book for iPhone development, I have started reading some articles about it and I really like it very much, it worth the effort.

The first thing came to my mind is to show Arabic strings to the screen of the emulator, and the shock was that iPhone doesn't support Arabic, for me I started to work on the emulator and XCode until I finally did it, now I am able to show Arabic in my application on the iPhone, for me it is very important as there is a lot of development will be done on such device and of course it will need Arabic, Here is snap shoot for the emulator after writing the word ALLAH.



Thanks to ALLAH that I did, it was nice try and I learn a lot to just show this word on the emulator.

I hope that I can do something useful to my Arabian bothers and sisters, this is just a step, I will work to get deeper into the system and provide you with open source solution to support Arabic on this magnificent device.

Now I really need to sleep, thanks for reading :)

BR
Ahmed Essam 

Saturday, June 07, 2008

SkyScrapr From Microsoft

Peace be upon you

How are you guys? Today I am going to recommend something to you form Microsoft, Microsoft has released new site for Architectures, I think it is the new Microsoft focus, after giving all available help to the developers they moved to Architects, to enhance the software development experience :D, anyways check the site I hope that it will be useful to you
Skyscrapr
, I don't know if they meant Skyscraper or something else :D

There is something else, I have found some free courses from Microsoft elearning, please have a shot there it really worth that.
Microsoft eLearning

Thanks for your time.

BR
Ahmed Essam

Saturday, May 17, 2008

PDU Format Extraction

Peace be upon you,

How are you guys? I hope that all of you is Ok, today I am going to show you peace of code that I really like, this code actually doing a very nice thing, which is extracting the characters from the SMS, what I mean here if you have any knowledge about SMS, you will now that it sent in 7 bits format called "PDU" Protocol Data Unit, the extraction of this data is not tough, but I just demonstrating the beauty of the bit wise operation and how it minimize the code size, here is the first peace of code, it suppose to extract the PDU data and make it readable ASCII characters data.

/*
Function Name : PDUChunk
Author : Ahmed Essam
Date : 17 - 05 - 2008
Purpose : Convert 7 bytes of PDU data to 8 bytes of Char data

History Revision
17-05-2008 Created AEssam
*/
char* PDUChunk(char* Source)
{
// it is just constant to the block size
int nBase = 8 ;
// Allocate 9 bytes because of the nature of null terminated sting
char *cpResult = new char[9];
// Clean the allocated memory
memset(cpResult,0,9);

// in each loop we keep part of the byte for the next byte, this the variable
// which will hold the rest of the opreation to the next character
unsigned char cRest = 0;
// in Each loop the mask changes, because the shifting that happen from using 7 bits from 8 bits
char cMask = 128;
for(int nLoop=0;nLoop<=nBase;nLoop++)
{
// shifting the current set of bits to the appropriate location,
// and put the rest the we keep from last byte at the end of the current bits set
cpResult[nLoop] = ((Source[nLoop] & ~cMask)<< (nLoop%nBase)) (cRest>>(nBase-(nLoop%nBase)));
// keep the unused set of bits to the next opreation
cRest = Source[nLoop] & cMask;
// update the mask for the next usage
cMask = cMask >> 1;
}
return
cpResult;
}


/*
Function Name : PDUChunk
Author : Ahmed Essam
Date : 17 - 05 - 2008
Purpose : Convert PDU data to of Char data
History Revision
17-05-2008 Created AEssam
*/
char* FromPDU2Char(char* Source,int len)
{
// Loops counter to end the loop by the end of the data retrieval
int nLoops = 0;
// This to calculate the CHAR length, after extracting it from PDU
// This is faster to avoid using floating point, if we are using floating point it will be (len/7) * 8)
int nTotalLen = (((len*10)/7) * 8)/10;
// Allocate memory for the end char array
char *cpResult = new char[nTotalLen];
// Clean the memory up
memset(cpResult,0,nTotalLen);
do
{
// Extract the Char from the PDU
char *cpChunk = PDUChunk(Source + nLoops);
// Safe concatenation for the end result
strcat_s(cpResult,nTotalLen,cpChunk);
// Delte the return char array
delete []cpChunk;
// Add the chunck size to the loop counter
nLoops+=7;
}
// Examining the loops count against the length of the PDU data
while (nLoops<len);
// Return the result string
return
cpResult;
}


Here is the code that consume that code


char cpSourceMSG[] = "\xc1\x60\x30\x18\x0c\x06\x83\xc1\x60\x30\x18\x0c\x06\x83\xc1\x60\x30\x18\x0c\x06\x83\xc1\x60\x30\x18\x0c\x06\x83\xc1\x60\x30\x18\x0c\x06\x83\xc1\x60\x30\x18\x0c\x06\x83\xc1\x60\x30\x18\x0c\x06\x83\xc1\x60\x30\x18\x0c\x06\x83\xc1\x60\x30\x18\x0c\x06\x83\xc1\x60\x30\x18\x0c\x06\x83\xc1\x60\x30\x18\x0c\x06\x83\xc1\x60\x30\x18\x0c\x06\x83\xc1\x60\x30\x18\x0c\x06\x83\xc1\x60\x30\x18\x0c\x06\x83\xc1\x60\x30\x18\x0c\x06\x83\xc1\x60\x30\x18\x0c\x06\x83\xc1\x60\x30\x18\x0c\x06\x83\xc1\x60\x30\x18\x0c\x06\x83\xc1\x60\x30\x18\x0c\x06\x83\xc1\x60\x30\x18\x0c\x06\x83";

// Extract the characters from the pSourceMSG
char * cpExtractedMSG = FromPDU2Char(cpSourceMSG,sizeof(cpSourceMSG));


this message suppose to be a SMS full of "A", which means 160 character of A, the function up there is not 100% safe but it is working OK for now,

in the function "PDUChunk", you will notice there is line full of bit wise operations

that is the line I am talking about

cpResult[nLoop] = ((Source[nLoop] & ~cMask)<< (nLoop%nBase)) (cRest>>(nBase-(nLoop%nBase)));

this line should do all the targeted purpose, it suppose to get the latest shifting value and apply it on the current value of PDU, then do ORING with the remain value from the last operation, I know that you may not understand what I am talking about, here is link that explains that issue in details
http://www.dreamfabric.com/sms/hello.html

anyways, the coming part is nice, the coming part is we are going to extract the Unicode SMS, actually it doesn't need any effort, it just little endian and we are going to make it big endian


char cpUnicodeMSG[] = "\x06\x33\x06\x2a\x06\x2a\x06\x35\x06\x44\x00\x20\x06\x28\x06\x43\x06\x45\x00\x20\x06\x45\x06\x48\x06\x28\x06\x4a\x06\x46\x06\x4a\x06\x44\x00\x20\x06\x44\x06\x25\x06\x33\x06\x2a\x06\x43\x06\x45\x06\x27\x06\x44\x00\x20\x06\x28\x06\x4a\x06\x27\x06\x46\x06\x27\x06\x2a\x06\x43\x06\x45\x00\x20\x06\x48\x06\x41\x06\x42\x06\x27\x06\x4b\x00\x20\x06\x44\x06\x2a\x06\x39\x06\x44\x06\x4a\x06\x45\x06\x27\x06\x2a\x00\x20\x06\x2c\x06\x47\x06\x27\x06\x32\x00\x20\x06\x27\x06\x44\x06\x25\x06\x2a\x06\x35\x06\x27\x06\x44\x06\x27\x06\x2a";
char *cpFlippedArray = new char[sizeof(cpUnicodeMSG)];
for(int n=0;n<sizeof(cpUnicodeMSG)/2;n++)
{
cpFlippedArray[n*2] = cpUnicodeMSG[(n*2)+1] ;
cpFlippedArray[(n*2)+1] = cpUnicodeMSG[n*2] ;
}
TCHAR *wsUnicodeString = (TCHAR*)cpFlippedArray ;



it suppose that you will have the result string the wsUnicodeString, after that you are free to do what ever you want to with this string.

Most of you will say, that you see the string in normal Wide Character if you are developing something for MAPI, like MAPI Rule, actually the idea here is little low level, I got this data from the RIL, Radio Interface Layer, I did small application that sniff GSM, and keep everything, this how I got this RAW data, here it is all about the memory and data format in the memory, it is really nice to play with the bit wise stuff :D, I hope that you like the post.

At the end I hope that this post was useful and helpful.

Thanks for your time.

BR
Ahmed Essam



Discover the new Windows Vista Learn more!

Tuesday, May 13, 2008

MIT, Waiting for all of us

Peace be upon you
I hope that you are all OK, today I am going to recommend (as usual :D), let us begin with summary to save your time, MIT has opened there materials Video Audio and text for all people so you can watch the courses that is in the institute for free just visit there web site
http://ocw.mit.edu
So let us begin the cool part, it is something like conversation between me and someone :D.
Short cuts : Me -> M, Someone who I am talking to -> S

M: Do u know that MIT has open there course materials for free?
S: Wait a second what is MIT?
M: it is "Massachusetts Institute of Technology", it is in USA, Cambridge, Massachusetts, it has strong emphasis on scientific and technological
S: so what are you telling me?
M: simply this HUGE decent educational place has done a very nice thing which is, opening there courses materials for people for free, in many formats Audio, Video and Text.
S: it is good, but what does it mean any way?
M: for guy like me, I seek so hard to starting master in Egypt and I couldn't do that for many "Educational lows" problems with me, so I start looking for something to study and learn online, I found many places that provide online master degree but I though that it is useless, I remember when "Mohamed Hegazy- My colleague in Imaginet (MobiDiv)" told me once that MIT has open there materials for all people, so I start checking it out, and I found it more than amazing.
S: you know it seems cool, but I still don't feel that is "it is not that important".
M: look the issue here is our career always want more and more from us in the area of keeping up with technology, I think if we could follow what this courses provide we would have very good progress in our career.
S: I think, you are right but not all people will like to go on with that.
M: I agree with you, but sometimes we need to do some stuff in teams, that's what I am thinking about, imagine that we arrange some kind of group to provide "Free knowledge" that is based on MIT courses, it could be amazing to provide such thing in Arabian community, specially when the educational standards in Egypt are very low, the community will do DEEP impact, the students may join us, to get better understanding for things.
S: you know it is a great idea, but I am not going to join, I am already loaded.
M: look, you can just listen when we have sessions about what we have studied, what do u think?
S: OK, that's seem to be fine, I will start with listening then may be I become one of the team :)
M: I hope all the Egyptian community join us :)
S: OK, can I go for my work, :) I am sorry I am little tough about it.
M: of course, I have work too, it was a very nice time that I have spent with you :), Bye
S: me too pleased talking to you, bye, keep me up to date ;)

At the end, I hope that you got something useful to help you managing your life, thanks for your time :)

BR
Ahmed Essam

Monday, April 28, 2008

Smart Sniffing on Windows Mobile

Peace be upon you

how are you Guys? sorry for the long absence, today I am getting a very "Evil" thing, actually I will not use it in evil, I will just demonstrate how this thing works and how it can be harmful, What I am talking about is something I named "Smart Sniffing",

What does "Smart Sniffing" means?
It means when the "Hacker" or "Intruder" sniff s/he will not sniff everything, why s/he would do that, for many reason, in our case, the Intruder will need to have just a few pieces of information, not all of it, let us have more details, our sample will be on windows mobile.

First of all you will need to have some tools to start in this operation,
  1. WinPCap for Windows CE.
  2. Windows mobile device to start your development and tests.
  3. Hotmail account.
Let us see what we have now, WinPcap is a free library that is use to capture network packets, well now you have all what is going in and out, for Windows CE version it is little tough but it is not impossible, then you will start watching what is going on, packets going out and packets coming in, now after you have accomplish your first step, let us move to the next step.

You will start looking in the packets for anything related to the password and user name, in the requests that go out from the device to certain server, there is Post requests, that what you are going to rip, if this trick didn't work for many reason on of them, the site uses some kind of SSL (Secure Socket Layer) so you can do something better than ripping the User name and password, you can rip the Session ID, there is too many ways to get what you want, after you have done with this step, the intruder notification step comes.

After you have done extracting the data you want from the packets and it is ready to be used by the Intruder, it will be sent simply and smooth by many ways, it can be sent through SMS, why I said that because may be the user uses some kind of "Firewall" and it will be easily to detect the what the application trying to send,of course the user will know that mobile sent SMS from the bill but the issue here is that the intruder get the piece of information as fast as possible, you can try to dig more and send what you want in sneaky way, like forcing the Internet Explorer to send it as encoded Query String.

What I have just said may seem to be evil but it is just Proof of concept that what ever "Smart Guys"say about mobile and its security, you have to be careful for the application you install on your device, also you have to be careful and try to notice everything on your screen, because there is always eye on you, may be you can't see it but be sure that this eye exist,all you have to do just be careful and try to keep your data as much as you can.

I have seen that before that some kind of Trojan was installed in X company PCs, the Trojan was working like virus, it wasn't detected by the anti-virus, the Trojan was so simple it was just graping the file names and send it to some e-mail Address, of course the Administrator was useless he didn't do anything to protect his company, anyways, don't rely that someone will protect you from any kind of attacks, also rememebr you may ask the wrong person for help so you have to do "Security" related things by your self.

Message to Developers, as you can see nothing is protected by default you have to protect your client as much as you can, it is your client, it is the reason of you raising, so try to keep your client safe, even after your death your work should be protected as much as possible, so you have to read about Encryption, Secure Systems, have certificate, learn the penetration test requirement and do it your self, read about secure code, ... etc
this topic is endless, all you have to do is just sake and be honest because such thing is really need very deep honesty, I am saying that because some how I am client and I hope to be protected.

I forgot to put some links :)
writing secure code
Secure Socket Layer
MSDN Writing Secure Code
WinPcap for Windows CE


I am sorry for the long post, may be I am over reacting but in the matter of fact and as I can see everything a round us is threated and we should be careful, that's all what I meant by this post, I put the idea, it is very simple but it can be used, also similar ideas used to have PC before and for sure there is people working on it now, as long as there is evil we should take care of our selves,

Thanks for your time.

BR
Ahmed Essam

Tuesday, March 25, 2008

Arabic Android - Free Class to enable Arabic

Peace be upon you

today I have released some source code at the WM_SupportArabic My Open source project, now I have added new class, but this time not for windows mobile it is for JAVA Android developers, I hope the guys uses it and make use of it, here is link for the code
http://wm-arabic.cvs.sourceforge.net/wm-arabic/
with this code, the developer will only need to install the font that has Arabic character shapes
Thanks for your time

BR
Ahmed Essam

P.S: I didn't test the code at all, I hope it works, sorry for that but I really have no time to do that.

P.S: Thanks for NarNouri for his push to do this code,

Saturday, March 22, 2008

dot NET Performance is not that good

Peace be upon you
How are you guys? I hope that everyone is OK.
Of course all of you know that VS.NET 2008 had released, and there is lots of guys downloaded it, and most of them until now are very happy with the nice IDE and the new features, I liked one thing about the new VS,
it is the ability to debug in the .NET framework 3.5 , I have downloaded the new version of VS.NET (2008), I installed it and I start doing the thing that interest me which is debugging in the GREAT DOT NET FRAMEWORK, actually I was trying something so simple, I wanted to change the window title, the code was nothing as I think

this.Text = "New Title";

then I got into the code, and I got shocked, there is hell of processing happen to just set the window title, I didn't imagine that it is like that, I though that there is something wrong, so I go and write some code to test the performance

After I wrote the code I run the application in very normal way, and here is the result (I will explain what did that application do)

simply the application changes the window name 10000 times, and count the ticks using (GetTickCount)

it uses 2 techniques framework code "this.Text" and the Native Method which is using the API "SetWindowText"

and as you can see the snapshot, native is faster than the framework with about 70%,

the point here that the dot NET framework have lots of checks before doing the command, somehow it is necessary, in same time it is time consuming, as I think at certain point if you are really seeking for the performance you will get to the Native as your saver, I know that what I am talking about is not new, but many people are ignoring the performance issue, I am sure that .NET has many performance weakness, for many reasons, now I hope that you like this post and do some tests your self to see what I am talking about , I hope that the post was informative, thanks for your time
BR
Ahmed Essam

Friday, March 14, 2008

RFID-> Security Flaw in Mifare Classic

peace be upon you

today post is so short and for some people it is shocking, some guys in "Radboud University" I think it is located in Netherlands have hacked into the RFID for "Mifare Classic" here is video and the link
Link: http://www.ru.nl/ds/research/rfid/



Thanks for your time

BR
Ahmed Essam

Sunday, March 09, 2008

Windows Mobile Hack Videos

Peace be upon you

How are you guys? someone suggest that I should publish the video of the "Turning windows mobile into spying device" in English, because some people get here in language other than arabic so here it is the videos in Arabic and English and I hope that you like it.
P.S: Sorry for my poor English :)

Original post link : http://www.ahmed-essam.com/2008/02/turning-windows-mobile-device-to-spying.html

English Demo
Link : http://www.youtube.com/watch?v=hESMx8zs8lM


Arabic Demo
Link : http://www.youtube.com/watch?v=ydotWSkX8PA



Thanks for your time :)

BR
Ahmed Essam

Saturday, March 08, 2008

Adding code to Singularity

Peace be up on you
Yesterday, I have publish post about starting up the Singularity project, today I was seeking for more, in my opinion more is get my self into it, here what I have done, I have start a debug session with the virtual machine, and I go with code, step by step execution, and I found that there is file called shell where all code get back to it, guess what is this, it is the main loop, where the system receive its commands. I have added a few lines, the lines that I have added is, adding the new command name ,description and the call back function that will be used when the user enter the command, so I have write few lines for it, and I rebuild the project in "Tiny" configuration , here is snapshots for what I have got

Here is the command that I have added to the command list that is available in singularity

Here is the result when call the command.
What I have done is not fully right :D, I should read more about the architecture the documents are available at this path
%Singularity Folder%\docs\Design Notes

soon I will try to add more effective code, like showing some Arabic characters on the screen, I hope that I got some time to do that, Thanks for your time

BR
Ahmed Essam

Friday, March 07, 2008

Singularity Step by Step

Peace be upon you
Today I will go with you in something "from my point of view" is very cool and really nice idea, Microsoft Research guys was working on something called Singularity, this project aim to do operating system that highly safe, what does it mean"Highly Safe OS"? it means that the operating system will not has memory problems that was exist before(before means current days), Buffer over flow, memory leaks and so on, if you have history with development you will know that memory mistakes is the source of all evilness (Viruses and Worms) every evil thing depend on some kind of problem in the operating system or some application.
Now What Microsoft research guys have done is very cool, they made Operating System that uses .NET Framework as base for it, they did everything run above the framework, even the hardware drivers it run above the .NET framework, as they said before 95% of the Kernel is written in C#, 3% C/C++, 2% Assembly.
this Operating System "Singularity" make things run more safe, if this idea works out, in near future writing a virus will need lots of work and real genius, because being above the .NET framework means that the assembly "Application" that is running will have certain permissions and can't be just broken like what happen now, some how it will be hard to be hacked, it doesn't mean that all Operating System will be fully safe or it will not have memory problems, it will just prevent the memory problems from happen, it means that you will not have crashes "it will be very rare", now after this long introduction let us get our hands dirty with some work.
Required tools to have Singularity OS working
first you have to have some tools let us sort it,


Building Singularity OS

First of all install .NET framework 1.1


After unzipping the Downloaded file from codeplex "Please be sure to put the files in folder without any spaces in its name", click start-> Run
write"cmd" then press Enter


press enter again when you see this stuff show up on the screen

After that you will have a shortcut on your desktop for the RDK

After that right click on "My computer" -> click "Properties" -> click on "Advanced" tab -> click on "Environment Variables"
in the "System Variables" click on "New", in the "Variable Name" enter "SINGULARITY_ROOT" and in the value write "%Path where you unzip the file%\base"

double click on the "Singularity RDK 1.1" icon on your desktop, now you have command line window that is ready to receive commands and prepared for building the Singularity OS

write this commands in the command window
cd build
msb /t:build ..\Distro\World.proj
"world.proj" as described in the documentation has everything in the project, which means that you will build all the code, if you want to do something quick, use Tiny.proj

This operation may take lots of time, on my machine it took 50 minutes

after that in the last few lines, you will have the path of the .iso file "bootable" written in the log file
the log file name is written at the end of the screen log, when you open the log with notepad or what ever you use, search for ".iso"

Here is the files, this image is ready to be used and burnt on CD, to start it on real machine








Preparing the Loopback adapter
We need the Loopback adapter to allow the Microsoft Virtual PC to connect with the Real PC, in our case we need it because we will use the Network boot to start up the Singularity.

Go to control panel and double click on "Add Hardware"

Welcome screen, just click on Next

Select "Yes, I have connected my hardware" and press Next

at the bottom of the list select "Add a new hardware device" and press Next


Select "Network Adapters" from the categories list and press Next

From the left menu select "Microsoft" and from the right list Select "Microsoft Loopback Adapter" and press Next

Press"Next"

Now you have the loopback adapter and ready to be consumed

Now you have the new connection appears on "Network Connections"

Select properties of "Loopback adapter connection" and select "Internet Protocol" and press "Properties"

Enter the IP address "10.99.99.1" and the network mask is "255.255.255.0"








Preparing the Virtual PC
Press"New"

Welcome Screen Just press "Next"

Select "Create a virtual machine" and press Next

Enter the Machine name

Select the type "Other",

Select RAM size needed, I don't think we will need more than what is allocated as recommended

Select "new Virtual hard disk" and press "Next"

select the path and the name of the Virtual PC hard disk file name

press finish.

from the Virtual PC, click on "CD" Menu and click on "Capture ISO image"

after that the system will start as you can see, but I faced some problem with the keyboard, it wasn't working, I think there is a problem, or something wrong I have done :D, but it will work when I boot from the network, wait and I will show you.








Preparing for booting and debugging the system


open "Singularity RDK 1.1" from your desktop, enter this commands
cd boot
bootd /dhcp /tftp
this command open port and do some kind of network boot,

open anther "Singularity RDK 1.1" and write this commands
cd build
boottest ..\boot\pxe.vmc
the last command loads the floppy disk image, all what it does is load the operating system from the network from the ip "10.99.99.1" that's why we setup the loopback adapter

In this snapshot I tried to open the WinDbg but it didn't work, because the command can't find windbg.exe

Here I have added the path of the Windbg to the system path , the I tried again using the this command
cd build
dbg /pipe

after that the debugger started and as you can see there is 2 parts, part for the debug strings, this strings are coming out as trace log, down there the code where you are working on, use the command "break" in the "singularity" windows


when you use "Break" command, it cause a break point in the debugger, you can use this debugger to navigate through everything, stack, memory, current registers and so on

at this point, I wanted to show, how to start his stuff to be able to add our code, the code that i am planing to add and I hope that I success in that is adding Arabic Support to output screen, please pray for me, thanks for your time, it was really exhausting to write such topic, it takes lot of time, anyways it is good as long as you read it, thanks for your time



I forgot to tell you about the Network boot loading,
open the "Singularity RDK 1.1"
write this command
.\built\boottest.cmd /Net .\boot\pxe.vmc
here is the result in the command window, it will be pop anther window

here is the window, it is preparing and listening to the upcoming requests

here it is, now it is feeding the Virtual machine with booting needs,

P.S: in this network booting, I have used the Tiny build of the project



BR
Ahmed Essam