[Android General] sikiko:
System.out.println("Hello peoples");

==>The purpose of this guide is to help people who don't know anything about programming,aren't modders,guys with knowledge about technology.

==>Initially I loved computers and their capabilities and have a little knowledge on the C and Java languages and just how computers (think).

You have to understand that computing tries to emulate human behaviors on how to solve problems.This is where programming kicks in.

So what is Android?

===================

1)Android in general is an operating system that was meant to run on mobile devices e.g. cell phones

and has expanded to tablets and notebooks.Android is divided into three language groups:

a)the system's framework and apps are written in java.

b)the Android's core [kernel] is pure C -language.

c)the Android's libraries are written in C++.

App libraries are called by apps that need more functionality that java can't provide.These are usually plugins like

decoders e.g. ffmpeg libraries that are used in video decoding,flash-players e.t.c. Here,java native methods are used and the android NDK platform

is used to enable the java apps call these libraries during execution.(Please read further on Android SDK,NDK and Jni).

So what happens when you have just flashed that new Rom.

====================================================================

First you have to understand that cell phones have their own embedded firmware not including the recovery and you will see why.

a)the recovery partition can be flashed to install aftermarket recovery roms.So even if you mess your recovery,you can still install again.(This varies with different phones).

b)their is that system chip which you cannot touch and there is a reason for it.Think of this partition like a PC BIOS.If you mess with your bios

your system is toast aka Bricking the system.Since phones are classed as embedded systems,manufactures don't want people messing with it as it would result into

cryptic errors and system vulnerability.

when the on button is pressed something simple yet complicated happens:

1==>The kernel which is compressed to save space usually in a (zImage) format is deflated or expanded.Since your NAND chips are partitioned,the kernel is given a very

special chunk in which is protected from user data.

2==>The kernel finds which base address it needs to start executing e.g.(0x00200000) and mostly when you put a wrong kernel base

address your phone enters into a boot-loop because arguments are being passed to invalid locations.It is important to know where your kernel base address

starts.You can try looking it up in your kernel sources(try searching for the mach msm folder and into the makefile) or just goggle it up or use Xda-Kitchen.

3==>with the correct kernel base address,execution starts.Usually the (init.rc) file in the (ramdisk folder) gives symlinks and creates structures i.e. folders that will house

modules and sets the correct paths to android files and framework.

4==>After arguments have successfully been passed,the handles are now passed to Android.Basically Android checks for (init.d) scripts that are available

this is true to GingerBread and Cyanogenmod 7.After that audio checks are done followed by camera services and then arguments are passed to (core.jar),a

critical framework file which is huge around 50Mb in size in CyanogenMod 7.

5==>Here the DalvikVM (Dalvik virtual machine) is called and the process of optimizing your system files starts.The framework get optimized first as this contains critical

code needed to run your device.Then your flingers and renderers and called.This are engines used by android e.g. (pixelflnger) which is used in touchscreen.

Your system's sensors are usually started around this point (your compass,light sensors e.t.c)your phone apps e.g. contacts,calendar get optimized around this point

and depending on the number of apps your manufacturer installed,it will take some time.

6==>your network get's activated around this point and is probably the time the capacitive buttons and lights on your gadget light up.This is usually a good indication

that your system has loaded.When your bootanimation ends the handles are passed to activate your home launcher.There is usually still a lot of activity going

on to fully ready your system and this is why if you try to use it immediately especially on low-end phones,your system lags or get (not responding) errors.

common misconceptions

=====================

1==>There is are reason why goggle gave minimum specifications needed to run Android because this is a full operating system(OS) unlike the past relic

phones that ran on 50MHz processors.

2==>please don't complain that some of your Ram is not the same as specified on the phones catalog(e.g. you have 256Mb of Ram but in the task manager it indicates you have 179Mb).

There is a reason to it.There are core processes that eat a chunk of your Ram and are hidden so that you don't try silly stuff like trying to kill them in thinking that your are trying to get more memory.

Think of it like this,it's like trying to kill (services.exe or svchost.exe) processes in Windows.You will just be trying to get system hangs,bluescreens

or just a system crash.

Will Add more info later.Please feel free to correct anything i might have not addressed properly or share your views.

Happy modding.

Kernel topic

============

In simple terms,the kernel is the core of any operating system e.g. windows, Mac,or any Linux distro like Ubuntu and Android.Android kernels come mostly

in the form of a compressed kernel (zImage).The kernel is written in pure C-language,which gives it direct access to memory and registers unlike java

which has to pass through the java VM(virtual machine).This makes code written in C-language to be very fast and robust but also dangerous.

==>Many Androids in the eclair regime ran on kernel 2.6.29. This was not a complete kernel and as by my experience there was alot of code missing from it.

2.6.29

======

==>a lot of androids did not have adb functionality due to the framework being embedded to allow USB mounting to PC.This was a very rigid method

of doing it(also a very old method).

==>In the case of other devices, when viewing the internal task manager,many processes were viewed as (0.00) byte files.In essence you could not determine

the amount of RAM your app was taking.This is true in the case of huawei u8120.

==>In the case of shutting down the phone,even in some cases under load,it did so very fast.It killed threads and handles mercilessly. Many people misunderstood

this concept and thought their phones ran faster as compared to 2.6.32 kernel.

2.6.32.9

========

Here there was a ton of improvements as developers and modders became more aware of support and tweaks.

==>Fixed issues like the internal task managers.It was now possible to accurately know how much RAM your apps were taking.

==>Resolved how the android system shutdown.Instead of merciless killing of handles and threads still running,it killed them appropriately.This is why

when shutting down your system takes a while.You can use adb to see these events.

==>Usb mounting to pc was also made somewhat generic and flexible across many devices.

==>It did change some methods on how the camera is being accessed mostly in eclair,donout and earlier versions of android phones.This issue made

cameras not function.

==>wifi methods were also changed and developers and modders had to re-write their code to allow compatibility.

==>This was also the year of many froyo phones and overclocking was a common thing.

extra notes

===========

During eclair era,many developers were in such a hurry to produce new android phones every few months that they never even thought of long-term support

to newer versions of android that would come much later.This is where i have to praise Iphones for standardisation of its OS across all of its devices.

==>If you try to copy paste code from 2.6.32.9 and paste it into 2.6.29 and expect it to work then expect tons of errors when compiling.The (g_android)

module was properly coded into 2.6.32.9 so if you try enabling it an older kernel,expect errors.

==>If you are a modder and looking to buy a new phone,please see if it has a fan base of coders or support.Avoid buying phones where you will not get

any support from the manufacturers or other devs e.g Huawei Technologies.This company sucks alot.After they produce a phone they forget about you the customer

so you will have to handle the upgrades all by yourself.

Do not use this command (make -i)when compiling kernels.It will skip errors and you may smile after it's finished but the end is just a tragedy.your kernel is bound

not to function properly or even function at all.

Happy modding.