1 需要关闭data区域加密
MTK_ENCRYPTION_DEFAULT_OFF = yes
MTK_ENCRYPTION_FDE_TO_FBE = no
MTK_ENCRYPTION_TYPE_FILE = no
/vendor/mediatek/proprietary/hardware/fstab/mtXXXX/fstab.in
5/* Can overwrite FDE setting by defining __MTK_FDE_NO_FORCE and __MTK_FDE_TYPE_FILE in this file */
6/* For example, you can un-comment the following line to disable FDE for all projects in this platform. */
7//#define __MTK_FDE_NO_FORCE //打开此项, 即默认不强制加密.
8#ifdef __MTK_FDE_NO_FORCE
9 #define FLAG_FDE_AUTO encryptable
10#else
11 #define FLAG_FDE_AUTO forceencrypt
12#endif
13#ifdef __MTK_FDE_TYPE_FILE
14 #define FLAG_FDE_TYPE fileencryption
15#else
16 #define FLAG_FDE_TYPE
17#endif
18#ifdef __MTK_FDE_TO_FBE
19 #define FLAG_FDE_TYPE forcefdeorfbe
20#else
21 #define FLAG_FDE_TYPE
22#endif
2 需要在recovery模式下更换升级路径
if(update_package != NULL) {
if(strncmp(update_package, "/storage/emulated/0/", 20) == 0) {
int len = strlen(update_package) + 20;
char* modified_path = (char*)malloc(len);
if (modified_path) {
strlcpy(modified_path, "/data/media/0/", len);
strlcat(modified_path, update_package+20, len);
ui->Print("(replacing path \"%s\" with \"%s\")\n",
update_package, modified_path);
update_package = modified_path;
} else {
ui->Print("modified_path allocation failed\n");
}
}
}
可以自己尝试在recovery 模式下挂载system区域和data区域
mount -rw -t ext4 /dev/block/mmcblk0p24 /data
mount -rw -t ext4 /dev/block/mmcblk0p23 /cache