[Detail] Because Android P impose so many restrictions, it is difficult for meta mode or factory mode to format partitions. A new design is adopted as follows: 1. Meta mode or factory mode write all 0 to first 4KB of target partition. 2. When entering kernel booting, the partition mount process in the original init flow find that XXX partition is wiped and automatically format XXX partition. In step-1 described above, selinux rules shall be added for meta_tst or factory. In step-2 described above, selinux rules shall be added for mke2fs. MTK-Commit-Id: 7e9bbd418ca6353ba89ecffdc016c78504583bf3 Change-Id: I3dd869c57107b0ebebf3134f69c50744df8f8ff9 CR-Id: ALPS03957630 Feature: SP META Tool
21 lines
780 B
Plaintext
21 lines
780 B
Plaintext
# ==============================================
|
|
# MTK Policy Rule
|
|
# ==============================================
|
|
|
|
# Date : WK17.32
|
|
# Operation : Migration
|
|
# Purpose : create ext4 images for protect1/protect2/persist/nvdata/nvcfg block devices.
|
|
allow e2fs protect1_block_device:blk_file rw_file_perms;
|
|
allow e2fs protect2_block_device:blk_file rw_file_perms;
|
|
allow e2fs persist_block_device:blk_file rw_file_perms;
|
|
allow e2fs nvdata_device:blk_file rw_file_perms;
|
|
allow e2fs nvcfg_block_device:blk_file rw_file_perms;
|
|
|
|
allow e2fs devpts:chr_file {read write};
|
|
|
|
# Date : WK18.23
|
|
# Operation: P migration
|
|
# Purpose : Allow mke2fs to format userdata and cache partition
|
|
allow e2fs cache_block_device:blk_file rw_file_perms;
|
|
allow e2fs userdata_block_device:blk_file rw_file_perms;
|