Fix missing /data/sec_storage_data
This commit is contained in:
parent
51be51649b
commit
494da1a8dc
38
rw-system.sh
38
rw-system.sh
@ -529,26 +529,32 @@ if getprop ro.boot.boot_devices |grep -v , |grep -qE .;then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -c /dev/dsm ];then
|
if [ -c /dev/dsm ];then
|
||||||
# /dev/dsm is a magic device on Kirin chipsets that teecd needs to access.
|
# /dev/dsm is a magic device on Kirin chipsets that teecd needs to access.
|
||||||
# Make sure that permissions are right.
|
# Make sure that permissions are right.
|
||||||
chown system:system /dev/dsm
|
chown system:system /dev/dsm
|
||||||
chmod 0660 /dev/dsm
|
chmod 0660 /dev/dsm
|
||||||
|
|
||||||
# The presence of /dev/dsm indicates that we have a teecd, which needs /sec_storage
|
# The presence of /dev/dsm indicates that we have a teecd,
|
||||||
|
# which needs /sec_storage and /data/sec_storage_data
|
||||||
|
|
||||||
mount | grep " on /sec_storage " > /dev/null 2>&1
|
mkdir -p /data/sec_storage_data
|
||||||
if [ "$?" -eq "0" ]; then
|
chown system:system /data/sec_storage_data
|
||||||
# /sec_storage is already mounted by the vendor, don't try to create and mount it
|
chcon -R u:object_r:teecd_data_file:s0 /data/sec_storage_data
|
||||||
# ourselves. However, some devices have /sec_storage owned by root, which means that
|
|
||||||
# the fingerprint daemon (running as system) cannot access it.
|
mount | grep " on /sec_storage " > /dev/null 2>&1
|
||||||
chown -R system:system /sec_storage
|
if [ "$?" -eq "0" ]; then
|
||||||
chmod -R 0660 /sec_storage
|
# /sec_storage is already mounted by the vendor, don't try to create and mount it
|
||||||
else
|
# ourselves. However, some devices have /sec_storage owned by root, which means that
|
||||||
# No /sec_storage provided by vendor, create our own
|
# the fingerprint daemon (running as system) cannot access it.
|
||||||
mkdir -p /data/sec_storage_data
|
chown -R system:system /sec_storage
|
||||||
chown system:system /data/sec_storage_data
|
chmod -R 0660 /sec_storage
|
||||||
mount /data/sec_storage_data /sec_storage
|
chcon -R u:object_r:teecd_data_file:s0 /sec_storage
|
||||||
fi
|
else
|
||||||
|
# No /sec_storage provided by vendor, mount /data/sec_storage_data to it
|
||||||
|
mount /data/sec_storage_data /sec_storage
|
||||||
|
chown system:system /sec_storage
|
||||||
|
chcon u:object_r:teecd_data_file:s0 /sec_storage
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#Try to detect DT2W
|
#Try to detect DT2W
|
||||||
|
Loading…
Reference in New Issue
Block a user