Jaegeuk Kim | 3bcf1e5 | 2024-11-09 16:23:56 -0800 | [diff] [blame] | 1 | #!/vendor/bin/sh |
| 2 | # |
| 3 | # The script belongs to the feature of UFS FFU via OTA: go/p23-ffu-ota |
| 4 | # Its purpose is to copy the corresponding firmware into partition for UFS FFU. |
| 5 | |
| 6 | |
| 7 | property="persist.vendor.intelligence" |
| 8 | partition="/dev/block/by-name/userdata_exp.ai" |
| 9 | mount_point="/data/vendor/intelligence" |
| 10 | backend_file="/data/userdata_exp.ai" |
| 11 | |
| 12 | request=`getprop $property` |
| 13 | |
| 14 | if [ "$request" == "on" ]; then |
| 15 | mounted=`grep $mount_point /proc/mounts` |
| 16 | if [ "$mounted" ]; then |
| 17 | setprop $property on |
| 18 | else |
| 19 | setprop $property remove |
| 20 | fi |
| 21 | elif [ "$request" == "off" ]; then |
| 22 | dd if=/dev/zero of=$partition bs=4k count=2 |
| 23 | setprop $property remove |
| 24 | fi |