2024-07-11
한어Русский языкEnglishFrançaisIndonesianSanskrit日本語DeutschPortuguêsΕλληνικάespañolItalianoSuomalainenLatina
In Android, useadb shell ps
The command can view the process information running in the current system. When you add-T
option (note that the standardps
Commands in Androidadb shell
May not be directly supported in-T
option, which is usually the same as the Linuxps
The command is slightly different), you may want to see more detailed thread information, but the standardadb shell ps
Commands are not directly supported-T
to list the threads. However, we can discussps
The general meaning of command output and the meaning of process status (such as D, T, Z).
adb shell ps
General meaning of the outputOn Androidadb shell
middle,ps
Commands are usually not provided-T
option to list threads directly. However, it can list information about processes, including:
In Linux (including the underlying Android),ps
The output of the command usually contains the status of the process. These status codes can include D, T, Z, etc., which represent different process states:
D (Uninterruptible sleep state): The process is in an uninterruptible sleeping state, usually because it is waiting for an I/O (such as a disk write) operation to complete. In this state, even if a signal is sent to the process, it will not respond.
T (stop state): The process has been stopped (usually bystop
Signals) can neither execute nor be terminated. However, a signal can be used to cause it to continue running or terminate.
Z (Zombie state): This is a process that has terminated, but its parent process has not yet passedwait()
orwaitpid()
The zombie process has released most of its resources but still retains a process table entry so that the parent process can query its status.
Please note that on Androidadb shell ps
These status characters may not appear directly in command output (especially if the output is not specially configured or formatted) because they may require additionalps
Options (such as-eo state
In Linux, however, Androidps
The available options and output formats of the command may differ from the standard Linux