当前位置:   article > 正文

[CM311-1A]-Android 分区管理以及系统启动流程和目录解析_安卓系统谁加载boot分区

安卓系统谁加载boot分区

##################################################

目录

Android 启动流程解析

安卓设备硬件简介

手机处理器 SoC

CPU 中央处理器

GPU 图形处理器

ISP 图像信号处理器

MODEM 通信处理器

基带处理器

ROM 内存容量与 ROM 固件概念

RAM 运行内存

安卓分区扫盲

分区的概念

Bootloader 引导加载器分区

Fastboot 线刷模式

Recovery 分区以及 Recovery 恢复出厂模式

Modem 分区

安卓系统简要启动流程

Android 正常启动流程

Android 软件系统架构

安卓系统架构一览

安卓软件系统架构详解

Android 操作系统常见目录解析

system 分区常见目录

/system/bin 与 /system/xbin 目录

/system/media 和  /system/media/audio 目录

/system/app 跟 /system/priv-app 目录

/system/etc

/system/fonts

/system/lib

/system/framework

/system/build.prop

data 分区和 cache 分区

/data/data 目录

/data/app 目录

/data/misc 目录

/data/local/tmp 目录

/data/anr/traces.txt 文件与 /data/system/dropbox/*.txt 文件们

/data/location/gps 目录和 /data/system/location/ 目录以及 /data/property/ 目录

SD 卡目录

安卓系统分区操作

安卓系统查看磁盘使用情况

查看根分区目录

df -h 常用查看存储情况

df -ah 查看所有存储情况

查看分区数量

df 的 h 参数单独查看加载节点

查看分区表和分区名称的匹配关系

查看各分区容量

查看硬件信息和系统属性

查看设备

安卓系统对分区进行格式化及挂载操作

fdisk 命令竟然报错

lsusb 或 lsusb2 命令查看 usb 设备

格式化分区命令 mkfs.文件系统

mount 挂载 U 盘设备后就能操作了

umount 卸载 USB 设备


##################################################

Android 启动流程解析

——————————

安卓设备硬件简介

        手机的硬件设备和电脑一样 都需要不同的零部件拼装而成 只不过手机零部件相比于电脑零部件来说更精密

        手机必备的零部件包括:

CPU 处理器
RAM 运存
ROM 内存
GPU 处理器
屏幕
摄像头
电池容量
网络模块

        等等

%%%%%

手机处理器 SoC

        手机芯片名为 SoC/System on Chip/系统级芯片 也有称片上系统

        意指它是一个产品 是一个有专用目标的集成电路

可能很多人平时将她称为 CPU/中央处理器

        其实手机的处理器并不只是 CPU 而是一个片上系统

        一颗手机处理器包括了

CPU

GPU

基带

ISP

        等众多单元 而这些单元集成在一起便是 SoC !!!

        手机上的 soc 一般使用 ARM 架构
        ARM 架构由 ARM 公司研发
        ARM 公司会将 ARM 公版架构授权给芯片设计公司
        由芯片设计公司对公版架构进行定制、改进以及最后的发布

%%%%%

CPU 中央处理器

        就是跟电脑一样的中央处理器

        手机 soc 的 CPU 一般会有 6 个或 8 个核心
        分为性能核心和能效核心

性能核心频率较高 架构较先进 主要应对手机需要处理大型任务的时候 同时耗电较多
能效核心一般频率较低 架构较低级 主要用于日常的用户使用

        现在来看几组 CPU 常用的丛集 常用为

1+3+4

4+4

2+6

2+4

  1. CPU 和电脑的 CPU 概念也差不多
  2. 手机 CPU 好坏对系统是否能够流畅运行影响很大
  3. CPU 的功能包括
  4. 顺序控制
  5. 操作控制
  6. 时间控制
  7. 数据处理
  8. 计算机指令解释
  9. 计算机软件中的数据处理
  10. 计算机中的所有操作都由 CPU 读取解码并执行指令
  11. 很多 CPU 都可以超频工作 需刷机 root

%%%%%

GPU 图形处理器


        CPU 主要负责逻辑指令的执行和处理

        但是当 CPU 遇到大量的简单计算时复杂的逻辑处理反而会降低运行效率
        那这大量的简单计算究竟交给谁呢 那就是 GPU

GPU 主要负责图形渲染等计算工作 减轻 CPU 负担 增强游戏体验

%%%%%

ISP 图像信号处理器


        我们平时用手机拍照录像的图像信号都会由 Image Signal Processing/ISP 进行处理
        目前 ISP 芯片分为两种

一种是集成式 她跟 CPU、GPU 基带等一起集成在 soc 中
另一种是独立式 其拥有明显的优势 在图像处理能力和成像质量上都更加优秀

        而且独立 ISP 一般是手机厂商根据不同机型的摄像硬件定制 也能更好的发挥出手机相机的实力

%%%%%

MODEM 通信处理器

        手机除了普通的 CPU 芯片以外 还有 MODEM 处理器芯片

        该芯片的功能就是实现手机必需的通信功能

%%%%%

基带处理器

        手机基带又称为 Radio 是手机中的一块电路

        主要的作用是负责完成移动网络中无线信号的解调、解扰、解扩和解码的工作

        手机通常由两大部分电路组成
        一部分是高层处理部分 另一部分就是基带

基带英文全称 Baseband/信源 信息源也称 发终端

        发出的没有经过 调制/进行频谱搬移和变换 的原始电信号所固有的 频带/频率带宽 称为基本频带 简称基带

        简单来说手机处理器负责处理信息

        而我们上网或通话时无线信号的收发均由基带完成

        基带也分为集成式和外挂式

在骁龙 888 之前 高通骁龙 8 系一直使用的是外挂基带
这是因为骁龙 865 及以前的处理器均使用的是 7nm 以上制程 处理器内部寸土寸金
如果要保证 soc 的面积大小不变强行把基带集成进 soc 那必然会带来性能的牺牲
而如今的骁龙 888 使用了 5nm 制程 使得 soc 在相同面积内能容纳下更多的晶体管
所以高通这次就把基带集成进了 soc

  1. 基带芯片是指用来合成即将发射的基带信号或对接收到的基带信号进行解码的芯片
  2. 具体地说 就是发射时 把语音或其她数据信号编码成用来发射的基带码
  3. 接收时 把收到的基带码解码为语音或其她数据信号
  4. 主要完成通信终端的信息处理功能

%%%%%

ROM 内存容量与 ROM 固件概念


        ROM 手机内存容量即手机内部存储空间 和电脑的硬盘可以说是一个概念

ROM 的大小 影响手机内部可以放多少东西

        个人觉得最好软件装 ROM 里 媒体文件等等放手机内存卡里

        ROM 固件和 ROM 内存不是一个概念

        就是各大论坛上说的固件 可以简单理解为刷入的系统 就像从网上下的 .iso 系统镜像

        在 Android 系统领域里有原生的 Android 系统 现在大多数 Android 手机厂商的出厂手机都是原生的
        还有基于原生系统上的优化系统 OS 等等

        可以这样理解 原生的 Android 系统就像原版的 XP

        优化系统就相当于 雨林木风版、深度版 XP 等等

        一般而言 后者都要比原生的 Android 系统具有更良好的性能

        而且有些差别很大 要比官方的系统在性能上好很多

        当然也有其她的一些缺点,比如没有原生系统稳定 这点在中低端手机会特别明显

%%%%%

RAM 运行内存

        简称运存

这个和电脑的内存差不多

        RAM 的大小影响手机可以同时运行多少软件 尤其是特别占运存的软件

——————————

安卓分区扫盲

        如果没有安卓分区知识 建议看一下这篇文章:

[探索 Android 设备分区]-安卓手机分区扫盲!折腾狂必看~~_燃吹的博客-CSDN博客_手机分区安卓系统是怎么分区的?用户权限扫盲/为什么需要 root 手机示例获取安卓 5.0.2手机信息以及系统分区详解安卓 6.0 系统分区传统安卓的 non-A/B 分区传统分区介绍传统系统升级方案安卓 7.0 之后的A/B 和 VAB 分区结构A/B 主备分区A/B 分区的系统升级方式以及优缺点A/B 分区结构虚拟 AB 分区安卓 10 之后的动态分区Shared System Image/SSI 概念动态分区和super 概念示例一个 Android 10 的默认分区方案...https://blog.csdn.net/m0_67268286/article/details/125128226

        下面主要是介绍了一下 Android 手机的硬软件结构以及主要分区的内容并简要的介绍了一些开机启动的过程

%%%%%

分区的概念

        可以简单的把手机的 ROM 存储类比为我们电脑上的硬盘

        这个硬盘被分成了几个分区:

bootloader 分区
boot 分区
system 分区

        等等

        所谓的刷机我们可以简单的理解成把软件安装在手机的某些分区中类似于我们在电脑上安装 Windows 系统到 C 盘

        注意盘符的概念是微软创造的 盘符那一套在这里不适用 而是 Android 是基于 Linux 的挂载概念

        Android 的主要分区:

  1. BootLoader 分区
  2. Boot 分区
  3. Recoverty 分区
  4. System 分区
  5. Data 分区
  6. Modem 分区

%%%%%

Bootloader 引导加载器分区

        当按下电源键手机上电启动后,首先从 bootloader 分区中一个固定的地址开始执行指令

        bootloader 就是 Android 版本的的 BIOS !!!

        bootloader 分区分成两个部分,分别叫做

primary bootloader/主引导加载程序

secondary stage bootloader/二级引导加载程序

        bootloader 的 primary bootloader 部分主要执行硬件检测 确保硬件能正常工作
        然后将 secondary stage bootloader 拷贝到 内存/RAM 相应位置开始执行

Secondary stage bootloader 会进行一些硬件初始化工作 例如获取内存大小信息等 然后根据用户的按键进入到某种启动模式

        比如说大家所熟知的通过电源键和其她一些按键的组合进入到 recovery、fastboot、 或者选择启动模式的启动界面以及进入工厂模式等等

        我们在各大论坛上看到的 bootloader 通常指的就是 secondary stage bootloader
        不过我们不需要关心太多的细节 可以简单的理解为 bootloader 就是一段启动代码 根据用户按键有选择的进入某种启动模式

%%%%%

Fastboot 线刷模式

        fastboot 是 Android 定义的一种简单的刷机协议

        用户可以通过 fastboot 命令行工具通过 USB 来进行刷机

        例如:

fastboot flash boot boot.img    /* 把 boot.img 的内容刷写到 boot 分区中 */

        一般的手机厂商不直接提供 fastboot 模式刷机 而为了显示她们的 NB 之处总是会提供自己专有的刷机工具和刷机方法

        比如说三星的 Odin 摩托的 RSD 华为的粉屏等等

        但是其本质实际上是相同的 都是将软件直接 flash 到各个分区中
        这种通常称为线刷 是比较原始的方法

        当手机处于开不了机的情况下 可以使用相应厂家提供的工具进行刷入

        不过需要注意的是 有一些机型无法修改 boot 分区!

%%%%%

Recovery 分区以及 Recovery 恢复出厂模式

        recovery 是 Android 定义的一个标准刷机协议

        当进入 recovery 模式时 Secondary stage bootloader 从 recovery 分区开始启动

        recovery 分区实际上是一个简单的 Linux 系统

  1. 当内核启动完毕后 开始执行第一个程序 init
  2. init 程序是 Linux 系统所有程序的老祖宗
  3. init 会启动一个叫做 recovery 的程序
  4. recovery 模式的名称也由此而来

        通过 recovery 程序用户可以执行清除数据、安装刷机包等操作

  1. 一般的手机厂商都提供一个简单的 recovery 刷机 多数只能进行 upate 的操作 不能进行卡刷
  2. 如果想要自已卡刷 则需要事先刷入第三方的 Recovery 然后选择刷机包
  3. 大名鼎鼎的 CWM Recovery 就是一个加入了很多增强功能的 recovery
  4. 要想用上 CWM Recovery 前提是 recovery 分区可以被刷写
  5. 大家在论坛上看到的解锁 bootloader 通常指的就是解锁 recovery 或 fastboot 允许刷写 recovery 分区
  6. 这样大家就可以用上喜爱的 CWM Recovery 了!

%%%%%

Modem 分区


        实现手机必需的通信功能

        大家通常所刷的 RADIO 就是刷写 modem 分区

        在所有适配的 ROM 中这部分是不动 否则会造成通话不稳定

——————————

安卓系统简要启动流程

    你有没有想过当我们按下电源键开机到进入到桌面到底是个什么样的过程呢?

%%%%%

Android 正常启动流程

        当我们只是按下电源键开机时 会进入正常启动模式

        Secondary stage bootloader/二级引导加载程序 会从 boot 分区开始启动

        Boot 分区的格式是固定的

首先是一个头部

然后是 Linux 内核

最后是用作根文件系统的 ramdisk

    一般针对每个机型的完整刷机包中会有一个 boot.img 文件 这就是 boot 分区镜像文件

        当 Linux 内核启动完毕后 就开始执行根文件系统中的 init 程序

        init 程序会读取启动脚本文件

  1. init.rc
  2. init.*.rc
  3. 下面是我安卓中的 init 文件:
  4. -rwxr-x--- 1 root root 1.4M 1970-01-01 08:00 init
  5. -rwxr-x--- 1 root root 1.1K 1970-01-01 08:00 init.environ.rc
  6. -rwxr-x--- 1 root root 29K 1970-01-01 08:00 init.rc
  7. -rwxr-x--- 1 root root 15K 1970-01-01 08:00 init.recovery.amlogic.rc
  8. -rwxr-x--- 1 root root 7.5K 1970-01-01 08:00 init.usb.configfs.rc
  9. -rwxr-x--- 1 root root 5.5K 1970-01-01 08:00 init.usb.rc
  10. -rwxr-x--- 1 root root 511 1970-01-01 08:00 init.zygote32.rc

        Android 内核挂载到

/nfsroot/androidfs

        之后根据

  1. init.rc
  2. init.goldfish.rc

        来初始化并装载系统库和相应程序等 直到开机完成

  1. init.rc 脚本包括了文件系统初始化、装载的许多过程
  2. init.rc 的工作主要是:
  3. 设置一些环境变量
  4. 创建 system、sdcard、data、cache 等目录
  5. 把一些文件系统 mount 到一些目录去
  6. 设置一些文件的用户群组、权限
  7. 设置一些线程参数
  8. 设置 TCP 缓存大小

        启动脚本文件的格式大家可以在网上找到很多参考资料 这里就不列出了

        根文件系统中有一个重要的配置文件

  1. cmcc_jiangsu:/ # ls default.prop -alh
  2. lrwxrwxrwx 1 root root 23 1970-01-01 08:00 default.prop -> system/etc/prop.default
  3. cmcc_jiangsu:/ #

        该文件的内容如下:

  1. cmcc_jiangsu:/ # cat default.prop
  2. #
  3. # ADDITIONAL_DEFAULT_PROPERTIES
  4. #
  5. ro.build.version.release=9
  6. ro.actionable_compatible_property.enabled=true
  7. ro.secure=0
  8. security.perf_harden=1
  9. ro.allow.mock.location=0
  10. ro.debuggable=1
  11. tombstoned.max_tombstone_count=50
  12. dalvik.vm.image-dex2oat-Xms=64m
  13. dalvik.vm.image-dex2oat-Xmx=64m
  14. dalvik.vm.dex2oat-Xms=64m
  15. dalvik.vm.dex2oat-Xmx=512m
  16. dalvik.vm.usejit=true
  17. dalvik.vm.usejitprofiles=true
  18. dalvik.vm.dexopt.secondary=true
  19. dalvik.vm.appimageformat=lz4
  20. pm.dexopt.first-boot=quicken
  21. pm.dexopt.boot=verify
  22. pm.dexopt.install=speed-profile
  23. pm.dexopt.bg-dexopt=speed-profile
  24. pm.dexopt.ab-ota=speed-profile
  25. pm.dexopt.inactive=verify
  26. pm.dexopt.shared=speed
  27. dalvik.vm.dex2oat-minidebuginfo=true
  28. debug.atrace.tags.enableflags=0
  29. #
  30. # BOOTIMAGE_BUILD_PROPERTIES
  31. #
  32. ro.bootimage.build.date=/* ... ... */
  33. ro.bootimage.build.date.utc=/* ... ... */
  34. ro.bootimage.build.fingerprint=/* ... ... */
  35. persist.sys.usb.config=none
  36. cmcc_jiangsu:/ #

        文件中的每一行对某个属性赋值

  1. 需要注意的两个属性:
  2. ro.secure
  3. ro.debuggable
  4. 如果
  5. ro.secure=0
  6. 允许我们运行 adbroot 命令
  7. 通常大家说的内核 ROOT 指的就是 ro.secure=0
  8. ROOT 权限只是手机上有一个名为授权管理的程序 Superuser.apk 可以授予程序 root 用户的权限
  9. 如果
  10. ro.debuggable=1
  11. 允许调试系统 APP

        init 程序读取启动脚本 执行脚本中指定的动作和命令

        脚本中的一部分是运行 system 分区的程序:

  1. system 的 bin 目录下存放的都是可执行程序
  2. 其中有一个重要的可执行文件叫 app_process 一般称之为 Zygote
  3. Zygote 是卵的意思 所有的 Android 进程都是由她生出来的
  4. Zygote 首先会加载 dalvik 虚拟机 然后产生一个叫做 system_server 的进程
  5. system_server 顾名思义被称作 Android的 系统服务程序
  6. system_server 主要管理整个 android 系统
  7. 示例:
  8. cmcc_jiangsu:/ # ls /system
  9. app etc lib priv-app vendor
  10. bin fake-libs lost+found product xbin
  11. build.prop fonts media recovery-from-boot.p
  12. compatibility_matrix.xml framework preinstall usr
  13. cmcc_jiangsu:/ # ls /system -alh
  14. total 2.2M
  15. drwxr-xr-x 15 root root 4.0K 1970-01-01 08:00 .
  16. drwxr-xr-x 23 root root 0 2015-01-01 08:00 ..
  17. drwxr-xr-x 17 root root 4.0K 2022-06-26 11:03 app
  18. drwxr-xr-x 3 root shell 8.0K 2022-06-26 11:03 bin
  19. -rw------- 1 root root 14K 2022-06-26 10:21 build.prop
  20. -rw-r--r-- 1 root root 87K 2022-06-26 10:21 compatibility_matrix.xml
  21. drwxr-xr-x 14 root root 4.0K 2022-06-26 11:03 etc
  22. drwxr-xr-x 2 root root 4.0K 2022-06-26 11:03 fake-libs
  23. drwxr-xr-x 2 root root 12K 2022-06-26 11:03 fonts
  24. drwxr-xr-x 4 root root 4.0K 2022-06-26 11:03 framework
  25. drwxr-xr-x 8 root root 16K 2022-06-28 15:29 lib
  26. drwx------ 2 root root 4.0K 1970-01-01 08:00 lost+found
  27. drwxr-xr-x 3 root root 4.0K 2022-06-26 11:03 media
  28. drwxr-xr-x 2 root root 4.0K 2022-07-10 17:17 preinstall
  29. drwxr-xr-x 21 root root 4.0K 2022-06-26 11:03 priv-app
  30. lrw-r--r-- 1 root root 8 2022-06-26 10:22 product -> /product
  31. -rw-r--r-- 1 root root 4.4M 2022-06-26 10:22 recovery-from-boot.p
  32. drwxr-xr-x 8 root root 4.0K 2022-06-26 11:03 usr
  33. lrw-r--r-- 1 root root 7 2022-06-26 10:22 vendor -> /vendor
  34. drwxr-xr-x 2 root shell 4.0K 2022-06-26 11:03 xbin
  35. cmcc_jiangsu:/ # ls /system/bin/app* -alh
  36. lrwxr-xr-x 1 root shell 13 2022-06-26 10:21 /system/bin/app_process -> app_process32
  37. -rwxr-xr-x 1 root shell 28K 2022-06-26 10:21 /system/bin/app_process32
  38. -rwxr-xr-x 1 root shell 71K 2022-06-26 10:21 /system/bin/applypatch
  39. -rwxr-xr-x 1 root shell 33 2022-06-26 10:21 /system/bin/appops
  40. -rwxr-xr-x 1 root shell 232 2022-06-26 10:21 /system/bin/appwidget
  41. cmcc_jiangsu:/ # ps -A | grep system_server
  42. system 3612 2600 1426196 195968 SyS_epoll_wait 0 S system_server
  43. cmcc_jiangsu:/ #

        system_server 启动完成后开始寻找一个叫做启动器的程序

        找到之后由 zygote 开始启动执行启动器 这就是我们常见到的桌面程序!

        至此我们总算弄明白了从电源键到桌面程序经历了什么!

##################################################

Android 软件系统架构

——————————

安卓系统架构一览

        除了内核是放在 boot 分区之外 其她层的代码都是在 system 分区之中的

  1. Boot 分区
  2. Linux Kernel/Linux 内核
  3. 例如 WiFi、Audio 等驱动
  4. System 分区
  5. Library/动态链接库文件
  6. 例如各种 .so 文件
  7. Android Runtime/安卓运行时环境
  8. 例如核心 lib 库
  9. 例如 Dalvik 虚拟机
  10. Application Framework/应用框架
  11. 例如窗口管理
  12. 再例如程序安装包管理
  13. Application/应用程序
  14. 例如 Home、Phone、Browser 等等

——————————

安卓软件系统架构详解

        了解 system 分区必看的 Android 软件系统架构:

  1. 核心应用层
  2. 框架层
  3. JNI 层
  4. Dalvik 虚拟机层
  5. 本地库层
  6. HAL 硬件抽象层
  7. 厂家适配层
  8. Linux 内核

        核心应用层:

        这一层就是大家平常所接触的各种各样的系统自带应用
        比如

联系人

电话

音乐

        等
        应用层往下就是开发人员所接触的

        框架层:

        这一层是 Android 系统的核心

        她提供了整个 Android 系统运作的机制
        像

窗口管理

程序安装包管理

        还有开发人员所接触的

Activity

Service

broadcast

        等等

        JNI 层:

        JNI 层是 Java 程序和底层操作系统通信的一个机制
        她使得 Java 代码可以调用 C/C++ 代码来访问底层操作系统的 API

        Dalvik 虚拟机:

        Android 开发使用 Java 语言
        应用程序的 Java 代码会被编译成 dalvik 虚拟机字节码
        这些字节码由 dalvik 虚拟机解释执行

        本地库:

        本地库一般是由 C/C++ 语言所开发 直接编译成相应 CPU 的机器码
        这其中包含标准 C 库 例如

用以绘制图形的 skia 库

浏览器核心引擎 webkit

        等

        HAL 硬件抽象层:

        为了和各个厂家的不同硬件工作 Android 定义了一套硬件接口
        比如说为了使用相机 厂家的相机驱动必须提供的接口方法
        这样使得上层的代码可以独立于不同的硬件运行

        厂家适配层:

        本来 Android 定义的 HAL 层是直接和厂家提供的设备驱动打交道的
        但是目前厂家不想开源 HAL 部分的代码 因此很多厂家都提供了一个厂家适配层的代码
        这样在 HAL 层接口的实现只是一个简单的对厂家适配层接口函数的调用

        内核:

        这一层就是大家熟悉的 Linux 内核
        内核中包含有各种硬件驱动 这些驱动不同的手机厂商不同的手机是不一样的
        Linux 内核是支持驱动模块化机制的
        简单的说就是允许用户动态的加载或者卸载某个硬件驱动
        但是目前来看手机厂商除了提供 WIFI 驱动单独加载外 其她驱动都是和内核绑定在一起的

  1. Android 把对硬件的支持分成了两层
  2. 一层放在用户空间 User Space
  3. 一层放在内核空间 Kernel Space
  4. 其中硬件抽象层运行在用户空间 而 Linux 内核驱动程序运行在内核空间
  5. 为什么要这样安排呢?把硬件抽象层和内核驱动整合在一起放在内核空间不可行吗?
  6. 从技术实现的角度来看 是可以的
  7. 然而从商业的角度来看 把对硬件的支持逻辑都放在内核空间 可能会损害厂家的利益
  8. 我们知道 Linux 内核源代码版权遵循 GNU License
  9. 而 Android 源代码版权遵循 Apache License
  10. 这两个许可证有些不同:
  11. 前者在发布产品时 必须公布源代码 而后者无须发布源代码
  12. 如果把对硬件支持的所有代码都放在 Linux 驱动层 那就意味着发布时要公开驱动程序的源代码
  13. 而公开源代码就意味着把硬件的相关参数和实现都公开了
  14. 在手机市场竞争激烈的今天 这对厂家来说 损害是非常大的
  15. 因此 Android 才会想到把对硬件的支持分成硬件抽象层和内核驱动层
  16. 内核驱动层只提供简单的访问硬件逻辑 例如读写硬件寄存器的通道
  17. 至于从硬件中读到了什么值或者写了什么值到硬件中的逻辑 都放在硬件抽象层中去了
  18. 这样就可以把商业秘密隐藏起来了

##################################################

Android 操作系统常见目录解析

——————————

system 分区常见目录

%%%%%

/system/bin 与 /system/xbin 目录

        我们常见的  shell 命令虽然都是放在 /system/bin 和 /system/xbin 目录下的

        但是 bin 目录下存放的是一些可执行文件

基本上是由 C/C++ 编写的

  1. cmcc_jiangsu:/ # ls /system/bin | wc -l
  2. 358
  3. cmcc_jiangsu:/ # ls /system/bin
  4. Android.mk insmod rgbtest
  5. acpi install-recovery.sh rm
  6. adbd installd rmdir
  7. am ionice rmmod
  8. amctcTest iorenice rtwpriv
  9. app_process iotop run-as
  10. app_process32 ip runcon
  11. applypatch ip6tables schedtest
  12. appops ip6tables-restore schedulecmd.sh
  13. appwidget ip6tables-save screencap
  14. arping ipd screencontrol
  15. atrace iptables screenrecord
  16. audioserver iptables-restore sdcard
  17. awk iptables-save secdiscard
  18. base64 iptvd secilc
  19. basename iptvdc sed
  20. bcc ipv6-android-script.sh sendevent
  21. blank_screen iw sensorservice
  22. blkid karaok_recorder seq
  23. blockdev keystore service
  24. bmgr keystore_cli_v2 servicemanager
  25. bootanimation kill setenforce
  26. bootplayer killall setprop
  27. bootstat ld.mc setsid
  28. bpfloader libpcapcmcc.so settings
  29. bu linker sgdisk
  30. bugreport linker_asan sh
  31. bugreportz lmkd sha1sum
  32. bunzip2 ln sha224sum
  33. busybox_ft load_policy sha256sum
  34. bzcat locksettings sha384sum
  35. bzip2 log sha512sum
  36. cal logcapture.sh sleep
  37. cameraserver logcat sload_f2fs
  38. cat logcatd sm
  39. chcon logd sort
  40. chgrp logname split
  41. chmod logpersist.cat sqlite3
  42. chown logpersist.start ss
  43. chroot logpersist.stop start
  44. chrt logwrapper startsoftdetector.sh
  45. cksum losetup stat
  46. clatd ls statsd
  47. clear lshal stop
  48. cmd lsmod storaged
  49. cmp lsof strace
  50. comm lspci strings
  51. content lsusb stty
  52. cp make_f2fs su
  53. cpio md5sum surfaceflinger
  54. crash_dump32 mdnsd svc
  55. csrctctest media swapoff
  56. ctctest mediadrmserver swapon
  57. cut mediaextractor sync
  58. dalvikvm mediametrics sysctl
  59. dalvikvm32 mediaserver tac
  60. date memory_replay32 tail
  61. dd memtest tar
  62. debuggerd microcom taskset
  63. dex2oat mkdir tc
  64. dex2oatd mke2fs tee
  65. dexdiag mkfifo telecom
  66. dexdump mkfs.exfat terminal_info_main
  67. dexlist mkfs.ext2 terminal_write_test
  68. dexoptanalyzer mkfs.ext3 thermalserviced
  69. dexoptanalyzerd mkfs.ext4 time
  70. df mknod timeout
  71. diff mkntfs tinycap
  72. dirname mkswap tinymix
  73. dmesg mktemp tinyplay
  74. dnsmasq modinfo tombstoned
  75. dos2unix modprobe toolbox
  76. dpm monkey top
  77. drmserver more touch
  78. du mount touchwifi.sh
  79. dumpstate mountpoint toybox
  80. dumpsys mtpd tr
  81. e2fsck mv traced
  82. e2fsdroid ndc traced_probes
  83. echo netd tracepath
  84. egrep netstat tracepath6
  85. env newfs_msdos traceroute
  86. execmd.sh nice traceroute6
  87. expand nl true
  88. expr nohup truncate
  89. fallocate ntfs-3g tspacktest
  90. false ntfsfix tty
  91. fgrep oatdump tune2fs
  92. file od tzdatacheck
  93. find odhcp6c uiautomator
  94. flock paste ulimit
  95. fmt patch umount
  96. free patchoat uname
  97. fsck.exfat patchoatd uncrypt
  98. fsck.f2fs perfetto unifiedctctest
  99. fsck_msdos perfprofd uniq
  100. gdbserver pgrep unix2dos
  101. getenforce pidof uptime
  102. getevent ping usbd
  103. getprop ping6 usleep
  104. grep pkill uudecode
  105. groups pm uuencode
  106. gunzip pmap vdc
  107. gzip pngtest videomediaconvertortest
  108. head pppd vmstat
  109. hid printenv vold
  110. hostname printf vold_prepare_subdirs
  111. hw profman wait_for_keymaster
  112. hwclock profmand wc
  113. hwservicemanager ps which
  114. id pwd whoami
  115. idmap racoon wificond
  116. ifconfig readlink wm
  117. imageserver realpath xargs
  118. ime reboot xiriservice_All
  119. incident renice xxd
  120. incident_helper requestsync yes
  121. incidentd resize2fs zcat
  122. inotifyd restorecon
  123. input revertuserdata.sh
  124. cmcc_jiangsu:/ # ls -alh /system/bin
  125. total 15M
  126. drwxr-xr-x 3 root shell 8.0K 2022-06-26 11:03 .
  127. drwxr-xr-x 15 root root 4.0K 1970-01-01 08:00 ..
  128. -rwxr-xr-x 1 root shell 727 2022-06-26 10:21 Android.mk
  129. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 acpi -> toybox
  130. -rwxr-xr-x 1 root shell 1.2M 2022-06-26 10:21 adbd
  131. -rwxr-xr-x 1 root shell 207 2022-06-26 10:21 am
  132. -rwxr-xr-x 1 root shell 20K 2022-06-26 10:21 amctcTest
  133. lrwxr-xr-x 1 root shell 13 2022-06-26 10:21 app_process -> app_process32
  134. -rwxr-xr-x 1 root shell 28K 2022-06-26 10:21 app_process32
  135. -rwxr-xr-x 1 root shell 71K 2022-06-26 10:21 applypatch
  136. -rwxr-xr-x 1 root shell 33 2022-06-26 10:21 appops
  137. -rwxr-xr-x 1 root shell 232 2022-06-26 10:21 appwidget
  138. -rwxr-xr-x 1 root shell 24K 2022-06-26 10:21 arping
  139. -rwxr-xr-x 1 root shell 57K 2022-06-26 10:21 atrace
  140. -rwxr-xr-x 1 root shell 36K 2022-06-26 10:21 audioserver
  141. -rwxr-xr-x 1 root shell 124K 2022-06-26 10:21 awk
  142. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 base64 -> toybox
  143. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 basename -> toybox
  144. -rwxr-xr-x 1 root shell 41K 2022-06-26 10:21 bcc
  145. -rwxr-xr-x 1 root shell 20K 2022-06-26 10:21 blank_screen
  146. -rwxr-xr-x 1 root shell 20K 2022-06-26 10:21 blkid
  147. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 blockdev -> toybox
  148. -rwxr-xr-x 1 root shell 216 2022-06-26 10:21 bmgr
  149. -rwxr-xr-x 1 root shell 32K 2022-06-26 10:21 bootanimation
  150. -rwxr-xr-x 1 root shell 6.5M 2022-06-26 10:21 bootplayer
  151. -r-xr-x--- 1 system log 61K 2022-06-26 10:21 bootstat
  152. -rwxr-xr-x 1 root shell 29K 2022-06-26 10:21 bpfloader
  153. -rwxr-xr-x 1 root shell 173 2022-06-26 10:21 bu
  154. -rwxr-xr-x 1 root shell 16K 2022-06-26 10:21 bugreport
  155. -rwxr-xr-x 1 root shell 16K 2022-06-26 10:21 bugreportz
  156. lrwxr-xr-x 1 root shell 5 2022-06-26 10:21 bunzip2 -> bzip2
  157. -rwxr-xr-x 1 root shell 743K 2022-06-26 10:21 busybox_ft
  158. lrwxr-xr-x 1 root shell 5 2022-06-26 10:21 bzcat -> bzip2
  159. -rwxr-xr-x 1 root shell 39K 2022-06-26 10:21 bzip2
  160. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 cal -> toybox
  161. -rwxr-xr-x 1 root shell 16K 2022-06-26 10:21 cameraserver
  162. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 cat -> toybox
  163. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 chcon -> toybox
  164. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 chgrp -> toybox
  165. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 chmod -> toybox
  166. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 chown -> toybox
  167. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 chroot -> toybox
  168. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 chrt -> toybox
  169. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 cksum -> toybox
  170. -rwxr-xr-x 1 root shell 51K 2022-06-26 10:21 clatd
  171. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 clear -> toybox
  172. -rwxr-xr-x 1 root shell 45K 2022-06-26 10:21 cmd
  173. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 cmp -> toybox
  174. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 comm -> toybox
  175. -rwxr-xr-x 1 root shell 224 2022-06-26 10:21 content
  176. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 cp -> toybox
  177. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 cpio -> toybox
  178. -rwxr-xr-x 1 root shell 104K 2022-06-26 10:21 crash_dump32
  179. -rwxr-xr-x 1 root shell 55K 2022-06-26 10:21 csrctctest
  180. -rwxr-xr-x 1 root shell 50K 2022-06-26 10:21 ctctest
  181. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 cut -> toybox
  182. lrwxr-xr-x 1 root shell 10 2022-06-26 10:21 dalvikvm -> dalvikvm32
  183. -rwxr-xr-x 1 root shell 24K 2022-06-26 10:21 dalvikvm32
  184. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 date -> toybox
  185. lrwxr-xr-x 1 root shell 7 2022-06-26 10:21 dd -> toolbox
  186. -rwxr-xr-x 1 root shell 20K 2022-06-26 10:21 debuggerd
  187. -rwxr-xr-x 1 root shell 534K 2022-06-26 10:21 dex2oat
  188. -rwxr-xr-x 1 root shell 790K 2022-06-26 10:21 dex2oatd
  189. -rwxr-xr-x 1 root shell 32K 2022-06-26 10:21 dexdiag
  190. -rwxr-xr-x 1 root shell 105K 2022-06-26 10:21 dexdump
  191. -rwxr-xr-x 1 root shell 24K 2022-06-26 10:21 dexlist
  192. -rwxr-xr-x 1 root shell 28K 2022-06-26 10:21 dexoptanalyzer
  193. -rwxr-xr-x 1 root shell 36K 2022-06-26 10:21 dexoptanalyzerd
  194. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 df -> toybox
  195. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 diff -> toybox
  196. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 dirname -> toybox
  197. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 dmesg -> toybox
  198. -rwxr-xr-x 1 root shell 137K 2022-06-26 10:21 dnsmasq
  199. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 dos2unix -> toybox
  200. -rwxr-xr-x 1 root shell 173 2022-06-26 10:21 dpm
  201. -rwxr-xr-x 1 root shell 68K 2022-06-26 10:21 drmserver
  202. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 du -> toybox
  203. -rwxr-xr-x 1 root shell 250K 2022-06-26 10:21 dumpstate
  204. -rwxr-xr-x 1 root shell 41K 2022-06-26 10:21 dumpsys
  205. -rwxr-xr-x 1 root shell 194K 2022-06-26 10:21 e2fsck
  206. -rwxr-xr-x 1 root shell 28K 2022-06-26 10:21 e2fsdroid
  207. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 echo -> toybox
  208. lrwxr-xr-x 1 root shell 4 2022-06-26 10:21 egrep -> grep
  209. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 env -> toybox
  210. -rwxr-xr-x 1 root shell 1.6K 2022-06-26 10:21 execmd.sh
  211. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 expand -> toybox
  212. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 expr -> toybox
  213. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 fallocate -> toybox
  214. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 false -> toybox
  215. lrwxr-xr-x 1 root shell 4 2022-06-26 10:21 fgrep -> grep
  216. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 file -> toybox
  217. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 find -> toybox
  218. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 flock -> toybox
  219. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 fmt -> toybox
  220. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 free -> toybox
  221. -rwxr-xr-x 1 root shell 41K 2022-06-26 10:21 fsck.exfat
  222. -rwxr-xr-x 1 root shell 107K 2022-06-26 10:21 fsck.f2fs
  223. -rwxr-xr-x 1 root shell 36K 2022-06-26 10:21 fsck_msdos
  224. -rwxr-xr-x 1 root shell 583K 2022-06-26 10:21 gdbserver
  225. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 getenforce -> toybox
  226. lrwxr-xr-x 1 root shell 7 2022-06-26 10:21 getevent -> toolbox
  227. lrwxr-xr-x 1 root shell 7 2022-06-26 10:21 getprop -> toolbox
  228. -rwxr-xr-x 1 root shell 33K 2022-06-26 10:21 grep
  229. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 groups -> toybox
  230. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 gunzip -> toybox
  231. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 gzip -> toybox
  232. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 head -> toybox
  233. -rwxr-xr-x 1 root shell 213 2022-06-26 10:21 hid
  234. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 hostname -> toybox
  235. drwxr-xr-x 2 root shell 4.0K 2022-06-26 11:03 hw
  236. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 hwclock -> toybox
  237. -rwxr-xr-x 1 root shell 71K 2022-06-26 10:21 hwservicemanager
  238. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 id -> toybox
  239. -rwxr-xr-x 1 root shell 36K 2022-06-26 10:21 idmap
  240. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 ifconfig -> toybox
  241. -rwxr-xr-x 1 root shell 346K 2022-06-26 10:21 imageserver
  242. -rwxr-xr-x 1 root shell 48 2022-06-26 10:21 ime
  243. -rwxr-xr-x 1 root shell 28K 2022-06-26 10:21 incident
  244. -rwxr-xr-x 1 root shell 138K 2022-06-26 10:21 incident_helper
  245. -rwxr-xr-x 1 root shell 128K 2022-06-26 10:21 incidentd
  246. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 inotifyd -> toybox
  247. -rwxr-xr-x 1 root shell 220 2022-06-26 10:21 input
  248. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 insmod -> toybox
  249. -rwxr-x--- 1 root root 822 2022-06-26 10:21 install-recovery.sh
  250. -rwxr-xr-x 1 root shell 228K 2022-06-26 10:21 installd
  251. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 ionice -> toybox
  252. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 iorenice -> toybox
  253. -rwxr-xr-x 1 root shell 49K 2022-06-26 10:21 iotop
  254. -rwxr-xr-x 1 root shell 281K 2022-06-26 10:21 ip
  255. -rwxr-xr-x 1 root shell 293K 2022-06-26 10:21 ip6tables
  256. lrwxr-xr-x 1 root shell 9 2022-06-26 10:21 ip6tables-restore -> ip6tables
  257. lrwxr-xr-x 1 root shell 9 2022-06-26 10:21 ip6tables-save -> ip6tables
  258. -rwxr-xr-x 1 root shell 162 2022-06-26 10:21 ipd
  259. -rwxr-xr-x 1 root shell 284K 2022-06-26 10:21 iptables
  260. lrwxr-xr-x 1 root shell 8 2022-06-26 10:21 iptables-restore -> iptables
  261. lrwxr-xr-x 1 root shell 8 2022-06-26 10:21 iptables-save -> iptables
  262. -rwxr-xr-x 1 root shell 67K 2022-06-26 10:21 iptvd
  263. -rwxr-xr-x 1 root shell 33K 2022-06-26 10:21 iptvdc
  264. -rwxr-xr-x 1 root shell 7.7K 2022-06-26 10:21 ipv6-android-script.sh
  265. -rwxr-xr-x 1 root shell 183K 2022-06-26 10:21 iw
  266. -rwxr-xr-x 1 root shell 24K 2022-06-26 10:21 karaok_recorder
  267. -rwxr-xr-x 1 root shell 233K 2022-06-26 10:21 keystore
  268. -rwxr-xr-x 1 root shell 65K 2022-06-26 10:21 keystore_cli_v2
  269. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 kill -> toybox
  270. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 killall -> toybox
  271. -rwxr-xr-x 1 root shell 505K 2022-06-26 10:21 ld.mc
  272. -rwxr-xr-x 1 root shell 619K 2022-06-26 10:21 libpcapcmcc.so
  273. -rwxr-xr-x 1 root shell 1.1M 2022-06-26 10:21 linker
  274. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 linker_asan -> linker
  275. -rwxr-xr-x 1 root shell 32K 2022-06-26 10:21 lmkd
  276. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 ln -> toybox
  277. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 load_policy -> toybox
  278. -rwxr-xr-x 1 root shell 211 2022-06-26 10:21 locksettings
  279. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 log -> toybox
  280. -rwxr-xr-x 1 root shell 307 2022-06-26 10:21 logcapture.sh
  281. -rwxr-xr-x 1 root shell 16K 2022-06-26 10:21 logcat
  282. -rwxr-xr-x 1 root shell 16K 2022-06-26 10:21 logcatd
  283. -r-xr-x--- 1 logd logd 129K 2022-06-26 10:21 logd
  284. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 logname -> toybox
  285. lrwxr-xr-x 1 root shell 16 2022-06-26 10:21 logpersist.cat -> logpersist.start
  286. -rwxr-xr-x 1 root shell 5.4K 2022-06-26 10:21 logpersist.start
  287. lrwxr-xr-x 1 root shell 16 2022-06-26 10:21 logpersist.stop -> logpersist.start
  288. -rwxr-xr-x 1 root shell 24K 2022-06-26 10:21 logwrapper
  289. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 losetup -> toybox
  290. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 ls -> toybox
  291. -rwxr-xr-x 1 root shell 16K 2022-06-26 10:21 lshal
  292. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 lsmod -> toybox
  293. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 lsof -> toybox
  294. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 lspci -> toybox
  295. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 lsusb -> toybox
  296. -rwxr-xr-x 1 root shell 49K 2022-06-26 10:21 make_f2fs
  297. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 md5sum -> toybox
  298. -rwxr-xr-x 1 root shell 769K 2022-06-26 10:21 mdnsd
  299. -rwxr-xr-x 1 root shell 227 2022-06-26 10:21 media
  300. -rwxr-xr-x 1 root shell 24K 2022-06-26 10:21 mediadrmserver
  301. -rwxr-xr-x 1 root shell 20K 2022-06-26 10:21 mediaextractor
  302. -rwxr-xr-x 1 root shell 37K 2022-06-26 10:21 mediametrics
  303. -rwxr-xr-x 1 root shell 24K 2022-06-26 10:21 mediaserver
  304. -rwxr-xr-x 1 root shell 25K 2022-06-26 10:21 memory_replay32
  305. -rwxr-xr-x 1 root shell 38K 2022-06-26 10:21 memtest
  306. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 microcom -> toybox
  307. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 mkdir -> toybox
  308. -rwxr-xr-x 1 root shell 72K 2022-06-26 10:21 mke2fs
  309. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 mkfifo -> toybox
  310. -rwxr-xr-x 1 root shell 35K 2022-06-26 10:21 mkfs.exfat
  311. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 mkfs.ext2 -> mke2fs
  312. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 mkfs.ext3 -> mke2fs
  313. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 mkfs.ext4 -> mke2fs
  314. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 mknod -> toybox
  315. -rwxr-xr-x 1 root shell 107K 2022-06-26 10:21 mkntfs
  316. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 mkswap -> toybox
  317. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 mktemp -> toybox
  318. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 modinfo -> toybox
  319. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 modprobe -> toybox
  320. -rwxr-xr-x 1 root shell 268 2022-06-26 10:21 monkey
  321. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 more -> toybox
  322. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 mount -> toybox
  323. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 mountpoint -> toybox
  324. -rwxr-xr-x 1 root shell 28K 2022-06-26 10:21 mtpd
  325. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 mv -> toybox
  326. -rwxr-xr-x 1 root shell 20K 2022-06-26 10:21 ndc
  327. -rwxr-xr-x 1 root shell 403K 2022-06-26 10:21 netd
  328. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 netstat -> toybox
  329. lrwxr-xr-x 1 root shell 7 2022-06-26 10:21 newfs_msdos -> toolbox
  330. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 nice -> toybox
  331. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 nl -> toybox
  332. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 nohup -> toybox
  333. -rwxr-xr-x 1 root shell 245K 2022-06-26 10:21 ntfs-3g
  334. -rwxr-xr-x 1 root shell 152K 2022-06-26 10:21 ntfsfix
  335. -rwxr-xr-x 1 root shell 201K 2022-06-26 10:21 oatdump
  336. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 od -> toybox
  337. -rwxr-xr-x 1 root shell 441K 2022-06-26 10:21 odhcp6c
  338. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 paste -> toybox
  339. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 patch -> toybox
  340. -rwxr-xr-x 1 root shell 61K 2022-06-26 10:21 patchoat
  341. -rwxr-xr-x 1 root shell 104K 2022-06-26 10:21 patchoatd
  342. -rwxr-xr-x 1 root shell 183K 2022-06-26 10:21 perfetto
  343. -rwxr-xr-x 1 root shell 1.5M 2022-06-26 10:21 perfprofd
  344. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 pgrep -> toybox
  345. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 pidof -> toybox
  346. -rwxr-xr-x 1 root shell 41K 2022-06-26 10:21 ping
  347. -rwxr-xr-x 1 root shell 45K 2022-06-26 10:21 ping6
  348. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 pkill -> toybox
  349. -rwxr-xr-x 1 root shell 34 2022-06-26 10:21 pm
  350. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 pmap -> toybox
  351. -rwxr-xr-x 1 root shell 20K 2022-06-26 10:21 pngtest
  352. -rwxr-xr-x 1 root shell 231K 2022-06-26 10:21 pppd
  353. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 printenv -> toybox
  354. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 printf -> toybox
  355. -rwxr-xr-x 1 root shell 82K 2022-06-26 10:21 profman
  356. -rwxr-xr-x 1 root shell 91K 2022-06-26 10:21 profmand
  357. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 ps -> toybox
  358. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 pwd -> toybox
  359. -rwxr-xr-x 1 root shell 189K 2022-06-26 10:21 racoon
  360. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 readlink -> toybox
  361. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 realpath -> toybox
  362. -rwxr-xr-x 1 root shell 16K 2022-06-26 10:21 reboot
  363. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 renice -> toybox
  364. -rwxr-xr-x 1 root shell 205 2022-06-26 10:21 requestsync
  365. -rwxr-xr-x 1 root shell 56K 2022-06-26 10:21 resize2fs
  366. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 restorecon -> toybox
  367. -rwxr-xr-x 1 root shell 1.3K 2022-06-26 10:21 revertuserdata.sh
  368. -rwxr-xr-x 1 root shell 16K 2022-06-26 10:21 rgbtest
  369. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 rm -> toybox
  370. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 rmdir -> toybox
  371. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 rmmod -> toybox
  372. -rwxr-xr-x 1 root shell 1.6M 2022-06-26 10:21 rtwpriv
  373. -rwxr-x--- 1 root shell 20K 2022-06-26 10:21 run-as
  374. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 runcon -> toybox
  375. -rwxr-xr-x 1 root shell 16K 2022-06-26 10:21 schedtest
  376. -rwxr-xr-x 1 root shell 1.0K 2022-06-26 10:21 schedulecmd.sh
  377. -rwxr-xr-x 1 root shell 24K 2022-06-26 10:21 screencap
  378. -rwxr-xr-x 1 root shell 37K 2022-06-26 10:21 screencontrol
  379. -rwxr-xr-x 1 root shell 110K 2022-06-26 10:21 screenrecord
  380. -rwxr-xr-x 1 root shell 33K 2022-06-26 10:21 sdcard
  381. -rwxr-xr-x 1 root shell 24K 2022-06-26 10:21 secdiscard
  382. -rwx------ 1 root root 230K 2022-06-26 10:21 secilc
  383. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 sed -> toybox
  384. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 sendevent -> toybox
  385. -rwxr-xr-x 1 root shell 16K 2022-06-26 10:21 sensorservice
  386. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 seq -> toybox
  387. -rwxr-xr-x 1 root shell 32K 2022-06-26 10:21 service
  388. -rwxr-xr-x 1 root shell 24K 2022-06-26 10:21 servicemanager
  389. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 setenforce -> toybox
  390. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 setprop -> toybox
  391. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 setsid -> toybox
  392. -rwxr-xr-x 1 root shell 35 2022-06-26 10:21 settings
  393. -rwxr-xr-x 1 root shell 118K 2022-06-26 10:21 sgdisk
  394. -rwxr-xr-x 1 root shell 231K 2022-06-26 10:21 sh
  395. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 sha1sum -> toybox
  396. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 sha224sum -> toybox
  397. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 sha256sum -> toybox
  398. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 sha384sum -> toybox
  399. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 sha512sum -> toybox
  400. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 sleep -> toybox
  401. -rwxr-xr-x 1 root shell 119K 2022-06-26 10:21 sload_f2fs
  402. -rwxr-xr-x 1 root shell 207 2022-06-26 10:21 sm
  403. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 sort -> toybox
  404. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 split -> toybox
  405. -rwxr-xr-x 1 root shell 131K 2022-06-26 10:21 sqlite3
  406. -rwxr-xr-x 1 root shell 69K 2022-06-26 10:21 ss
  407. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 start -> toybox
  408. -rwxr-xr-x 1 root shell 475 2022-06-26 10:21 startsoftdetector.sh
  409. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 stat -> toybox
  410. -rwxr-xr-x 1 root shell 421K 2022-06-26 10:21 statsd
  411. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 stop -> toybox
  412. -rwxr-xr-x 1 root shell 172K 2022-06-26 10:21 storaged
  413. -rwxr-xr-x 1 root shell 565K 2022-06-26 10:21 strace
  414. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 strings -> toybox
  415. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 stty -> toybox
  416. -rwxr-xr-x 1 root shell 122K 2022-06-26 10:21 su
  417. -rwxr-xr-x 1 system graphics 33K 2022-06-26 10:21 surfaceflinger
  418. -rwxr-xr-x 1 root shell 209 2022-06-26 10:21 svc
  419. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 swapoff -> toybox
  420. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 swapon -> toybox
  421. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 sync -> toybox
  422. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 sysctl -> toybox
  423. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 tac -> toybox
  424. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 tail -> toybox
  425. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 tar -> toybox
  426. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 taskset -> toybox
  427. -rwxr-xr-x 1 root shell 94K 2022-06-26 10:21 tc
  428. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 tee -> toybox
  429. -rwxr-xr-x 1 root shell 189 2022-06-26 10:21 telecom
  430. -rwxr-xr-x 1 root shell 16K 2022-06-26 10:21 terminal_info_main
  431. -rwxr-xr-x 1 root shell 16K 2022-06-26 10:21 terminal_write_test
  432. -rwxr-xr-x 1 root shell 33K 2022-06-26 10:21 thermalserviced
  433. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 time -> toybox
  434. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 timeout -> toybox
  435. -rwxr-xr-x 1 root shell 20K 2022-06-26 10:21 tinycap
  436. -rwxr-xr-x 1 root shell 20K 2022-06-26 10:21 tinymix
  437. -rwxr-xr-x 1 root shell 20K 2022-06-26 10:21 tinyplay
  438. -rwxr-xr-x 1 root shell 139K 2022-06-26 10:21 tombstoned
  439. -rwxr-xr-x 1 root shell 93K 2022-06-26 10:21 toolbox
  440. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 top -> toybox
  441. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 touch -> toybox
  442. -rwxr-xr-x 1 root shell 166 2022-06-26 10:21 touchwifi.sh
  443. -rwxr-xr-x 1 root shell 340K 2022-06-26 10:21 toybox
  444. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 tr -> toybox
  445. -rwxr-xr-x 1 root shell 16K 2022-06-26 10:21 traced
  446. -rwxr-xr-x 1 root shell 16K 2022-06-26 10:21 traced_probes
  447. -rwxr-xr-x 1 root shell 20K 2022-06-26 10:21 tracepath
  448. -rwxr-xr-x 1 root shell 20K 2022-06-26 10:21 tracepath6
  449. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 traceroute -> toybox
  450. -rwxr-xr-x 1 root shell 24K 2022-06-26 10:21 traceroute6
  451. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 true -> toybox
  452. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 truncate -> toybox
  453. -rwxr-xr-x 1 root shell 16K 2022-06-26 10:21 tspacktest
  454. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 tty -> toybox
  455. -rwxr-xr-x 1 root shell 56K 2022-06-26 10:21 tune2fs
  456. -rwxr-xr-x 1 root shell 28K 2022-06-26 10:21 tzdatacheck
  457. -rwxr-xr-x 1 root shell 4.0K 2022-06-26 10:21 uiautomator
  458. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 ulimit -> toybox
  459. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 umount -> toybox
  460. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 uname -> toybox
  461. -rwxr-x--- 1 root root 114K 2022-06-26 10:21 uncrypt
  462. -rwxr-xr-x 1 root shell 55K 2022-06-26 10:21 unifiedctctest
  463. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 uniq -> toybox
  464. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 unix2dos -> toybox
  465. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 uptime -> toybox
  466. -rwxr-xr-x 1 root shell 20K 2022-06-26 10:21 usbd
  467. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 usleep -> toybox
  468. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 uudecode -> toybox
  469. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 uuencode -> toybox
  470. -rwxr-xr-x 1 root shell 46K 2022-06-26 10:21 vdc
  471. -rwxr-xr-x 1 root shell 16K 2022-06-26 10:21 videomediaconvertortest
  472. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 vmstat -> toybox
  473. -rwxr-xr-x 1 root shell 595K 2022-06-26 10:21 vold
  474. -rwxr-xr-x 1 root shell 32K 2022-06-26 10:21 vold_prepare_subdirs
  475. -rwxr-xr-x 1 root shell 28K 2022-06-26 10:21 wait_for_keymaster
  476. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 wc -> toybox
  477. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 which -> toybox
  478. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 whoami -> toybox
  479. -rwxr-xr-x 1 root shell 312K 2022-06-26 10:21 wificond
  480. -rwxr-xr-x 1 root shell 33 2022-06-26 10:21 wm
  481. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 xargs -> toybox
  482. -rwxr-xr-x 1 root shell 38K 2022-06-26 10:21 xiriservice_All
  483. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 xxd -> toybox
  484. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 yes -> toybox
  485. lrwxr-xr-x 1 root shell 6 2022-06-26 10:21 zcat -> toybox
  486. cmcc_jiangsu:/ #

        而 xbin 存放的是一些扩展的可执行文件

  1. cmcc_jiangsu:/ # ls /system/xbin | wc -l
  2. 24
  3. cmcc_jiangsu:/ # ls /system/xbin
  4. anrd ioshark_bench micro_bench_static rawbu simpleperf
  5. cpustats ksminfo mmc_utils runconuid su
  6. dnschk latencytop procmem sane_schedstat taskstats
  7. dumpcache librank procrank showmap tcpdump
  8. httpurl micro_bench puncture_fs showslab
  9. cmcc_jiangsu:/ # ls /system/xbin -alh
  10. total 1.8M
  11. drwxr-xr-x 2 root shell 4.0K 2022-06-26 11:03 .
  12. drwxr-xr-x 15 root root 4.0K 1970-01-01 08:00 ..
  13. -rwxr-xr-x 1 root shell 24K 2022-06-26 10:22 anrd
  14. -rwxr-xr-x 1 root shell 20K 2022-06-26 10:22 cpustats
  15. -rwxr-xr-x 1 root shell 20K 2022-06-26 10:22 dnschk
  16. -rwxr-xr-x 1 root shell 20K 2022-06-26 10:22 dumpcache
  17. -rwxr-xr-x 1 root shell 24K 2022-06-26 10:22 httpurl
  18. -rwxr-xr-x 1 root shell 37K 2022-06-26 10:22 ioshark_bench
  19. -rwxr-xr-x 1 root shell 20K 2022-06-26 10:22 ksminfo
  20. -rwxr-xr-x 1 root shell 20K 2022-06-26 10:22 latencytop
  21. -rwxr-xr-x 1 root shell 20K 2022-06-26 10:22 librank
  22. -rwxr-xr-x 1 root shell 36K 2022-06-26 10:22 micro_bench
  23. -rwxr-xr-x 1 root shell 282K 2022-06-26 10:22 micro_bench_static
  24. -rwxr-xr-x 1 root shell 50K 2022-06-26 10:22 mmc_utils
  25. -rwsr-sr-x 1 root root 20K 2022-06-26 10:22 procmem
  26. -rwxr-xr-x 1 root shell 28K 2022-06-26 10:22 procrank
  27. -rwxr-xr-x 1 root shell 20K 2022-06-26 10:22 puncture_fs
  28. -rwxr-xr-x 1 root shell 28K 2022-06-26 10:22 rawbu
  29. -rwxr-xr-x 1 root shell 20K 2022-06-26 10:22 runconuid
  30. -rwxr-xr-x 1 root shell 20K 2022-06-26 10:22 sane_schedstat
  31. -rwxr-xr-x 1 root shell 20K 2022-06-26 10:22 showmap
  32. -rwxr-xr-x 1 root shell 20K 2022-06-26 10:22 showslab
  33. -rwxr-xr-x 1 root shell 2.3M 2022-06-26 10:22 simpleperf
  34. -rwsr-x--- 1 root shell 16K 2022-06-26 10:22 su
  35. -rwxr-xr-x 1 root shell 24K 2022-06-26 10:22 taskstats
  36. -rwxr-xr-x 1 root shell 705K 2022-06-26 10:22 tcpdump
  37. cmcc_jiangsu:/ #

        该目录可以为空 大家常用的 busybox 就放在该目录下

        Busybox 所建立的各种符号链接命令一般都是放在该目录

  1. BusyBox 是一个集成了三百多个最常用 Linux 命令和工具的软件
  2. BusyBox 包含了一些简单的工具 例如
  3. ls
  4. cat
  5. echo
  6. 等等
  7. 还包含了一些更强大更复杂的工具 例如
  8. grep
  9. find
  10. mount
  11. telnet
  12. 有些人将 BusyBox 称为 Linux 工具里的瑞士军刀
  13. 简单的说 BusyBox 就好像是个大工具箱 集成压缩了 Linux 的许多工具和命令
  14. 也包含了 Linux 系统的自带的 shell ……
  15. BusyBox 是打包为单个二进制文件的用户级 Unix 实用程序的轻量级集合实现
  16. 这使其成为资源受限环境
  17. 例如嵌入式设备
  18. 的理想选择
  19. 完整的发行版包含近 400 个最常用的命令
  20. BusyBox 是开源的并在 GPL 下获得许可
  21. 她创建于 1995 年旨在使可引导系统适合单个软盘
  22. 将命令捆绑到一个二进制文件中可以减少开销并允许看似独立的应用程序之间的代码共享
  23. 你可以将她与 Linux 内核结合起来以创建一个没有其她依赖项的正常运行的系统
  24. BusyBox 针对空间受限的环境进行了优化 这使其成为物联网设备等嵌入式产品的理想选择
  25. 你可能还会发现 BusyBox 安装在最小但通用的 Linux 发行版上 例如 Alpine Linux

%%%%%

/system/media 和  /system/media/audio 目录

        /system/media 目录下存放的是系统所使用的各种媒体文件

        比如说

开机音乐

动画

壁纸文件

        等

不同的手机该目录的组织方式可能不一样

如何修改这些文件请自行捉摸~

  1. cmcc_jiangsu:/ # ls /system/media
  2. audio bootanimation.zip
  3. cmcc_jiangsu:/ # ls /system/media -alh
  4. total 1.2M
  5. drwxr-xr-x 3 root root 4.0K 2022-06-26 11:03 .
  6. drwxr-xr-x 15 root root 4.0K 1970-01-01 08:00 ..
  7. drwxr-xr-x 6 root root 4.0K 2022-06-26 11:03 audio
  8. -rw-r--r-- 1 root root 2.5M 2022-06-26 10:34 bootanimation.zip
  9. cmcc_jiangsu:/ # ls /system/media/audio
  10. alarms notifications ringtones ui
  11. cmcc_jiangsu:/ # ls /system/media/audio -alh
  12. total 12K
  13. drwxr-xr-x 6 root root 4.0K 2022-06-26 11:03 .
  14. drwxr-xr-x 3 root root 4.0K 2022-06-26 11:03 ..
  15. drwxr-xr-x 2 root root 4.0K 2022-06-26 11:03 alarms
  16. drwxr-xr-x 2 root root 4.0K 2022-06-26 11:03 notifications
  17. drwxr-xr-x 2 root root 4.0K 2022-06-26 11:03 ringtones
  18. drwxr-xr-x 2 root root 4.0K 2022-06-26 11:03 ui
  19. cmcc_jiangsu:/ # ls /system/media/audio/ui -alh
  20. total 88K
  21. drwxr-xr-x 2 root root 4.0K 2022-06-26 11:03 .
  22. drwxr-xr-x 6 root root 4.0K 2022-06-26 11:03 ..
  23. -rw-r--r-- 1 root root 6.1K 2022-06-26 10:22 Dock.ogg
  24. -rw-r--r-- 1 root root 5.0K 2022-06-26 10:22 Effect_Tick.ogg
  25. -rw-r--r-- 1 root root 5.6K 2022-06-26 10:22 KeypressDelete.ogg
  26. -rw-r--r-- 1 root root 10K 2022-06-26 10:22 KeypressInvalid.ogg
  27. -rw-r--r-- 1 root root 6.1K 2022-06-26 10:22 KeypressReturn.ogg
  28. -rw-r--r-- 1 root root 5.8K 2022-06-26 10:22 KeypressSpacebar.ogg
  29. -rw-r--r-- 1 root root 5.7K 2022-06-26 10:22 KeypressStandard.ogg
  30. -rw-r--r-- 1 root root 8.1K 2022-06-26 10:22 Lock.ogg
  31. -rw-r--r-- 1 root root 12K 2022-06-26 10:22 LowBattery.ogg
  32. -rw-r--r-- 1 root root 5.5K 2022-06-26 10:22 Trusted.ogg
  33. -rw-r--r-- 1 root root 8.0K 2022-06-26 10:22 Undock.ogg
  34. -rw-r--r-- 1 root root 7.6K 2022-06-26 10:22 Unlock.ogg
  35. -rw-r--r-- 1 root root 6.3K 2022-06-26 10:22 VideoRecord.ogg
  36. -rw-r--r-- 1 root root 6.3K 2022-06-26 10:22 VideoStop.ogg
  37. -rw-r--r-- 1 root root 12K 2022-06-26 10:22 WirelessChargingStarted.ogg
  38. -rw-r--r-- 1 root root 5.8K 2022-06-26 10:22 camera_click.ogg
  39. -rw-r--r-- 1 root root 9.1K 2022-06-26 10:22 camera_focus.ogg
  40. -rw-r--r-- 1 root root 24 2022-06-26 10:22 config.txt
  41. cmcc_jiangsu:/ #

        /system/media/audio 下面放的都是系统的声音文件 像是闹铃声或者来电铃声等等这些声音文件多是 ogg 格式

  1. /system/media/audio/notification
  2. /system/media/audio/alarms
  3. /system/media/audio/ringtones
  4. /system/media/audio/ui

%%%%%

/system/app 跟 /system/priv-app 目录

        /system/app 目录下都是核心应用程序文件 系统统自带的 *.apk 都是存放在这里

  1. cmcc_jiangsu:/ # ls /system/app
  2. Bluetooth
  3. BtAutoConn_release_9.0_V1.0_19_20210827_chinamobile
  4. CertInstaller
  5. CompanionDeviceManager
  6. Dangbei2.apk
  7. ExtShared
  8. GDYD-IPTVSettings-AN9-ALL-DEBUG-1.0.0-20210805-1058.apk
  9. KeyChain
  10. LatinIME
  11. PacProcessor
  12. SecureElement
  13. SkySettingA9_jiangsuCMCC_release
  14. SoftDetector_V5.1.0_20210721_35101_x025_encrypt
  15. Superuser
  16. SystemXiri_release-2.0.4-unsigned_signed_Aligned
  17. Tr069_Service.apk
  18. TvSettings
  19. xiri
  20. cmcc_jiangsu:/ # ls /system/app -alh
  21. total 5.4M
  22. drwxr-xr-x 17 root root 4.0K 2022-06-26 11:03 .
  23. drwxr-xr-x 15 root root 4.0K 1970-01-01 08:00 ..
  24. drwxr-xr-x 4 root root 4.0K 2022-06-26 11:03 Bluetooth
  25. drwxr-xr-x 3 root root 4.0K 2022-06-26 11:03 BtAutoConn_release_9.0_V1.0_19_20210827_chinamobile
  26. drwxr-xr-x 3 root root 4.0K 2022-06-26 11:03 CertInstaller
  27. drwxr-xr-x 3 root root 4.0K 2022-06-26 11:03 CompanionDeviceManager
  28. -rw-r--r-- 1 root root 5.3M 2022-06-26 10:21 Dangbei2.apk
  29. drwxr-xr-x 3 root root 4.0K 2022-06-26 11:03 ExtShared
  30. -rw-r--r-- 1 root root 2.3M 2022-06-26 10:21 GDYD-IPTVSettings-AN9-ALL-DEBUG-1.0.0-20210805-1058.apk
  31. drwxr-xr-x 3 root root 4.0K 2022-06-26 11:03 KeyChain
  32. drwxr-xr-x 4 root root 4.0K 2022-06-26 11:03 LatinIME
  33. drwxr-xr-x 4 root root 4.0K 2022-06-26 11:03 PacProcessor
  34. drwxr-xr-x 3 root root 4.0K 2022-06-26 11:03 SecureElement
  35. drwxr-xr-x 3 root root 4.0K 2022-06-26 11:03 SkySettingA9_jiangsuCMCC_release
  36. drwxr-xr-x 4 root root 4.0K 2022-06-26 11:03 SoftDetector_V5.1.0_20210721_35101_x025_encrypt
  37. drwxr-xr-x 3 root root 4.0K 2022-06-26 11:03 Superuser
  38. drwxr-xr-x 4 root root 4.0K 2022-06-26 11:03 SystemXiri_release-2.0.4-unsigned_signed_Aligned
  39. -rw-r--r-- 1 root root 3.1M 2022-06-26 10:21 Tr069_Service.apk
  40. drwxr-xr-x 3 root root 4.0K 2022-06-26 11:03 TvSettings
  41. drwxr-xr-x 3 root root 4.0K 2022-06-26 11:03 xiri
  42. cmcc_jiangsu:/ #

        静默安装就是将 APK 放入到 system/app 目录下

        像是

Phone/电话

Alarm Clock/闹钟

Browser/浏览器

Contacts/联系人

        等等这些核心应用也就是大家熟知的系统 APP
        这些系统自带的程序是不能简单的卸载的
        要通过一些特殊的方式才能删除

大家熟悉的一种方法是用 RE 文件管理器

        /system/priv-app 是特权 App 也称之为内置应用:

  1. cmcc_jiangsu:/ # ls /system/priv-app
  2. BackupRestoreConfirmation ManagedProvisioning Shell
  3. DefaultContainerService MediaProvider SkySettings
  4. DownloadProvider PackageInstaller StatementService
  5. ExtServices ProxyHandler SystemUI
  6. ExternalStorageProvider Settings VpnDialogs
  7. FusedLocation SettingsProvider
  8. InputDevices SharedStorageBackup
  9. cmcc_jiangsu:/ # ls /system/priv-app -alh
  10. total 42K
  11. drwxr-xr-x 21 root root 4.0K 2022-06-26 11:03 .
  12. drwxr-xr-x 15 root root 4.0K 1970-01-01 08:00 ..
  13. drwxr-xr-x 3 root root 4.0K 2022-06-26 11:03 BackupRestoreConfirmation
  14. drwxr-xr-x 4 root root 4.0K 2022-06-26 11:03 DefaultContainerService
  15. drwxr-xr-x 3 root root 4.0K 2022-06-26 11:03 DownloadProvider
  16. drwxr-xr-x 3 root root 4.0K 2022-06-26 11:03 ExtServices
  17. drwxr-xr-x 3 root root 4.0K 2022-06-26 11:03 ExternalStorageProvider
  18. drwxr-xr-x 3 root root 4.0K 2022-06-26 11:03 FusedLocation
  19. drwxr-xr-x 3 root root 4.0K 2022-06-26 11:03 InputDevices
  20. drwxr-xr-x 3 root root 4.0K 2022-06-26 11:03 ManagedProvisioning
  21. drwxr-xr-x 3 root root 4.0K 2022-06-26 11:03 MediaProvider
  22. drwxr-xr-x 3 root root 4.0K 2022-06-26 11:03 PackageInstaller
  23. drwxr-xr-x 3 root root 4.0K 2022-06-26 11:03 ProxyHandler
  24. drwxr-xr-x 3 root root 4.0K 2022-06-26 11:03 Settings
  25. drwxr-xr-x 3 root root 4.0K 2022-06-26 11:03 SettingsProvider
  26. drwxr-xr-x 3 root root 4.0K 2022-06-26 11:03 SharedStorageBackup
  27. drwxr-xr-x 3 root root 4.0K 2022-06-26 11:03 Shell
  28. drwxr-xr-x 3 root root 4.0K 2022-06-26 11:03 SkySettings
  29. drwxr-xr-x 3 root root 4.0K 2022-06-26 11:03 StatementService
  30. drwxr-xr-x 3 root root 4.0K 2022-06-26 11:03 SystemUI
  31. drwxr-xr-x 3 root root 4.0K 2022-06-26 11:03 VpnDialogs
  32. cmcc_jiangsu:/ #

        这里的应用比 system_app 权限还要高!
        其不仅 System_app 标识是 true 同时还置了 Priv-app 标识

放到 /system/priv-app 下的应用比放到 /system/app 下的应用可以声明获得更多的权限

手机被 root 后通过 adb push 可以把 apk 推送到这两个目录作为系统应用 之后用户无法删除这些应用

  1. /system/priv-app 中包括
  2. Launcher/桌面启动器
  3. SystemUI/状态栏
  4. SettingsProvider/设置存储
  5. 等 均是系统的核心应用 这些应用能使用系统级的权限

%%%%%

/system/etc

        /system/etc 目录存放一些配置文件

        和属性配置文件不一样 这下面的配置文件可能稍微没那么的有规律:

  1. cmcc_jiangsu:/ # ls /system/etc
  2. NOTICE.xml.gz hosts prop.default
  3. bluetooth hotkey.properties public.libraries.txt
  4. boot-image.prof in_test.mp4 seccomp_policy
  5. bpf init security
  6. clatd.conf keypara.ini selinux
  7. curl ld.config.28.txt sepolicy_freeze_test
  8. cwmp.conf llndk.libraries.28.txt sepolicy_tests
  9. delayStartAppList.txt media_profiles_V1_0.dtd sysconfig
  10. device.xml mke2fs.conf textclassifier
  11. dirty-image-objects mkshrc treble_sepolicy_tests_26.0
  12. event-log-tags packages-warnings.xml treble_sepolicy_tests_27.0
  13. fonts.xml permissions vintf
  14. fs_config_dirs ppp vndksp.libraries.28.txt
  15. fs_config_files preloaded-classes xtables.lock
  16. cmcc_jiangsu:/ # ls /system/etc -alh
  17. total 8.1M
  18. drwxr-xr-x 14 root root 4.0K 2022-06-26 11:03 .
  19. drwxr-xr-x 15 root root 4.0K 1970-01-01 08:00 ..
  20. -rw-r--r-- 1 root root 175K 2022-06-26 10:21 NOTICE.xml.gz
  21. drwxr-xr-x 2 root root 4.0K 2022-06-26 11:03 bluetooth
  22. -rw-r--r-- 1 root root 76K 2022-06-26 10:21 boot-image.prof
  23. drwxr-xr-x 2 root root 4.0K 2022-06-26 11:03 bpf
  24. -rw-r--r-- 1 root root 1.0K 2022-06-26 10:21 clatd.conf
  25. drwxr-xr-x 3 root root 4.0K 2022-06-26 11:03 curl
  26. -rw-r--r-- 1 root root 775 2022-06-26 10:21 cwmp.conf
  27. -rw-r--r-- 1 root root 404 2022-06-26 10:21 delayStartAppList.txt
  28. -rw-r--r-- 1 root root 31K 2022-06-26 10:21 device.xml
  29. -rw-r--r-- 1 root root 5.9K 2022-06-26 10:21 dirty-image-objects
  30. -rw-r--r-- 1 root root 24K 2022-06-26 10:21 event-log-tags
  31. -rw-r--r-- 1 root root 29K 2022-06-26 10:21 fonts.xml
  32. ---------- 1 root root 0 2022-06-26 10:21 fs_config_dirs
  33. ---------- 1 root root 352 2022-06-26 10:21 fs_config_files
  34. -rw-r--r-- 1 root root 56 2022-06-26 10:21 hosts
  35. -rw-r--r-- 1 root root 125 2022-06-26 10:21 hotkey.properties
  36. -rw-r--r-- 1 root root 16M 2022-06-26 10:21 in_test.mp4
  37. drwxr-xr-x 2 root root 4.0K 2022-06-26 11:03 init
  38. -rw-r--r-- 1 root root 84 2022-06-26 10:21 keypara.ini
  39. -rw-r--r-- 1 root root 25K 2022-06-26 10:21 ld.config.28.txt
  40. -rw-r--r-- 1 root root 253 2022-06-26 10:21 llndk.libraries.28.txt
  41. -rw-r--r-- 1 root root 2.6K 2022-06-26 10:21 media_profiles_V1_0.dtd
  42. -rw-r--r-- 1 root root 1.1K 2022-06-26 10:21 mke2fs.conf
  43. -rw-r--r-- 1 root root 375 2022-06-26 10:21 mkshrc
  44. -rw-r--r-- 1 root root 139 2022-06-26 10:21 packages-warnings.xml
  45. drwxr-xr-x 2 root root 4.0K 2022-06-26 11:03 permissions
  46. drwxr-xr-x 2 root root 4.0K 2022-06-26 11:03 ppp
  47. -rw-r--r-- 1 root root 251K 2022-06-26 10:21 preloaded-classes
  48. -rw------- 1 root root 977 2022-06-26 21:00 prop.default
  49. -rw-r--r-- 1 root root 454 2022-06-26 10:21 public.libraries.txt
  50. drwxr-xr-x 2 root root 4.0K 2022-06-26 11:03 seccomp_policy
  51. drwxr-xr-x 4 root root 4.0K 2022-06-26 11:03 security
  52. drwxr-xr-x 3 root root 4.0K 2022-06-26 11:03 selinux
  53. -rw-r--r-- 1 root root 0 2022-06-26 10:21 sepolicy_freeze_test
  54. -rw-r--r-- 1 root root 0 2022-06-26 10:21 sepolicy_tests
  55. drwxr-xr-x 2 root root 4.0K 2022-06-26 11:03 sysconfig
  56. drwxr-xr-x 2 root root 4.0K 2022-06-26 11:03 textclassifier
  57. -rw-r--r-- 1 root root 0 2022-06-26 10:21 treble_sepolicy_tests_26.0
  58. -rw-r--r-- 1 root root 0 2022-06-26 10:21 treble_sepolicy_tests_27.0
  59. drwxr-xr-x 2 root root 4.0K 2022-06-26 11:03 vintf
  60. -rw-r--r-- 1 root root 628 2022-06-26 10:21 vndksp.libraries.28.txt
  61. -rw-r--r-- 1 root root 0 2022-06-26 10:21 xtables.lock
  62. cmcc_jiangsu:/ #

        一般来说一些脚本程序还有 GPS 配置文件

gps.conf

        和 APN 配置文件

apns-conf.xml

        都是放在这个目录

        像 HTC 将相机特效所使用的一些文件也放在这个目录下 

%%%%%

/system/fonts

        /system/fonts 目录下存放的是系统 缺省/默认 的字体文件

        我的系统有 237 个字体文件:

  1. cmcc_jiangsu:/ # ls /system/fonts -alh | wc -l
  2. 237
  3. cmcc_jiangsu:/ # ls /system/fonts -alh
  4. total 34M
  5. drwxr-xr-x 2 root root 12K 2022-06-26 11:03 .
  6. drwxr-xr-x 15 root root 4.0K 1970-01-01 08:00 ..
  7. -rw-r--r-- 1 root root 4.4K 2022-06-26 10:21 AndroidClock.ttf
  8. -rw-r--r-- 1 root root 39K 2022-06-26 10:21 CarroisGothicSC-Regular.ttf
  9. -rw-r--r-- 1 root root 58K 2022-06-26 10:21 ComingSoon.ttf
  10. -rw-r--r-- 1 root root 68K 2022-06-26 10:21 CutiveMono.ttf
  11. -rw-r--r-- 1 root root 113K 2022-06-26 10:21 DancingScript-Bold.ttf
  12. -rw-r--r-- 1 root root 114K 2022-06-26 10:21 DancingScript-Regular.ttf
  13. lrw-r--r-- 1 root root 15 2022-06-26 10:21 DroidSans-Bold.ttf -> Roboto-Bold.ttf
  14. lrw-r--r-- 1 root root 18 2022-06-26 10:21 DroidSans.ttf -> Roboto-Regular.ttf
  15. -rw-r--r-- 1 root root 106K 2022-06-26 10:21 DroidSansMono.ttf
  16. -rw-r--r-- 1 root root 7.4M 2022-06-26 10:21 NotoColorEmoji.ttf
  17. -rw-r--r-- 1 root root 113K 2022-06-26 10:21 NotoNaskhArabic-Bold.ttf
  18. -rw-r--r-- 1 root root 114K 2022-06-26 10:21 NotoNaskhArabic-Regular.ttf
  19. -rw-r--r-- 1 root root 117K 2022-06-26 10:21 NotoNaskhArabicUI-Bold.ttf
  20. -rw-r--r-- 1 root root 118K 2022-06-26 10:21 NotoNaskhArabicUI-Regular.ttf
  21. -rw-r--r-- 1 root root 50K 2022-06-26 10:21 NotoSansAdlam-Regular.ttf
  22. -rw-r--r-- 1 root root 14K 2022-06-26 10:21 NotoSansAhom-Regular.otf
  23. -rw-r--r-- 1 root root 132K 2022-06-26 10:21 NotoSansAnatolianHieroglyphs-Regular.otf
  24. -rw-r--r-- 1 root root 15K 2022-06-26 10:21 NotoSansArmenian-Bold.ttf
  25. -rw-r--r-- 1 root root 16K 2022-06-26 10:21 NotoSansArmenian-Regular.ttf
  26. -rw-r--r-- 1 root root 12K 2022-06-26 10:21 NotoSansAvestan-Regular.ttf
  27. -rw-r--r-- 1 root root 31K 2022-06-26 10:21 NotoSansBalinese-Regular.ttf
  28. -rw-r--r-- 1 root root 131K 2022-06-26 10:21 NotoSansBamum-Regular.ttf
  29. -rw-r--r-- 1 root root 6.1K 2022-06-26 10:21 NotoSansBassaVah-Regular.otf
  30. -rw-r--r-- 1 root root 13K 2022-06-26 10:21 NotoSansBatak-Regular.ttf
  31. -rw-r--r-- 1 root root 96K 2022-06-26 10:21 NotoSansBengali-Bold.ttf
  32. -rw-r--r-- 1 root root 99K 2022-06-26 10:21 NotoSansBengali-Regular.ttf
  33. -rw-r--r-- 1 root root 102K 2022-06-26 10:21 NotoSansBengaliUI-Bold.ttf
  34. -rw-r--r-- 1 root root 105K 2022-06-26 10:21 NotoSansBengaliUI-Regular.ttf
  35. -rw-r--r-- 1 root root 98K 2022-06-26 10:21 NotoSansBhaiksuki-Regular.otf
  36. -rw-r--r-- 1 root root 23K 2022-06-26 10:21 NotoSansBrahmi-Regular.ttf
  37. -rw-r--r-- 1 root root 7.6K 2022-06-26 10:21 NotoSansBuginese-Regular.ttf
  38. -rw-r--r-- 1 root root 4.7K 2022-06-26 10:21 NotoSansBuhid-Regular.ttf
  39. -rw-r--r-- 1 root root 18M 2022-06-26 10:21 NotoSansCJK-Regular.ttc
  40. -rw-r--r-- 1 root root 45K 2022-06-26 10:21 NotoSansCanadianAboriginal-Regular.ttf
  41. -rw-r--r-- 1 root root 6.1K 2022-06-26 10:21 NotoSansCarian-Regular.ttf
  42. -rw-r--r-- 1 root root 33K 2022-06-26 10:21 NotoSansChakma-Regular.ttf
  43. -rw-r--r-- 1 root root 22K 2022-06-26 10:21 NotoSansCham-Bold.ttf
  44. -rw-r--r-- 1 root root 22K 2022-06-26 10:21 NotoSansCham-Regular.ttf
  45. -rw-r--r-- 1 root root 57K 2022-06-26 10:21 NotoSansCherokee-Regular.ttf
  46. -rw-r--r-- 1 root root 21K 2022-06-26 10:21 NotoSansCoptic-Regular.ttf
  47. -rw-r--r-- 1 root root 489K 2022-06-26 10:21 NotoSansCuneiform-Regular.ttf
  48. -rw-r--r-- 1 root root 7.7K 2022-06-26 10:21 NotoSansCypriot-Regular.ttf
  49. -rw-r--r-- 1 root root 10K 2022-06-26 10:21 NotoSansDeseret-Regular.ttf
  50. -rw-r--r-- 1 root root 129K 2022-06-26 10:21 NotoSansDevanagari-Bold.ttf
  51. -rw-r--r-- 1 root root 133K 2022-06-26 10:21 NotoSansDevanagari-Regular.ttf
  52. -rw-r--r-- 1 root root 118K 2022-06-26 10:21 NotoSansDevanagariUI-Bold.ttf
  53. -rw-r--r-- 1 root root 122K 2022-06-26 10:21 NotoSansDevanagariUI-Regular.ttf
  54. -rw-r--r-- 1 root root 494K 2022-06-26 10:21 NotoSansEgyptianHieroglyphs-Regular.ttf
  55. -rw-r--r-- 1 root root 8.5K 2022-06-26 10:21 NotoSansElbasan-Regular.otf
  56. -rw-r--r-- 1 root root 140K 2022-06-26 10:21 NotoSansEthiopic-Bold.ttf
  57. -rw-r--r-- 1 root root 140K 2022-06-26 10:21 NotoSansEthiopic-Regular.ttf
  58. -rw-r--r-- 1 root root 20K 2022-06-26 10:21 NotoSansGeorgian-Bold.ttf
  59. -rw-r--r-- 1 root root 20K 2022-06-26 10:21 NotoSansGeorgian-Regular.ttf
  60. -rw-r--r-- 1 root root 15K 2022-06-26 10:21 NotoSansGlagolitic-Regular.ttf
  61. -rw-r--r-- 1 root root 5.8K 2022-06-26 10:21 NotoSansGothic-Regular.ttf
  62. -rw-r--r-- 1 root root 114K 2022-06-26 10:21 NotoSansGujarati-Bold.ttf
  63. -rw-r--r-- 1 root root 117K 2022-06-26 10:21 NotoSansGujarati-Regular.ttf
  64. -rw-r--r-- 1 root root 112K 2022-06-26 10:21 NotoSansGujaratiUI-Bold.ttf
  65. -rw-r--r-- 1 root root 115K 2022-06-26 10:21 NotoSansGujaratiUI-Regular.ttf
  66. -rw-r--r-- 1 root root 31K 2022-06-26 10:21 NotoSansGurmukhi-Bold.ttf
  67. -rw-r--r-- 1 root root 31K 2022-06-26 10:21 NotoSansGurmukhi-Regular.ttf
  68. -rw-r--r-- 1 root root 32K 2022-06-26 10:21 NotoSansGurmukhiUI-Bold.ttf
  69. -rw-r--r-- 1 root root 31K 2022-06-26 10:21 NotoSansGurmukhiUI-Regular.ttf
  70. -rw-r--r-- 1 root root 6.6K 2022-06-26 10:21 NotoSansHanunoo-Regular.ttf
  71. -rw-r--r-- 1 root root 4.2K 2022-06-26 10:21 NotoSansHatran-Regular.otf
  72. -rw-r--r-- 1 root root 17K 2022-06-26 10:21 NotoSansHebrew-Bold.ttf
  73. -rw-r--r-- 1 root root 17K 2022-06-26 10:21 NotoSansHebrew-Regular.ttf
  74. -rw-r--r-- 1 root root 5.5K 2022-06-26 10:21 NotoSansImperialAramaic-Regular.ttf
  75. -rw-r--r-- 1 root root 5.5K 2022-06-26 10:21 NotoSansInscriptionalPahlavi-Regular.ttf
  76. -rw-r--r-- 1 root root 7.3K 2022-06-26 10:21 NotoSansInscriptionalParthian-Regular.ttf
  77. -rw-r--r-- 1 root root 37K 2022-06-26 10:21 NotoSansJavanese-Regular.ttf
  78. -rw-r--r-- 1 root root 58K 2022-06-26 10:21 NotoSansKaithi-Regular.ttf
  79. -rw-r--r-- 1 root root 79K 2022-06-26 10:21 NotoSansKannada-Bold.ttf
  80. -rw-r--r-- 1 root root 80K 2022-06-26 10:21 NotoSansKannada-Regular.ttf
  81. -rw-r--r-- 1 root root 78K 2022-06-26 10:21 NotoSansKannadaUI-Bold.ttf
  82. -rw-r--r-- 1 root root 79K 2022-06-26 10:21 NotoSansKannadaUI-Regular.ttf
  83. -rw-r--r-- 1 root root 7.8K 2022-06-26 10:21 NotoSansKayahLi-Regular.ttf
  84. -rw-r--r-- 1 root root 21K 2022-06-26 10:21 NotoSansKharoshthi-Regular.ttf
  85. -rw-r--r-- 1 root root 140K 2022-06-26 10:21 NotoSansKhmer-VF.ttf
  86. -rw-r--r-- 1 root root 35K 2022-06-26 10:21 NotoSansKhmerUI-Bold.ttf
  87. -rw-r--r-- 1 root root 37K 2022-06-26 10:21 NotoSansKhmerUI-Regular.ttf
  88. -rw-r--r-- 1 root root 28K 2022-06-26 10:21 NotoSansLao-Bold.ttf
  89. -rw-r--r-- 1 root root 30K 2022-06-26 10:21 NotoSansLao-Regular.ttf
  90. -rw-r--r-- 1 root root 29K 2022-06-26 10:21 NotoSansLaoUI-Bold.ttf
  91. -rw-r--r-- 1 root root 30K 2022-06-26 10:21 NotoSansLaoUI-Regular.ttf
  92. -rw-r--r-- 1 root root 100K 2022-06-26 10:21 NotoSansLepcha-Regular.ttf
  93. -rw-r--r-- 1 root root 11K 2022-06-26 10:21 NotoSansLimbu-Regular.ttf
  94. -rw-r--r-- 1 root root 33K 2022-06-26 10:21 NotoSansLinearA-Regular.otf
  95. -rw-r--r-- 1 root root 57K 2022-06-26 10:21 NotoSansLinearB-Regular.ttf
  96. -rw-r--r-- 1 root root 5.5K 2022-06-26 10:21 NotoSansLisu-Regular.ttf
  97. -rw-r--r-- 1 root root 4.2K 2022-06-26 10:21 NotoSansLycian-Regular.ttf
  98. -rw-r--r-- 1 root root 4.1K 2022-06-26 10:21 NotoSansLydian-Regular.ttf
  99. -rw-r--r-- 1 root root 55K 2022-06-26 10:21 NotoSansMalayalam-Bold.ttf
  100. -rw-r--r-- 1 root root 55K 2022-06-26 10:21 NotoSansMalayalam-Regular.ttf
  101. -rw-r--r-- 1 root root 55K 2022-06-26 10:21 NotoSansMalayalamUI-Bold.ttf
  102. -rw-r--r-- 1 root root 56K 2022-06-26 10:21 NotoSansMalayalamUI-Regular.ttf
  103. -rw-r--r-- 1 root root 15K 2022-06-26 10:21 NotoSansMandaic-Regular.ttf
  104. -rw-r--r-- 1 root root 16K 2022-06-26 10:21 NotoSansManichaean-Regular.otf
  105. -rw-r--r-- 1 root root 62K 2022-06-26 10:21 NotoSansMarchen-Regular.otf
  106. -rw-r--r-- 1 root root 14K 2022-06-26 10:21 NotoSansMeeteiMayek-Regular.ttf
  107. -rw-r--r-- 1 root root 20K 2022-06-26 10:21 NotoSansMeroitic-Regular.otf
  108. -rw-r--r-- 1 root root 22K 2022-06-26 10:21 NotoSansMiao-Regular.otf
  109. -rw-r--r-- 1 root root 111K 2022-06-26 10:21 NotoSansMongolian-Regular.ttf
  110. -rw-r--r-- 1 root root 5.5K 2022-06-26 10:21 NotoSansMro-Regular.otf
  111. -rw-r--r-- 1 root root 7.6K 2022-06-26 10:21 NotoSansMultani-Regular.otf
  112. -rw-r--r-- 1 root root 106K 2022-06-26 10:21 NotoSansMyanmar-Bold.ttf
  113. -rw-r--r-- 1 root root 106K 2022-06-26 10:21 NotoSansMyanmar-Regular.ttf
  114. -rw-r--r-- 1 root root 102K 2022-06-26 10:21 NotoSansMyanmarUI-Bold.ttf
  115. -rw-r--r-- 1 root root 100K 2022-06-26 10:21 NotoSansMyanmarUI-Regular.ttf
  116. -rw-r--r-- 1 root root 18K 2022-06-26 10:21 NotoSansNKo-Regular.ttf
  117. -rw-r--r-- 1 root root 6.4K 2022-06-26 10:21 NotoSansNabataean-Regular.otf
  118. -rw-r--r-- 1 root root 15K 2022-06-26 10:21 NotoSansNewTaiLue-Regular.ttf
  119. -rw-r--r-- 1 root root 65K 2022-06-26 10:21 NotoSansNewa-Regular.otf
  120. -rw-r--r-- 1 root root 4.3K 2022-06-26 10:21 NotoSansOgham-Regular.ttf
  121. -rw-r--r-- 1 root root 7.4K 2022-06-26 10:21 NotoSansOlChiki-Regular.ttf
  122. -rw-r--r-- 1 root root 4.8K 2022-06-26 10:21 NotoSansOldItalic-Regular.ttf
  123. -rw-r--r-- 1 root root 6.1K 2022-06-26 10:21 NotoSansOldNorthArabian-Regular.otf
  124. -rw-r--r-- 1 root root 8.4K 2022-06-26 10:21 NotoSansOldPermic-Regular.otf
  125. -rw-r--r-- 1 root root 12K 2022-06-26 10:21 NotoSansOldPersian-Regular.ttf
  126. -rw-r--r-- 1 root root 4.6K 2022-06-26 10:21 NotoSansOldSouthArabian-Regular.ttf
  127. -rw-r--r-- 1 root root 7.6K 2022-06-26 10:21 NotoSansOldTurkic-Regular.ttf
  128. -rw-r--r-- 1 root root 83K 2022-06-26 10:21 NotoSansOriya-Bold.ttf
  129. -rw-r--r-- 1 root root 83K 2022-06-26 10:21 NotoSansOriya-Regular.ttf
  130. -rw-r--r-- 1 root root 78K 2022-06-26 10:21 NotoSansOriyaUI-Bold.ttf
  131. -rw-r--r-- 1 root root 79K 2022-06-26 10:21 NotoSansOriyaUI-Regular.ttf
  132. -rw-r--r-- 1 root root 10K 2022-06-26 10:21 NotoSansOsage-Regular.ttf
  133. -rw-r--r-- 1 root root 7.2K 2022-06-26 10:21 NotoSansOsmanya-Regular.ttf
  134. -rw-r--r-- 1 root root 13K 2022-06-26 10:21 NotoSansPahawhHmong-Regular.otf
  135. -rw-r--r-- 1 root root 8.4K 2022-06-26 10:21 NotoSansPalmyrene-Regular.otf
  136. -rw-r--r-- 1 root root 8.0K 2022-06-26 10:21 NotoSansPauCinHau-Regular.otf
  137. -rw-r--r-- 1 root root 28K 2022-06-26 10:21 NotoSansPhagsPa-Regular.ttf
  138. -rw-r--r-- 1 root root 5.2K 2022-06-26 10:21 NotoSansPhoenician-Regular.ttf
  139. -rw-r--r-- 1 root root 6.3K 2022-06-26 10:21 NotoSansRejang-Regular.ttf
  140. -rw-r--r-- 1 root root 8.3K 2022-06-26 10:21 NotoSansRunic-Regular.ttf
  141. -rw-r--r-- 1 root root 10K 2022-06-26 10:21 NotoSansSamaritan-Regular.ttf
  142. -rw-r--r-- 1 root root 18K 2022-06-26 10:21 NotoSansSaurashtra-Regular.ttf
  143. -rw-r--r-- 1 root root 27K 2022-06-26 10:21 NotoSansSharada-Regular.otf
  144. -rw-r--r-- 1 root root 5.8K 2022-06-26 10:21 NotoSansShavian-Regular.ttf
  145. -rw-r--r-- 1 root root 150K 2022-06-26 10:21 NotoSansSinhala-Bold.ttf
  146. -rw-r--r-- 1 root root 156K 2022-06-26 10:21 NotoSansSinhala-Regular.ttf
  147. -rw-r--r-- 1 root root 82K 2022-06-26 10:21 NotoSansSinhalaUI-Bold.otf
  148. -rw-r--r-- 1 root root 82K 2022-06-26 10:21 NotoSansSinhalaUI-Regular.otf
  149. -rw-r--r-- 1 root root 6.2K 2022-06-26 10:21 NotoSansSoraSompeng-Regular.otf
  150. -rw-r--r-- 1 root root 10K 2022-06-26 10:21 NotoSansSundanese-Regular.ttf
  151. -rw-r--r-- 1 root root 15K 2022-06-26 10:21 NotoSansSylotiNagri-Regular.ttf
  152. -rw-r--r-- 1 root root 693K 2022-06-26 10:21 NotoSansSymbols-Regular-Subsetted.ttf
  153. -rw-r--r-- 1 root root 32K 2022-06-26 10:21 NotoSansSymbols-Regular-Subsetted2.ttf
  154. -rw-r--r-- 1 root root 49K 2022-06-26 10:21 NotoSansSyriacEastern-Regular.ttf
  155. -rw-r--r-- 1 root root 45K 2022-06-26 10:21 NotoSansSyriacEstrangela-Regular.ttf
  156. -rw-r--r-- 1 root root 51K 2022-06-26 10:21 NotoSansSyriacWestern-Regular.ttf
  157. -rw-r--r-- 1 root root 5.5K 2022-06-26 10:21 NotoSansTagalog-Regular.ttf
  158. -rw-r--r-- 1 root root 5.4K 2022-06-26 10:21 NotoSansTagbanwa-Regular.ttf
  159. -rw-r--r-- 1 root root 10K 2022-06-26 10:21 NotoSansTaiLe-Regular.ttf
  160. -rw-r--r-- 1 root root 47K 2022-06-26 10:21 NotoSansTaiTham-Regular.ttf
  161. -rw-r--r-- 1 root root 15K 2022-06-26 10:21 NotoSansTaiViet-Regular.ttf
  162. -rw-r--r-- 1 root root 34K 2022-06-26 10:21 NotoSansTamil-Bold.ttf
  163. -rw-r--r-- 1 root root 33K 2022-06-26 10:21 NotoSansTamil-Regular.ttf
  164. -rw-r--r-- 1 root root 34K 2022-06-26 10:21 NotoSansTamilUI-Bold.ttf
  165. -rw-r--r-- 1 root root 33K 2022-06-26 10:21 NotoSansTamilUI-Regular.ttf
  166. -rw-r--r-- 1 root root 108K 2022-06-26 10:21 NotoSansTelugu-Bold.ttf
  167. -rw-r--r-- 1 root root 108K 2022-06-26 10:21 NotoSansTelugu-Regular.ttf
  168. -rw-r--r-- 1 root root 109K 2022-06-26 10:21 NotoSansTeluguUI-Bold.ttf
  169. -rw-r--r-- 1 root root 109K 2022-06-26 10:21 NotoSansTeluguUI-Regular.ttf
  170. -rw-r--r-- 1 root root 14K 2022-06-26 10:21 NotoSansThaana-Bold.ttf
  171. -rw-r--r-- 1 root root 14K 2022-06-26 10:21 NotoSansThaana-Regular.ttf
  172. -rw-r--r-- 1 root root 18K 2022-06-26 10:21 NotoSansThai-Bold.ttf
  173. -rw-r--r-- 1 root root 21K 2022-06-26 10:21 NotoSansThai-Regular.ttf
  174. -rw-r--r-- 1 root root 19K 2022-06-26 10:21 NotoSansThaiUI-Bold.ttf
  175. -rw-r--r-- 1 root root 22K 2022-06-26 10:21 NotoSansThaiUI-Regular.ttf
  176. -rw-r--r-- 1 root root 364K 2022-06-26 10:21 NotoSansTibetan-Bold.ttf
  177. -rw-r--r-- 1 root root 392K 2022-06-26 10:21 NotoSansTibetan-Regular.ttf
  178. -rw-r--r-- 1 root root 13K 2022-06-26 10:21 NotoSansTifinagh-Regular.ttf
  179. -rw-r--r-- 1 root root 6.6K 2022-06-26 10:21 NotoSansUgaritic-Regular.ttf
  180. -rw-r--r-- 1 root root 63K 2022-06-26 10:21 NotoSansVai-Regular.ttf
  181. -rw-r--r-- 1 root root 120K 2022-06-26 10:21 NotoSansYi-Regular.ttf
  182. -rw-r--r-- 1 root root 242K 2022-06-26 10:21 NotoSerif-Bold.ttf
  183. -rw-r--r-- 1 root root 257K 2022-06-26 10:21 NotoSerif-BoldItalic.ttf
  184. -rw-r--r-- 1 root root 244K 2022-06-26 10:21 NotoSerif-Italic.ttf
  185. -rw-r--r-- 1 root root 241K 2022-06-26 10:21 NotoSerif-Regular.ttf
  186. -rw-r--r-- 1 root root 14K 2022-06-26 10:21 NotoSerifArmenian-Bold.ttf
  187. -rw-r--r-- 1 root root 15K 2022-06-26 10:21 NotoSerifArmenian-Regular.ttf
  188. -rw-r--r-- 1 root root 114K 2022-06-26 10:21 NotoSerifBengali-Bold.ttf
  189. -rw-r--r-- 1 root root 116K 2022-06-26 10:21 NotoSerifBengali-Regular.ttf
  190. -rw-r--r-- 1 root root 24M 2022-06-26 10:21 NotoSerifCJK-Regular.ttc
  191. -rw-r--r-- 1 root root 77K 2022-06-26 10:21 NotoSerifDevanagari-Bold.ttf
  192. -rw-r--r-- 1 root root 77K 2022-06-26 10:21 NotoSerifDevanagari-Regular.ttf
  193. -rw-r--r-- 1 root root 126K 2022-06-26 10:21 NotoSerifEthiopic-Bold.otf
  194. -rw-r--r-- 1 root root 110K 2022-06-26 10:21 NotoSerifEthiopic-Regular.otf
  195. -rw-r--r-- 1 root root 22K 2022-06-26 10:21 NotoSerifGeorgian-Bold.ttf
  196. -rw-r--r-- 1 root root 22K 2022-06-26 10:21 NotoSerifGeorgian-Regular.ttf
  197. -rw-r--r-- 1 root root 62K 2022-06-26 10:21 NotoSerifGujarati-Bold.ttf
  198. -rw-r--r-- 1 root root 64K 2022-06-26 10:21 NotoSerifGujarati-Regular.ttf
  199. -rw-r--r-- 1 root root 29K 2022-06-26 10:21 NotoSerifGurmukhi-Bold.otf
  200. -rw-r--r-- 1 root root 27K 2022-06-26 10:21 NotoSerifGurmukhi-Regular.otf
  201. -rw-r--r-- 1 root root 17K 2022-06-26 10:21 NotoSerifHebrew-Bold.ttf
  202. -rw-r--r-- 1 root root 17K 2022-06-26 10:21 NotoSerifHebrew-Regular.ttf
  203. -rw-r--r-- 1 root root 89K 2022-06-26 10:21 NotoSerifKannada-Bold.ttf
  204. -rw-r--r-- 1 root root 90K 2022-06-26 10:21 NotoSerifKannada-Regular.ttf
  205. -rw-r--r-- 1 root root 47K 2022-06-26 10:21 NotoSerifKhmer-Bold.otf
  206. -rw-r--r-- 1 root root 40K 2022-06-26 10:21 NotoSerifKhmer-Regular.otf
  207. -rw-r--r-- 1 root root 29K 2022-06-26 10:21 NotoSerifLao-Bold.ttf
  208. -rw-r--r-- 1 root root 30K 2022-06-26 10:21 NotoSerifLao-Regular.ttf
  209. -rw-r--r-- 1 root root 49K 2022-06-26 10:21 NotoSerifMalayalam-Bold.ttf
  210. -rw-r--r-- 1 root root 48K 2022-06-26 10:21 NotoSerifMalayalam-Regular.ttf
  211. -rw-r--r-- 1 root root 133K 2022-06-26 10:21 NotoSerifMyanmar-Bold.otf
  212. -rw-r--r-- 1 root root 134K 2022-06-26 10:21 NotoSerifMyanmar-Regular.otf
  213. -rw-r--r-- 1 root root 83K 2022-06-26 10:21 NotoSerifSinhala-Bold.otf
  214. -rw-r--r-- 1 root root 73K 2022-06-26 10:21 NotoSerifSinhala-Regular.otf
  215. -rw-r--r-- 1 root root 33K 2022-06-26 10:21 NotoSerifTamil-Bold.ttf
  216. -rw-r--r-- 1 root root 33K 2022-06-26 10:21 NotoSerifTamil-Regular.ttf
  217. -rw-r--r-- 1 root root 147K 2022-06-26 10:21 NotoSerifTelugu-Bold.ttf
  218. -rw-r--r-- 1 root root 148K 2022-06-26 10:21 NotoSerifTelugu-Regular.ttf
  219. -rw-r--r-- 1 root root 18K 2022-06-26 10:21 NotoSerifThai-Bold.ttf
  220. -rw-r--r-- 1 root root 19K 2022-06-26 10:21 NotoSerifThai-Regular.ttf
  221. -rw-r--r-- 1 root root 299K 2022-06-26 10:21 Roboto-Black.ttf
  222. -rw-r--r-- 1 root root 323K 2022-06-26 10:21 Roboto-BlackItalic.ttf
  223. -rw-r--r-- 1 root root 300K 2022-06-26 10:21 Roboto-Bold.ttf
  224. -rw-r--r-- 1 root root 324K 2022-06-26 10:21 Roboto-BoldItalic.ttf
  225. -rw-r--r-- 1 root root 321K 2022-06-26 10:21 Roboto-Italic.ttf
  226. -rw-r--r-- 1 root root 300K 2022-06-26 10:21 Roboto-Light.ttf
  227. -rw-r--r-- 1 root root 324K 2022-06-26 10:21 Roboto-LightItalic.ttf
  228. -rw-r--r-- 1 root root 299K 2022-06-26 10:21 Roboto-Medium.ttf
  229. -rw-r--r-- 1 root root 323K 2022-06-26 10:21 Roboto-MediumItalic.ttf
  230. -rw-r--r-- 1 root root 298K 2022-06-26 10:21 Roboto-Regular.ttf
  231. -rw-r--r-- 1 root root 300K 2022-06-26 10:21 Roboto-Thin.ttf
  232. -rw-r--r-- 1 root root 322K 2022-06-26 10:21 Roboto-ThinItalic.ttf
  233. -rw-r--r-- 1 root root 297K 2022-06-26 10:21 RobotoCondensed-Bold.ttf
  234. -rw-r--r-- 1 root root 323K 2022-06-26 10:21 RobotoCondensed-BoldItalic.ttf
  235. -rw-r--r-- 1 root root 322K 2022-06-26 10:21 RobotoCondensed-Italic.ttf
  236. -rw-r--r-- 1 root root 295K 2022-06-26 10:21 RobotoCondensed-Light.ttf
  237. -rw-r--r-- 1 root root 325K 2022-06-26 10:21 RobotoCondensed-LightItalic.ttf
  238. -rw-r--r-- 1 root root 296K 2022-06-26 10:21 RobotoCondensed-Medium.ttf
  239. -rw-r--r-- 1 root root 323K 2022-06-26 10:21 RobotoCondensed-MediumItalic.ttf
  240. -rw-r--r-- 1 root root 294K 2022-06-26 10:21 RobotoCondensed-Regular.ttf
  241. cmcc_jiangsu:/ #

%%%%%

/system/lib

    system 的 Library 存放的是所有动态链接库 .so 文件

        /system/lib 目录下都是组成

JNI 层
Dalvik 虚拟机
本地库
HAL 层
厂家适配层

        的所有动态链接库 .so 文件
        也存放 APK 程序用到的库文件

        这些 SO 是

JNI 层
Dalvik 虚拟机

本地库

HAL 层

        所必须需要的
        因为系统应用 /system/app 下的 apk 是不会解压 SO 到程序的目录下
        所以其相应用的 SO 都应放在 /system/lib 下面
        当一个系统 apk 的 SO 加载时会从此目录下寻找对应用的 SO 文件

        我系统上的库文件大概有五百个:

  1. cmcc_jiangsu:/ # ls /system/lib | wc -l
  2. 489
  3. cmcc_jiangsu:/ #

%%%%%

/system/framework


        /system/framework 目录下存放的都是 Android 系统的核心文件库

启用 Android 系统所用到框架 例如一些 .jar 文件

        存放的是框架层的 JAR 包 application framework 部分的库 像是

  1. core.jar
  2. services.jar
  3. android.policy.jar
  4. framework-res.apk
  5. framework.jar

        等等

        我的系统中有 70 个:

  1. cmcc_jiangsu:/ # ls /system/framework | wc -l
  2. 70
  3. cmcc_jiangsu:/ # ls /system/framework -alh
  4. total 34M
  5. drwxr-xr-x 4 root root 4.0K 2022-06-26 11:03 .
  6. drwxr-xr-x 15 root root 4.0K 1970-01-01 08:00 ..
  7. -rw-r--r-- 1 root root 200 2022-06-26 10:21 am.jar
  8. -rw-r--r-- 1 root root 183 2022-06-26 10:21 android.hidl.base-V1.0-java.jar
  9. -rw-r--r-- 1 root root 183 2022-06-26 10:21 android.hidl.manager-V1.0-java.jar
  10. -rw-r--r-- 1 root root 183 2022-06-26 10:21 android.test.base.jar
  11. -rw-r--r-- 1 root root 183 2022-06-26 10:21 android.test.mock.jar
  12. -rw-r--r-- 1 root root 183 2022-06-26 10:21 android.test.runner.jar
  13. -rw-r--r-- 1 root root 17K 2022-06-26 10:21 apache-xml.jar
  14. -rw-r--r-- 1 root root 200 2022-06-26 10:21 appwidget.jar
  15. drwxr-xr-x 2 root root 4.0K 2022-06-26 11:03 arm
  16. -rw-r--r-- 1 root root 200 2022-06-26 10:22 bmgr.jar
  17. -rw-r--r-- 1 root root 27K 2022-06-26 10:22 boot-android.hidl.base-V1.0-java.vdex
  18. -rw-r--r-- 1 root root 43K 2022-06-26 10:22 boot-android.hidl.manager-V1.0-java.vdex
  19. -rw-r--r-- 1 root root 32K 2022-06-26 10:22 boot-android.test.base.vdex
  20. -rw-r--r-- 1 root root 1.1M 2022-06-26 10:22 boot-apache-xml.vdex
  21. -rw-r--r-- 1 root root 1.2M 2022-06-26 10:22 boot-bouncycastle.vdex
  22. -rw-r--r-- 1 root root 1.2K 2022-06-26 10:22 boot-com.sumavision.util.terminalinfo.vdex
  23. -rw-r--r-- 1 root root 387K 2022-06-26 10:22 boot-conscrypt.vdex
  24. -rw-r--r-- 1 root root 2.9M 2022-06-26 10:22 boot-core-libart.vdex
  25. -rw-r--r-- 1 root root 937K 2022-06-26 10:22 boot-ext.vdex
  26. -rw-r--r-- 1 root root 1.1K 2022-06-26 10:22 boot-framework-oahl-backward-compatibility.vdex
  27. -rw-r--r-- 1 root root 20M 2022-06-26 10:22 boot-framework.vdex
  28. -rw-r--r-- 1 root root 130K 2022-06-26 10:22 boot-ims-common.vdex
  29. -rw-r--r-- 1 root root 378K 2022-06-26 10:22 boot-okhttp.vdex
  30. -rw-r--r-- 1 root root 2.8M 2022-06-26 10:22 boot-telephony-common.vdex
  31. -rw-r--r-- 1 root root 146K 2022-06-26 10:22 boot-voip-common.vdex
  32. -rw-r--r-- 1 root root 4.4M 2022-06-26 10:22 boot.vdex
  33. -rw-r--r-- 1 root root 185 2022-06-26 10:22 bouncycastle.jar
  34. -rw-r--r-- 1 root root 200 2022-06-26 10:22 bu.jar
  35. -rw-r--r-- 1 root root 200 2022-06-26 10:22 com.android.future.usb.accessory.jar
  36. -rw-r--r-- 1 root root 200 2022-06-26 10:22 com.android.location.provider.jar
  37. -rw-r--r-- 1 root root 200 2022-06-26 10:22 com.android.media.remotedisplay.jar
  38. -rw-r--r-- 1 root root 200 2022-06-26 10:22 com.android.mediadrm.signer.jar
  39. -rw-r--r-- 1 root root 200 2022-06-26 10:22 com.sumavision.util.terminalinfo.jar
  40. -rw-r--r-- 1 root root 185 2022-06-26 10:22 conscrypt.jar
  41. -rw-r--r-- 1 root root 200 2022-06-26 10:22 content.jar
  42. -rw-r--r-- 1 root root 18K 2022-06-26 10:22 core-libart.jar
  43. -rw-r--r-- 1 root root 123K 2022-06-26 10:22 core-oj.jar
  44. -rw-r--r-- 1 root root 200 2022-06-26 10:22 dpm.jar
  45. -rw-r--r-- 1 root root 200 2022-06-26 10:22 ethernet-service.jar
  46. -rw-r--r-- 1 root root 1.8M 2022-06-26 10:22 ext.jar
  47. -rw-r--r-- 1 root root 183 2022-06-26 10:22 framework-oahl-backward-compatibility.jar
  48. -rw-r--r-- 1 root root 32M 2022-06-26 10:22 framework-res.apk
  49. -rw-r--r-- 1 root root 183 2022-06-26 10:22 framework.jar
  50. -rw-r--r-- 1 root root 200 2022-06-26 10:22 hid.jar
  51. -rw-r--r-- 1 root root 200 2022-06-26 10:22 ims-common.jar
  52. -rw-r--r-- 1 root root 200 2022-06-26 10:22 input.jar
  53. -rw-r--r-- 1 root root 183 2022-06-26 10:22 iptvd.core.jar
  54. -rw-r--r-- 1 root root 200 2022-06-26 10:22 javax.obex.jar
  55. -rw-r--r-- 1 root root 183 2022-06-26 10:22 libipd.jar
  56. -rw-r--r-- 1 root root 200 2022-06-26 10:22 locksettings.jar
  57. -rw-r--r-- 1 root root 200 2022-06-26 10:22 media_cmd.jar
  58. -rw-r--r-- 1 root root 200 2022-06-26 10:22 monkey.jar
  59. drwxr-xr-x 3 root root 4.0K 2022-06-26 11:03 oat
  60. -rw-r--r-- 1 root root 185 2022-06-26 10:22 okhttp.jar
  61. -rw-r--r-- 1 root root 200 2022-06-26 10:22 org.apache.http.legacy.boot.jar
  62. -rw-r--r-- 1 root root 1.3K 2022-06-26 10:22 org.apache.http.legacy.boot.jar.prof
  63. -rw-r--r-- 1 root root 200 2022-06-26 10:22 pppoe-service.jar
  64. -rw-r--r-- 1 root root 200 2022-06-26 10:22 requestsync.jar
  65. -rw-r--r-- 1 root root 183 2022-06-26 10:22 services.jar
  66. -rw-r--r-- 1 root root 2.5K 2022-06-26 10:22 services.jar.prof
  67. -rw-r--r-- 1 root root 200 2022-06-26 10:22 sm.jar
  68. -rw-r--r-- 1 root root 200 2022-06-26 10:22 svc.jar
  69. -rw-r--r-- 1 root root 200 2022-06-26 10:22 telecom.jar
  70. -rw-r--r-- 1 root root 200 2022-06-26 10:22 telephony-common.jar
  71. -rw-r--r-- 1 root root 200 2022-06-26 10:22 uiautomator.jar
  72. -rw-r--r-- 1 root root 183 2022-06-26 10:22 vendor.amlogic.hardware.droidvold-V1.0java.jar
  73. -rw-r--r-- 1 root root 200 2022-06-26 10:22 vlan-service.jar
  74. -rw-r--r-- 1 root root 183 2022-06-26 10:22 voip-common.jar
  75. -rw-r--r-- 1 root root 200 2022-06-26 10:22 wifi-service.jar
  76. -rw-r--r-- 1 root root 1.1K 2022-06-26 10:22 wifi-service.jar.prof
  77. cmcc_jiangsu:/ #

%%%%%

/system/build.prop

  1. cmcc_jiangsu:/ # ls -alh /system/build.prop
  2. -rw------- 1 root root 14K 2022-06-26 10:21 /system/build.prop
  3. cmcc_jiangsu:/ #

        build.prop 跟根文件系统中的 default.prop 文件格式一样 都称为属性配置文件
        她们都定义了一些属性值 代码可以读取或者修改这些属性值
        属性值有一些命名规范:

ro 开头的表示只读属性 即这些属性的值代码是无法修改的
persist 开头的表示这些属性值会保存在文件中 这样重新启动之后这些值还保留

        其她的属性一般以所属的类别开头 这些属性是可读可写的 但是对她们的修改重启之后不会保留

  1. 很多 ROM 制作者都会修改一下 build.prop 信息
  2. 里面的一些以 ro.build 开头的属性就是你在手机设置中的关于手机里看到的
  3. 可以通过修改 build.prop 文件来将这个 ROM 打上自己的印记 例如
  4. OOXX 所修改
  5. 我见过一个只是删了 /system/app 的一些程序
  6. 然后修改 build.prop 中的
  7. ro.build.display.id
  8. ro.build.version.incremental
  9. 两个属性值打上自己的大名的 ROM ……

——————————

data 分区和 cache 分区

        当我们开机进入桌面程序后 一般来说我们都会下载安装一些 APP
        这些 APP 都安装在该目录下

/data/app

        所有的 Android 程序生成的数据基本上都保存在 data/data 目录下

        wipe data 实质上就是格式化 data 分区 这样我们安装的所有 APP 和程序数据就都丢失了

        cache 分区从名字上来看是用来缓存一些文件的

        比如说一些音乐下载的临时文件

        或者下载管理下载的内容基本上放在这个分区

%%%%%

/data/data 目录

        /data/data 目录存放的是所有 APK 程序数据的目录
        每个 APK 所对应的 Data 目录都在 /data/data/ 目录下
        会产生一个跟 PackageName/包名 一样的目录
        比如有一个 APK 包名

com.test.hello

        则在 /data/data/ 目录下会有一个 com.test.hello 的目录:

/data/data/com.test.hello

        这个 APK 只能操作此目录而不能操作其她 APK 的目录

  1. 另外 如果你是 Android 编程的话 当你在代码中用 Context.openFileOutput() 所建立的文件都放在这个目录
  2. /data/data/<app-package-name>
  3. 下的 files 子目录内
  4. 而用 Context.getSharedPreferences() 所建立的 preferences 文件 *.xml 则是放在 shared_pref 这个子目录中

        我的系统这边竟然有 41 个:

  1. cmcc_jiangsu:/ # ls /data/data | wc -l
  2. 41
  3. cmcc_jiangsu:/ # ls /data/data
  4. android com.android.settings
  5. android.ext.services com.android.sharedstoragebackup
  6. android.ext.shared com.android.shell
  7. com.android.backupconfirm com.android.statementservice
  8. com.android.bluetooth com.android.superuser
  9. com.android.certinstaller com.android.systemui
  10. com.android.companiondevicemanager com.android.vpndialogs
  11. com.android.defcontainer com.android.webview
  12. com.android.externalstorage com.cmcc.mid.softdetector
  13. com.android.inputdevices com.dangbei.tvlauncher
  14. com.android.inputmethod.latin com.dangbeimarket
  15. com.android.keychain com.droidlogic
  16. com.android.location.fused com.droidlogic.BluetoothRemote
  17. com.android.managedprovisioning com.droidlogic.inputmethod.remote
  18. com.android.packageinstaller com.fengyun.live
  19. com.android.pacprocessor com.iflytek.bt.auto
  20. com.android.providers.downloads com.iflytek.xiri
  21. com.android.providers.media com.iflytek.xiri2.system
  22. com.android.providers.settings com.mylejia.store
  23. com.android.proxyhandler me.thomastv.rebootupdate
  24. com.android.se
  25. cmcc_jiangsu:/ # ls /data/data -alh
  26. total 170K
  27. drwxrwx--x 43 system system 4.0K 2015-01-01 08:00 .
  28. drwxrwx--x 40 system system 4.0K 2015-01-01 08:00 ..
  29. drwx------ 4 system system 4.0K 2015-01-01 08:00 android
  30. drwx------ 4 u0_a3 u0_a3 4.0K 2015-01-01 08:00 android.ext.services
  31. drwx------ 4 u0_a15 u0_a15 4.0K 2015-01-01 08:00 android.ext.shared
  32. drwx------ 4 u0_a1 u0_a1 4.0K 2015-01-01 08:00 com.android.backupconfirm
  33. drwx------ 4 bluetooth bluetooth 4.0K 2015-01-01 08:00 com.android.bluetooth
  34. drwx------ 4 u0_a13 u0_a13 4.0K 2015-01-01 08:00 com.android.certinstaller
  35. drwx------ 4 u0_a12 u0_a12 4.0K 2015-01-01 08:00 com.android.companiondevicemanager
  36. drwx------ 4 u0_a0 u0_a0 4.0K 2015-01-01 08:00 com.android.defcontainer
  37. drwx------ 4 u0_a4 u0_a4 4.0K 2015-01-01 08:00 com.android.externalstorage
  38. drwx------ 4 system system 4.0K 2015-01-01 08:00 com.android.inputdevices
  39. drwxr-x--x 4 u0_a20 u0_a20 4.0K 2015-01-01 08:00 com.android.inputmethod.latin
  40. drwx------ 5 system system 4.0K 2015-01-01 08:00 com.android.keychain
  41. drwx------ 4 system system 4.0K 2015-01-01 08:00 com.android.location.fused
  42. drwx------ 5 u0_a5 u0_a5 4.0K 2015-01-01 08:00 com.android.managedprovisioning
  43. drwx------ 4 u0_a8 u0_a8 4.0K 2015-01-01 08:00 com.android.packageinstaller
  44. drwx------ 4 u0_a17 u0_a17 4.0K 2015-01-01 08:00 com.android.pacprocessor
  45. drwx------ 5 u0_a2 u0_a2 4.0K 2015-01-01 08:00 com.android.providers.downloads
  46. drwx------ 6 u0_a2 u0_a2 4.0K 2015-01-01 08:00 com.android.providers.media
  47. drwx------ 4 system system 4.0K 2015-01-01 08:00 com.android.providers.settings
  48. drwx------ 4 u0_a6 u0_a6 4.0K 2015-01-01 08:00 com.android.proxyhandler
  49. drwx------ 4 secure_element secure_element 4.0K 2015-01-01 08:00 com.android.se
  50. drwx------ 6 system system 4.0K 2015-01-01 08:00 com.android.settings
  51. drwx------ 4 u0_a7 u0_a7 4.0K 2015-01-01 08:00 com.android.sharedstoragebackup
  52. drwx------ 4 shell shell 4.0K 2015-01-01 08:00 com.android.shell
  53. drwx------ 4 u0_a9 u0_a9 4.0K 2015-01-01 08:00 com.android.statementservice
  54. drwxr-x--x 5 u0_a19 u0_a19 4.0K 2015-01-01 08:00 com.android.superuser
  55. drwx------ 4 u0_a11 u0_a11 4.0K 2015-01-01 08:00 com.android.systemui
  56. drwx------ 4 u0_a10 u0_a10 4.0K 2015-01-01 08:00 com.android.vpndialogs
  57. drwx------ 4 u0_a23 u0_a23 4.0K 2015-01-01 08:00 com.android.webview
  58. drwxr-x--x 10 u0_a18 u0_a18 4.0K 2015-01-01 08:00 com.cmcc.mid.softdetector
  59. drwxr-x--x 7 u0_a16 u0_a16 4.0K 2015-01-01 08:00 com.dangbei.tvlauncher
  60. drwxr-x--x 4 u0_a25 u0_a25 4.0K 2015-01-01 08:00 com.dangbeimarket
  61. drwx------ 5 system system 4.0K 2015-01-01 08:00 com.droidlogic
  62. drwx------ 4 system system 4.0K 2015-01-01 08:00 com.droidlogic.BluetoothRemote
  63. drwx------ 6 u0_a22 u0_a22 4.0K 2015-01-01 08:00 com.droidlogic.inputmethod.remote
  64. drwx------ 4 u0_a27 u0_a27 4.0K 2015-01-01 08:00 com.fengyun.live
  65. drwx------ 4 u0_a14 u0_a14 4.0K 2015-01-01 08:00 com.iflytek.bt.auto
  66. drwxr-x--x 11 u0_a21 u0_a21 4.0K 2022-07-22 18:46 com.iflytek.xiri
  67. drwx------ 5 system system 4.0K 2015-01-01 08:00 com.iflytek.xiri2.system
  68. drwx------ 4 u0_a26 u0_a26 4.0K 2015-01-01 08:00 com.mylejia.store
  69. drwx------ 4 u0_a24 u0_a24 4.0K 2015-01-01 08:00 me.thomastv.rebootupdate
  70. cmcc_jiangsu:/ #

%%%%%

/data/app 目录


        /data/app 一般放的是使用者自己安装的应用程序可执行 *.apk 文件

        用户安装的 APK 都放在这里

我们如果把 APK 放入这个文件夹下面的话就算安装好了

这就叫静默安装

不用管 APK 文件里面的 lib 目录下的库文件 系统会自动帮我们放入调用库

  1. cmcc_jiangsu:/ # ls /data/app
  2. com.dangbeimarket-GvchZCDlwKegHBtoXBQhwg==
  3. com.fengyun.live-829NViyOdL42DNDyYJhxWw==
  4. com.iflytek.xiri-WgYGkZvi6pwHhlca9dWSJw==
  5. com.mylejia.store--X53YUFZXKN1XMhyN9prZw==
  6. me.thomastv.rebootupdate-4SVHakbq9YXs3X7ozxyY0w==
  7. cmcc_jiangsu:/ # ls /data/app -alh
  8. total 16K
  9. drwxrwxr-x 7 system system 4.0K 2015-01-01 08:00 .
  10. drwxrwx--x 40 system system 4.0K 2015-01-01 08:00 ..
  11. drwxr-xr-x 4 system system 4.0K 2015-01-01 08:00 com.dangbeimarket-GvchZCDlwKegHBtoXBQhwg==
  12. drwxr-xr-x 4 system system 4.0K 2015-01-01 08:01 com.fengyun.live-829NViyOdL42DNDyYJhxWw==
  13. drwxr-xr-x 4 system system 4.0K 2015-01-01 08:00 com.iflytek.xiri-WgYGkZvi6pwHhlca9dWSJw==
  14. drwxr-xr-x 4 system system 4.0K 2015-01-01 08:00 com.mylejia.store--X53YUFZXKN1XMhyN9prZw==
  15. drwxr-xr-x 4 system system 4.0K 2015-01-01 08:00 me.thomastv.rebootupdate-4SVHakbq9YXs3X7ozxyY0w==
  16. cmcc_jiangsu:/ #

%%%%%

/data/misc 目录

        WIFI 帐号或 VPN 设置信息等都保存在 /data/misc 目录下

        比如保存了一个 WIFI 连接帐号
        则在此目录下的 WIFI 目录下面的 wpa_supplicant.conf 中可以看到

  1. cmcc_jiangsu:/ # ls /data/misc | wc -l
  2. 41
  3. cmcc_jiangsu:/ # ls /data/misc
  4. adb dhcp media sms vold
  5. apns ethernet net stats-data vpn
  6. audioserver gatekeeper network_watchlist stats-service wifi
  7. bluedroid gcov perfprofd systemkeys wmtrace
  8. bluetooth hdcp profiles textclassifier zoneinfo
  9. bootstat incidents profman trace
  10. boottrace keychain radio update_engine
  11. cameraserver keystore recovery update_engine_log
  12. carrierid logd shared_relro user
  13. cmcc_jiangsu:/ # ls -alh /data/misc
  14. total 88K
  15. drwxrwx--t 43 system misc 4.0K 2015-01-01 08:00 .
  16. drwxrwx--x 40 system system 4.0K 2015-01-01 08:00 ..
  17. drwxr-s--- 2 system shell 4.0K 2015-01-01 08:00 adb
  18. drwxrwx--- 2 system radio 4.0K 2015-01-01 08:00 apns
  19. drwx------ 2 audioserver audioserver 4.0K 2015-01-01 08:00 audioserver
  20. drwxrws--- 2 bluetooth bluetooth 4.0K 2022-07-19 12:10 bluedroid
  21. drwxrwx--- 3 bluetooth bluetooth 4.0K 2015-01-01 08:00 bluetooth
  22. drwx------ 2 system log 4.0K 2015-01-01 08:00 bootstat
  23. drwxrwx--x 2 system shell 4.0K 2015-01-01 08:00 boottrace
  24. drwx------ 2 cameraserver cameraserver 4.0K 2015-01-01 08:00 cameraserver
  25. drwxrwx--- 2 system radio 4.0K 2015-01-01 08:00 carrierid
  26. drwxrwx--- 2 dhcp dhcp 4.0K 2015-01-01 08:00 dhcp
  27. drwxrwx--- 2 system system 4.0K 2022-07-22 19:23 ethernet
  28. drwx------ 2 system system 4.0K 2015-01-01 08:00 gatekeeper
  29. drwxrwx--- 2 root root 4.0K 2015-01-01 08:00 gcov
  30. drwxrwx--- 2 media media 4.0K 2015-01-01 08:00 hdcp
  31. drwxrwx--- 2 incidentd incidentd 4.0K 2015-01-01 08:00 incidents
  32. drwxrwx--x 2 system system 4.0K 2015-01-01 08:00 keychain
  33. drwx------ 3 keystore keystore 4.0K 2015-01-01 08:00 keystore
  34. drwx------ 2 logd log 4.0K 2015-01-01 08:00 logd
  35. drwx------ 2 media media 4.0K 2015-01-01 08:00 media
  36. drwxr-x--- 2 root shell 4.0K 2015-01-01 08:00 net
  37. drwxrwxr-- 2 system system 4.0K 2015-01-01 08:00 network_watchlist
  38. drwxrwxr-x 2 root root 4.0K 2015-01-01 08:00 perfprofd
  39. drwxrwx--x 4 system system 4.0K 2015-01-01 08:00 profiles
  40. drwxrwx--- 2 system shell 4.0K 2015-01-01 08:00 profman
  41. drwxrwx--- 2 system radio 4.0K 2015-01-01 08:00 radio
  42. drwxrwx--- 3 system log 4.0K 2015-01-01 08:00 recovery
  43. drwxrwx--x 2 shared_relro shared_relro 4.0K 2022-07-22 18:46 shared_relro
  44. drwxrwx--- 2 system radio 4.0K 2015-01-01 08:00 sms
  45. drwxrwx--- 2 statsd system 4.0K 2015-01-01 08:00 stats-data
  46. drwxrwx--- 2 statsd system 4.0K 2015-01-01 08:00 stats-service
  47. drwx------ 2 system system 4.0K 2015-01-01 08:00 systemkeys
  48. drwxrwx--x 2 system system 4.0K 2015-01-01 08:00 textclassifier
  49. drwxrwx-wx 2 root root 4.0K 2015-01-01 08:00 trace
  50. drwx------ 2 root root 4.0K 2015-01-01 08:00 update_engine
  51. drwxr-s--- 2 root log 4.0K 2015-01-01 08:00 update_engine_log
  52. drwxrwx--x 3 root root 4.0K 2015-01-01 08:00 user
  53. drwx------ 2 root root 4.0K 2015-01-01 08:00 vold
  54. drwxrwx--- 2 system vpn 4.0K 2015-01-01 08:00 vpn
  55. drwxrwx--- 4 wifi wifi 4.0K 2015-01-01 08:00 wifi
  56. drwxrwxr-x 2 system system 4.0K 2015-01-01 08:00 wmtrace
  57. drwxrwxr-x 2 system system 4.0K 2015-01-01 08:00 zoneinfo
  58. cmcc_jiangsu:/ # ls /data/misc/wifi/
  59. sockets/ softap.conf wpa_supplicant/
  60. cmcc_jiangsu:/ # ls /data/misc/wifi/wpa_supplicant
  61. cmcc_jiangsu:/ # ls /data/misc/wifi/wpa_supplicant -alh
  62. total 4.0K
  63. drwxrwx--- 2 wifi wifi 4.0K 2015-01-01 08:00 .
  64. drwxrwx--- 4 wifi wifi 4.0K 2015-01-01 08:00 ..
  65. cmcc_jiangsu:/ # ls /data/misc/wifi/ -alh
  66. total 10K
  67. drwxrwx--- 4 wifi wifi 4.0K 2015-01-01 08:00 .
  68. drwxrwx--t 43 system misc 4.0K 2015-01-01 08:00 ..
  69. drwxrwx--- 2 wifi wifi 4.0K 2015-01-01 08:00 sockets
  70. -rw------- 1 system system 47 2015-01-01 08:00 softap.conf
  71. drwxrwx--- 2 wifi wifi 4.0K 2015-01-01 08:00 wpa_supplicant
  72. cmcc_jiangsu:/ #

%%%%%

/data/local/tmp 目录

        /data/local/tmp 就不用多说了 懂的都懂!

        在 Android 中访问 data 目录一般需要 root 权限但是有个例外那就是 /data/local/tmp 目录!!!

  1. cmcc_jiangsu:/ # ls /data/local/tmp
  2. log.txt symbol_thirdpart_apks_installed
  3. cmcc_jiangsu:/ # ls /data/local/tmp -alh
  4. total 6.0K
  5. drwxrwx--x 2 shell shell 4.0K 2015-01-01 08:01 .
  6. drwxrwxrwx 4 root root 4.0K 2015-01-01 08:00 ..
  7. -rw------- 1 root root 233 2015-01-01 08:01 log.txt
  8. -rw------- 1 root root 0 2015-01-01 08:01 symbol_thirdpart_apks_installed
  9. cmcc_jiangsu:/ # ls /data/local -alh
  10. total 10K
  11. drwxrwxrwx 4 root root 4.0K 2015-01-01 08:00 .
  12. drwxrwx--x 40 system system 4.0K 2015-01-01 08:00 ..
  13. -rw------- 1 root root 0 2015-01-01 08:00 showwififlag
  14. drwxrwx--x 2 shell shell 4.0K 2015-01-01 08:01 tmp
  15. drwxrwxrwx 2 shell shell 4.0K 2015-01-01 08:00 traces
  16. cmcc_jiangsu:/ #

%%%%%

/data/anr/traces.txt 文件与 /data/system/dropbox/*.txt 文件们

        当你的应用程序发生 ANR/Application is Not Responding 错误时
        Android 会自动将问题点的

code stack list/代码堆栈列表

        写在 /data/anr/traces.txt 这个文件内
        你直接用 cat 命令就查看内容

  1. cmcc_jiangsu:/ # ls /data -alh
  2. total 88K
  3. drwxrwx--x 40 system system 4.0K 2015-01-01 08:00 .
  4. drwxr-xr-x 23 root root 0 2015-01-01 08:00 ..
  5. -rw------- 1 root root 2 2015-01-01 08:00 .layout_version
  6. drwx------ 2 root root 4.0K 2015-01-01 08:00 adb
  7. drwxrwxr-x 2 system system 4.0K 2015-01-01 08:00 anr
  8. drwxrwxr-x 7 system system 4.0K 2015-01-01 08:00 app
  9. drwx------ 2 root root 4.0K 2015-01-01 08:00 app-asec
  10. drwxrwx--x 2 system system 4.0K 2015-01-01 08:00 app-ephemeral
  11. drwxrwx--x 2 system system 4.0K 2015-01-01 08:00 app-lib
  12. drwxrwx--x 2 system system 4.0K 2015-01-01 08:00 app-private
  13. drwx------ 4 system system 4.0K 2022-07-22 18:46 backup
  14. drwxr-xr-x 2 shell shell 4.0K 2015-01-01 08:00 bootchart
  15. drwxrwx--- 5 system cache 4.0K 2015-01-01 08:00 cache
  16. drwxrwx--x 3 root root 4.0K 2015-01-01 08:00 dalvik-cache
  17. drwxrwx--x 43 system system 4.0K 2015-01-01 08:00 data
  18. drwxrwx--- 3 drm drm 4.0K 2015-01-01 08:00 drm
  19. drwxrwx--x 2 system system 4.0K 2015-01-01 08:00 droidota
  20. drwxrwx--- 2 system system 4.0K 2015-01-01 08:00 execmd
  21. drwxrwxrwx 4 root root 4.0K 2015-01-01 08:00 local
  22. drwxrwx--x 3 log log 4.0K 2015-01-01 08:00 log
  23. drwxrwx--- 2 root root 16K 2015-01-01 08:00 lost+found
  24. drwxrwx--- 4 media_rw media_rw 4.0K 2015-01-01 08:00 media
  25. drwxrwx--- 2 mediadrm mediadrm 4.0K 2015-01-01 08:00 mediadrm
  26. drwxrwx--t 43 system misc 4.0K 2015-01-01 08:00 misc
  27. drwxrwx--t 3 system misc 4.0K 2015-01-01 08:00 misc_ce
  28. drwxrwx--t 3 system misc 4.0K 2015-01-01 08:00 misc_de
  29. drwxrwx--- 3 nfc nfc 4.0K 2015-01-01 08:00 nfc
  30. drwxrwx--x 2 root root 4.0K 2015-01-01 08:00 ota
  31. drwxrwx--- 2 system cache 4.0K 2015-01-01 08:00 ota_package
  32. drwx------ 2 root root 4.0K 2022-07-22 19:25 property
  33. drwxrwx--x 2 system system 4.0K 2015-01-01 08:00 resource-cache
  34. drwx------ 2 system system 4.0K 2015-01-01 08:00 ss
  35. drwxrwxr-x 18 system system 4.0K 2022-07-22 20:16 system
  36. drwxrwx--- 3 system system 4.0K 2015-01-01 08:00 system_ce
  37. drwxrwx--- 3 system system 4.0K 2015-01-01 08:00 system_de
  38. drwxrwx--x 2 system system 4.0K 2022-07-22 19:03 tombstones
  39. drwx--x--x 2 system system 4.0K 2015-01-01 08:00 user
  40. drwx--x--x 3 system system 4.0K 2015-01-01 08:00 user_de
  41. drwxrwx--x 7 root root 4.0K 2015-01-01 08:00 vendor
  42. drwxrwx--x 3 root root 4.0K 2015-01-01 08:00 vendor_ce
  43. drwxrwx--x 3 root root 4.0K 2015-01-01 08:00 vendor_de
  44. cmcc_jiangsu:/ # ls /data/anr/
  45. cmcc_jiangsu:/ # ls /data/anr/ -alh
  46. total 6.0K
  47. drwxrwxr-x 2 system system 4.0K 2015-01-01 08:00 .
  48. drwxrwx--x 40 system system 4.0K 2015-01-01 08:00 ..
  49. cmcc_jiangsu:/ #

        而 /data/system/dropbox 下的文件们主要是系统内 apk 发生 crash 时写的日志文件
        主要有 system_app_crash 或 data_app_crash 等日志

  1. cmcc_jiangsu:/ # ls /data/system/dropbox
  2. SYSTEM_BOOT@1658486820338.txt
  3. system_app_strictmode@1658486812713.txt
  4. system_app_strictmode@1658486812724.txt
  5. system_app_strictmode@1658486812732.txt
  6. system_app_strictmode@1658486812745.txt
  7. system_app_strictmode@1658486812763.txt
  8. system_app_strictmode@1658486812769.txt
  9. system_app_strictmode@1658486812777.txt
  10. system_app_strictmode@1658486812789.txt
  11. system_app_strictmode@1658486812795.txt
  12. system_app_strictmode@1658486812817.txt
  13. system_app_strictmode@1658486821213.txt
  14. system_app_strictmode@1658486821253.txt
  15. system_app_strictmode@1658486821286.txt
  16. system_app_strictmode@1658486821326.txt
  17. system_app_strictmode@1658486821366.txt
  18. system_app_strictmode@1658486821402.txt
  19. system_app_strictmode@1658486821421.txt
  20. system_app_strictmode@1658486821446.txt
  21. system_app_strictmode@1658486821466.txt
  22. system_app_strictmode@1658486821489.txt
  23. system_app_strictmode@1658488660424.txt.gz
  24. system_app_wtf@1658486814247.txt
  25. system_server_strictmode@1658486816020.txt
  26. system_server_strictmode@1658486816024.txt
  27. system_server_strictmode@1658486816039.txt
  28. system_server_strictmode@1658486816047.txt
  29. system_server_strictmode@1658486816053.txt
  30. system_server_strictmode@1658486816060.txt
  31. system_server_strictmode@1658486819968.txt
  32. system_server_strictmode@1658486819973.txt
  33. system_server_strictmode@1658486819979.txt
  34. system_server_strictmode@1658486819982.txt
  35. system_server_strictmode@1658486822840.txt
  36. system_server_wtf@1658486814250.txt
  37. system_server_wtf@1658486814260.txt
  38. system_server_wtf@1658489113063.txt
  39. cmcc_jiangsu:/ # ls /data/system/dropbox -alh
  40. total 94K
  41. drwx------ 2 system system 32K 2022-07-22 19:25 .
  42. drwxrwxr-x 18 system system 4.0K 2022-07-22 20:46 ..
  43. -rw------- 1 system system 319 2022-07-22 18:47 SYSTEM_BOOT@1658486820338.txt
  44. -rw------- 1 system system 1.7K 2022-07-22 18:46 system_app_strictmode@1658486812713.txt
  45. -rw------- 1 system system 1.7K 2022-07-22 18:46 system_app_strictmode@1658486812724.txt
  46. -rw------- 1 system system 1.8K 2022-07-22 18:46 system_app_strictmode@1658486812732.txt
  47. -rw------- 1 system system 1.4K 2022-07-22 18:46 system_app_strictmode@1658486812745.txt
  48. -rw------- 1 system system 2.5K 2022-07-22 18:46 system_app_strictmode@1658486812763.txt
  49. -rw------- 1 system system 2.5K 2022-07-22 18:46 system_app_strictmode@1658486812769.txt
  50. -rw------- 1 system system 2.5K 2022-07-22 18:46 system_app_strictmode@1658486812777.txt
  51. -rw------- 1 system system 2.3K 2022-07-22 18:46 system_app_strictmode@1658486812789.txt
  52. -rw------- 1 system system 2.4K 2022-07-22 18:46 system_app_strictmode@1658486812795.txt
  53. -rw------- 1 system system 2.2K 2022-07-22 18:46 system_app_strictmode@1658486812817.txt
  54. -rw------- 1 system system 2.0K 2022-07-22 18:47 system_app_strictmode@1658486821213.txt
  55. -rw------- 1 system system 2.4K 2022-07-22 18:47 system_app_strictmode@1658486821253.txt
  56. -rw------- 1 system system 2.5K 2022-07-22 18:47 system_app_strictmode@1658486821286.txt
  57. -rw------- 1 system system 2.5K 2022-07-22 18:47 system_app_strictmode@1658486821326.txt
  58. -rw------- 1 system system 2.5K 2022-07-22 18:47 system_app_strictmode@1658486821366.txt
  59. -rw------- 1 system system 2.5K 2022-07-22 18:47 system_app_strictmode@1658486821402.txt
  60. -rw------- 1 system system 2.5K 2022-07-22 18:47 system_app_strictmode@1658486821421.txt
  61. -rw------- 1 system system 2.5K 2022-07-22 18:47 system_app_strictmode@1658486821446.txt
  62. -rw------- 1 system system 2.5K 2022-07-22 18:47 system_app_strictmode@1658486821466.txt
  63. -rw------- 1 system system 2.5K 2022-07-22 18:47 system_app_strictmode@1658486821489.txt
  64. -rw------- 1 system system 1.2K 2022-07-22 19:17 system_app_strictmode@1658488660424.txt.gz
  65. -rw------- 1 system system 1.3K 2022-07-22 18:46 system_app_wtf@1658486814247.txt
  66. -rw------- 1 system system 1.1K 2022-07-22 18:46 system_server_strictmode@1658486816020.txt
  67. -rw------- 1 system system 1.1K 2022-07-22 18:46 system_server_strictmode@1658486816024.txt
  68. -rw------- 1 system system 1.5K 2022-07-22 18:46 system_server_strictmode@1658486816039.txt
  69. -rw------- 1 system system 1.5K 2022-07-22 18:46 system_server_strictmode@1658486816047.txt
  70. -rw------- 1 system system 1.5K 2022-07-22 18:46 system_server_strictmode@1658486816053.txt
  71. -rw------- 1 system system 1.5K 2022-07-22 18:46 system_server_strictmode@1658486816060.txt
  72. -rw------- 1 system system 1.1K 2022-07-22 18:46 system_server_strictmode@1658486819968.txt
  73. -rw------- 1 system system 1.5K 2022-07-22 18:46 system_server_strictmode@1658486819973.txt
  74. -rw------- 1 system system 1.5K 2022-07-22 18:46 system_server_strictmode@1658486819979.txt
  75. -rw------- 1 system system 1.5K 2022-07-22 18:46 system_server_strictmode@1658486819982.txt
  76. -rw------- 1 system system 1.5K 2022-07-22 18:47 system_server_strictmode@1658486822840.txt
  77. -rw------- 1 system system 1.1K 2022-07-22 18:46 system_server_wtf@1658486814250.txt
  78. -rw------- 1 system system 1.1K 2022-07-22 18:46 system_server_wtf@1658486814260.txt
  79. -rw------- 1 system system 1.1K 2022-07-22 19:25 system_server_wtf@1658489113063.txt
  80. cmcc_jiangsu:/ #

%%%%%

/data/location/gps 目录和 /data/system/location/ 目录以及 /data/property/ 目录


        /data/location/gps 目录是给 GPS location provider 用的

        其中的 properties 档案的内容如下

        /data/system/location/location.gps 这个文件主要是记录最后的经纬度座标

        LocationManager.getLastKnownLocation() 就是在这抓值的 

        /data/property/persist.sys.timezone 文件主要是记录目前系统所使用的时区

        例如记录着 Asia/ShangHai 这个字串

  1. cmcc_jiangsu:/ # ls /data/property/ -alh
  2. total 8.0K
  3. drwx------ 2 root root 4.0K 2022-07-22 19:25 .
  4. drwxrwx--x 40 system system 4.0K 2015-01-01 08:00 ..
  5. -rw------- 1 root root 0.9K 2022-07-22 19:25 persistent_properties
  6. cmcc_jiangsu:/ #

——————————

SD 卡目录

        最常见的两个 sd 卡目录为:

  1. /sdcard
  2. /mnt/sdcard

        但是储存卡位置在:

/storage/emulated/0

        要说储存卡还真是不好找啊 链接来链接去的 最后才能确定为 /storage/emulated/0

  1. cmcc_jiangsu:/ # ls / -alh
  2. total 792K
  3. drwxr-xr-x 23 root root 0 2015-01-01 08:00 .
  4. drwxr-xr-x 23 root root 0 2015-01-01 08:00 ..
  5. dr-xr-xr-x 35 root root 0 2015-01-01 08:00 acct
  6. lrwxrwxrwx 1 root root 11 1970-01-01 08:00 bin -> /system/bin
  7. drwxr-xr-x 2 root root 0 1970-01-01 08:00 boot
  8. drwxrwxr-x 2 system system 0 2015-01-01 08:00 bootfiles
  9. lrwxrwxrwx 1 root root 50 1970-01-01 08:00 bugreports -> /data/user_de/0/com.android.shell/files/bugreports
  10. drwxrwx--- 6 system cache 4.0K 2015-01-01 08:00 cache
  11. lrwxrwxrwx 1 root root 13 1970-01-01 08:00 charger -> /sbin/charger
  12. drwxr-xr-x 4 root root 0 1970-01-01 08:00 config
  13. lrwxrwxrwx 1 root root 17 1970-01-01 08:00 d -> /sys/kernel/debug
  14. drwxrwx--x 40 system system 4.0K 2015-01-01 08:00 data
  15. lrwxrwxrwx 1 root root 23 1970-01-01 08:00 default.prop -> system/etc/prop.default
  16. drwxr-xr-x 17 root root 5.5K 2022-07-22 20:33 dev
  17. lrwxrwxrwx 1 root root 11 1970-01-01 08:00 etc -> /system/etc
  18. drwxr-xr-x 2 root root 0 2015-01-01 08:00 factory
  19. lrwxrwxrwx 1 root root 17 1970-01-01 08:00 info -> /mnt/vendor/param
  20. -rwxr-x--- 1 root root 1.4M 1970-01-01 08:00 init
  21. -rwxr-x--- 1 root root 1.1K 1970-01-01 08:00 init.environ.rc
  22. -rwxr-x--- 1 root root 29K 1970-01-01 08:00 init.rc
  23. -rwxr-x--- 1 root root 15K 1970-01-01 08:00 init.recovery.amlogic.rc
  24. -rwxr-x--- 1 root root 7.5K 1970-01-01 08:00 init.usb.configfs.rc
  25. -rwxr-x--- 1 root root 5.5K 1970-01-01 08:00 init.usb.rc
  26. -rwxr-x--- 1 root root 511 1970-01-01 08:00 init.zygote32.rc
  27. drwxr-xr-x 4 root root 4.0K 2015-01-01 08:00 metadata
  28. drwxr-xr-x 12 root system 260 2022-07-22 18:47 mnt
  29. drwxr-xr-x 4 root root 4.0K 1970-01-01 08:00 odm
  30. drwxr-xr-x 2 root root 0 1970-01-01 08:00 oem
  31. dr-xr-xr-x 261 root root 0 1970-01-01 08:00 proc
  32. drwxr-xr-x 7 root root 4.0K 1970-01-01 08:00 product
  33. drwx------ 2 root root 0 2021-12-10 20:51 root
  34. drwxr-x--- 2 root root 0 1970-01-01 08:00 sbin
  35. lrwxrwxrwx 1 root root 21 1970-01-01 08:00 sdcard -> /storage/self/primary
  36. drwxr-xr-x 4 root root 80 2022-07-22 18:58 storage
  37. dr-xr-xr-x 12 root root 0 2015-01-01 08:00 sys
  38. drwxr-xr-x 15 root root 4.0K 1970-01-01 08:00 system
  39. drwxrwxrwt 3 root root 80 2022-07-22 19:48 tmp
  40. -rw-r--r-- 1 root root 5.1K 1970-01-01 08:00 ueventd.rc
  41. drwxr-xr-x 13 root root 4.0K 1970-01-01 08:00 vendor
  42. cmcc_jiangsu:/ # ls -alh /sdcard
  43. lrwxrwxrwx 1 root root 21 1970-01-01 08:00 /sdcard -> /storage/self/primary
  44. cmcc_jiangsu:/ # ls -alh /mnt/sdcard
  45. lrwxrwxrwx 1 root root 21 2015-01-01 08:00 /mnt/sdcard -> /storage/self/primary
  46. cmcc_jiangsu:/ # ls -alh /storage/self/primary
  47. lrwxrwxrwx 1 root root 19 2015-01-01 08:00 /storage/self/primary -> /mnt/user/0/
  48. primary
  49. cmcc_jiangsu:/ # ls -alh /mnt/user/0/primary
  50. lrwxrwxrwx 1 root reserved_disk 19 2015-01-01 08:00 /mnt/user/0/primary -> /stor
  51. age/emulated/0
  52. cmcc_jiangsu:/ # ls -alh /storage/emulated/0
  53. total 44K
  54. drwxrwx--x 22 root sdcard_rw 4.0K 2022-07-20 18:56 .
  55. drwx--x--x 4 root sdcard_rw 4.0K 2015-01-01 08:00 ..
  56. drwxrwx--x 2 root sdcard_rw 4.0K 2022-07-22 18:47 .DataStorage
  57. drwxrwx--x 3 root sdcard_rw 4.0K 2015-01-01 08:00 .UTSystemConfig
  58. drwxrwx--x 2 root sdcard_rw 4.0K 2015-01-01 08:00 Alarms
  59. drwxrwx--x 5 root sdcard_rw 4.0K 2022-07-19 11:05 Android
  60. drwxrwx--x 3 root sdcard_rw 4.0K 2022-07-19 11:08 DBLauncher
  61. drwxrwx--x 2 root sdcard_rw 4.0K 2022-07-19 13:56 DBZM
  62. drwxrwx--x 2 root sdcard_rw 4.0K 2015-01-01 08:00 DCIM
  63. drwxrwx--x 2 root sdcard_rw 4.0K 2015-01-01 08:00 Download
  64. drwxrwx--x 2 root sdcard_rw 4.0K 2015-01-01 08:00 Movies
  65. drwxrwx--x 2 root sdcard_rw 4.0K 2015-01-01 08:00 Music
  66. drwxrwx--x 2 root sdcard_rw 4.0K 2015-01-01 08:00 Notifications
  67. drwxrwx--x 3 root sdcard_rw 4.0K 2015-01-01 08:00 Pictures
  68. drwxrwx--x 2 root sdcard_rw 4.0K 2015-01-01 08:00 Podcasts
  69. drwxrwx--x 2 root sdcard_rw 4.0K 2015-01-01 08:00 Ringtones
  70. drwxrwx--x 2 root sdcard_rw 4.0K 2022-07-19 11:01 com.iflytek.xiri
  71. drwxrwx--x 5 root sdcard_rw 4.0K 2015-01-01 08:01 msc
  72. drwxrwx--x 2 root sdcard_rw 4.0K 2022-07-20 18:58 sc
  73. drwxrwx--x 5 root sdcard_rw 4.0K 2022-07-19 11:08 zm_pingbao
  74. drwxrwx--x 2 root sdcard_rw 4.0K 2015-01-01 08:05 zm_pingbao_local
  75. drwxrwx--x 2 root sdcard_rw 4.0K 2015-01-01 08:00 zm_wx_chuantu
  76. cmcc_jiangsu:/ #

##################################################

安卓系统分区操作

——————————

安卓系统查看磁盘使用情况

 %%%%%

查看根分区目录

  1. cmcc_jiangsu:/ # ls
  2. acct d init.environ.rc odm sys
  3. bin data init.rc oem system
  4. boot default.prop init.recovery.amlogic.rc proc tmp
  5. bootfiles dev init.usb.configfs.rc product ueventd.rc
  6. bugreports etc init.usb.rc root vendor
  7. cache factory init.zygote32.rc sbin
  8. charger info metadata sdcard
  9. config init mnt storage
  10. cmcc_jiangsu:/ # ls -alh
  11. total 792K
  12. drwxr-xr-x 23 root root 0 2015-01-01 08:00 .
  13. drwxr-xr-x 23 root root 0 2015-01-01 08:00 ..
  14. dr-xr-xr-x 34 root root 0 2015-01-01 08:00 acct
  15. lrwxrwxrwx 1 root root 11 1970-01-01 08:00 bin -> /system/bin
  16. drwxr-xr-x 2 root root 0 1970-01-01 08:00 boot
  17. drwxrwxr-x 2 system system 0 2015-01-01 08:00 bootfiles
  18. lrwxrwxrwx 1 root root 50 1970-01-01 08:00 bugreports -> /data/user_de/0/com.android.shell/files/bugreports
  19. drwxrwx--- 6 system cache 4.0K 2015-01-01 08:00 cache
  20. lrwxrwxrwx 1 root root 13 1970-01-01 08:00 charger -> /sbin/charger
  21. drwxr-xr-x 4 root root 0 1970-01-01 08:00 config
  22. lrwxrwxrwx 1 root root 17 1970-01-01 08:00 d -> /sys/kernel/debug
  23. drwxrwx--x 40 system system 4.0K 2015-01-01 08:00 data
  24. lrwxrwxrwx 1 root root 23 1970-01-01 08:00 default.prop -> system/etc/prop.default
  25. drwxr-xr-x 17 root root 5.5K 2015-01-01 08:00 dev
  26. lrwxrwxrwx 1 root root 11 1970-01-01 08:00 etc -> /system/etc
  27. drwxr-xr-x 2 root root 0 2015-01-01 08:00 factory
  28. lrwxrwxrwx 1 root root 17 1970-01-01 08:00 info -> /mnt/vendor/param
  29. -rwxr-x--- 1 root root 1.4M 1970-01-01 08:00 init
  30. -rwxr-x--- 1 root root 1.1K 1970-01-01 08:00 init.environ.rc
  31. -rwxr-x--- 1 root root 29K 1970-01-01 08:00 init.rc
  32. -rwxr-x--- 1 root root 15K 1970-01-01 08:00 init.recovery.amlogic.rc
  33. -rwxr-x--- 1 root root 7.5K 1970-01-01 08:00 init.usb.configfs.rc
  34. -rwxr-x--- 1 root root 5.5K 1970-01-01 08:00 init.usb.rc
  35. -rwxr-x--- 1 root root 511 1970-01-01 08:00 init.zygote32.rc
  36. drwxr-xr-x 4 root root 4.0K 2015-01-01 08:00 metadata
  37. drwxr-xr-x 11 root system 240 2015-01-01 08:00 mnt
  38. drwxr-xr-x 4 root root 4.0K 1970-01-01 08:00 odm
  39. drwxr-xr-x 2 root root 0 1970-01-01 08:00 oem
  40. dr-xr-xr-x 259 root root 0 1970-01-01 08:00 proc
  41. drwxr-xr-x 7 root root 4.0K 1970-01-01 08:00 product
  42. drwx------ 2 root root 0 2021-12-10 20:51 root
  43. drwxr-x--- 2 root root 0 1970-01-01 08:00 sbin
  44. lrwxrwxrwx 1 root root 21 1970-01-01 08:00 sdcard -> /storage/self/primary
  45. drwxr-xr-x 4 root root 80 2015-01-01 08:00 storage
  46. dr-xr-xr-x 12 root root 0 2015-01-01 08:00 sys
  47. drwxr-xr-x 15 root root 4.0K 1970-01-01 08:00 system
  48. drwxrwxrwt 3 root root 80 2022-07-21 00:02 tmp
  49. -rw-r--r-- 1 root root 5.1K 1970-01-01 08:00 ueventd.rc
  50. drwxr-xr-x 13 root root 4.0K 1970-01-01 08:00 vendor
  51. cmcc_jiangsu:/ #

%%%%%

df -h 常用查看存储情况

        最常用的方式:

  1. cmcc_jiangsu:/ # df -h
  2. Filesystem Size Used Avail Use% Mounted on
  3. tmpfs 0.9G 516K 0.9G 1% /dev
  4. tmpfs 0.9G 0 0.9G 0% /mnt
  5. /dev/block/odm 122M 472K 122M 1% /odm
  6. /dev/block/product 126M 51M 75M 41% /product
  7. /dev/block/system 1.2G 738M 501M 60% /system
  8. /dev/block/vendor 310M 244M 66M 79% /vendor
  9. tmpfs 0.9G 88K 0.9G 1% /tmp
  10. tmpfs 0.9G 0 0.9G 0% /tmp/capture
  11. /dev/block/data 10G 254M 10G 3% /data
  12. /dev/block/cache 976M 1.2M 975M 1% /cache
  13. /dev/block/metadata 11M 40K 11M 1% /metadata
  14. /dev/block/param 11M 860K 11M 8% /mnt/vendor/param
  15. /dev/block/tee 27M 28K 27M 1% /mnt/vendor/tee
  16. /data/media 10G 254M 10G 3% /mnt/runtime/default/emulated
  17. cmcc_jiangsu:/ # df
  18. Filesystem 1K-blocks Used Available Use% Mounted on
  19. tmpfs 1027576 516 1027060 1% /dev
  20. tmpfs 1027576 0 1027576 0% /mnt
  21. /dev/block/odm 124912 472 124440 1% /odm
  22. /dev/block/product 129008 52496 76512 41% /product
  23. /dev/block/system 1269632 756112 513520 60% /system
  24. /dev/block/vendor 317396 249988 67408 79% /vendor
  25. tmpfs 1027576 132 1027444 1% /tmp
  26. tmpfs 1027576 0 1027576 0% /tmp/capture
  27. /dev/block/data 10610276 260480 10349796 3% /data
  28. /dev/block/cache 999320 1312 998008 1% /cache
  29. /dev/block/metadata 11760 40 11720 1% /metadata
  30. /dev/block/param 11744 860 10884 8% /mnt/vendor/param
  31. /dev/block/tee 27632 28 27604 1% /mnt/vendor/tee
  32. /data/media 10610276 260480 10349796 3% /mnt/runtime/default/emulate
  33. d
  34. cmcc_jiangsu:/ #

%%%%%

df -ah 查看所有存储情况

  1. cmcc_jiangsu:/ # df -ah
  2. Filesystem Size Used Avail Use% Mounted on
  3. rootfs 0 0 0 0% /
  4. tmpfs 0.9G 516K 0.9G 1% /dev
  5. devpts 0 0 0 0% /dev/pts
  6. proc 0 0 0 0% /proc
  7. sysfs 0 0 0 0% /sys
  8. selinuxfs 0 0 0 0% /sys/fs/selinux
  9. tmpfs 0.9G 0 0.9G 0% /mnt
  10. /dev/block/odm 122M 472K 122M 1% /odm
  11. /dev/block/product 126M 51M 75M 41% /product
  12. /dev/block/system 1.2G 738M 501M 60% /system
  13. /dev/block/vendor 310M 244M 66M 79% /vendor
  14. none 0 0 0 0% /acct
  15. /sys/kernel/debug 0 0 0 0% /sys/kernel/debug
  16. none 0 0 0 0% /dev/stune
  17. none 0 0 0 0% /config
  18. none 0 0 0 0% /dev/cpuctl
  19. none 0 0 0 0% /dev/cpuset
  20. cg2_bpf 0 0 0 0% /dev/cg2_bpf
  21. bpf 0 0 0 0% /sys/fs/bpf
  22. pstore 0 0 0 0% /sys/fs/pstore
  23. tmpfs 0.9G 132K 0.9G 1% /tmp
  24. tmpfs 0.9G 0 0.9G 0% /tmp/capture
  25. tracefs 0 0 0 0% /sys/kernel/debug/tracing
  26. /dev/block/data 10G 254M 10G 3% /data
  27. /dev/block/cache 976M 1.2M 975M 1% /cache
  28. /dev/block/metadata 11M 40K 11M 1% /metadata
  29. /dev/block/param 11M 860K 11M 8% /mnt/vendor/param
  30. /dev/block/tee 27M 28K 27M 1% /mnt/vendor/tee
  31. tmpfs 0.9G 0 0.9G 0% /storage
  32. adb 0 0 0 0% /dev/usb-ffs/adb
  33. /data/media 10G 254M 10G 3% /mnt/runtime/default/emulated
  34. /data/media 10G 254M 10G 3% /storage/emulated
  35. /data/media 10G 254M 10G 3% /mnt/runtime/read/emulated
  36. /data/media 10G 254M 10G 3% /mnt/runtime/write/emulated
  37. cmcc_jiangsu:/ #

%%%%%

查看分区数量

        要注意的是 df 中的 size 是不准的 要以 /proc/partitions 为准

  1. cmcc_jiangsu:/ # cat /proc/partitions
  2. major minor #blocks name
  3. 1 0 4096 ram0
  4. 1 1 4096 ram1
  5. 1 2 4096 ram2
  6. 1 3 4096 ram3
  7. 1 4 4096 ram4
  8. 1 5 4096 ram5
  9. 1 6 4096 ram6
  10. 1 7 4096 ram7
  11. 1 8 4096 ram8
  12. 1 9 4096 ram9
  13. 1 10 4096 ram10
  14. 1 11 4096 ram11
  15. 1 12 4096 ram12
  16. 1 13 4096 ram13
  17. 1 14 4096 ram14
  18. 1 15 4096 ram15
  19. 252 0 262144 zram0
  20. 179 0 15267840 mmcblk0
  21. 179 1 4096 mmcblk0p1
  22. 179 2 65536 mmcblk0p2
  23. 179 3 1048576 mmcblk0p3
  24. 179 4 8192 mmcblk0p4
  25. 179 5 8192 mmcblk0p5
  26. 179 6 24576 mmcblk0p6
  27. 179 7 8192 mmcblk0p7
  28. 179 8 8192 mmcblk0p8
  29. 179 9 8192 mmcblk0p9
  30. 179 10 16384 mmcblk0p10
  31. 179 11 16384 mmcblk0p11
  32. 179 12 16384 mmcblk0p12
  33. 179 13 16384 mmcblk0p13
  34. 179 14 2048 mmcblk0p14
  35. 179 15 32768 mmcblk0p15
  36. 179 16 327680 mmcblk0p16
  37. 179 17 131072 mmcblk0p17
  38. 179 18 1310720 mmcblk0p18
  39. 179 19 131072 mmcblk0p19
  40. 179 20 1048576 mmcblk0p20
  41. 179 21 10846208 mmcblk0p21
  42. 179 96 4096 mmcblk0rpmb
  43. 179 64 4096 mmcblk0boot1
  44. 179 32 4096 mmcblk0boot0
  45. cmcc_jiangsu:/ #

%%%%%

df 的 h 参数单独查看加载节点

        单独查看分区 被加载到哪个节点

        这边发现 /system 是 /dev/block/

  1. cmcc_jiangsu:/ # df -h /system
  2. Filesystem Size Used Avail Use% Mounted on
  3. /dev/block/system 1.2G 738M 501M 60% /system
  4. cmcc_jiangsu:/ #

——————————

查看分区表和分区名称的匹配关系

        查看 /proc/mounts 文件

  1. cmcc_jiangsu:/ # cat /proc/mounts
  2. rootfs / rootfs ro,seclabel 0 0
  3. tmpfs /dev tmpfs rw,seclabel,nosuid,relatime,mode=755 0 0
  4. devpts /dev/pts devpts rw,seclabel,relatime,mode=600,ptmxmode=000 0 0
  5. proc /proc proc rw,relatime 0 0
  6. sysfs /sys sysfs rw,seclabel,relatime 0 0
  7. selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0
  8. tmpfs /mnt tmpfs rw,seclabel,nosuid,nodev,noexec,relatime,mode=755,gid=1000 0 0
  9. /dev/block/odm /odm ext4 ro,seclabel,relatime,data=ordered,inode_readahead_blks=8 0 0
  10. /dev/block/product /product ext4 ro,seclabel,relatime,block_validity,delalloc,barrier,user_xattr,acl,inode_readahead_blks=8 0 0
  11. /dev/block/system /system ext4 ro,seclabel,relatime,data=ordered,inode_readahead_blks=8 0 0
  12. /dev/block/vendor /vendor ext4 ro,seclabel,relatime,data=ordered,inode_readahead_blks=8 0 0
  13. none /acct cgroup rw,nosuid,nodev,noexec,relatime,cpuacct 0 0
  14. /sys/kernel/debug /sys/kernel/debug debugfs rw,seclabel,relatime,mode=755 0 0
  15. configfs /sys/kernel/config configfs rw,relatime 0 0
  16. none /dev/stune cgroup rw,nosuid,nodev,noexec,relatime,schedtune 0 0
  17. none /config configfs rw,nosuid,nodev,noexec,relatime 0 0
  18. none /dev/cpuctl cgroup rw,nosuid,nodev,noexec,relatime,cpu 0 0
  19. none /dev/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset,noprefix,release_
  20. agent=/sbin/cpuset_release_agent 0 0
  21. cg2_bpf /dev/cg2_bpf cgroup2 rw,nosuid,nodev,noexec,relatime 0 0
  22. bpf /sys/fs/bpf bpf rw,nosuid,nodev,noexec,relatime 0 0
  23. pstore /sys/fs/pstore pstore rw,seclabel,nosuid,nodev,noexec,relatime 0 0
  24. tmpfs /tmp tmpfs rw,seclabel,relatime 0 0
  25. tmpfs /tmp/capture tmpfs rw,seclabel,relatime 0 0
  26. tracefs /sys/kernel/debug/tracing tracefs rw,seclabel,relatime 0 0
  27. /dev/block/data /data ext4 rw,seclabel,nosuid,nodev,noatime,nodelalloc,resgid=1065,errors=panic,data=ordered 0 0
  28. /dev/block/cache /cache ext4 rw,seclabel,nosuid,nodev,noatime,nodelalloc,errors=panic,data=ordered 0 0
  29. /dev/block/metadata /metadata ext4 rw,seclabel,nosuid,nodev,noatime,nodelalloc,errors=panic,data=ordered 0 0
  30. /dev/block/param /mnt/vendor/param ext4 rw,seclabel,nosuid,nodev,noatime,nodelalloc,errors=panic,data=ordered 0 0
  31. /dev/block/tee /mnt/vendor/tee ext4 rw,seclabel,nosuid,nodev,noatime,nodelalloc,errors=panic,data=ordered 0 0
  32. tmpfs /storage tmpfs rw,seclabel,nosuid,nodev,noexec,relatime,mode=755,gid=10000 0
  33. adb /dev/usb-ffs/adb functionfs rw,relatime 0 0
  34. /data/media /mnt/runtime/default/emulated sdcardfs rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=1015,multiuser,mask=6,derive_gid,default_normal 0 0
  35. /data/media /storage/emulated sdcardfs rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=1015,multiuser,mask=6,derive_gid,default_normal 0 0
  36. /data/media /mnt/runtime/read/emulated sdcardfs rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,multiuser,mask=23,derive_gid,default_normal 0 0
  37. /data/media /mnt/runtime/write/emulated sdcardfs rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,multiuser,mask=7,derive_gid,default_normal 0 0
  38. cmcc_jiangsu:/ #

        或者查看 /sys/class/block 下的文件指向:

  1. cmcc_jiangsu:/ # ls /sys/class/block -alh
  2. total 0
  3. drwxr-xr-x 2 root root 0 2015-01-01 08:00 .
  4. drwxr-xr-x 119 root root 0 2015-01-01 08:00 ..
  5. lrwxrwxrwx 1 root root 0 2022-07-21 01:14 backup -> ../../devices/platform/ffe07000.emmc/mmc_host/emmc/emmc:0001/block/mmcblk0/backup
  6. lrwxrwxrwx 1 root root 0 2022-07-21 01:14 boot -> ../../devices/platform/ffe07000.emmc/mmc_host/emmc/emmc:0001/block/mmcblk0/boot
  7. lrwxrwxrwx 1 root root 0 2022-07-21 01:14 bootloader -> ../../devices/platform/ffe07000.emmc/mmc_host/emmc/emmc:0001/block/mmcblk0/bootloader
  8. lrwxrwxrwx 1 root root 0 2022-07-21 01:14 cache -> ../../devices/platform/ffe07000.emmc/mmc_host/emmc/emmc:0001/block/mmcblk0/cache
  9. lrwxrwxrwx 1 root root 0 2022-07-21 01:14 cri_data -> ../../devices/platform/ffe07000.emmc/mmc_host/emmc/emmc:0001/block/mmcblk0/cri_data
  10. lrwxrwxrwx 1 root root 0 2022-07-21 01:14 data -> ../../devices/platform/ffe07000.emmc/mmc_host/emmc/emmc:0001/block/mmcblk0/data
  11. lrwxrwxrwx 1 root root 0 2022-07-21 01:14 dtbo -> ../../devices/platform/ffe07000.emmc/mmc_host/emmc/emmc:0001/block/mmcblk0/dtbo
  12. lrwxrwxrwx 1 root root 0 2022-07-21 01:14 env -> ../../devices/platform/ffe07000.emmc/mmc_host/emmc/emmc:0001/block/mmcblk0/env
  13. lrwxrwxrwx 1 root root 0 2022-07-21 01:14 logo -> ../../devices/platform/ffe07000.emmc/mmc_host/emmc/emmc:0001/block/mmcblk0/logo
  14. lrwxrwxrwx 1 root root 0 2022-07-21 01:14 loop0 -> ../../devices/virtual/block/loop0
  15. lrwxrwxrwx 1 root root 0 2022-07-21 01:14 loop1 -> ../../devices/virtual/block/loop1
  16. lrwxrwxrwx 1 root root 0 2022-07-21 01:14 loop2 -> ../../devices/virtual/block/loop2
  17. lrwxrwxrwx 1 root root 0 2022-07-21 01:14 loop3 -> ../../devices/virtual/block/loop3
  18. lrwxrwxrwx 1 root root 0 2022-07-21 01:14 loop4 -> ../../devices/virtual/block/loop4
  19. lrwxrwxrwx 1 root root 0 2022-07-21 01:14 loop5 -> ../../devices/virtual/block/loop5
  20. lrwxrwxrwx 1 root root 0 2022-07-21 01:14 loop6 -> ../../devices/virtual/block/loop6
  21. lrwxrwxrwx 1 root root 0 2022-07-21 01:14 loop7 -> ../../devices/virtual/block/loop7
  22. lrwxrwxrwx 1 root root 0 2022-07-21 01:14 metadata -> ../../devices/platform/ffe07000.emmc/mmc_host/emmc/emmc:0001/block/mmcblk0/metadata
  23. lrwxrwxrwx 1 root root 0 2022-07-21 01:14 misc -> ../../devices/platform/ffe07000.emmc/mmc_host/emmc/emmc:0001/block/mmcblk0/misc
  24. lrwxrwxrwx 1 root root 0 2022-07-21 01:14 mmcblk0 -> ../../devices/platform/ffe07000.emmc/mmc_host/emmc/emmc:0001/block/mmcblk0
  25. lrwxrwxrwx 1 root root 0 2022-07-21 01:14 mmcblk0boot0 -> ../../devices/platform/ffe07000.emmc/mmc_host/emmc/emmc:0001/block/mmcblk0/mmcblk0boot0
  26. lrwxrwxrwx 1 root root 0 2022-07-21 01:14 mmcblk0boot1 -> ../../devices/platform/ffe07000.emmc/mmc_host/emmc/emmc:0001/block/mmcblk0/mmcblk0boot1
  27. lrwxrwxrwx 1 root root 0 2022-07-21 01:14 mmcblk0rpmb -> ../../devices/platform/ffe07000.emmc/mmc_host/emmc/emmc:0001/block/mmcblk0/mmcblk0rpmb
  28. lrwxrwxrwx 1 root root 0 2022-07-21 01:14 odm -> ../../devices/platform/ffe07000.emmc/mmc_host/emmc/emmc:0001/block/mmcblk0/odm
  29. lrwxrwxrwx 1 root root 0 2022-07-21 01:14 param -> ../../devices/platform/ffe07000.emmc/mmc_host/emmc/emmc:0001/block/mmcblk0/param
  30. lrwxrwxrwx 1 root root 0 2022-07-21 01:14 product -> ../../devices/platform/ffe07000.emmc/mmc_host/emmc/emmc:0001/block/mmcblk0/product
  31. lrwxrwxrwx 1 root root 0 2022-07-21 01:14 ram0 -> ../../devices/virtual/block/ram0
  32. lrwxrwxrwx 1 root root 0 2022-07-21 01:14 ram1 -> ../../devices/virtual/block/ram1
  33. lrwxrwxrwx 1 root root 0 2022-07-21 01:14 ram10 -> ../../devices/virtual/block/ram10
  34. lrwxrwxrwx 1 root root 0 2022-07-21 01:14 ram11 -> ../../devices/virtual/block/ram11
  35. lrwxrwxrwx 1 root root 0 2022-07-21 01:14 ram12 -> ../../devices/virtual/block/ram12
  36. lrwxrwxrwx 1 root root 0 2022-07-21 01:14 ram13 -> ../../devices/virtual/block/ram13
  37. lrwxrwxrwx 1 root root 0 2022-07-21 01:14 ram14 -> ../../devices/virtual/block/ram14
  38. lrwxrwxrwx 1 root root 0 2022-07-21 01:14 ram15 -> ../../devices/virtual/block/ram15
  39. lrwxrwxrwx 1 root root 0 2022-07-21 01:14 ram2 -> ../../devices/virtual/block/ram2
  40. lrwxrwxrwx 1 root root 0 2022-07-21 01:14 ram3 -> ../../devices/virtual/block/ram3
  41. lrwxrwxrwx 1 root root 0 2022-07-21 01:14 ram4 -> ../../devices/virtual/block/ram4
  42. lrwxrwxrwx 1 root root 0 2022-07-21 01:14 ram5 -> ../../devices/virtual/block/ram5
  43. lrwxrwxrwx 1 root root 0 2022-07-21 01:14 ram6 -> ../../devices/virtual/block/ram6
  44. lrwxrwxrwx 1 root root 0 2022-07-21 01:14 ram7 -> ../../devices/virtual/block/ram7
  45. lrwxrwxrwx 1 root root 0 2022-07-21 01:14 ram8 -> ../../devices/virtual/block/ram8
  46. lrwxrwxrwx 1 root root 0 2022-07-21 01:14 ram9 -> ../../devices/virtual/block/ram9
  47. lrwxrwxrwx 1 root root 0 2022-07-21 01:14 recovery -> ../../devices/platform/ffe07000.emmc/mmc_host/emmc/emmc:0001/block/mmcblk0/recovery
  48. lrwxrwxrwx 1 root root 0 2022-07-21 01:14 reserved -> ../../devices/platform/ffe07000.emmc/mmc_host/emmc/emmc:0001/block/mmcblk0/reserved
  49. lrwxrwxrwx 1 root root 0 2022-07-21 01:14 rsv -> ../../devices/platform/ffe07000.emmc/mmc_host/emmc/emmc:0001/block/mmcblk0/rsv
  50. lrwxrwxrwx 1 root root 0 2022-07-21 01:14 system -> ../../devices/platform/ffe07000.emmc/mmc_host/emmc/emmc:0001/block/mmcblk0/system
  51. lrwxrwxrwx 1 root root 0 2022-07-21 01:14 tee -> ../../devices/platform/ffe07000.emmc/mmc_host/emmc/emmc:0001/block/mmcblk0/tee
  52. lrwxrwxrwx 1 root root 0 2022-07-21 01:14 vbmeta -> ../../devices/platform/ffe07000.emmc/mmc_host/emmc/emmc:0001/block/mmcblk0/vbmeta
  53. lrwxrwxrwx 1 root root 0 2022-07-21 01:14 vendor -> ../../devices/platform/ffe07000.emmc/mmc_host/emmc/emmc:0001/block/mmcblk0/vendor
  54. lrwxrwxrwx 1 root root 0 2022-07-21 01:14 zram0 -> ../../devices/virtual/block/zram0
  55. cmcc_jiangsu:/ #

        mount 缺省输出就是挂载信息:

  1. cmcc_jiangsu:/ # mount
  2. rootfs on / type rootfs (ro,seclabel)
  3. tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,mode=755)
  4. devpts on /dev/pts type devpts (rw,seclabel,relatime,mode=600,ptmxmode=000)
  5. proc on /proc type proc (rw,relatime)
  6. sysfs on /sys type sysfs (rw,seclabel,relatime)
  7. selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
  8. tmpfs on /mnt type tmpfs (rw,seclabel,nosuid,nodev,noexec,relatime,mode=755,gid=1000)
  9. /dev/block/odm on /odm type ext4 (ro,seclabel,relatime,data=ordered,inode_readahead_blks=8)
  10. /dev/block/product on /product type ext4 (ro,seclabel,relatime,block_validity,delalloc,barrier,user_xattr,acl,inode_readahead_blks=8)
  11. /dev/block/system on /system type ext4 (ro,seclabel,relatime,data=ordered,inode_readahead_blks=8)
  12. /dev/block/vendor on /vendor type ext4 (ro,seclabel,relatime,data=ordered,inode_readahead_blks=8)
  13. none on /acct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct)
  14. /sys/kernel/debug on /sys/kernel/debug type debugfs (rw,seclabel,relatime,mode=755)
  15. configfs on /sys/kernel/config type configfs (rw,relatime)
  16. none on /dev/stune type cgroup (rw,nosuid,nodev,noexec,relatime,schedtune)
  17. none on /config type configfs (rw,nosuid,nodev,noexec,relatime)
  18. none on /dev/cpuctl type cgroup (rw,nosuid,nodev,noexec,relatime,cpu)
  19. none on /dev/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset,noprefix,release_agent=/sbin/cpuset_release_agent)
  20. cg2_bpf on /dev/cg2_bpf type cgroup2 (rw,nosuid,nodev,noexec,relatime)
  21. bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime)
  22. pstore on /sys/fs/pstore type pstore (rw,seclabel,nosuid,nodev,noexec,relatime)
  23. tmpfs on /tmp type tmpfs (rw,seclabel,relatime)
  24. tmpfs on /tmp/capture type tmpfs (rw,seclabel,relatime)
  25. tracefs on /sys/kernel/debug/tracing type tracefs (rw,seclabel,relatime)
  26. /dev/block/data on /data type ext4 (rw,seclabel,nosuid,nodev,noatime,nodelalloc,resgid=1065,errors=panic,data=ordered)
  27. /dev/block/cache on /cache type ext4 (rw,seclabel,nosuid,nodev,noatime,nodelalloc,errors=panic,data=ordered)
  28. /dev/block/metadata on /metadata type ext4 (rw,seclabel,nosuid,nodev,noatime,nodelalloc,errors=panic,data=ordered)
  29. /dev/block/param on /mnt/vendor/param type ext4 (rw,seclabel,nosuid,nodev,noatime,nodelalloc,errors=panic,data=ordered)
  30. /dev/block/tee on /mnt/vendor/tee type ext4 (rw,seclabel,nosuid,nodev,noatime,nodelalloc,errors=panic,data=ordered)
  31. tmpfs on /storage type tmpfs (rw,seclabel,nosuid,nodev,noexec,relatime,mode=755,gid=1000)
  32. adb on /dev/usb-ffs/adb type functionfs (rw,relatime)
  33. /data/media on /mnt/runtime/default/emulated type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=1015,multiuser,mask=6,derive_gid,default_normal)
  34. /data/media on /storage/emulated type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=1015,multiuser,mask=6,derive_gid,default_normal)
  35. /data/media on /mnt/runtime/read/emulated type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,multiuser,mask=23,derive_id,default_normal)
  36. /data/media on /mnt/runtime/write/emulated type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,multiuser,mask=7,derive_gid,default_normal)
  37. cmcc_jiangsu:/ #

%%%%%

查看各分区容量

        显示单位是 records

1 records = 512 byte

        示例查看 mmcblk0 的状况 约等于 15 G

  1. cmcc_jiangsu:/ # cat /sys/class/block/mmcblk0/size
  2. 30535680
  3. cmcc_jiangsu:/ #

size = 30535680 / 2 = 15267840 KB = 14910 MB = 14.560546875 GB

——————————

查看硬件信息和系统属性

        硬件信息查看:

cat /system/build.prop

        单独查看系统属性

getprop > /tmp/getprop.txt

——————————

查看设备

  1. cmcc_jiangsu:/ # cat /proc/devices
  2. Character devices:
  3. 255 amstream
  4. 510 deinterlace
  5. 1 mem
  6. 511 display2
  7. 2 pty
  8. 257 dsp
  9. 3 ttyp
  10. 258 firmware_vdec
  11. 4 /dev/vc/0
  12. 4 tty
  13. 5 /dev/tty
  14. 5 /dev/console
  15. 5 /dev/ptmx
  16. 7 vcs
  17. 264 amvideo
  18. 10 misc
  19. 266 amaudio
  20. 13 input
  21. 269 vfm
  22. 270 ionvideo
  23. 271 vad
  24. 272 videosync
  25. 274 video_composer
  26. 276 v4lvideo
  27. 29 fb
  28. 81 video4linux
  29. 89 i2c
  30. 90 mtd
  31. 108 ppp
  32. 116 alsa
  33. 128 ptm
  34. 136 pts
  35. 153 spi
  36. 166 ttyACM
  37. 180 usb
  38. 188 ttyUSB
  39. 189 usb_device
  40. 212 DVB
  41. 216 rfcomm
  42. 235 amvideo_poll
  43. 236 tunnel_sync
  44. 237 ge2d
  45. 238 media-configs-dev
  46. 239 amremote
  47. 494 HevcEnc
  48. 240 ttyS
  49. 495 amvenc_avc
  50. 241 hidraw
  51. 496 amsubtitle
  52. 242 uio
  53. 497 dtb
  54. 243 bsg
  55. 498 audio_data_debug
  56. 244 wifi_power
  57. 499 unifykeys
  58. 245 watchdog
  59. 500 cec
  60. 246 display
  61. 501 smc
  62. 247 amhdmitx
  63. 502 vm
  64. 248 iio
  65. 503 amdolby_vision
  66. 249 ptp
  67. 504 amvecm
  68. 250 pps
  69. 505 picdec
  70. 251 rtc
  71. 506 ppmgr
  72. 252 cvbs
  73. 507 amvdec_csi
  74. 253 amvdac
  75. 508 hdmirx
  76. 254 gpiochip
  77. 509 vdin
  78. Block devices:
  79. 1 ramdisk
  80. 259 blkext
  81. 7 loop
  82. 8 sd
  83. 9 md
  84. 11 sr
  85. 31 mtdblock
  86. 65 sd
  87. 66 sd
  88. 67 sd
  89. 68 sd
  90. 69 sd
  91. 70 sd
  92. 71 sd
  93. 128 sd
  94. 129 sd
  95. 130 sd
  96. 131 sd
  97. 132 sd
  98. 133 sd
  99. 134 sd
  100. 135 sd
  101. 179 mmc
  102. 251 device-mapper
  103. 252 zram
  104. 253 virtblk
  105. 254 mdp
  106. cmcc_jiangsu:/ # ls /dev
  107. HevcEnc fuse ptyq5 tty44 ttyqe
  108. __properties__ ge2d ptyq6 tty45 ttyqf
  109. amaudio gpiochip0 ptyq7 tty46 tun
  110. amaudio_ctl gpiochip1 ptyq8 tty47 tunnel_sync
  111. amaudio_utils graphics ptyq9 tty48 ubi_ctrl
  112. amdolby_vision hw_random ptyqa tty49 uhid
  113. amhdmitx0 hwbinder ptyqb tty5 uinput
  114. amremote i2c-0 ptyqc tty50 uio0
  115. amstream_abuf input ptyqd tty51 unifykeys
  116. amstream_dves_avc ion ptyqe tty52 urandom
  117. amstream_dves_hevc ionvideo ptyqf tty53 usb-ffs
  118. amstream_hevc kmsg random tty54 usb_accessory
  119. amstream_hevc_frame kmsg_debug rfkill tty55 uvm
  120. amstream_hevc_sched loop-control rtc0 tty56 v4lvideo
  121. amstream_mpps mali0 snd tty57 vad
  122. amstream_mpts media socket tty58 vcs
  123. amstream_mpts_sched media.amports stune tty59 vcs1
  124. amstream_rm media.audio tty tty6 vcsa
  125. amstream_sub media.codec_mm tty0 tty60 vcsa1
  126. amstream_sub_read media.decoder tty1 tty61 vdin1
  127. amstream_userdata media.parser tty10 tty62 vfm
  128. amstream_vbuf media.tsync tty11 tty63 vga_arbiter
  129. amstream_vbuf_sched media.vfm tty12 tty7 video10
  130. amstream_vframe media.video tty13 tty8 video11
  131. amsubtitle memcg tty14 tty9 video12
  132. amvdac memory_bandwidth tty15 ttyS0 video13
  133. amvecm mtp_usb tty16 ttyS1 video14
  134. amvenc_avc network_latency tty17 ttyp0 video15
  135. amvideo network_throughput tty18 ttyp1 video16
  136. amvideo_poll null tty19 ttyp2 video17
  137. ashmem picdec tty2 ttyp3 video18
  138. audio_data_debug ppmgr tty20 ttyp4 video19
  139. audiodsp0 ppp tty21 ttyp5 video20
  140. autofs psaux tty22 ttyp6 video21
  141. binder ptmx tty23 ttyp7 video23
  142. bl40 pts tty24 ttyp8 video30
  143. block ptyp0 tty25 ttyp9 video31
  144. bus ptyp1 tty26 ttypa video32
  145. cec ptyp2 tty27 ttypb video33
  146. cg2_bpf ptyp3 tty28 ttypc video34
  147. console ptyp4 tty29 ttypd video35
  148. cpu_dma_latency ptyp5 tty3 ttype video36
  149. cpuctl ptyp6 tty30 ttypf video37
  150. cpuset ptyp7 tty31 ttyq0 video38
  151. cvbs ptyp8 tty32 ttyq1 video_composer.0
  152. device-mapper ptyp9 tty33 ttyq2 video_composer.1
  153. di0 ptypa tty34 ttyq3 videosync
  154. display ptypb tty35 ttyq4 videotunnel
  155. display2 ptypc tty36 ttyq5 vndbinder
  156. dtb ptypd tty37 ttyq6 watchdog
  157. esm ptype tty38 ttyq7 watchdog0
  158. esm_rx ptypf tty39 ttyq8 wifi_power
  159. event-log-tags ptyq0 tty4 ttyq9 xt_qtaguid
  160. fd ptyq1 tty40 ttyqa zero
  161. firmware_vdec ptyq2 tty41 ttyqb
  162. fscklogs ptyq3 tty42 ttyqc
  163. full ptyq4 tty43 ttyqd
  164. cmcc_jiangsu:/ #

——————————

安卓系统对分区进行格式化及挂载操作

%%%%%

fdisk 命令竟然报错

        CM311-1A 盒子的 fdisk 竟然不能用:

  1. cmcc_jiangsu:/ # fdisk --help
  2. BusyBox v1.26.2 bionic (2017-11-15 14:37 +0800) multi-call binary.
  3. Usage: fdisk [-ul] [-C CYLINDERS] [-H HEADS] [-S SECTORS] [-b SSZ] DISK
  4. Change partition table
  5. -u Start and End are in sectors (instead of cylinders) /* 开始和结束在扇区中 而不是柱面 */
  6. -l Show partition table for each DISK, then exit /* 显示每个磁盘的分区表,然后退出 */
  7. -b 2048 (for certain MO disks) use 2048-byte sectors /* 对于某些 MO 磁盘 使用 2048 字节扇区 */
  8. -C CYLINDERS Set number of cylinders/heads/sectors /* 设置 柱面/磁头/扇区 的数量 */
  9. -H HEADS
  10. -S SECTORS
  11. cmcc_jiangsu:/ # fdisk -l
  12. Segmentation fault
  13. 139|cmcc_jiangsu:/ #

        Segmentation fault 分段故障是为什么!!!

%%%%%

lsusb 或 lsusb2 命令查看 usb 设备

        还好 lsusb 可以用:

  1. cmcc_jiangsu:/ # lsusb --version
  2. toybox 0.7.6-android
  3. cmcc_jiangsu:/ # lsusb --help
  4. usage: lsusb
  5. List USB hosts/devices.
  6. cmcc_jiangsu:/ #

        然后还发现一个 lsusb2 好家伙:

  1. cmcc_jiangsu:/ # ls
  2. ls lsattr lshal lsmod lsof lspci lsusb lsusb2
  3. cmcc_jiangsu:/ # lsusb
  4. Bus 001 Device 001: ID 1d6b:0002
  5. Bus 002 Device 001: ID 1d6b:0003
  6. cmcc_jiangsu:/ # lsusb2
  7. 1d6b:0002 (bus 1, device 1)
  8. 1d6b:0003 (bus 2, device 1)
  9. cmcc_jiangsu:/ #

        插上 U 盘成功识别出来:

  1. cmcc_jiangsu:/ # lsusb
  2. Bus 001 Device 001: ID 1d6b:0002
  3. Bus 002 Device 001: ID 1d6b:0003
  4. Bus 001 Device 002: ID 0951:1642
  5. cmcc_jiangsu:/ # lsusb2
  6. 1d6b:0002 (bus 1, device 1)
  7. 1d6b:0003 (bus 2, device 1)
  8. 0951:1642 (bus 1, device 2)
  9. cmcc_jiangsu:/ #

        插上 USB 之前:

  1. cmcc_jiangsu:/ # df -h
  2. Filesystem Size Used Avail Use% Mounted on
  3. tmpfs 0.9G 516K 0.9G 1% /dev
  4. tmpfs 0.9G 0 0.9G 0% /mnt
  5. /dev/block/odm 122M 472K 122M 1% /odm
  6. /dev/block/product 126M 51M 75M 41% /product
  7. /dev/block/system 1.2G 738M 501M 60% /system
  8. /dev/block/vendor 310M 244M 66M 79% /vendor
  9. tmpfs 0.9G 0 0.9G 0% /tmp
  10. tmpfs 0.9G 0 0.9G 0% /tmp/capture
  11. /dev/block/data 10G 255M 10G 3% /data
  12. /dev/block/cache 976M 1.2M 975M 1% /cache
  13. /dev/block/metadata 11M 40K 11M 1% /metadata
  14. /dev/block/param 11M 860K 11M 8% /mnt/vendor/param
  15. /dev/block/tee 27M 28K 27M 1% /mnt/vendor/tee
  16. /data/media 10G 255M 10G 3% /mnt/runtime/default/emulated
  17. cmcc_jiangsu:/ # ls /dev
  18. HevcEnc fuse ptyq5 tty44 ttyqe
  19. __properties__ ge2d ptyq6 tty45 ttyqf
  20. amaudio gpiochip0 ptyq7 tty46 tun
  21. amaudio_ctl gpiochip1 ptyq8 tty47 tunnel_sync
  22. amaudio_utils graphics ptyq9 tty48 ubi_ctrl
  23. amdolby_vision hw_random ptyqa tty49 uhid
  24. amhdmitx0 hwbinder ptyqb tty5 uinput
  25. amremote i2c-0 ptyqc tty50 uio0
  26. amstream_abuf input ptyqd tty51 unifykeys
  27. amstream_dves_avc ion ptyqe tty52 urandom
  28. amstream_dves_hevc ionvideo ptyqf tty53 usb-ffs
  29. amstream_hevc kmsg random tty54 usb_accessory
  30. amstream_hevc_frame kmsg_debug rfkill tty55 uvm
  31. amstream_hevc_sched loop-control rtc0 tty56 v4lvideo
  32. amstream_mpps mali0 snd tty57 vad
  33. amstream_mpts media socket tty58 vcs
  34. amstream_mpts_sched media.amports stune tty59 vcs1
  35. amstream_rm media.audio tty tty6 vcsa
  36. amstream_sub media.codec_mm tty0 tty60 vcsa1
  37. amstream_sub_read media.decoder tty1 tty61 vdin1
  38. amstream_userdata media.parser tty10 tty62 vfm
  39. amstream_vbuf media.tsync tty11 tty63 vga_arbiter
  40. amstream_vbuf_sched media.vfm tty12 tty7 video10
  41. amstream_vframe media.video tty13 tty8 video11
  42. amsubtitle memcg tty14 tty9 video12
  43. amvdac memory_bandwidth tty15 ttyS0 video13
  44. amvecm mtp_usb tty16 ttyS1 video14
  45. amvenc_avc network_latency tty17 ttyp0 video15
  46. amvideo network_throughput tty18 ttyp1 video16
  47. amvideo_poll null tty19 ttyp2 video17
  48. ashmem picdec tty2 ttyp3 video18
  49. audio_data_debug ppmgr tty20 ttyp4 video19
  50. audiodsp0 ppp tty21 ttyp5 video20
  51. autofs psaux tty22 ttyp6 video21
  52. binder ptmx tty23 ttyp7 video23
  53. bl40 pts tty24 ttyp8 video30
  54. block ptyp0 tty25 ttyp9 video31
  55. bus ptyp1 tty26 ttypa video32
  56. cec ptyp2 tty27 ttypb video33
  57. cg2_bpf ptyp3 tty28 ttypc video34
  58. console ptyp4 tty29 ttypd video35
  59. cpu_dma_latency ptyp5 tty3 ttype video36
  60. cpuctl ptyp6 tty30 ttypf video37
  61. cpuset ptyp7 tty31 ttyq0 video38
  62. cvbs ptyp8 tty32 ttyq1 video_composer.0
  63. device-mapper ptyp9 tty33 ttyq2 video_composer.1
  64. di0 ptypa tty34 ttyq3 videosync
  65. display ptypb tty35 ttyq4 videotunnel
  66. display2 ptypc tty36 ttyq5 vndbinder
  67. dtb ptypd tty37 ttyq6 watchdog
  68. esm ptype tty38 ttyq7 watchdog0
  69. esm_rx ptypf tty39 ttyq8 wifi_power
  70. event-log-tags ptyq0 tty4 ttyq9 xt_qtaguid
  71. fd ptyq1 tty40 ttyqa zero
  72. firmware_vdec ptyq2 tty41 ttyqb
  73. fscklogs ptyq3 tty42 ttyqc
  74. full ptyq4 tty43 ttyqd
  75. cmcc_jiangsu:/ #

        插上 USB 之后:

  1. cmcc_jiangsu:/ # df -h
  2. Filesystem Size Used Avail Use% Mounted on
  3. tmpfs 0.9G 516K 0.9G 1% /dev
  4. tmpfs 0.9G 0 0.9G 0% /mnt
  5. /dev/block/param 11M 860K 11M 8% /mnt/vendor/param
  6. /dev/block/tee 27M 28K 27M 1% /mnt/vendor/tee
  7. /data/media 10G 255M 10G 3% /mnt/runtime/default/emulated
  8. /dev/block/odm 122M 472K 122M 1% /odm
  9. /dev/block/product 126M 51M 75M 41% /product
  10. /dev/block/system 1.2G 738M 501M 60% /system
  11. /dev/block/vendor 310M 244M 66M 79% /vendor
  12. tmpfs 0.9G 0 0.9G 0% /tmp
  13. tmpfs 0.9G 0 0.9G 0% /tmp/capture
  14. /dev/block/data 10G 255M 10G 3% /data
  15. /dev/block/cache 976M 1.2M 975M 1% /cache
  16. /dev/block/metadata 11M 40K 11M 1% /metadata
  17. /dev/block/vold/public:8,4 7.4G 3.2G 4.2G 44% /mnt/media_rw/B4FE-5315
  18. /mnt/media_rw/B4FE-5315 7.4G 3.2G 4.2G 44% /mnt/runtime/default/B4FE-5315
  19. cmcc_jiangsu:/ #

        每个目录都看一遍:

  1. cmcc_jiangsu:/ # ls /dev/block/vold -alh
  2. total 0
  3. drwx------ 2 root reserved_disk 80 2022-07-22 18:00 .
  4. drwxr-xr-x 4 root root 1.0K 2022-07-22 18:00 ..
  5. brw------- 1 root reserved_disk 8, 0 2022-07-22 18:00 disk:8,0
  6. brw------- 1 root reserved_disk 8, 4 2022-07-22 18:00 public:8,4
  7. cmcc_jiangsu:/ # ls /mnt/media_rw -alh
  8. total 2.0K
  9. drwxr-x--- 3 root media_rw 60 2022-07-22 18:00 .
  10. drwxr-xr-x 11 root system 240 2015-01-01 08:00 ..
  11. drwxrwx--- 9 media_rw media_rw 4.0K 2022-07-22 18:00 B4FE-5315
  12. cmcc_jiangsu:/ # ls /mnt/runtime/default -alh
  13. total 4.0K
  14. drwxr-xr-x 5 root root 100 2022-07-22 18:00 .
  15. drwx------ 5 root root 100 2015-01-01 08:00 ..
  16. drwxrwx--x 9 root sdcard_rw 4.0K 2022-07-22 18:00 B4FE-5315
  17. drwx--x--x 4 root sdcard_rw 4.0K 2015-01-01 08:00 emulated
  18. drwxr-xr-x 2 root root 60 2015-01-01 08:00 self
  19. cmcc_jiangsu:/ #

        最后确认设备为:

  1. /dev/block/vold/public\:8,4
  2. "/dev/block/vold/public:8,4"

%%%%%

格式化分区命令 mkfs.文件系统

        可以格式化成如下系统:

exfat

ext2

ext3

ext4

vfat

  1. cmcc_jiangsu:/ # mkfs
  2. mkfs.exfat mkfs.ext2 mkfs.ext3 mkfs.ext4 mkfs.vfat
  3. cmcc_jiangsu:/ # mkfs.

        现在我们就将 U 盘格式化为 exfat 文件系统:

  1. cmcc_jiangsu:/ # mkfs.exfat /dev/block/vold/public\:8,4
  2. mkexfatfs 1.3.0
  3. Creating... done.
  4. Flushing... done.
  5. File system created successfully.
  6. cmcc_jiangsu:/ #

        格式化成功 但是发现 df 还是旧的信息 而且 U 盘的挂载点也是旧的内容:

  1. cmcc_jiangsu:/ # df -h
  2. Filesystem Size Used Avail Use% Mounted on
  3. tmpfs 0.9G 516K 0.9G 1% /dev
  4. tmpfs 0.9G 0 0.9G 0% /mnt
  5. /dev/block/param 11M 860K 11M 8% /mnt/vendor/param
  6. /dev/block/tee 27M 28K 27M 1% /mnt/vendor/tee
  7. /data/media 10G 255M 10G 3% /mnt/runtime/default/emulated
  8. /dev/block/odm 122M 472K 122M 1% /odm
  9. /dev/block/product 126M 51M 75M 41% /product
  10. /dev/block/system 1.2G 738M 501M 60% /system
  11. /dev/block/vendor 310M 244M 66M 79% /vendor
  12. tmpfs 0.9G 0 0.9G 0% /tmp
  13. tmpfs 0.9G 0 0.9G 0% /tmp/capture
  14. /dev/block/data 10G 255M 10G 3% /data
  15. /dev/block/cache 976M 1.2M 975M 1% /cache
  16. /dev/block/metadata 11M 40K 11M 1% /metadata
  17. /dev/block/vold/public:8,4 7.4G 3.2G 4.2G 44% /mnt/media_rw/B4FE-5315
  18. /mnt/media_rw/B4FE-5315 7.4G 3.2G 4.2G 44% /mnt/runtime/default/B4FE-5315
  19. cmcc_jiangsu:/ # ls /mnt/media_rw/B4FE-5315/
  20. LOST.DIR boot efi support
  21. System\ Volume\ Information bootmgr setup.exe upgrade
  22. autorun.inf bootmgr.efi sources
  23. cmcc_jiangsu:/ #

        这可能需要重启一下系统

        重启过后再次查看挂载信息 发现 U 盘容量发生变化了 已经被清空了

        再查看 USB 挂载点的内容 也是空空如也:

  1. cmcc_jiangsu:/ # reboot
  2. C:\Users\byme>adb connect 192.168.0.103
  3. already connected to 192.168.0.103:5555
  4. C:\Users\byme>adb shell
  5. cmcc_jiangsu:/ # df -h
  6. Filesystem Size Used Avail Use% Mounted on
  7. tmpfs 0.9G 516K 0.9G 1% /dev
  8. tmpfs 0.9G 0 0.9G 0% /mnt
  9. /dev/block/odm 122M 472K 122M 1% /odm
  10. /dev/block/product 126M 51M 75M 41% /product
  11. /dev/block/system 1.2G 738M 501M 60% /system
  12. /dev/block/vendor 310M 244M 66M 79% /vendor
  13. tmpfs 0.9G 0 0.9G 0% /tmp
  14. tmpfs 0.9G 0 0.9G 0% /tmp/capture
  15. /dev/block/data 10G 255M 10G 3% /data
  16. /dev/block/cache 976M 1.2M 975M 1% /cache
  17. /dev/block/metadata 11M 40K 11M 1% /metadata
  18. /dev/block/param 11M 860K 11M 8% /mnt/vendor/param
  19. /dev/block/tee 27M 28K 27M 1% /mnt/vendor/tee
  20. /data/media 10G 255M 10G 3% /mnt/runtime/default/emulated
  21. /dev/block/vold/public:8,4 7.4G 96K 7.4G 1% /mnt/media_rw/BC92-F723
  22. /mnt/media_rw/BC92-F723 7.4G 96K 7.4G 1% /mnt/runtime/default/BC92-F723
  23. cmcc_jiangsu:/ # ls /mnt/media_rw/BC92-F723/ -alh
  24. total 16K
  25. drwxrwx--- 2 media_rw media_rw 32K 2022-07-22 18:31 .
  26. drwxr-x--- 3 root media_rw 60 2022-07-22 18:31 ..
  27. cmcc_jiangsu:/ #

        要知道以前这可是一个启动盘啊:

  1. cmcc_jiangsu:/ # ls /mnt/media_rw/B4FE-5315 -alh
  2. total 594K
  3. drwxrwx--- 9 media_rw media_rw 4.0K 2022-07-22 18:00 .
  4. drwxr-x--- 3 root media_rw 60 2022-07-22 18:00 ..
  5. drwxrwx--- 2 media_rw media_rw 4.0K 2022-07-22 18:00 LOST.DIR
  6. drwxrwx--- 2 media_rw media_rw 4.0K 2022-05-30 06:26 System\ Volume\ Informatio
  7. n
  8. -rwxrwx--- 1 media_rw media_rw 122 2011-04-13 00:18 autorun.inf
  9. drwxrwx--- 4 media_rw media_rw 4.0K 2011-04-13 00:18 boot
  10. -rwxrwx--- 1 media_rw media_rw 375K 2011-04-13 00:18 bootmgr
  11. -rwxrwx--- 1 media_rw media_rw 654K 2011-04-13 00:18 bootmgr.efi
  12. drwxrwx--- 3 media_rw media_rw 4.0K 2011-04-13 00:18 efi
  13. -rwxrwx--- 1 media_rw media_rw 104K 2011-04-13 00:18 setup.exe
  14. drwxrwx--- 10 media_rw media_rw 16K 2011-04-13 00:18 sources
  15. drwxrwx--- 5 media_rw media_rw 4.0K 2011-04-13 00:18 support
  16. drwxrwx--- 3 media_rw media_rw 4.0K 2011-04-13 00:18 upgrade
  17. cmcc_jiangsu:/ #

%%%%%

mount 挂载 U 盘设备后就能操作了

        将 U 盘挂载到指定位置 对该位置进行操作就是对 USB 进行操作!

        示例操作 都标注了注释:

  1. cmcc_jiangsu:/ # cd mnt /* 进入 /mnt 目录 */
  2. cmcc_jiangsu:/mnt # ls /* 查看目录内容 */
  3. appfuse asec expand media_rw obb runtime sdcard secure user vendor
  4. cmcc_jiangsu:/mnt # mkdir usb_dir /* 创建 U 盘挂载点 */
  5. cmcc_jiangsu:/mnt # mount /dev/block/vold/public\:8,4 usb_dir /* 将 U 盘挂载到这里 */
  6. cmcc_jiangsu:/mnt # df -h /* 发现 df 的缓存信息还没刷新 没关系 实际上已经挂载好了 */
  7. Filesystem Size Used Avail Use% Mounted on
  8. tmpfs 0.9G 516K 0.9G 1% /dev
  9. tmpfs 0.9G 0 0.9G 0% /mnt
  10. /dev/block/odm 122M 472K 122M 1% /odm
  11. /dev/block/product 126M 51M 75M 41% /product
  12. /dev/block/system 1.2G 738M 501M 60% /system
  13. /dev/block/vendor 310M 244M 66M 79% /vendor
  14. tmpfs 0.9G 0 0.9G 0% /tmp
  15. tmpfs 0.9G 0 0.9G 0% /tmp/capture
  16. /dev/block/data 10G 255M 10G 3% /data
  17. /dev/block/cache 976M 1.2M 975M 1% /cache
  18. /dev/block/metadata 11M 40K 11M 1% /metadata
  19. /dev/block/param 11M 860K 11M 8% /mnt/vendor/param
  20. /dev/block/tee 27M 28K 27M 1% /mnt/vendor/tee
  21. /data/media 10G 255M 10G 3% /mnt/runtime/default/emulated
  22. /dev/block/vold/public:8,4 7.4G 96K 7.4G 1% /mnt/media_rw/BC92-F723
  23. /mnt/media_rw/BC92-F723 7.4G 96K 7.4G 1% /mnt/runtime/default/BC92-F723
  24. cmcc_jiangsu:/mnt # touch /mnt/usb_dir/usb_1.txt /* 在挂载处创建一个文件 */
  25. cmcc_jiangsu:/mnt # ls usb_dir /* 查看挂载点目录内容 */
  26. usb_1.txt
  27. cmcc_jiangsu:/mnt # ls /mnt/media_rw/BC92-F723 /* 发现确实是对 U 盘设备进行操作 */
  28. usb_1.txt
  29. cmcc_jiangsu:/mnt #

%%%%%

umount 卸载 USB 设备

        使用完毕 就需要卸载 U 盘

  1. cmcc_jiangsu:/mnt # umount usb_dir /* 卸载挂载点 */
  2. cmcc_jiangsu:/mnt # df -h /* 查看 df 缓存信息还是没刷新出来 但是已经成功卸载了 */
  3. Filesystem Size Used Avail Use% Mounted on
  4. tmpfs 0.9G 516K 0.9G 1% /dev
  5. tmpfs 0.9G 0 0.9G 0% /mnt
  6. /dev/block/odm 122M 472K 122M 1% /odm
  7. /dev/block/product 126M 51M 75M 41% /product
  8. /dev/block/system 1.2G 738M 501M 60% /system
  9. /dev/block/vendor 310M 244M 66M 79% /vendor
  10. tmpfs 0.9G 0 0.9G 0% /tmp
  11. tmpfs 0.9G 0 0.9G 0% /tmp/capture
  12. /dev/block/data 10G 255M 10G 3% /data
  13. /dev/block/cache 976M 1.2M 975M 1% /cache
  14. /dev/block/metadata 11M 40K 11M 1% /metadata
  15. /dev/block/param 11M 860K 11M 8% /mnt/vendor/param
  16. /dev/block/tee 27M 28K 27M 1% /mnt/vendor/tee
  17. /data/media 10G 255M 10G 3% /mnt/runtime/default/emulated
  18. /dev/block/vold/public:8,4 7.4G 96K 7.4G 1% /mnt/media_rw/BC92-F723
  19. /mnt/media_rw/BC92-F723 7.4G 96K 7.4G 1% /mnt/runtime/default/BC92-F723
  20. cmcc_jiangsu:/mnt # ls usb_dir/ /* 不信看一下挂载点 是空的哦! */
  21. cmcc_jiangsu:/mnt #

        然后就可以拔出来了!

        插上我们的 Windows 系统查看 确实操作成功了:

插上我们的 Windows 系统查看

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/从前慢现在也慢/article/detail/134494
推荐阅读
相关标签
  

闽ICP备14008679号