1#
2# Copyright (C) 2019 The Android Open Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8#      http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16
17service lpdumpd /system/bin/lpdumpd
18    # TODO(b/129011369): make this killable by lmkd
19    oneshot
20    disabled
21    user system
22    group system
23    # On Launch devices, assume "super". On virtual devices, ${ro.boot.super_partition}
24    # might be something else.
25    file /dev/block/by-name/${ro.boot.super_partition:-super} r
26    # On retrofit devices, ${ro.boot.super_partition} is slot-suffixed.
27    # Use NO_SUCH_DEVICE_NO_SUCH_SUFFIX as default values so that host_init_verifier does
28    # not complain about missing sysprops
29    file /dev/block/by-name/${ro.boot.super_partition:-NO_SUCH_DEVICE}${ro.boot.slot_suffix:-_NO_SUCH_SUFFIX} r
30
31on property:sys.lpdumpd=start
32    start lpdumpd
33
34on property:sys.lpdumpd=stop
35    stop lpdumpd
36