Skip to content

Commit

Permalink
[Diag Debug] Support to trigger ramdump when property on
Browse files Browse the repository at this point in the history
We will set this property when Diag Issue Occurred.

Bug: 160282745
Test: 1. We can trigger the bugreport with signature
         "QCRIL Issue: Diag Issue Detected".
      2. We can trigger ramdump successfully
      3. Basic function pass: dial/mobile data/ssr
Change-Id: I9609fe9c878b208c3640d8f518b7f214e8786c8e
  • Loading branch information
Willy Hu committed Dec 22, 2020
1 parent 32ae1fc commit 4211bb4
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
6 changes: 6 additions & 0 deletions device.mk
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,12 @@ else
$(LOCAL_PATH)/init.hardware.mpssrfs.rc.user:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.$(PRODUCT_PLATFORM).mpssrfs.rc
endif

# Enable DIAG issue debug
ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/init.diagdebug.rc.userdebug:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.diagdebug.rc
endif

# A/B support
PRODUCT_PACKAGES += \
otapreopt_script \
Expand Down
20 changes: 20 additions & 0 deletions init.diagdebug.rc.userdebug
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#
# Copyright (C) 2020 The Android Open-Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# Trigger ramdump when property on
on property:vendor.radio.diag_debug=true
write /dev/kmsg "RIL Diag Issue Detected!"
write /proc/sysrq-trigger "c"

0 comments on commit 4211bb4

Please sign in to comment.