How to patch the source code or revert it back?

We often have the situation of testing or applying someones patch or to remove the changes made by a patch. It may happen that a patch is not correctly applied and result into to dirty source code. This simple bit of information will help you to carefully apply the patch to your source code and also revert the changes back to original state if required. I’m using linux kernel version 3.0.42+ as example and Elan Touch Screen patch file(patch-linux-3.0.42+_elan_ts.patch).

Continue Reading…


Grub Rescue commands

The grub rescue> prompt comes when grub is missing. Some times if you have dual boot system and you  delete any partition contains win 7. To rewrite the partition table when you reboot, you can stuck with this grub rescue prompt. Here you find no commands works, So dont panic follow these steps, and you will get your lost child 😀

Step 1. List the partition you have on the disk
grub-rescue> ls

Step 2. The above command display some partition and from these partition find out which has /boot/grub,Which contains several .mod files.
grub-rescue> ls (hd0,5)/boot/grub
If you will find some files, it means this disk contains the grub file, else search in other partitions.

Step 3. set this partition
grub-rescue> set prefix=(hd0,5)/boot/grub

Step 4. Now insert module on kernel using insmod (install loadable kernel module) command.
grub-rescue> insmod normal

Step 5. Restart the machine

Now after the machine boot in linux update and install your grub
Open a terminal and type below commands

$ sudo update-grub
$ sudo grub-install /dev/sda



RED5 installation on ubuntu 12.04

Red5 is open source streaming server under Apache licencing. Most of the video conferencing tools like BigBlueButton Open Meeting uses RED5 for the video streaming server.
In this post I will explain the latest version red5-1.0 installation on ubuntu 12.04. We can also install red5 using the source by compiling it using ant.

Step 1. Update the repo
$ sudo apt-get update

Step 2. Install the package. It contain all the basic libs and java required for the red5
$ sudo apt-get install red5-server

It will take some time depends on your internet speed.

Step 3. After Installation is complete open browser and type
url http://localhost:5080


You will find red5 page. Now you need to install the packages to run the demos and to use the red5 server as streaming server.

Step 4. Download the demos
$ wget

Step 5. unzip the file and change the directory
$ unzip -d red5
$ cd red5

Step 6. Copy the demos and installer to working directory of red5
$ sudo cp -R webapps/root/demos /var/lib/red5/webapps/root/demos
$ sudo cp -R webapps/installer /var/lib/red5/webapps/installer

Step 7. Change the ownership to red5
$ sudo find /var/lib/red5/webapps/ -type d -exec chown _red5 {} \;

Step 8. Now click on install link which you find on the page open by above link.

Step 9. Install all the packages listed. It will take some time depends on the internet speed.

Step 10. Go back to home page and click on demos to check the demos. click on view video link you will find a new page and then click on connect find it on the right of the page and to left you will see list of default videos.


If the default video starts your installation is successful. If you find the connection error like

163) Connections: true | true
(80550) connected?: true
(80684) NetConnection.onStatus:
description = No scope “oflaDemo” on this server.
code = NetConnection.Connect.Rejected
level = error

your oflaDemo war package is not proper to solve this problem you have to download this package and placed it in

$ wget

unzip the war file
$ unzip oflaDemo-r3989-java6.war

restart the server
$ sudo service red5-server restart

Refresh the page and you will find the video running …



Command-line Android

We often use Eclipse for Android programming. Of-course creating an Android project is simple and easy for a beginner and advance user using Eclipse. Eclipse creates a file hierarchy needed for an Android project. Also building and running an apk is even simpler. But for those who don’t want to switch to GUI or who want to stick to the terminal for Android programming, read on ..

Continue Reading…