To root a device means to be able to run arbitrary programs as root. So by definition, if the machine isn't rooted, you can't run programs as root. There are programs running as root on an Android device. But you can't control what they do.
Android is not a unix operating system. The kernel is the same as Linux, but the rest is different. As far as the kernel is concerned, there are only three ways to run a program as root:
- It may be invoked by the kernel directly. When the kernel has finished booting, it invokes the
init program as root. Connecting a device may also cause the kernel to run a program as root in some configurations.
- It may be invoked by a program that is itself running as root.
- It may be a setuid executable belonging to root.
On a unix system, programs like su and sudo are setuid root. They can be invoked by any user, and they decide (based on who calls them, what password they enter and so on) whether to run a shell or other program as root or return an error status. It's these programs, not the kernel, that performs authorization. The kernel only manipulates numerical user IDs, it doesn't handle user accounts and passwords.
A standard Android system doesn't have any user accounts (user IDs are used to isolate applications, not to isolate users). It doesn't use password-based authorization in the unix sense (it can use a PIN or other authentication method to authenticate the sole user of the system). To root an Android device means to arrange for some shell to run as root, typically to get adb shell to give you a shell running as root. There's still no root password, since there's a single user of the device.