1#! /vendor/bin/sh 2 3# 4# Copy qcril.db if needed for RIL 5# 6if [ -f /vendor/radio/qcril_database/qcril.db -a ! -f /data/vendor/radio/qcril.db ]; then 7 cp /vendor/radio/qcril_database/qcril.db /data/vendor/radio/qcril.db 8 chown -h radio.radio /data/vendor/radio/qcril.db 9fi 10echo 1 > /data/vendor/radio/db_check_done 11 12cp /vendor/radio/qcril_database/qcril.db /data/vendor/radio/qcril_prebuilt.db 13chown radio.radio /data/vendor/radio/qcril_prebuilt.db 14chmod 0660 /data/vendor/radio/qcril_prebuilt.db 15 16# 17# Make modem config folder and copy firmware config to that folder for RIL 18# 19if [ -f /data/vendor/radio/ver_info.txt ]; then 20 prev_version_info=`cat /data/vendor/radio/ver_info.txt` 21else 22 prev_version_info="" 23fi 24 25cur_version_info=`cat /vendor/firmware_mnt/verinfo/ver_info.txt` 26if [ ! -f /vendor/firmware_mnt/verinfo/ver_info.txt -o "$prev_version_info" != "$cur_version_info" ]; then 27 rm -rf /data/vendor/radio/modem_config 28 mkdir /data/vendor/radio/modem_config 29 chmod 770 /data/vendor/radio/modem_config 30 cp -r /vendor/firmware_mnt/image/modem_pr/mcfg/configs/* /data/vendor/radio/modem_config 31 chown -hR radio.radio /data/vendor/radio/modem_config 32 cp /vendor/firmware_mnt/verinfo/ver_info.txt /data/vendor/radio/ver_info.txt 33 chown radio.radio /data/vendor/radio/ver_info.txt 34fi 35cp /vendor/firmware_mnt/image/modem_pr/mbn_ota.txt /data/vendor/radio/modem_config 36chown radio.radio /data/vendor/radio/modem_config/mbn_ota.txt 37echo 1 > /data/vendor/radio/copy_complete 38