安卓机型玩机搞机刷写第三方twrp存储出现乱码 存储不显示等情况都是没有解密data分区的原因。用户需要在twrp里格式化data分区重启后存储显示正常。那么这个操作后你的数据分区就会呗彻底清除。
今天主要解析下如何操作可以永久解密data分区。其实data分区加密原则上也是厂商为了用户安全。简单来说。如果你设置了开机密码。但手机系统没有加密data分区。其他有能力者很轻松就可以获取到你data分区里面设置保存的密码。此操作后原则上任何第三方twrp都可以正常挂载data分区.读取data分区所有数据.步骤如下;
💔💔💔1---首先要进行开头名为fstab的类似fstab.qcom文件的修改操作。fstab开头的文件都需要按此方法进行修改
目录
💔💔💔1---首先要进行开头名为fstab的类似fstab.qcom文件的修改操作。fstab开头的文件都需要按此方法进行修改
💔💔💔机型不同。略有不同
💔💔💔在这个文件用 Notepad++打开或者搜索类似fileencryption=ice,wrappedkey,keydirectory=/metadata/vold/metadata_encryption代码
/dev/block/bootdevice/by-name/userdata /data f2fs noatime,nosuid,nodev,discard,reserve_root=32768,resgid=1065,fsync_mode=nobarrier,inlinecrypt latemount,wait,check,formattable,encryptable=aes-256-xts:aes-256-cts:v2+inlinecrypt_optimized+wrappedkey_v0,metadata_encryption=aes-256-xts:wrappedkey_v0,keydirectory=/metadata/vold/metadata_encryption,quota,reservedsize=128M,sysfs_path=/sys/devices/platform/soc/1d84000.ufshc,checkpoint=fs
💔💔💔fstab.emmc这个文件里也有类似
# 1 "vendor/mediatek/proprietary/hardware/fstab/mt6877/fstab.in.emmc"
# 1 "<built-in>" 1
# 1 "<built-in>" 3
# 341 "<built-in>" 3
# 1 "<command line>" 1
# 1 "<built-in>" 2
# 1 "vendor/mediatek/proprietary/hardware/fstab/mt6877/fstab.in.emmc" 2
# 141 "vendor/mediatek/proprietary/hardware/fstab/mt6877/fstab.in.emmc"
system /system ext4 ro wait,slotselect,avb=vbmeta_system,logical,first_stage_mount,avb_keys=/avb/q-gsi.avbpubkey:/avb/r-gsi.avbpubkey:/avb/s-gsi.avbpubkeyvendor /vendor ext4 ro wait,slotselect,avb,logical,first_stage_mountproduct /product ext4 ro wait,slotselect,avb,logical,first_stage_mount/dev/block/by-name/metadata /metadata ext4 noatime,nosuid,nodev,discard wait,check,formattable,first_stage_mount/dev/block/by-name/userdata /data f2fs noatime,nosuid,nodev,discard,noflush_merge,fsync_mode=nobarrier,reserve_root=134217,resgid=1065,inlinecrypt wait,check,formattable,quota,reservedsize=128m,latemount,resize,checkpoint=fs,fileencryption=aes-256-xts:aes-256-cts:v2,keydirectory=/metadata/vold/metadata_encryption,fsverity/dev/block/by-name/protect1 /mnt/vendor/protect_f ext4 noatime,nosuid,nodev,noauto_da_alloc,commit=1,nodelalloc wait,check,formattable
/dev/block/by-name/protect2 /mnt/vendor/protect_s ext4 noatime,nosuid,nodev,noauto_da_alloc,commit=1,nodelalloc wait,check,formattable
/dev/block/by-name/nvdata /mnt/vendor/nvdata ext4 noatime,nosuid,nodev,noauto_da_alloc,commit=1,nodelalloc wait,check,formattable
/dev/block/by-name/nvcfg /mnt/vendor/nvcfg ext4 noatime,nosuid,nodev,noauto_da_alloc,commit=1,nodelalloc wait,check,formattable
💔💔💔mtk芯片中fstab.68**中也有类似代码
# 1 "vendor/mediatek/proprietary/hardware/fstab/mt6877/fstab.in.mt6877"
# 1 "<built-in>" 1
# 1 "<built-in>" 3
# 341 "<built-in>" 3
# 1 "<command line>" 1
# 1 "<built-in>" 2
# 1 "vendor/mediatek/proprietary/hardware/fstab/mt6877/fstab.in.mt6877" 2
# 143 "vendor/mediatek/proprietary/hardware/fstab/mt6877/fstab.in.mt6877"
system /system ext4 ro wait,slotselect,avb=vbmeta_system,logical,first_stage_mount,avb_keys=/avb/q-gsi.avbpubkey:/avb/r-gsi.avbpubkey:/avb/s-gsi.avbpubkey
system /system erofs ro wait,slotselect,avb=vbmeta_system,logical,first_stage_mount,avb_keys=/avb/q-gsi.avbpubkey:/avb/r-gsi.avbpubkey:/avb/s-gsi.avbpubkeyvendor /vendor ext4 ro wait,slotselect,avb,logical,first_stage_mount
vendor /vendor erofs ro wait,slotselect,avb,logical,first_stage_mountproduct /product ext4 ro wait,slotselect,avb,logical,first_stage_mount
product /product erofs ro wait,slotselect,avb,logical,first_stage_mount/dev/block/by-name/metadata /metadata ext4 noatime,nosuid,nodev,discard wait,check,formattable,first_stage_mount/dev/block/by-name/userdata /data f2fs noatime,nosuid,nodev,discard,noflush_merge,fsync_mode=nobarrier,reserve_root=134217,resgid=1065,inlinecrypt wait,check,formattable,quota,reservedsize=128m,latemount,resize,checkpoint=fs,fileencryption=aes-256-xts:aes-256-cts:v2+inlinecrypt_optimized,keydirectory=/metadata/vold/metadata_encryption,fsverity/dev/block/by-name/rescue /cache ext4 noatime,nosuid,nodev,noauto_da_alloc,discard wait,check,formattable/dev/block/by-name/protect1 /mnt/vendor/protect_f ext4 noatime,nosuid,nodev,noauto_da_alloc,commit=1,nodelalloc wait,check,formattable
/dev/block/by-name/protect2 /mnt/vendor/protect_s ext4 noatime,nosuid,nodev,noauto_da_alloc,commit=1,nodelalloc wait,check,formattable
/dev/block/by-name/nvdata /mnt/vendor/nvdata ext4 noatime,nosuid,nodev,noauto_da_alloc,commit=1,nodelalloc wait,check,formattable
/dev/block/by-name/nvcfg /mnt/vendor/nvcfg ext4 noatime,nosuid,nodev,noauto_da_alloc,commit=1,nodelalloc wait,check,formattable/dev/block/by-name/persist /mnt/vendor/persist ext4 noatime,nosuid,nodev,noauto_da_alloc,commit=1,nodelalloc wait,check,formattable
删掉这段代码然后保存。重启系统即可.data加密的判断方式:格式化data后,第一次开机时,读取【/vendor/etc/fstab.qcom】文件,该文件是否存在上面我们删除的代码,如果存在,则对data进行加密操作,若不存在,则不对data进行data操作。
💔💔💔在一些早期mtk芯片中。在fstab.xx文件中可以搜索/dev/block/platform/mtk-msdc.0/by-name/userdata /data ext4
noatime,nosuid,nodev,noauto_da_alloc,discard wait,check,resiz
e,forceencrypt=footer
将 "forceencrypt=footer" 改成"encryptable=footer".
在/dev/block/platform/mtk-msdc.0/by-name/userdata /data ext4
noatime,nosuid,nodev,noauto_da_alloc,discard wait,check,resiz
e,forceencrypt=/dev/block/platform/mtk-msdc.0/by-name/metadata
将: "forceencrypt=/dev/block/platform/mtk-msdc.0/by-name/metadata" 改成
"encryptable=/dev/block/platform/mtk-msdc.0/by-name/metadata"
此时将默认加密改成默认不加密
机型和版本不同。可能操作完效果也有不同。具体实测。有的机型还有fstab.开头好几个文件,都需要按此方法修改。此种方法可以直接在第三方包里进行修改。修改完写入手机data分区就是解密状态。也可以开机状态root下手机端使用工具进行修改。
最后说下一个小技巧
小米系列机型如果未登录账号且要安装软件时会提示未通过小米安全审核让你登陆账号。否则不让你安装。可以在安装软件时断网。断开数据和wifi链接或者飞行模式。此时在安装软件就不会有提示,可以正常安装。