forked from phhusson/device_phh_treble
-
Notifications
You must be signed in to change notification settings - Fork 0
/
phh-on-data.sh
31 lines (25 loc) · 1.06 KB
/
phh-on-data.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/system/bin/sh
vndk="$(getprop persist.sys.vndk)"
[ -z "$vndk" ] && vndk="$(getprop ro.vndk.version |grep -oE '^[0-9]+')"
if getprop persist.sys.phh.no_vendor_overlay |grep -q true;then
for part in odm vendor;do
mount /mnt/phh/empty_dir/ /$part/overlay
done
fi
if getprop persist.sys.phh.caf.media_profile |grep -q true;then
setprop media.settings.xml "/vendor/etc/media_profiles_vendor.xml"
fi
minijailSrc=/system/system_ext/apex/com.android.vndk.v28/lib/libminijail.so
minijailSrc64=/system/system_ext/apex/com.android.vndk.v28/lib64/libminijail.so
if [ "$vndk" = 27 ];then
mount $minijailSrc64 /vendor/lib64/libminijail_vendor.so
mount $minijailSrc /vendor/lib/libminijail_vendor.so
fi
if [ "$vndk" = 28 ];then
mount $minijailSrc64 /vendor/lib64/libminijail_vendor.so
mount $minijailSrc /vendor/lib/libminijail_vendor.so
mount $minijailSrc64 /system/lib64/vndk-28/libminijail.so
mount $minijailSrc /system/lib/vndk-28/libminijail.so
mount $minijailSrc64 /vendor/lib64/libminijail.so
mount $minijailSrc /vendor/lib/libminijail.so
fi