selinuxrelabel: Add a check for dalvik-cache
Change-Id: Ic8087450756ae81458e155aa1ca22d5055547664
This commit is contained in:
parent
5a27f63685
commit
c7e9230614
@ -10,6 +10,7 @@ fi
|
||||
|
||||
LABELDATA=0
|
||||
LABELSYS=0
|
||||
LABELDALVIKCACHE=0
|
||||
|
||||
# Test /data
|
||||
ls -Zd /data/system | grep -q unlabeled
|
||||
@ -30,6 +31,18 @@ if [ $LABELSYS = "0" -a $? -eq 0 ]; then
|
||||
LABELSYS=1
|
||||
fi
|
||||
|
||||
ls -Zd /data/dalvik-cache | grep -q unlabeled
|
||||
if [ $? -eq 0 ]; then
|
||||
$L "dalvik-cache is unlabeled, fixing..."
|
||||
LABELDALVIKCACHE=1
|
||||
fi
|
||||
|
||||
ls -Zd /cache/dalvik-cache | grep -q unlabeled
|
||||
if [ $? -eq 0 ]; then
|
||||
$L "dalvik-cache is unlabeled, fixing..."
|
||||
LABELDALVIKCACHE=1
|
||||
fi
|
||||
|
||||
|
||||
if [ $LABELSYS = "1" ]; then
|
||||
busybox mount -o remount,rw /system
|
||||
@ -47,3 +60,10 @@ if [ $LABELDATA = "1" ]; then
|
||||
restorecon -R /cache
|
||||
$L "/cache relabel complete"
|
||||
fi
|
||||
|
||||
if [ $LABELDALVIKCACHE = "1" ]; then
|
||||
$L "dalvik-cache relabel starting..."
|
||||
restorecon -R /data/dalvik-cache
|
||||
restorecon -R /cache/dalvik-cache
|
||||
$L "dalvik-cache relabel complete"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user