Files
vendor_xiaomi_garnet/proprietary/vendor/bin/qtisetprop
T
AdarshGrewal 3e85cf266b garnet: Initial import
Change-Id: Ib229a3a4d2f8a1e602085fad2b6a757f994cdd99
2025-12-24 20:06:53 +05:30

32 lines
659 B
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: qtisetprop config_name config_val"
}
if [ $# -ne 2 ]; then
help
exit 1
fi
# Disable exit on non 0
set +e
query_result="0"
if [[ -f $ril_db ]]; then
query_result=`echo "SELECT 1 FROM qcril_properties_table WHERE property='$1';" | sqlite3 $ril_db`
fi
if [[ $query_result == "1" ]]; then
echo "UPDATE qcril_properties_table SET value='$2' WHERE property='$1';" | sqlite3 $ril_db
else
setprop $1 $2
fi