Android:进程UID定义

博客内容介绍了在Android系统中,应用进程的UID通常以app开头,编号为大于10000的数值,该数值与进程PID减去10000相等。这些信息可以通过adb shell ps命令查看,例如com.andy.androidtest的UID为10037。此外,还提到了AID_APP在Android_filesystem_config.h文件中的定义。
摘要由CSDN通过智能技术生成

当在adb shell中查询当前进程情况时(ps),可以看到app应用都分配了一个user属性,

如app_37分配给了自己创建的应用com.andy.androidtest,在不卸载这个应用之前,这个属性是保持不变的。

非系统的应用都是以app开头命名,之后的编号就是uid(确切的说是uid-10000)。

# ps
ps
USER     PID   PPID  VSIZE  RSS     WCHAN    PC         NAME
root      1     0     312    220   c009b74c 0000ca4c S /init
root      2     0     0      0     c004e72c 00000000 S kthreadd
root      3     2     0      0     c003fdc8 00000000 S ksoftirqd/0
root      4     2     0      0     c004b2c4 00000000 S events/0
root      5     2     0      0     c004b2c4 00000000 S khelper
root      6     2     0      0     c004b2c4 00000000 S suspend
root      7     2     0      0     c004b2c4 00000000 S kblockd/0
root      8     2     0      0     c004b2c4 00000000 S cqueue
root      9     2     0      0     c018179c 00000000 S kseriod
root      10    2     0      0     c004b2c4 00000000 S kmmcd
root      11    2     0      0     c006fc74 00000000 S pdflush
root      12    2     0      0     c006fc74 00000000 S pdflush
root      13    2     0      0     c00744e4 00000000 S kswapd0
root      14    2     0      0     c004b2c4 00000000 S aio/0
root      22    2     0      0     c017ef48 00000000 S mtdblockd
root      23    2     0      0     c004b2c4 00000000 S kstriped
root      24    2     0      0     c004b2c4 00000000 S hid_compat
root      25    2     0      0     c004b2c4 00000000 S rpciod/0
root      26    2     0      0     c019d16c 00000000 S mmcqd
root      27    1     740    220   c0158eb0 afd0d8ac S /system/bin/sh
system    28    1     808    208   c01a94a4 afd0db4c S /system/bin/servicemanager
root      29    1     3736   492   ffffffff afd0e1bc S /system/bin/vold
root      30    1     3716   460   ffffffff afd0e1bc S /system/bin/netd
root      31    1     668    200   c01b52b4 afd0e4dc S /system/bin/debuggerd
radio     32    1     5392   616   ffffffff afd0e1bc S /system/bin/rild
root      33    1     102056 25344 c009b74c afd0dc74 S zygote
media     34    1     22764  3412  ffffffff afd0db4c S /system/bin/mediaserver
root      35    1     812    276   c02181f4 afd0d8ac S /system/bin/installd
keystore  36    1     1616   336   c01b52b4 afd0e4dc S /system/bin/keystore
root      37    1     740    224   c003da38 afd0e7bc S /system/bin/sh
root      38    1     852    296   c00b8fec afd0e90c S /system/bin/qemud
root      40    1     3396   188   ffffffff 0000ecc4 S /sbin/adbd
root      51    37    796    252   c02181f4 afd0d8ac S /system/bin/qemu-props
system    59    33    190964 39172 ffffffff afd0db4c S system_server
app_23    110   33    139004 20216 ffffffff afd0eb08 S jp.co.omronsoft.openwnn
radio     114   33    145612 22484 ffffffff afd0eb08 S com.android.phone
app_25    117   33    150104 24568 ffffffff afd0eb08 S com.android.launcher
system    119   33    137096 18980 ffffffff afd0eb08 S com.android.settings
app_0     151   33    144956 24500 ffffffff afd0eb08 S android.process.acore
app_22    162   33    132052 18252 ffffffff afd0eb08 S com.android.music
app_12    171   33    133680 18712 ffffffff afd0eb08 S com.android.quicksearchbox
app_7     180   33    130900 17920 ffffffff afd0eb08 S com.android.protips
app_2     189   33    134704 19272 ffffffff afd0eb08 S android.process.media
app_9     203   33    131712 18736 ffffffff afd0eb08 S com.android.alarmclock
app_15    214   33    144660 19600 ffffffff afd0eb08 S com.android.mms
root      222   40    740    228   c003da38 afd0e7bc S /system/bin/sh
root      223   222   692    292   c009b74c afd0dc74 S logcat
app_10    232   33    132760 17612 ffffffff afd0eb08 S com.android.defcontainer
app_30    247   33
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值