Thursday, January 3, 2013

Baby named ANDROID of Mother LINUX...



We all know that 'mother' is very important in life of every person. In computer hardware theory also the term 'mother' is of great importance. As every one knows that the major hardware component of computer is 'mother-board'. We all might think why name is given as mother-board, why not father or daughter or son-board? The simple reason behind this is that mother is the person who looks after every chores being carried out. Mother is one who binds some rules for the family. Similarly in case of hardware theory also the name so given is because mother board carries out all the functions. Similarly, in software field also we get to see the 'mother'. In a precise manner we can say that Android is the child of mother Linux-kernel.


         Fig 1. Android with Linux kernel

In today's era, Android is the heartbeat of any handset or machine, but the base behind this huge spreading application is, mother Linux. Why is Linux given so much importance or why is Linux kernel called as the base for the development of android apps??Android is overwhelming. Android integrates Linux kernel at the bottom of its software stack. In fact Android was created on top of Linux Kernel 2.6.

Android is open source, therefore any manufacturer can access it, customize it and adapt it according to the requirements of their own gadget. This is the reason why Android is found on variety of gadgets. With camera, without, high-end and low-end, whether a full-fledged tablet or a low-end entertainment device, Android can run on any platform. This has not only given freedom to manufacturers to customize the operating system, add personalized skin, applications or strip-off default Google services, adapt the OS to run on high/low spec gadget but it has also given freedom to people-freedom of choice. A kernel is the first layer of software that interacts with the device hardware. The kernel is responsible for providing basic architectural model for process scheduling, resource handling, memory management, networking and isolation etc. It must be noted that while Android is built on Linux Kernel, Google has maintained its own forked version of Linux Kernel specifically for android since 2010.
 
                        Fig 2. Architecture of Linux kernel

There are number of reasons for selecting Linux kernel. Linux Kernel boasts some proven core features that are integrated in Android operating system.
Following are some features:

1.      Easily portable: Linux runs on devices of diverse architecture from numerous machines like supercomputers & smaller devices like motor bikes. This is due to the fact that Linux is an immensely portable platform. It is fairly easy to compile Linux on various hardware. What do you think is the major concern of Android? It's that it is picked by many manufacturers and is used on a variety of gadgets. Linux makes that possible. Linux brings Android a level of hardware abstraction. Most parts particularly the low-level ones are written in portable C code that can be accessed and modified by manufacturer easily. This means manufacturers can pick up Android and modify it to adapt it according to their hardware requirements rather that improving the hardware to fit the software.
2.      Essential property: Linux brings to Android some useful features. The Linux Kernel 2.6 includes these features:
Memory Management: While developing for mobile devices memory handling becomes a point of great concern. Thanks to Linux Kernel over which Android is built. You can free yourself from the worry. Linux will handle Linux kernel for-threading and low-level memory management for Android. Linux kernel is responsible to manage the core feature of any mobile device i.e. memory cache. Linux kernel manages memory by allocating and De-allocating memory for the file system, processes, applications etc.
       Fig 3. Baby Android with mother Linux (kernel)
     3.   Other properties:
Process Management: Linux Kernel is responsible to start, stop and execute the program. For a beginner a process can be thought of as an instance of computer program. i.e. whenever a program runs on computer, the OS creates its instance or process for it which is executed by the OS. In case of Android, Linux is responsible to allocate resources to various processes that need them.
Driver Model: As evident this is the layer where all the device specific drivers run. Here Linux ensures that your application is able to run on Android. Hardware vendors can develop their drivers into Linux in a familiar environment. That is giving plenty room for hardware vendors to optimizing OS.

    4.     File System Management:
Linux also manages the file system which in turn controls the data storage service for Android device.

    5.     Network Stack:
Linux Kernel is responsible to communicate with the network. It also controls networking stack, drivers, routing devices and network adapters.

    6.     User account (Security):
Linux kernel handles the security between application and the system. Linux takes control of authentication of users and is responsible for user management. Besides this Linux kernel is also responsible for power management and for undertaking various services like Internet search, voice communication, system logging etc.

    7.     Security:
Linux runs in scientific research labs, supercomputers and systems for mission critical tasks. Android completely relies on Linux for security. All Android applications run as distinct Linux processes under permissions set by Linux system.
Thus we can say that the kernel of the Linux is the back bone for Android technology.

APTonCD – Create Backup of Any Installed Packages in Ubuntu


The most common method that is used to carry out installation of any sort of additional packages in Ubuntu is the apt-get. The apt-get following the name of the software package you specified to install, it searches for that particular software from the Internet and if found, apt-get downloads and installs it on your system. But there is a tool which allows you to install the download packages on your system without downloading. The tool named, APTonCd, which is a graphical tool that allows you to create one or more CDs or DVDs of all the packages that you’ve downloaded via apt-get and thus creates a removal repository that you can use on other computers with a single action. The main advantage of APTonCD is that you don’t have to download the packages again if you are doing a fresh installation on your or other systems. You can restore the previously installed programs easily. Let’s see how we can do this in Ubuntu.
Installation:

First you have to install APTonCD.

You can install APTonCD from the Ubuntu Software Center.

                                         Fig1.Search APTonCD from Ubuntu Software Center

Or you can install it through your terminal. Run the following command:
         sudo apt-get install aptoncd
                  Fig2.Install APTonCD through terminal
Once installation is complete, you can launch it from the Dash.                             
                                                      Fig3.Launch APTonCD from Dash             
Backing up Packages:

After you launch it, you can see the following window. Click “Create” button to create a disc with your downloaded, cached deb packages on it. This copies packages from your APT cache located in the /var/cache/apt/archives/directory to the disc.
                                                Fig4.Starting screen to Create the backup.  
Next step is to select the packages which you would like to write to the disk. By default it selects all the packages but you can deselect them if you don’t want those packages to be written on the disc. And also you can add some additional packages you want by clicking the Add button.
                                                      Fig5.Selecting the packages.   


Once you have selected your packages then click the Burn button.

After you get a Window that allows you to select a CD or DVD image, give it a name and the location for the ISO image file, and select optionally create a meta-package.
                                          Fig6.Specifying the installation disc properties.
Click the Apply button and APTonCD will create an ISO image at the location you specified.                                               

                                                 Fig7.Creating the ISO image.


                                                      Fig8.Scanning the packages.

Once the image is created, you can have APTonCD launch a disc-burning application, Such as Brasero, to burn it to a disc immediately. You can burn the ISO image later also. And if you don’t have a disc drive, then there is nothing to worry, you can also save the ISO image as a file and you can transport it using a USB drive between computers.
                                                     Fig9.Burning the packages to the disc

Installing All Packages:
If you burnt the image to disc, you can insert it into your drive by opening it in a file manager window, and double-click the package named ”aptoncd-metapackage” to install it. This will install all packages available on the disc. The package will not be present if you didn’t have APTonCD create a meta-package.

                                                       Fig10.Selecting the aptoncd-metapackage.

If you have not burn into a disc and you have just an ISO image then you can mount it as a disc and install the packages from it.
Adding a Disc as a Repository:
The File -> Add CD/DVD option in APTonCD adds the disc to APT as a software source. The disc will be used as a repository in APT, so you can install packages from it using Synaptic, apt-get, or any other package management tools, even if you’re offline.
                                             Fig11.Adding CD or DVD as APT source.
Restoring Packages to Cache:
Before you click on the Load Button on the restore screen, you have to install the hal package on your system. To do so, run the following command:
                 sudo apt-get install hal
                   Fig12.Installing the hal packages.

Restart APTonCD after running this command and you’ll be able to restore packages by Restore button. You can restore packages to any of your system.
                                                       Fig13.Load the packages.
Use the Load button on the Restore screen to specify a disc drive or ISO image file.
                                                 Fig14.Selecting an ISO image.