1# 2# Copyright (C) 2018 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 17on init 18 chmod 666 /dev/diag 19 20on post-fs-data 21 mkdir /data/vendor/radio 0777 radio radio 22 mkdir /data/vendor/radio/diag_logs 0777 system system 23 rm /data/vendor/radio/diag_logs/logs/diag_poweron_log.qmdl 24 25service diag_mdlog_start /vendor/bin/diag_mdlog 26 class late_start 27 user shell 28 group system diag media_rw 29 disabled 30 oneshot 31 32service diag_mdlog_stop /vendor/bin/diag_mdlog -k 33 class late_start 34 user shell 35 group system diag media_rw 36 disabled 37 oneshot 38 39on property:persist.vendor.sys.modem.diag.mdlog=* 40 rm /data/vendor/radio/diag_logs/diag_mdlog_pid 41 setprop vendor.sys.modem.diag.mdlog ${persist.vendor.sys.modem.diag.mdlog} 42 43on property:vendor.sys.modem.diag.mdlog=true 44 start diag_mdlog_start 45 46on property:vendor.sys.modem.diag.mdlog=false 47 start diag_mdlog_stop 48 49on property:persist.vendor.verbose_logging_enabled=* 50 setprop persist.vendor.sys.modem.diag.mdlog ${persist.vendor.verbose_logging_enabled} 51