Chapter 13. Inside Android

Android is Linux, but something as a standard Linux does not exist. Linux means "just" the kernel. To have a working system the Linux kernel needs some more packages and setup. Android went it's own ways that is very different from a regular Linux desktop setup (boot process, X server), but taking over a lot of the standard features to protect the device against all unwanted things that could be happen. One fundamental thing is the root permissions (Administrator). Every file, program or process belongs to a user and can be restricted. Android devices make use of that. In a console type id to see who you are and to what groups you belong. You probably will not be root and therefore a lot of system commands and modifications are not allowed to do. This is OK like that and prevents you from damaging your Androids software setup.

There are ways to root the device to be able to work as root, but this is just for experienced professionals and people that know how to recover the physical device. To run such tests it is recommended to install Android on a PC as in virtual box where snapshots can be made and going back to the installation as it was before a screw up.

There are Linux console apps that allow you to observe Linux:

Figure 13.1. Terminal

Terminal


As any other Linux system the kernel is loaded and starts the program /init (this might not always true since the program started can be passed via boot loader)./init.rc and /init.<platform>.rc

The C++ programmed system process /system/bin/app_process zygote is started by /init and is the key, to run other processes.

Regular applications are written in java, however using special byte code requiring the register based Dalvik virtual machine instead of the stacked based standard java virtual machine. Due to this small difference standard java byte code can be converted to Dalvik byte code. This allows to use any standard Java environment for development. When finished the Dalvik compiler dx can convert java byte code in dex-code (Dalvik Executable).


Linurs Hosttech startpage