Florian Mayer | 6e129a4 | 2022-01-19 14:03:44 -0800 | [diff] [blame] | 1 | # Copyright (C) 2022 The Android Open Source Project |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
| 15 | on property:arm64.memtag.bootctl=* |
Florian Mayer | c43870f | 2023-03-23 13:23:50 -0700 | [diff] [blame] | 16 | exec -- /system/bin/mtectrl ${arm64.memtag.bootctl:-none} ${persist.device_config.runtime_native_boot.bootloader_override:-default} |
Florian Mayer | 965e509 | 2022-07-27 14:52:29 -0700 | [diff] [blame] | 17 | |
Florian Mayer | c43870f | 2023-03-23 13:23:50 -0700 | [diff] [blame] | 18 | on property:persist.device_config.runtime_native_boot.bootloader_override=* |
| 19 | exec -- /system/bin/mtectrl ${arm64.memtag.bootctl:-none} ${persist.device_config.runtime_native_boot.bootloader_override:-default} |
Florian Mayer | f6658f0 | 2022-09-21 12:55:33 -0700 | [diff] [blame] | 20 | |
Florian Mayer | 54835d3 | 2022-11-04 15:48:33 -0700 | [diff] [blame] | 21 | # adbd gets initialized in init, so run before that. this makes sure that the |
| 22 | # user does not change the value before we initialize it |
| 23 | on early-init && property:ro.arm64.memtag.bootctl_supported=1 |
Florian Mayer | f6658f0 | 2022-09-21 12:55:33 -0700 | [diff] [blame] | 24 | exec -- /system/bin/mtectrl -s arm64.memtag.bootctl |
Florian Mayer | 1af018f | 2022-10-28 10:47:46 -0700 | [diff] [blame] | 25 | |
| 26 | on shutdown && property:ro.arm64.memtag.bootctl_supported=1 |
Florian Mayer | c43870f | 2023-03-23 13:23:50 -0700 | [diff] [blame] | 27 | exec -- /system/bin/mtectrl ${arm64.memtag.bootctl:-none} ${persist.device_config.runtime_native_boot.bootloader_override:-default} |