blob: a474cdcf9ba48620713305dc3ceab224636fa1a7 [file] [log] [blame]
Florian Mayer6e129a42022-01-19 14:03:44 -08001# 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
15on property:arm64.memtag.bootctl=*
Florian Mayerc43870f2023-03-23 13:23:50 -070016 exec -- /system/bin/mtectrl ${arm64.memtag.bootctl:-none} ${persist.device_config.runtime_native_boot.bootloader_override:-default}
Florian Mayer965e5092022-07-27 14:52:29 -070017
Florian Mayerc43870f2023-03-23 13:23:50 -070018on 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 Mayerf6658f02022-09-21 12:55:33 -070020
Florian Mayer54835d32022-11-04 15:48:33 -070021# 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
23on early-init && property:ro.arm64.memtag.bootctl_supported=1
Florian Mayerf6658f02022-09-21 12:55:33 -070024 exec -- /system/bin/mtectrl -s arm64.memtag.bootctl
Florian Mayer1af018f2022-10-28 10:47:46 -070025
26on shutdown && property:ro.arm64.memtag.bootctl_supported=1
Florian Mayerc43870f2023-03-23 13:23:50 -070027 exec -- /system/bin/mtectrl ${arm64.memtag.bootctl:-none} ${persist.device_config.runtime_native_boot.bootloader_override:-default}