许多朋友因为业务需求尝试直接通过上层应用或init.rc
脚本使用echo
或write
命令来修改某些系统节点的值。但在这种尝试中,经常遇到权限问题,尤其是在非root的用户版本的Android系统中。
Android系统 理解/sys/目录权限和UID和GID?
- ADB Shell权限:为了直接从上层写入值,首先需要确保
adb shell
具有root权限。这样,我们才能修改/sys/
目录下的某些节点。 - 应用权限:如果想让应用有权修改这些节点,应用需要能够调用
su
命令并使用echo
来写入。 - 通过
init.rc
写入:另一种方法是在init.rc
脚本中使用on property
来修改某些节点,并通过属性触发这些更改。但这种方法可能会遇到SELinux权限问题。
我以/sys/kernel/debug
为例,来探讨为什么在上层,即使是shell权限,也无法直接写入这些节点。
什么是/sys/kernel/debug目录?
/sys/kernel/debug
是Linux内核的一个特殊目录,它是通过debugfs文件系统在内核编译和运行时生成的。这个目录包含了一些用于调试和诊断内核问题的接口。
在Android系统中,这个目录通常在设备启动时挂载,具体的挂载过程在device/rockchip/common/init.rockchip.rc
脚本或者其他相关的启动脚本中进行。这个脚本会在系统启动时运行,并执行一些初始化任务,包括挂载debugfs文件系统。
/sys/kernel/debug目录的默认权限是什么?
/sys/kernel/debug
目录的默认权限通常是只有root用户才能读写。这是因为这个目录包含了一些敏感的内核调试信息,所以通常只有具有root权限的用户才能访问。
在Android或者其他基于Linux的系统中,可以使用chmod
命令来修改文件或者目录的权限。然而,/sys/kernel/debug
目录是一个特殊的目录,它是在内核层面进行管理的,所以你可能无法直接通过chmod
命令来修改它的权限。需要先获取root权限,然后才能修改这个目录的权限。
如何修改/sys/kernel/debug目录的权限?
如果想要修改/sys/kernel/debug
目录的权限,有以下几种方法:
- 使用
**chmod**
命令:可以在adb shell
中使用chmod
命令来修改文件或者目录的权限。这个命令的基本格式是chmod [permissions] [file/directory]
。例如,如果想要给所有用户读、写和执行的权限,可以使用chmod 777 [file/directory]
。
需要注意的是,这个命令需要在debugfs文件系统挂载之后才能执行,否则/sys/kernel/debug
目录可能不存在。另外,这个命令需要root权限才能修改其他用户的文件或目录的权限。在一些设备上,可能需要先获取root权限,然后才能修改这个目录的权限。 - 修改内核源码:如果想要在内核启动时就修改
/sys/kernel/debug
目录的权限,可能需要修改内核源码。具体来说,需要找到创建这个目录的代码,然后修改创建目录时设置的权限。这个代码通常在fs/debugfs/inode.c
文件中,可以在这个文件中找到相关的代码。
在这个文件中,有一个宏定义了debugfs文件系统中文件和目录的默认权限:
#define DEBUGFS_DEFAULT_MODE 0700
如果想要修改这个默认权限,可以将这个宏改为其他值,例如:
#define DEBUGFS_DEFAULT_MODE 0777
然后,需要重新编译和烧录内核。
Android中UID和GID是什么?
在Android系统中,每个应用都有一个唯一的用户ID(UID)和一个或多个组ID(GID)。这些ID用于实现应用的沙箱隔离和权限管理。
Android中UID和GID是如何分配的?
在Android系统中,UID和GID的分配是在应用安装时由PackageManagerService处理的。具体的代码可以在PackageManagerService.java
文件中找到。
UID和GID的具体值是在android_filesystem_config.h
文件中定义的。这个文件包含了一些预定义的UID和GID,例如系统服务的UID和GID。可以在Android源码的system/core/include/private/android_filesystem_config.h
路径下找到这个文件。
当一个新的应用被安装时,PackageManagerService会为这个应用分配一个新的UID和GID。这个过程在PackageManagerService.java
文件的installNewPackageLI
方法中进行。这个方法会调用assignUserIdLPw
方法来分配一个新的UID。
#define AID_ROOT 0 /* traditional unix root user */ /* The following are for LTP and should only be used for testing */ #define AID_DAEMON 1 /* traditional unix daemon owner */ #define AID_BIN 2 /* traditional unix binaries owner */ #define AID_SYSTEM 1000 /* system server */ #define AID_RADIO 1001 /* telephony subsystem, RIL */ #define AID_BLUETOOTH 1002 /* bluetooth subsystem */ #define AID_GRAPHICS 1003 /* graphics devices */ #define AID_INPUT 1004 /* input devices */ #define AID_AUDIO 1005 /* audio devices */ #define AID_CAMERA 1006 /* camera devices */ #define AID_LOG 1007 /* log devices */ #define AID_COMPASS 1008 /* compass device */ #define AID_MOUNT 1009 /* mountd socket */ #define AID_WIFI 1010 /* wifi subsystem */ #define AID_ADB 1011 /* android debug bridge (adbd) */ #define AID_INSTALL 1012 /* group for installing packages */ #define AID_MEDIA 1013 /* mediaserver process */ #define AID_DHCP 1014 /* dhcp client */ #define AID_SDCARD_RW 1015 /* external storage write access */ #define AID_VPN 1016 /* vpn system */ #define AID_KEYSTORE 1017 /* keystore subsystem */ #define AID_USB 1018 /* USB devices */ #define AID_DRM 1019 /* DRM server */ #define AID_MDNSR 1020 /* MulticastDNSResponder (service discovery) */ #define AID_GPS 1021 /* GPS daemon */ #define AID_UNUSED1 1022 /* deprecated, DO NOT USE */ #define AID_MEDIA_RW 1023 /* internal media storage write access */ #define AID_MTP 1024 /* MTP USB driver access */ #define AID_UNUSED2 1025 /* deprecated, DO NOT USE */ #define AID_DRMRPC 1026 /* group for drm rpc */ #define AID_NFC 1027 /* nfc subsystem */ #define AID_SDCARD_R 1028 /* external storage read access */ #define AID_CLAT 1029 /* clat part of nat464 */ #define AID_LOOP_RADIO 1030 /* loop radio devices */ #define AID_MEDIA_DRM 1031 /* MediaDrm plugins */ #define AID_PACKAGE_INFO 1032 /* access to installed package details */ #define AID_SDCARD_PICS 1033 /* external storage photos access */ #define AID_SDCARD_AV 1034 /* external storage audio/video access */ #define AID_SDCARD_ALL 1035 /* access all users external storage */ #define AID_LOGD 1036 /* log daemon */ #define AID_SHARED_RELRO 1037 /* creator of shared GNU RELRO files */ #define AID_DBUS 1038 /* dbus-daemon IPC broker process */ #define AID_TLSDATE 1039 /* tlsdate unprivileged user */ #define AID_MEDIA_EX 1040 /* mediaextractor process */ #define AID_AUDIOSERVER 1041 /* audioserver process */ #define AID_METRICS_COLL 1042 /* metrics_collector process */ #define AID_METRICSD 1043 /* metricsd process */ #define AID_WEBSERV 1044 /* webservd process */ #define AID_DEBUGGERD 1045 /* debuggerd unprivileged user */ #define AID_MEDIA_CODEC 1046 /* mediacodec process */ #define AID_CAMERASERVER 1047 /* cameraserver process */ #define AID_FIREWALL 1048 /* firewalld process */ #define AID_TRUNKS 1049 /* trunksd process (TPM daemon) */ #define AID_NVRAM 1050 /* Access-controlled NVRAM */ #define AID_DNS 1051 /* DNS resolution daemon (system: netd) */ #define AID_DNS_TETHER 1052 /* DNS resolution daemon (tether: dnsmasq) */ #define AID_WEBVIEW_ZYGOTE 1053 /* WebView zygote process */ #define AID_VEHICLE_NETWORK 1054 /* Vehicle network service */ #define AID_MEDIA_AUDIO 1055 /* GID for audio files on internal media storage */ #define AID_MEDIA_VIDEO 1056 /* GID for video files on internal media storage */ #define AID_MEDIA_IMAGE 1057 /* GID for image files on internal media storage */ #define AID_TOMBSTONED 1058 /* tombstoned user */ #define AID_MEDIA_OBB 1059 /* GID for OBB files on internal media storage */ #define AID_ESE 1060 /* embedded secure element (eSE) subsystem */ #define AID_OTA_UPDATE 1061 /* resource tracking UID for OTA updates */ #define AID_AUTOMOTIVE_EVS 1062 /* Automotive rear and surround view system */ #define AID_LOWPAN 1063 /* LoWPAN subsystem */ #define AID_HSM 1064 /* hardware security module subsystem */ #define AID_RESERVED_DISK 1065 /* GID that has access to reserved disk space */ #define AID_STATSD 1066 /* statsd daemon */ #define AID_INCIDENTD 1067 /* incidentd daemon */ #define AID_SECURE_ELEMENT 1068 /* secure element subsystem */ #define AID_LMKD 1069 /* low memory killer daemon */ #define AID_LLKD 1070 /* live lock daemon */ #define AID_IORAPD 1071 /* input/output readahead and pin daemon */ #define AID_GPU_SERVICE 1072 /* GPU service daemon */ #define AID_NETWORK_STACK 1073 /* network stack service */ #define AID_GSID 1074 /* GSI service daemon */ #define AID_FSVERITY_CERT 1075 /* fs-verity key ownership in keystore */ #define AID_CREDSTORE 1076 /* identity credential manager service */ #define AID_EXTERNAL_STORAGE 1077 /* Full external storage access including USB OTG volumes */ #define AID_EXT_DATA_RW 1078 /* GID for app-private data directories on external storage */ #define AID_EXT_OBB_RW 1079 /* GID for OBB directories on external storage */ #define AID_CONTEXT_HUB 1080 /* GID for access to the Context Hub */ /* Changes to this file must be made in AOSP, *not* in internal branches. */ #define AID_SHELL 2000 /* adb and debug shell user */ #define AID_CACHE 2001 /* cache access */ #define AID_DIAG 2002 /* access to diagnostic resources */ /* The range 2900-2999 is reserved for the vendor partition */ /* Note that the two 'OEM' ranges pre-dated the vendor partition, so they take the legacy 'OEM' * name. Additionally, they pre-dated passwd/group files, so there are users and groups named oem_# * created automatically for all values in these ranges. If there is a user/group in a passwd/group * file corresponding to this range, both the oem_# and user/group names will resolve to the same * value. */ #define AID_OEM_RESERVED_START 2900 #define AID_OEM_RESERVED_END 2999 /* The 3000 series are intended for use as supplemental group id's only. * They indicate special Android capabilities that the kernel is aware of. */ #define AID_NET_BT_ADMIN 3001 /* bluetooth: create any socket */ #define AID_NET_BT 3002 /* bluetooth: create sco, rfcomm or l2cap sockets */ #define AID_INET 3003 /* can create AF_INET and AF_INET6 sockets */ #define AID_NET_RAW 3004 /* can create raw INET sockets */ #define AID_NET_ADMIN 3005 /* can configure interfaces and routing tables. */ #define AID_NET_BW_STATS 3006 /* read bandwidth statistics */ #define AID_NET_BW_ACCT 3007 /* change bandwidth statistics accounting */ #define AID_READPROC 3009 /* Allow /proc read access */ #define AID_WAKELOCK 3010 /* Allow system wakelock read/write access */ #define AID_UHID 3011 /* Allow read/write to /dev/uhid node */ /* The range 5000-5999 is also reserved for vendor partition. */ #define AID_OEM_RESERVED_2_START 5000 #define AID_OEM_RESERVED_2_END 5999 /* The range 6000-6499 is reserved for the system partition. */ #define AID_SYSTEM_RESERVED_START 6000 #define AID_SYSTEM_RESERVED_END 6499 /* The range 6500-6999 is reserved for the odm partition. */ #define AID_ODM_RESERVED_START 6500 #define AID_ODM_RESERVED_END 6999 /* The range 7000-7499 is reserved for the product partition. */ #define AID_PRODUCT_RESERVED_START 7000 #define AID_PRODUCT_RESERVED_END 7499 /* The range 7500-7999 is reserved for the system_ext partition. */ #define AID_SYSTEM_EXT_RESERVED_START 7500 #define AID_SYSTEM_EXT_RESERVED_END 7999 #define AID_EVERYBODY 9997 /* shared between all apps in the same profile */ #define AID_MISC 9998 /* access to misc storage */ #define AID_NOBODY 9999 #define AID_APP 10000 /* TODO: switch users over to AID_APP_START */ #define AID_APP_START 10000 /* first app user */ #define AID_APP_END 19999 /* last app user */ #define AID_CACHE_GID_START 20000 /* start of gids for apps to mark cached data */ #define AID_CACHE_GID_END 29999 /* end of gids for apps to mark cached data */ #define AID_EXT_GID_START 30000 /* start of gids for apps to mark external data */ #define AID_EXT_GID_END 39999 /* end of gids for apps to mark external data */ #define AID_EXT_CACHE_GID_START 40000 /* start of gids for apps to mark external cached data */ #define AID_EXT_CACHE_GID_END 49999 /* end of gids for apps to mark external cached data */ #define AID_SHARED_GID_START 50000 /* start of gids for apps in each user to share */ #define AID_SHARED_GID_END 59999 /* end of gids for apps in each user to share */ /* * This is a magic number in the kernel and not something that was picked * arbitrarily. This value is returned whenever a uid that has no mapping in the * user namespace is returned to userspace: * https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/highuid.h?h=v4.4#n40 */ #define AID_OVERFLOWUID 65534 /* unmapped user in the user namespace */ /* use the ranges below to determine whether a process is isolated */ #define AID_ISOLATED_START 90000 /* start of uids for fully isolated sandboxed processes */ #define AID_ISOLATED_END 99999 /* end of uids for fully isolated sandboxed processes */ #define AID_USER 100000 /* TODO: switch users over to AID_USER_OFFSET */ #define AID_USER_OFFSET 100000 /* offset for uid ranges for each user */
Android中如何查看UID和GID?
可以通过以下方法查看应用的UID和GID:
- 使用
**ps**
命令:可以在adb shell
中使用ps
命令来查看运行中的进程的UID和GID。例如,可以使用ps -A -o USER,UID,GID,COMMAND
命令来查看所有进程的用户、UID、GID和命令。
您提供的输出是来自Android设备上的ps
命令,该命令用于显示当前运行的进程信息。我将首先为您
– USER: 进程的拥有者。
– PID: 进程ID。
– PPID: 父进程ID。
– VSZ: 虚拟内存大小,以KB为单位。
– RSS: 实际内存使用量,以KB为单位。
– WCHAN: 进程正在等待的内核函数名称(如果进程正在等待)。
– ADDR: 进程的内核调度实体地址。
– S: 进程的状态。常见的状态有:R(运行中)、S(休眠中)、T(停止)等。
– NAME: 进程的名称。
USER | PID | PPID | VSZ | RSS | WCHAN | ADDR | S | NAME |
shell | 16507 | 335 | 10771076 | 2828 | sigsuspend | 0 | S | sh |
shell | 16533 | 16507 | 10773488 | 3264 | 0 | 0 | R | ps |
显示了两个进程:一个是sh
进程(shell),另一个是ps
进程。可以看到ps
进程是由sh
进程启动的,因为它的PPID(父进程ID)是sh
进程的PID。
3. 查看**/proc**
目录:每个运行中的进程都有一个对应的/proc/[pid]
目录,其中[pid]
是进程的PID。可以在这个目录中的status
文件中找到进程的UID和GID。例如,可以使用cat /proc/[pid]/status
命令来查看进程的状态信息。
rk3568_r:/ $ ps -A -o USER,UID,GID,COMMAND USER UID GID COMMAND root 0 0 [init] root 0 0 [kthreadd] root 0 0 [rcu_gp] root 0 0 [rcu_par_gp] root 0 0 [mm_percpu_wq] root 0 0 [ksoftirqd/0] root 0 0 [rcu_preempt] root 0 0 [rcu_sched] root 0 0 [rcu_bh] root 0 0 [migration/0] root 0 0 [cpuhp/0] root 0 0 [cpuhp/1] root 0 0 [migration/1] root 0 0 [ksoftirqd/1] root 0 0 [cpuhp/2] root 0 0 [migration/2] root 0 0 [ksoftirqd/2] root 0 0 [cpuhp/3] root 0 0 [migration/3] root 0 0 [ksoftirqd/3] root 0 0 [kworker/3:0H-kblockd] root 0 0 [kdevtmpfs] root 0 0 [netns] root 0 0 [rcu_tasks_kthre] root 0 0 [kauditd] root 0 0 [khungtaskd] root 0 0 [oom_reaper] root 0 0 [writeback] root 0 0 [kcompactd0] root 0 0 [crypto] root 0 0 [kblockd] root 0 0 [blk_crypto_wq] root 0 0 [kconsole] root 0 0 [devfreq_wq] root 0 0 [watchdogd] root 0 0 [cfinteractive] root 0 0 [cfg80211] root 0 0 [kswapd0] root 0 0 [irq/68-rockchip] root 0 0 [irq/69-rockchip] root 0 0 [iommu_wq] root 0 0 [vdpu] root 0 0 [irq/21-fdea0400] root 0 0 [vepu] root 0 0 [irq/26-fdee0000] root 0 0 [iep] root 0 0 [irq/28-fdef0000] root 0 0 [jpegd] root 0 0 [irq/24-fded0000] root 0 0 [rkvdec] root 0 0 [hwrng] root 0 0 [hpd_queue] root 0 0 [irq/41-fe0a0000] root 0 0 [cec-dw_hdmi] root 0 0 [irq/41-dw-hdmi-] root 0 0 [nvme-wq] root 0 0 [nvme-reset-wq] root 0 0 [nvme-delete-wq] root 0 0 [stmmac_wq] root 0 0 [stmmac_wq] root 0 0 [uas] root 0 0 [goodix_wq] root 0 0 [gtp_esd_check] root 0 0 [irq/79-rk817] root 0 0 [irq/66-rockchip] root 0 0 [dm_bufio_cache] root 0 0 [irq/46-mmc0] root 0 0 [ion_system_heap] root 0 0 [mmc_complete] root 0 0 [kworker/1:1H-kblockd] root 0 0 [ipv6_addrconf] root 0 0 [krfcommd] root 0 0 [irq/23-rga] root 0 0 [rkvenc] root 0 0 [iommu_wq] root 0 0 [irq/29-fdf40000] root 0 0 [gpu_power_off_w] root 0 0 [kbase_job_fault] root 0 0 [kworker/2:1H-kblockd] root 0 0 [jbd2/mmcblk0p11] root 0 0 [ext4-rsv-conver] root 0 0 [kdmflush] root 0 0 [kdmflush] root 0 0 [kdmflush] root 0 0 [kdmflush] root 0 0 [kdmflush] root 0 0 [ext4-rsv-conver] root 0 0 [ext4-rsv-conver] root 0 0 [ext4-rsv-conver] root 0 0 [ext4-rsv-conver] root 0 0 [ext4-rsv-conver] root 0 0 [init] root 0 0 [ueventd] logd 1036 1036 [logd] lmkd 1069 1069 [lmkd] system 1000 1000 [servicemanager] system 1000 1000 [hwservicemanage] system 1000 1000 [vndservicemanag] shell 2000 2000 /system/bin/sh root 0 0 [rknn_server] root 0 0 [psimon] root 0 0 [Binder:147_2] root 0 0 [jbd2/mmcblk0p10] root 0 0 [ext4-rsv-conver] root 0 0 [ext4-rsv-conver] root 0 0 [tee-supplicant] system 1000 1000 [suspend@1.0-ser] system 1000 1000 [keymaster@4.0-s] system 1000 1003 [surfaceflinger] root 0 0 [kdmflush] root 0 0 [kbase_event] root 0 0 [f2fs_flush-253:] root 0 0 [f2fs_discard-25] root 0 0 [f2fs_gc-253:5] system 1000 1003 [allocator@4.0-s] system 1000 1003 [composer@2.1-se] tombstoned 1058 1000 [tombstoned] statsd 1066 1066 [Binder:262_2] system 1000 1000 [allocator@1.0-s] bluetooth 1002 1002 [bluetooth@1.0-s] cameraserver 1047 1005 [provider@2.4-ex] cameraserver 1047 1005 [provider@2.4-se] media 1013 1031 [cas@1.2-service] media 1013 1013 [drm@1.3-service] media 1013 1013 [drm@1.3-service] system 1000 1000 [gatekeeper@1.0-] gps 1021 1000 [gnss@1.0-servic] system 1000 1000 [health@2.1-serv] system 1000 1000 [config@1.0-serv] system 1000 1000 [android.hardwar] system 1000 1000 [sensors@1.0-ser] system 1000 1000 [weaver@1.0-serv] wifi 1010 1010 [wifi@1.0-servic] system 1000 1000 [android.hardwar] root 0 1000 [android.hardwar] system 1000 1000 [neuralnetworks@] system 1000 1000 [outputmanager@1] media 1013 1005 [hw@1.0-service] credstore 1076 1076 [credstore] gpu_service 1072 1003 [Binder:314_2] shell 2000 2000 [adbd] nobody 9999 9999 [traced_probes] nobody 9999 9999 [traced] drm 1019 1019 [drmserver] incidentd 1067 1067 [Binder:365_2] root 0 0 [Binder:369_2] keystore 1017 1017 [keystore] mediaex 1040 1026 [mediaextractor] media 1013 1013 [mediametrics] root 0 1032 [storaged] mediacodec 1046 1006 [omx@1.0-service] radio 1001 1001 [rild] mediacodec 1046 1006 [mediaswcodec] system 1000 0 [gatekeeperd] mdnsr 1020 3003 [mdnsd] root 0 0 [main] root 0 0 [main] audioserver 1041 1005 [audioserver] cameraserver 1047 1005 [cameraserver] media 1013 1005 [mediaserver] root 0 0 [Binder:519_3] wifi 1010 1010 [wificond] audioserver 1041 1005 [audio.service] root 0 0 [iptables-restor] root 0 0 [ip6tables-resto] system 1000 1000 [Binder:576_3] u0_a116 10116 10116 [ndroid.systemui] u0_a119 10119 10119 [ssioncontroller] network_sta+ 1073 1073 [rkstack.process] webview_zyg+ 1053 1053 [webview_zygote] u0_a114 10114 10114 [droid.launcher3] secure_elem+ 1068 1068 [com.android.se] root 0 0 [kbase_event] u0_a120 10120 10120 [id.ext.services] u0_a103 10103 10103 [putmethod.latin] system 1000 1000 [cghs.stresstest] u0_a123 10123 10123 [rs.media.module] root 0 0 [kbase_event] u0_a63 10063 10063 [d.process.media] root 0 0 [kbase_event] system 1000 1000 [.update.service] u0_a111 10111 10111 [droid.gallery3d] u0_a72 10072 10072 [ackageinstaller] root 0 0 [kworker/1:0H-kblockd] root 0 0 [kworker/0:0H-kblockd] u0_a71 10071 10071 [viders.calendar] shell 2000 2000 [m.android.shell] radio 1001 1001 [m.android.phone] u0_a84 10084 10084 [android.traceur] u0_a75 10075 10075 [android.musicfx] root 0 0 [kworker/u9:1-kbase_pm_poweroff_wait] root 0 0 [kworker/2:1-events_freezable] root 0 0 [kworker/3:1-events_power_efficient] root 0 0 [kworker/u8:0-events_unbound] root 0 0 [kworker/1:0-mm_percpu_wq] root 0 0 [kworker/u8:2-adb] root 0 0 [kworker/0:2-cgroup_destroy] root 0 0 [kworker/2:0H-kblockd] shell 2000 2000 /system/bin/logcat root 0 0 [kworker/u8:3-adb] root 0 0 [irq/77-dwc3] root 0 0 [kworker/3:2H] root 0 0 [kworker/0:0-events] root 0 0 [kworker/0:3H] shell 2000 2000 /system/bin/sh shell 2000 2000 /data/local/tmp/.studio/bin/installer root 0 0 [kworker/u9:0-kbase_pm_shader_powerof] shell 2000 2000 [run-as] system 1000 1000 [btf.factorytest] root 0 0 [kbase_event] root 0 0 [kworker/2:2H] root 0 0 [kworker/0:2H-mmc_complete] shell 2000 2000 /system/bin/sh root 0 0 [kworker/2:2-events] root 0 0 [kworker/3:2] shell 2000 2000 /system/bin/toybox root 0 0 [kworker/u9:2-kbase_pm_poweroff_wait] root 0 0 [kworker/0:1H-kblockd] root 0 0 [kworker/0:1-cgroup_pidlist_destroy] root 0 0 [kworker/2:0-events_freezable] system 1000 1000 [ndroid.keychain] root 0 0 [kworker/3:1H] root 0 0 [kworker/1:1-cgroup_pidlist_destroy] root 0 0 [kworker/u8:1-events_unbound] root 0 0 [kworker/3:0-events_power_efficient]
- 查看
**/data/system/packages.list**
文件:这个文件包含了系统中所有已安装的应用的信息,包括应用的包名、UID、GID和目录。可以使用cat /data/system/packages.list
命令来查看这个文件的内容。
rk3568_r:/ # cat /data/system/packages.list com.android.cts.priv.ctsshim 10076 0 /data/user/0/com.android.cts.priv.ctsshim default:privapp:targetSdkVersion=28 none 0 30 com.android.internal.display.cutout.emulation.corner 10024 0 /data/user/0/com.android.internal.display.cutout.emulation.corner default:targetSdkVersion=30 none 0 1 com.android.internal.display.cutout.emulation.double 10051 0 /data/user/0/com.android.internal.display.cutout.emulation.double default:targetSdkVersion=30 none 0 1 com.android.providers.telephony 1001 0 /data/user_de/0/com.android.providers.telephony platform:privapp:targetSdkVersion=30 1065,3002,3003,3001,3007,3006 0 30 com.android.dynsystem 1000 0 /data/user/0/com.android.dynsystem platform:privapp:targetSdkVersion=23 2001,1077,1065,3002,3003,3001,3007,1024,1007 0 30 com.android.theme.color.amethyst 10021 0 /data/user/0/com.android.theme.color.amethyst default:targetSdkVersion=30 none 0 1 com.android.theme.icon.pebble 10025 0 /data/user/0/com.android.theme.icon.pebble default:targetSdkVersion=30 none 0 1 com.android.providers.calendar 10071 0 /data/user/0/com.android.providers.calendar default:privapp:targetSdkVersion=30 1065,3003 0 30 com.android.providers.media 10063 0 /data/user/0/com.android.providers.media media:privapp:targetSdkVersion=30 2001,1077,3003,3007,1024 0 1024 com.android.internal.systemui.navbar.gestural_wide_back 10043 0 /data/user/0/com.android.internal.systemui.navbar.gestural_wide_back default:targetSdkVersion=30 none 0 1 com.android.theme.color.sand 10033 0 /data/user/0/com.android.theme.color.sand default:targetSdkVersion=30 none 0 1 com.android.wallpapercropper 10113 0 /data/user/0/com.android.wallpapercropper platform:privapp:targetSdkVersion=30 none 0 30 com.android.theme.icon.vessel 10019 0 /data/user/0/com.android.theme.icon.vessel default:targetSdkVersion=30 none 0 1 com.android.theme.color.cinnamon 10055 0 /data/user/0/com.android.theme.color.cinnamon default:targetSdkVersion=30 none 0 1 com.android.theme.icon_pack.victor.settings 10005 0 /data/user/0/com.android.theme.icon_pack.victor.settings default:targetSdkVersion=30 none 0 1 com.android.theme.icon_pack.rounded.systemui 10013 0 /data/user/0/com.android.theme.icon_pack.rounded.systemui default:targetSdkVersion=30 none 0 1 com.android.theme.icon.taperedrect 10039 0 /data/user/0/com.android.theme.icon.taperedrect default:targetSdkVersion=30 none 0 1 com.android.documentsui 10074 0 /data/user/0/com.android.documentsui platform:privapp:targetSdkVersion=30 none 0 30 com.android.externalstorage 10070 0 /data/user/0/com.android.externalstorage platform:privapp:targetSdkVersion=30 1077 0 30 com.android.htmlviewer 10077 0 /data/user/0/com.android.htmlviewer default:targetSdkVersion=30 none 0 30 com.android.companiondevicemanager 10081 0 /data/user/0/com.android.companiondevicemanager default:targetSdkVersion=30 3002,3001 0 30 com.android.quicksearchbox 10109 0 /data/user/0/com.android.quicksearchbox default:targetSdkVersion=28 3003 0 30 com.android.mms.service 1001 0 /data/user/0/com.android.mms.service platform:privapp:targetSdkVersion=30 1065,3002,3003,3001,3007,3006 0 30 com.android.providers.downloads 10063 0 /data/user/0/com.android.providers.downloads media:privapp:targetSdkVersion=30 2001,1077,3003,3007,1024 0 30 com.android.theme.icon_pack.rounded.android 10037 0 /data/user/0/com.android.theme.icon_pack.rounded.android default:targetSdkVersion=30 none 0 1 com.android.theme.icon_pack.victor.systemui 10028 0 /data/user/0/com.android.theme.icon_pack.victor.systemui default:targetSdkVersion=30 none 0 1 com.android.theme.icon_pack.circular.themepicker 10010 0 /data/user/0/com.android.theme.icon_pack.circular.themepicker platform:targetSdkVersion=30 none 0 1 com.android.soundrecorder 10079 0 /data/user/0/com.android.soundrecorder default:targetSdkVersion=29 1077,3003 0 30 com.bjw.ComAssistant 10124 0 /data/user/0/com.bjw.ComAssistant default:targetSdkVersion=10 none 0 2 com.android.theme.color.tangerine 10045 0 /data/user/0/com.android.theme.color.tangerine default:targetSdkVersion=30 none 0 1 com.android.providers.downloads.ui 10063 0 /data/user/0/com.android.providers.downloads.ui media:privapp:targetSdkVersion=30 2001,1077,3003,3007,1024 0 30 com.android.pacprocessor 10083 0 /data/user/0/com.android.pacprocessor platform:targetSdkVersion=30 3003 0 30 com.android.simappdialog 10095 0 /data/user/0/com.android.simappdialog platform:targetSdkVersion=30 none 0 30 com.android.networkstack 1073 0 /data/user_de/0/com.android.networkstack network_stack:privapp:targetSdkVersion=29 3002,3003,3007,3006,3005,3004 0 300000000 com.android.theme.color.aquamarine 10052 0 /data/user/0/com.android.theme.color.aquamarine default:targetSdkVersion=30 none 0 1 com.android.internal.display.cutout.emulation.hole 10042 0 /data/user/0/com.android.internal.display.cutout.emulation.hole default:targetSdkVersion=30 none 0 1 com.android.internal.display.cutout.emulation.tall 10022 0 /data/user/0/com.android.internal.display.cutout.emulation.tall default:targetSdkVersion=30 none 0 1 com.android.modulemetadata 10106 0 /data/user/0/com.android.modulemetadata default:targetSdkVersion=28 none 0 30 com.android.certinstaller 10092 0 /data/user/0/com.android.certinstaller platform:targetSdkVersion=30 none 0 30 com.rockchip.overlay.pinnerservice 10054 0 /data/user/0/com.rockchip.overlay.pinnerservice default:targetSdkVersion=30 none 0 1 com.android.theme.color.black 10023 0 /data/user/0/com.android.theme.color.black default:targetSdkVersion=30 none 0 1 com.android.carrierconfig 10115 0 /data/user/0/com.android.carrierconfig platform:privapp:targetSdkVersion=30 none 0 1 com.android.theme.color.green 10049 0 /data/user/0/com.android.theme.color.green default:targetSdkVersion=30 none 0 1 com.android.theme.color.ocean 10027 0 /data/user/0/com.android.theme.color.ocean default:targetSdkVersion=30 none 0 1 com.android.theme.color.space 10020 0 /data/user/0/com.android.theme.color.space default:targetSdkVersion=30 none 0 1 com.android.internal.systemui.navbar.threebutton 10048 0 /data/user/0/com.android.internal.systemui.navbar.threebutton default:targetSdkVersion=30 none 0 1 android.rockchip.update.service 1000 0 /data/user/0/android.rockchip.update.service platform:privapp:targetSdkVersion=23 2001,1077,1065,3002,3003,3001,3007,1024,1007 0 39 android 1000 0 /data/system platform:privapp:targetSdkVersion=23 2001,1077,1065,3002,3003,3001,3007,1024,1007 0 30 com.android.contacts 10101 0 /data/user/0/com.android.contacts default:privapp:targetSdkVersion=29 3003 0 10731 com.android.camera2 10082 0 /data/user/0/com.android.camera2 platform:targetSdkVersion=29 3003 0 20002000 com.btf.factorytest 1000 1 /data/user/0/com.btf.factorytest platform:privapp:targetSdkVersion=23 2001,1077,1065,3002,3003,3001,3007,1024,1007 1 1 com.android.theme.icon_pack.rounded.launcher 10044 0 /data/user/0/com.android.theme.icon_pack.rounded.launcher default:targetSdkVersion=30 none 0 1 com.android.theme.icon_pack.kai.settings 10047 0 /data/user/0/com.android.theme.icon_pack.kai.settings default:targetSdkVersion=30 none 0 1 com.android.egg 10096 0 /data/user/0/com.android.egg platform:targetSdkVersion=30 none 0 1 com.android.mtp 10063 0 /data/user/0/com.android.mtp media:privapp:targetSdkVersion=30 2001,1077,3003,3007,1024 0 30 com.android.nfc 1027 0 /data/user/0/com.android.nfc platform:privapp:targetSdkVersion=30 3002,3003,3001 0 30 com.android.launcher3 10114 0 /data/user/0/com.android.launcher3 default:privapp:targetSdkVersion=30 none 0 30 com.android.backupconfirm 10062 0 /data/user/0/com.android.backupconfirm platform:privapp:targetSdkVersion=30 none 0 30 com.android.provision 10112 0 /data/user/0/com.android.provision platform:privapp:targetSdkVersion=30 none 0 30 com.android.statementservice 10065 0 /data/user/0/com.android.statementservice default:privapp:targetSdkVersion=30 3003 0 1 com.android.theme.icon_pack.sam.settings 10003 0 /data/user/0/com.android.theme.icon_pack.sam.settings default:targetSdkVersion=30 none 0 1 com.android.settings.intelligence 10100 0 /data/user/0/com.android.settings.intelligence default:privapp:targetSdkVersion=29 none 0 30 com.android.calendar 10108 0 /data/user/0/com.android.calendar default:targetSdkVersion=29 3003 0 30 com.android.internal.systemui.navbar.gestural_extra_wide_back 10007 0 /data/user/0/com.android.internal.systemui.navbar.gestural_extra_wide_back default:targetSdkVersion=30 none 0 1 com.android.theme.icon_pack.kai.themepicker 10036 0 /data/user/0/com.android.theme.icon_pack.kai.themepicker platform:targetSdkVersion=30 none 0 1 com.android.providers.settings 1000 0 /data/user_de/0/com.android.providers.settings platform:privapp:targetSdkVersion=23 2001,1077,1065,3002,3003,3001,3007,1024,1007 0 30 com.android.sharedstoragebackup 10064 0 /data/user/0/com.android.sharedstoragebackup platform:privapp:targetSdkVersion=30 1077 0 30 com.android.theme.icon_pack.victor.launcher 10031 0 /data/user/0/com.android.theme.icon_pack.victor.launcher default:targetSdkVersion=30 none 0 1 com.android.printspooler 10089 0 /data/user/0/com.android.printspooler default:targetSdkVersion=30 none 0 30 com.android.theme.icon_pack.filled.settings 10041 0 /data/user/0/com.android.theme.icon_pack.filled.settings default:targetSdkVersion=30 none 0 1 com.android.dreams.basic 10087 0 /data/user/0/com.android.dreams.basic default:targetSdkVersion=30 none 0 30 com.android.theme.icon_pack.kai.systemui 10009 0 /data/user/0/com.android.theme.icon_pack.kai.systemui default:targetSdkVersion=30 none 0 1 com.android.webview 10104 0 /data/user/0/com.android.webview default:targetSdkVersion=30 3003 0 410412053 com.android.rk 1000 0 /data/user/0/com.android.rk platform:privapp:targetSdkVersion=23 2001,1077,1065,3002,3003,3001,3007,1024,1007 0 5 com.android.se 1068 0 /data/user/0/com.android.se platform:privapp:targetSdkVersion=30 none 0 30 com.android.inputdevices 1000 0 /data/user_de/0/com.android.inputdevices platform:privapp:targetSdkVersion=23 2001,1077,1065,3002,3003,3001,3007,1024,1007 0 30 com.android.bips 10073 0 /data/user/0/com.android.bips default:privapp:targetSdkVersion=30 3003 0 30 com.android.theme.icon_pack.circular.settings 10029 0 /data/user/0/com.android.theme.icon_pack.circular.settings default:targetSdkVersion=30 none 0 1 com.android.musicfx 10075 0 /data/user/0/com.android.musicfx default:privapp:targetSdkVersion=30 3002 0 10400 com.android.theme.icon_pack.sam.systemui 10000 0 /data/user/0/com.android.theme.icon_pack.sam.systemui default:targetSdkVersion=30 none 0 1 com.android.theme.icon.teardrop 10053 0 /data/user/0/com.android.theme.icon.teardrop default:targetSdkVersion=30 none 0 1 android.ext.shared 10088 0 /data/user_de/0/android.ext.shared platform:targetSdkVersion=30 none 0 1 com.android.onetimeinitializer 10099 0 /data/user/0/com.android.onetimeinitializer default:privapp:targetSdkVersion=30 none 0 30 com.android.server.telecom 1000 0 /data/user_de/0/com.android.server.telecom platform:privapp:targetSdkVersion=23 2001,1077,1065,3002,3003,3001,3007,1024,1007 0 30 com.android.theme.icon_pack.rounded.themepicker 10016 0 /data/user/0/com.android.theme.icon_pack.rounded.themepicker platform:targetSdkVersion=30 none 0 1 com.android.keychain 1000 0 /data/user/0/com.android.keychain platform:privapp:targetSdkVersion=23 2001,1077,1065,3002,3003,3001,3007,1024,1007 0 30 com.android.printservice.recommendation 10078 0 /data/user/0/com.android.printservice.recommendation default:targetSdkVersion=30 3003 0 4 com.android.gallery3d 10111 0 /data/user/0/com.android.gallery3d default:targetSdkVersion=29 1077,3003 0 40030 com.android.theme.icon_pack.filled.systemui 10032 0 /data/user/0/com.android.theme.icon_pack.filled.systemui default:targetSdkVersion=30 none 0 1 android.ext.services 10120 0 /data/user_de/0/android.ext.services platform:privapp:targetSdkVersion=30 none 0 300000000 com.android.wifi.resources 10121 0 /data/user_de/0/com.android.wifi.resources default:privapp:targetSdkVersion=30 none 0 1 com.android.localtransport 1000 0 /data/user/0/com.android.localtransport platform:privapp:targetSdkVersion=23 2001,1077,1065,3002,3003,3001,3007,1024,1007 0 30 com.android.packageinstaller 10072 0 /data/user_de/0/com.android.packageinstaller platform:privapp:targetSdkVersion=30 1065 0 30 com.android.carrierdefaultapp 10094 0 /data/user/0/com.android.carrierdefaultapp platform:targetSdkVersion=30 3003 0 30 com.android.theme.icon_pack.sam.android 10001 0 /data/user/0/com.android.theme.icon_pack.sam.android default:targetSdkVersion=30 none 0 1 com.android.theme.font.notoserifsource 10017 0 /data/user/0/com.android.theme.font.notoserifsource default:targetSdkVersion=30 none 0 1 com.android.theme.icon_pack.filled.android 10056 0 /data/user/0/com.android.theme.icon_pack.filled.android default:targetSdkVersion=30 none 0 1 com.android.proxyhandler 10069 0 /data/user_de/0/com.android.proxyhandler platform:privapp:targetSdkVersion=30 3003 0 30 com.android.internal.display.cutout.emulation.waterfall 10060 0 /data/user/0/com.android.internal.display.cutout.emulation.waterfall default:targetSdkVersion=30 none 0 1 com.android.theme.icon_pack.circular.systemui 10034 0 /data/user/0/com.android.theme.icon_pack.circular.systemui default:targetSdkVersion=30 none 0 1 com.android.inputmethod.latin 10103 0 /data/user_de/0/com.android.inputmethod.latin default:targetSdkVersion=28 none 0 28 org.chromium.webview_shell 10105 0 /data/user/0/org.chromium.webview_shell default:targetSdkVersion=28 3003 0 1 com.android.theme.icon_pack.kai.android 10015 0 /data/user/0/com.android.theme.icon_pack.kai.android default:targetSdkVersion=30 none 0 1 com.android.managedprovisioning 10066 0 /data/user/0/com.android.managedprovisioning platform:privapp:targetSdkVersion=30 3003 0 30 com.android.networkstack.tethering 1073 0 /data/user_de/0/com.android.networkstack.tethering network_stack:privapp:targetSdkVersion=29 3002,3003,3007,3006,3005,3004 0 30 com.android.soundpicker 10063 0 /data/user/0/com.android.soundpicker media:privapp:targetSdkVersion=30 2001,1077,3003,3007,1024 0 30 com.android.dreams.phototable 10107 0 /data/user/0/com.android.dreams.phototable default:targetSdkVersion=28 none 0 30 com.android.theme.icon_pack.kai.launcher 10038 0 /data/user/0/com.android.theme.icon_pack.kai.launcher default:targetSdkVersion=30 none 0 1 com.android.smspush 10118 0 /data/user/0/com.android.smspush default:targetSdkVersion=30 none 0 30 com.android.wallpaper.livepicker 10080 0 /data/user/0/com.android.wallpaper.livepicker platform:targetSdkVersion=30 none 0 30 com.cghs.stresstest 1000 0 /data/user/0/com.cghs.stresstest platform:privapp:targetSdkVersion=23 2001,1077,1065,3002,3003,3001,3007,1024,1007 0 1 com.android.theme.icon_pack.sam.launcher 10057 0 /data/user/0/com.android.theme.icon_pack.sam.launcher default:targetSdkVersion=30 none 0 1 com.android.theme.icon.squircle 10011 0 /data/user/0/com.android.theme.icon.squircle default:targetSdkVersion=30 none 0 1 com.android.theme.icon_pack.victor.android 10046 0 /data/user/0/com.android.theme.icon_pack.victor.android default:targetSdkVersion=30 none 0 1 com.android.storagemanager 10117 0 /data/user/0/com.android.storagemanager default:privapp:targetSdkVersion=30 1077,1065 0 30 com.android.theme.color.palette 10058 0 /data/user/0/com.android.theme.color.palette default:targetSdkVersion=30 none 0 1 com.android.bookmarkprovider 10090 0 /data/user/0/com.android.bookmarkprovider default:targetSdkVersion=30 none 0 30 com.android.settings 1000 0 /data/user_de/0/com.android.settings platform:privapp:targetSdkVersion=23 2001,1077,1065,3002,3003,3001,3007,1024,1007 0 30 com.android.theme.icon_pack.filled.launcher 10026 0 /data/user/0/com.android.theme.icon_pack.filled.launcher default:targetSdkVersion=30 none 0 1 com.android.networkstack.permissionconfig 1073 0 /data/user/0/com.android.networkstack.permissionconfig network_stack:privapp:targetSdkVersion=29 3002,3003,3007,3006,3005,3004 0 300000000 acr.browser.barebones 10085 1 /data/user/0/acr.browser.barebones platform:targetSdkVersion=25 3003 1 93 com.android.calculator2 10086 0 /data/user/0/com.android.calculator2 default:targetSdkVersion=30 none 0 30 com.android.cts.ctsshim 10091 0 /data/user/0/com.android.cts.ctsshim default:targetSdkVersion=28 none 0 30 com.android.theme.color.carbon 10035 0 /data/user/0/com.android.theme.color.carbon default:targetSdkVersion=30 none 0 1 com.android.theme.icon_pack.circular.launcher 10014 0 /data/user/0/com.android.theme.icon_pack.circular.launcher default:targetSdkVersion=30 none 0 1 com.android.vpndialogs 10067 0 /data/user/0/com.android.vpndialogs platform:privapp:targetSdkVersion=30 none 0 30 com.android.music 1000 0 /data/user/0/com.android.music platform:privapp:targetSdkVersion=23 2001,1077,1065,3002,3003,3001,3007,1024,1007 0 30 com.android.phone 1001 0 /data/user_de/0/com.android.phone platform:privapp:targetSdkVersion=30 1065,3002,3003,3001,3007,3006 0 30 com.android.shell 2000 0 /data/user_de/0/com.android.shell platform:privapp:targetSdkVersion=30 1077,1065,3002,1002,3010,3011 0 30 com.android.theme.icon_pack.filled.themepicker 10050 0 /data/user/0/com.android.theme.icon_pack.filled.themepicker platform:targetSdkVersion=30 none 0 1 com.android.wallpaperbackup 1000 0 /data/user/0/com.android.wallpaperbackup platform:privapp:targetSdkVersion=23 2001,1077,1065,3002,3003,3001,3007,1024,1007 0 30 com.android.providers.blockednumber 10068 0 /data/user_de/0/com.android.providers.blockednumber default:privapp:targetSdkVersion=30 1065 0 30 com.android.providers.userdictionary 10068 0 /data/user/0/com.android.providers.userdictionary default:privapp:targetSdkVersion=30 1065 0 30 com.android.providers.media.module 10123 0 /data/user/0/com.android.providers.media.module media:privapp:targetSdkVersion=30 1077,1065,3007 0 30 com.android.hotspot2.osulogin 10122 0 /data/user/0/com.android.hotspot2.osulogin default:targetSdkVersion=30 3003 0 30 com.android.internal.systemui.navbar.gestural 10012 0 /data/user/0/com.android.internal.systemui.navbar.gestural default:targetSdkVersion=30 none 0 1 com.android.location.fused 1000 0 /data/user_de/0/com.android.location.fused platform:privapp:targetSdkVersion=23 2001,1077,1065,3002,3003,3001,3007,1024,1007 0 30 com.android.theme.icon_pack.victor.themepicker 10059 0 /data/user/0/com.android.theme.icon_pack.victor.themepicker platform:targetSdkVersion=30 none 0 1 com.android.theme.color.orchid 10002 0 /data/user/0/com.android.theme.color.orchid default:targetSdkVersion=30 none 0 1 com.android.deskclock 10102 0 /data/user/0/com.android.deskclock default:targetSdkVersion=30 none 0 30 com.android.systemui 10116 0 /data/user_de/0/com.android.systemui platform:privapp:targetSdkVersion=30 1077,1065,3002,3001,3006 0 30 com.android.theme.color.purple 10006 0 /data/user/0/com.android.theme.color.purple default:targetSdkVersion=30 none 0 1 com.android.bluetoothmidiservice 10093 0 /data/user/0/com.android.bluetoothmidiservice platform:targetSdkVersion=29 3002 0 1 com.android.permissioncontroller 10119 0 /data/user_de/0/com.android.permissioncontroller platform:privapp:targetSdkVersion=29 none 0 300000000 com.android.traceur 10084 0 /data/user/0/com.android.traceur platform:targetSdkVersion=29 none 0 2 com.DeviceTest 1000 0 /data/user/0/com.DeviceTest platform:privapp:targetSdkVersion=23 2001,1077,1065,3002,3003,3001,3007,1024,1007 0 28 com.android.theme.icon_pack.sam.themepicker 10008 0 /data/user/0/com.android.theme.icon_pack.sam.themepicker platform:targetSdkVersion=30 none 0 1 com.android.bluetooth 1002 0 /data/user_de/0/com.android.bluetooth platform:privapp:targetSdkVersion=30 3002,3003,3001,3007,1002,3010,3011,3005,1016 0 30 com.android.wallpaperpicker 10110 0 /data/user/0/com.android.wallpaperpicker default:targetSdkVersion=23 none 0 1 com.android.providers.contacts 10068 0 /data/user/0/com.android.providers.contacts default:privapp:targetSdkVersion=30 1065 0 30 com.android.captiveportallogin 10097 0 /data/user/0/com.android.captiveportallogin network_stack:targetSdkVersion=30 3003,3005,3004 0 300000000 com.android.theme.icon.roundedrect 10030 0 /data/user/0/com.android.theme.icon.roundedrect default:targetSdkVersion=30 none 0 1 android.rk.RockVideoPlayer 10098 0 /data/user/0/android.rk.RockVideoPlayer platform:targetSdkVersion=26 3003 0 2 com.android.internal.systemui.navbar.gestural_narrow_back 10004 0 /data/user/0/com.android.internal.systemui.navbar.gestural_narrow_back default:targetSdkVersion=30 none 0 1 com.android.theme.icon_pack.rounded.settings 10018 0 /data/user/0/com.android.theme.icon_pack.rounded.settings default:targetSdkVersion=30 none 0 1 android.auto_generated_rro_vendor__ 10061 0 /data/user/0/android.auto_generated_rro_vendor__ default:targetSdkVersion=30 none 0 1 com.android.theme.icon_pack.circular.android 10040 0 /data/user/0/com.android.theme.icon_pack.circular.android default:targetSdkVersion=30 none 0 1
随便抄2段对比
platform:privapp:targetSdkVersion=23 2001,1077,1065,3002,3003,3001,3007,1024,1007 0 39
android 1000 0 /data/system platform:privapp:targetSdkVersion=23 2001,1077,1065,3002,3003,3001,3007,1024,1007 0 30
com.android.contacts 10101 0 /data/user/0/com.android.contacts default:privapp:targetSdkVersion=29 3003 0 10731
com.android.camera2 10082 0 /data/user/0/com.android.camera2 platform:targetSdkVersion=29 3003 0 20002000
com.btf.factorytest 1000 1 /data/user/0/com.btf.factorytest
- 应用程序名称或标识符:如
platform
,android
,com.android.contacts
等。 - UID:用户ID,用于标识应用程序。
- GID:组ID,通常为0,表示应用程序所属的主要组。
- 数据目录:应用程序的数据存储目录,如
/data/user/0/com.android.contacts
。 - SEPolicy标签:如
platform:privapp:targetSdkVersion=23
,表示应用程序的安全策略标签。 - 附加的GIDs:如
2001,1077,1065
等,表示应用程序还属于这些组。指除了应用的主要GID之外,还分配给应用的其他GIDs。这些附加的GIDs通常与特定的系统权限或功能相关。
应用名称/标识符 | UID | GID | 数据目录 | SEPolicy标签 | 附加的GIDs |
platform:privapp | 2001 | 0 | - | targetSdkVersion=23 | 1077,1065,3002,3003,3001,3007,1024,1007 |
android | 1000 | 0 | /data/system | platform:privapp:targetSdkVersion=23 | 2001,1077,1065,3002,3003,3001,3007,1024,1007 |
com.android.contacts | 10101 | 0 | /data/user/0/com.android.contacts | default:privapp:targetSdkVersion=29 | 3003 |
com.android.camera2 | 10082 | 0 | /data/user/0/com.android.camera2 | platform:targetSdkVersion=29 | 3003 |
com.btf.factorytest | 1000 | 1 | /data/user/0/com.btf.factorytest | - | - |
总结
本文介绍了Android中/sys/kernel/debug目录的生成和权限,以及Android中UID和GID的分配和查看。希望本文对你有所帮助。
你有任何问题或建议,请在评论区留言。谢谢!