windows访问ext4文件系统_Android 分区与文件系统

9d0ba900ac58d3664b51027d2c81d58f.png 作者丨DebugCat  来源丨DebugCat 像Windows分盘一样,Android 设备上也有几个重要分区,用来组织和存储特定的数据

Android 分区

之所以是独立分区,是因为各自有对应的功能和用途的考量,可以进行单独读写和格式化。 进入adb shell, 通过 df 命令查看分区 99a38526fd15067a5d431224e1766696.png

/boot

这个分区主要包含 android kernel映像 和 ramdisk(一种将一部分RAM模拟为硬盘的技术,用于提高文件访问速度)。如果此分区被擦除,Android系统将无法启动,除非重建这个分区,或者重新安装包含此分区的ROM。

/system

此分区只读不可写,主要存放Android框架及其相关的配置,包括系统预装app。,擦除这个分区系统仍可启动,可以通过进入recovery模式或者bootloader安装新ROM的形式恢复。 3485b7e860139a2bbdc7f12e6574a3a4.png

/recovery

从名字也可以看出来,这个分区主要是备份区域,一旦上述分区被损坏,可以通过引导进入此分区机型恢复,通常我们所说的刷机就是在此分区进行。

/data

也叫用户数据区,对开发者来说这也是最重要的分区之一,主要包含用户安装的应用、短信、设置等数据。如果擦除此区域,相当于重置系统,即恢复出厂默认设置。
/data/app/com.xxxx/ 以包名存放应用安装文件,包括base.apk /lib/data/data/com.xxxx/ 存放应用数据,包括sp、db等/data/dalvik-cache 以包名存放优化过的应用dex文件 519d56631348ebbf104dc13469b02413.png

/cache

Android系统缓存区域,保存系统最常访问的数据和应用程序。擦除后会重新生成,无重大影响。

/misc

此分区包含一些系统功能的设置开关和数据,比如USB设置和一些硬件设置等。如果此分区损坏会导致手机某些特定功能无法正常工作。

/sdcard

外置存储分区,主要用于存储一些用户应用数据,比如图片视频等,可安全擦除。

/vendor

厂商定制分区,厂商的某些系统升级可以通过这个分区来实现。 小结:这几大分区,平时开发中我们关注比较多的是/system 和 /data ,尤其用户数据区,用户安装的应用在/data/app/com.xxxx中,应用的相关数据存储在/data/data/com.xxxx中。还有其他比较重要的/data/dalvik-cache等,感兴趣的可以了解这一分区的详细结构。

Android文件系统

文件系统是建立在物理存储上的一套存储和检索系统,所以在同一物理设备的基础上,文件系统的设计好坏也会明显影响整个文件读取和写入的性能表现。

Ext4

Android操作系统依托于Linux,所以主要的文件系统也是从Linux中发展而来,包括exFAT、ext3、ext4等,目前大多数手机仍使用Ext4,但相对于手机上使用的闪存设备来说,Ext4这一基于Linux的文件系统还有很大的优化空间。

F2FS

F2FS “Flash Friendly File System”,一种专门为闪存而生的文件系统,其优势就是小文件的传输速率更快。近年来不断的有旗舰机采用这一文件系统,华为、OnePlus、三星等,也使得这一文件系统在高端机上得到普及,促进了它的不断优化和兼容性。

Ext4 vs F2FS

  • F2FS 随机读写速度更快
  • F2FS减少写的次数,延长固件寿命
  • F2FS小文件读写速度更快,降低整理碎片开销
  • Ext4 普及率更高,兼容性更好
  • Ext 4 大文件读取吊打 F2FS
这里只是介绍,对二者感兴趣的可以参考以下几篇文章: DIFFERENCE BETWEEN F2FS AND EXT4 FILE SYSTEM android file system 安卓手机文件系统的二次革命,F2FS后再看EROFS 带你飞! 给你的 Android 手机换个文件系统

总结

主要了解了Android中几个重要的分区,其中/system、/data分区是日常开发中比较关心的,另外介绍了Android两种文件系统,对比了其优劣。应用开发者可能也会关心上层这些文件的访问,系统提供了Environment类, 源码比较简单,可以参考 Environment

1045e9410a8169eb04ca5e8718d3fffb.png

近期精彩内容推荐:  

55c9bcff07613f36e9878531b02f2dba.png 直播界要哭了!罗永浩进军电商直播

55c9bcff07613f36e9878531b02f2dba.png 人家裁员我加薪,他凭什么身价1200亿?

55c9bcff07613f36e9878531b02f2dba.png 什么?你还在使用fastjson,性能太差了

55c9bcff07613f36e9878531b02f2dba.png 2020年抖音用户画像报告

7208940030ba9090d8a50c7d3ef3a310.png

f78fa357744ef17434392c923489d477.png

在看点这里08fb07cf4db08c09598a9171113c13b0.gif好文分享给更多人↓↓

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
可以读写Ext2,以Ext2方式挂载Ext3文件系统(不支持Ext3日志),不支持中文! It provides Windows NT4.0/2000/XP/2003/Vista/2008 with full access to Linux Ext2 volumes (read access andwrite access). This may be useful if you have installed both Windows and Linux as a dual boot environment on your computer. What features are supported? Complete reading and writing access to files and directories of volumes with theExt2 orExt3 file system. Supports features which are specific to the I/O-system of Windows: Byte Range Locks, Directory Notfication (so the Explorer updates the view of a directory on changes within that directory), Oplocks (so SMB clients are able to cache the content of files). Allows Windows to run with paging files on Ext2 volumes. UTF-8 encoded file names are supported. The driver treats files with file names that start with a dot "." character ashidden. Supports GPT disks if the Windows version used also does. Supports use of the Windows mountvol utility to create or delete drive letters for Ext2 volumes (except on Windows NT 4.0). See also section"Can drive letters also be configured from scripts?". What features are *not* supported? Inodes that are larger than 128 bytes are not supported. Access rights are not maintained. All users can access all the directories and files of an Ext2 volume. If a new file or directory is created, it inherits all the permissions, the GID and the UID from the directory where it has been created. There is one exception to this rule: a file (but not a directory) the driver has created always has cleared "x" permissions, it inherits the "r" and the "w" permissions only. See also section"What limitations arise from not maintaining access rights?". The driver does not allow accessing special files at Ext2 volumes, the access will be always denied. (Special files are sockets, soft links, block devices, character devices and pipes.) Alternate 8.3-DOS names are not supported (just because there is no place to store them in an Ext2 file system). This can prevent legacy DOS applications, executed by the NTVDM of Windows, from accessing some files or directories. Currently the driver does not implement defragging support. So defragmentation applications will neither show fragmentation information nor defragment any Ext2 volume. This software does not achieve booting a Windows operating system from an Ext2 volume. LVM volumes are not supported, so it is not possible to access them.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值