Skip to content
Snippets Groups Projects
Commit 30b8d196 authored by Hua Liu's avatar Hua Liu Committed by Artem Borisov
Browse files

msm8953-common: Fix MBN copy issue

DAC_OVERRIDE is disabled for all the vendor init scripts
in Android P. This change will grant "group root" the write
permission temporarily for deleting/copying operations.

System user could not access the MBN files in data partition
no longer. Only radio user and root group have read permission
after boot up.

Change-Id: I9f184da2253dc5896b145c0e52fc3b42da15d9f7
parent 8142bb7b
No related branches found
No related tags found
No related merge requests found
......@@ -273,7 +273,7 @@ on post-fs-data
mkdir /data/vendor/radio 0770 system radio
# Create directory for modem_config
mkdir /data/vendor/modem_config 0550 system radio
mkdir /data/vendor/modem_config 0570 radio root
# Mounting of persist is moved to 'on emmc-fs' and 'on fs' sections
# We chown/chmod /persist again so because mount is run as root + defaults
......
......@@ -354,6 +354,8 @@ fi
cur_version_info=`cat /firmware/verinfo/ver_info.txt`
if [ ! -f /firmware/verinfo/ver_info.txt -o "$prev_version_info" != "$cur_version_info" ]; then
# add W for group recursively before delete
chmod g+w -R /data/vendor/modem_config/*
rm -rf /data/vendor/modem_config/*
# preserve the read only mode for all subdir and files
cp --preserve=m -dr /firmware/image/modem_pr/mcfg/configs/* /data/vendor/modem_config
......@@ -361,8 +363,10 @@ if [ ! -f /firmware/verinfo/ver_info.txt -o "$prev_version_info" != "$cur_versio
cp --preserve=m -d /firmware/image/modem_pr/mbn_ota.txt /data/vendor/modem_config/
cp --preserve=m -d /firmware/image/modem_pr/mbn_oin.txt /data/vendor/modem_config/
cp --preserve=m -d /firmware/image/modem_pr/mbn_ogl.txt /data/vendor/modem_config/
chown -hR radio.radio /data/vendor/modem_config/*
# the group must be root, otherwise this script could not add "W" for group recursively
chown -hR radio.root /data/vendor/modem_config/*
fi
chmod g-w /data/vendor/modem_config
setprop ro.runtime.mbn_copy_completed 1
#check build variant for printk logging
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment