I found out that there\'s so many apps out there which required root access.
How were they able to create those apps? Where did they found all the resource? Is ther
You need su installed in the phone (of course). Details here: http://forum.xda-developers.com/showthread.php?t=682828
And to use it, is as simple as running su command. Here is a sample I use to reboot the phone programmatically (copied from this answer: Android 2.2: Reboot device programmatically )
try {
    Runtime.getRuntime().exec("su");
    Runtime.getRuntime().exec("reboot");
} catch (IOException e) {
}