Marc Bourgoin 576c1636ce sm7325-common: Update blobs from DUBAI_RETAIL_13_T1RD33.116-33-3_subsidy-DEFAULT_regulatory-DEFAULT_cid50_CFC
Co-authored-by: sb6596 <shubhamprince111@gmail.com>
Co-authored-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
Co-authored-by: Andrew Hexen <SyberHexen@gmail.com>
Change-Id: I3e12f16adcb353d22f758eab4a281785d16212b2
2023-06-07 09:33:22 -06:00

55 lines
1.5 KiB
Bash
Executable File

#!/bin/sh --
# Copyright (c) 2019-2020 Qualcomm Technologies, Inc.
# All Rights Reserved.
# Confidential and Proprietary - Qualcomm Technologies, Inc.
ril_db="/data/vendor/radio/qcrilNr.db"
help() {
echo "Syntax error! Example: qtigetprop [config_name]"
}
if [ $# -gt 1 ]; then
help
exit 1
elif [ $# -eq 1 ]; then
prop_name=$1
fi
# Disable exit on non 0
set +e
if [[ ! -f $ril_db ]]; then
getprop "$@"
else
if [ ! -z "$prop_name" ]; then
query_result=`echo "SELECT 1 FROM qcril_properties_table WHERE property='$prop_name';" | sqlite3 $ril_db`
if [[ $query_result == "1" ]]; then
result=`echo "SELECT value FROM qcril_properties_table WHERE property='$1';" | sqlite3 $ril_db`
if [ "$result" == "" ]; then
echo "SELECT def_val FROM qcril_properties_table WHERE property='$1';" | sqlite3 $ril_db
else
echo $result
fi
else
getprop $prop_name
fi
else
# print RIL configs
all_props=`echo "SELECT * FROM qcril_properties_table;" | sqlite3 $ril_db`
for each_prop in $all_props; do
IFS='|' read -ra values <<< "$each_prop"
prop_name="${values[0]}"
def_val="${values[1]}"
val="${values[2]}"
if [[ $val == "" ]]; then
val=$def_val
fi
echo "$prop_name=$val"
done
# print Android properties
getprop
fi
fi