diff --git a/phh-prop-handler.sh b/phh-prop-handler.sh index bb681b3..3d707d2 100644 --- a/phh-prop-handler.sh +++ b/phh-prop-handler.sh @@ -207,6 +207,18 @@ if [ "$1" == "sys.phh.restart_sysui" ]; then exit fi +#dump_logs +if [ "$1" == "sys.phh.dump_logs" ]; then + if [[ "$prop_value" = "false" && "$prop_value" != "true" ]]; then + exit + fi + + if [[ "$prop_value" == "true" ]]; then + logcat -b all -d > /sdcard/logs.txt + fi + exit +fi + if [ "$1" == "persist.sys.phh.disable_soundvolume_effect" ];then if [[ "$prop_value" != "0" && "$prop_value" != "1" ]]; then exit 1 diff --git a/vndk.rc b/vndk.rc index 6ab620d..7d7074c 100644 --- a/vndk.rc +++ b/vndk.rc @@ -65,6 +65,9 @@ on property:persist.sys.phh.disable_a2dp_offload=* on property:sys.phh.restart_sysui=* exec u:r:phhsu_daemon:s0 root -- /system/bin/phh-prop-handler.sh "sys.phh.restart_sysui" +on property:sys.phh.dump_logs=* + exec u:r:phhsu_daemon:s0 root -- /system/bin/phh-prop-handler.sh "sys.phh.dump_logs" + on property:init.svc.ril-proxy=stopped && property:persist.sys.phh.restart_ril=true start ril-proxy