By persist.vendor.intelligence, # on -> mount(ok) -> on # off -> write_zeroes -> remove -> rm(ok) -> disable # on -> mount(fail) -> remove -> rm(ok) -> disable For SEpolicy, type=1400 audit(1731445557.444:32): avc: denied { read } for comm="kworker/u16:3" path="/dev/block/sda33" dev="tmpfs" ino=1050 scontext=u:r:kernel:s0 tcontext=u:object_r:userdata_exp_block_device:s0 tclass=blk_file permissive=1 type=1400 audit(1731445557.476:33): avc: denied { execute_no_trans } for comm="storage_intelli" path="/vendor/bin/toolbox" dev="dm-11" ino=368 scontext=u:r:storage_intelligence:s0 tcontext=u:object_r:vendor_toolbox_exec:s0 tclass=file permissive=1 type=1400 audit(1731448933.292:16): avc: denied { search } for comm="dd" name="block" dev="tmpfs" ino=12 scontext=u:r:storage_intelligence:s0 tcontext=u:object_r:block_device:s0 tclass=dir permissive=1 type=1400 audit(1731461590.844:16): avc: denied { write } for comm="dd" name="sda33" dev="tmpfs" ino=1052 scontext=u:r:storage_intelligence:s0 tcontext=u:object_r:userdata_exp_block_device:s0 tclass=blk_file permissive=1 type=1400 audit(1731461590.844:17): avc: denied { open } for comm="dd" path="/dev/block/sda33" dev="tmpfs" ino=1052 scontext=u:r:storage_intelligence:s0 tcontext=u:object_r:userdata_exp_block_device:s0 tclass=blk_file permissive=1 Bug: 378120929 Flag: build.RELEASE_PIXEL_VENDOR_INTELLIGENCE_AID Change-Id: If9d2f067e29b6c574d3b827ea509fec92c6d8028 Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
24 lines
633 B
Bash
Executable file
24 lines
633 B
Bash
Executable file
#!/vendor/bin/sh
|
|
#
|
|
# The script belongs to the feature of UFS FFU via OTA: go/p23-ffu-ota
|
|
# Its purpose is to copy the corresponding firmware into partition for UFS FFU.
|
|
|
|
|
|
property="persist.vendor.intelligence"
|
|
partition="/dev/block/by-name/userdata_exp.ai"
|
|
mount_point="/data/vendor/intelligence"
|
|
backend_file="/data/userdata_exp.ai"
|
|
|
|
request=`getprop $property`
|
|
|
|
if [ "$request" == "on" ]; then
|
|
mounted=`grep $mount_point /proc/mounts`
|
|
if [ "$mounted" ]; then
|
|
setprop $property on
|
|
else
|
|
setprop $property remove
|
|
fi
|
|
elif [ "$request" == "off" ]; then
|
|
dd if=/dev/zero of=$partition bs=4k count=2
|
|
setprop $property remove
|
|
fi
|