summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xrootdir/bin/init.goodix.sh2
-rwxr-xr-xrootdir/bin/init.qcom.early_boot.sh2
-rw-r--r--rootdir/etc/fstab.qcom2
-rw-r--r--rootdir/etc/fstab_AB.qcom2
-rwxr-xr-xrootdir/etc/init.qcom.rc38
-rwxr-xr-xrootdir/etc/init.target.rc57
6 files changed, 54 insertions, 49 deletions
diff --git a/rootdir/bin/init.goodix.sh b/rootdir/bin/init.goodix.sh
index 59818c0..cb019c5 100755
--- a/rootdir/bin/init.goodix.sh
+++ b/rootdir/bin/init.goodix.sh
@@ -28,5 +28,5 @@
#
if [ ! -f /data/system/users/0/settings_fingerprint.xml ]; then
- rm -rf /persist/data/finger_*
+ rm -rf /mnt/vendor/persist/data/finger_*
fi
diff --git a/rootdir/bin/init.qcom.early_boot.sh b/rootdir/bin/init.qcom.early_boot.sh
index b037c8d..839945a 100755
--- a/rootdir/bin/init.qcom.early_boot.sh
+++ b/rootdir/bin/init.qcom.early_boot.sh
@@ -512,7 +512,7 @@ fi
boot_reason=`cat /proc/sys/kernel/boot_reason`
reboot_reason=`getprop ro.boot.alarmboot`
-power_off_alarm_file=`cat /persist/alarm/powerOffAlarmSet`
+power_off_alarm_file=`cat /mnt/vendor/persist/alarm/powerOffAlarmSet`
if [ "$boot_reason" = "3" ] || [ "$reboot_reason" = "true" ]; then
if [ "$power_off_alarm_file" = "1" ]
then
diff --git a/rootdir/etc/fstab.qcom b/rootdir/etc/fstab.qcom
index 39a2f4a..6731564 100644
--- a/rootdir/etc/fstab.qcom
+++ b/rootdir/etc/fstab.qcom
@@ -18,7 +18,7 @@
/devices/soc/a800000.ssusb/a800000.dwc3/xhci-hcd.0.auto* /storage/usbotg vfat nosuid,nodev wait,voldmanaged=usbotg:auto
/dev/block/bootdevice/by-name/dsp /dsp ext4 ro,nosuid,nodev,barrier=1 wait
/dev/block/bootdevice/by-name/cache /cache ext4 nosuid,nodev,noatime,barrier=1 wait
-/dev/block/bootdevice/by-name/persist /persist ext4 nosuid,nodev,barrier=1,noatime wait,check
+/dev/block/bootdevice/by-name/persist /mnt/vendor/persist ext4 nosuid,nodev,barrier=1,noatime wait,check
/dev/block/bootdevice/by-name/system /system ext4 ro,barrier=1 wait,recoveryonly
/dev/block/bootdevice/by-name/vendor /vendor ext4 ro,barrier=1 wait,recoveryonly
diff --git a/rootdir/etc/fstab_AB.qcom b/rootdir/etc/fstab_AB.qcom
index 88d2ac7..fb64fca 100644
--- a/rootdir/etc/fstab_AB.qcom
+++ b/rootdir/etc/fstab_AB.qcom
@@ -14,4 +14,4 @@
/dev/block/bootdevice/by-name/bluetooth /bt_firmware vfat ro,shortname=lower,uid=1002,gid=3002,dmask=227,fmask=337,context=u:object_r:bt_firmware_file:s0 wait,slotselect
/devices/soc/a800000.ssusb/a800000.dwc3/xhci-hcd.0.auto* /storage/usbotg vfat nosuid,nodev wait,voldmanaged=usbotg:auto
/dev/block/bootdevice/by-name/dsp /dsp ext4 ro,nosuid,nodev,barrier=1 wait,slotselect
-/dev/block/bootdevice/by-name/persist /persist ext4 nosuid,nodev,barrier=1,noatime wait,check
+/dev/block/bootdevice/by-name/persist /mnt/vendor/persist ext4 nosuid,nodev,barrier=1,noatime wait,check
diff --git a/rootdir/etc/init.qcom.rc b/rootdir/etc/init.qcom.rc
index 452225b..e205a67 100755
--- a/rootdir/etc/init.qcom.rc
+++ b/rootdir/etc/init.qcom.rc
@@ -36,8 +36,6 @@ on early-init
chmod 0620 /dev/kmsg
on init
- # Set permissions for persist partition
- mkdir /persist 0771 root system
# Support legacy paths
symlink /sdcard /mnt/sdcard
@@ -106,12 +104,12 @@ on boot
mkdir /dev/socket/qmux_gps 0770 gps gps
chmod 2770 /dev/socket/qmux_gps
- mkdir /persist/drm 0770 system system
- mkdir /persist/bluetooth 0770 bluetooth bluetooth
- mkdir /persist/misc 0770 system system
- mkdir /persist/alarm 0770 system system
- mkdir /persist/time 0770 system system
- mkdir /persist/secnvm 0770 system system
+ mkdir /vendor/mnt/persist/drm 0770 system system
+ mkdir /vendor/mnt/persist/bluetooth 0770 bluetooth bluetooth
+ mkdir /vendor/mnt/persist/misc 0770 system system
+ mkdir /vendor/mnt/persist/alarm 0770 system system
+ mkdir /vendor/mnt/persist/time 0770 system system
+ mkdir /vendor/mnt/persist/secnvm 0770 system system
#Create NETMGR daemon socket area
mkdir /dev/socket/netmgr 0750 radio radio
@@ -204,10 +202,10 @@ on boot
chown system system /sys/class/sensors/ap3426-proximity/poll_delay
# Create directory used for display
- mkdir /persist/display 0770 system graphics
+ mkdir /vendor/mnt/persist/display 0770 system graphics
# Create vpp directory
- mkdir /persist/vpp 0770 media media
+ mkdir /vendor/mnt/persist/vpp 0770 media media
# load WIGIG platform driver
insmod /vendor/lib/modules/msm_11ad_proxy.ko
@@ -313,10 +311,10 @@ on post-fs-data
mkdir /data/vendor/radio 0770 system radio
# 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
- chown root system /persist
- chmod 0771 /persist
- chown system system /persist/WCNSS_qcom_wlan_nv.bin
+ # We chown/chmod /vendor/mnt/persist again so because mount is run as root + defaults
+ chown root system /vendor/mnt/persist
+ chmod 0771 /vendor/mnt/persist
+ chown system system /vendor/mnt/persist/WCNSS_qcom_wlan_nv.bin
chmod 0664 /sys/devices/platform/msm_sdcc.1/polling
chmod 0664 /sys/devices/platform/msm_sdcc.2/polling
chmod 0664 /sys/devices/platform/msm_sdcc.3/polling
@@ -346,12 +344,12 @@ on post-fs-data
chown system system /data/fota
# SSC/SLPI sensors
- mkdir /persist/sensors 0775 sensors sensors
- write /persist/sensors/sensors_settings 1
- chown system root /persist/sensors/sensors_settings
- chmod 0664 /persist/sensors/sensors_settings
- chown system system /persist/PRSensorData.txt
- chmod 0600 /persist/PRSensorData.txt
+ mkdir /vendor/mnt/persist/sensors 0775 sensors sensors
+ write /vendor/mnt/persist/sensors/sensors_settings 1
+ chown system root /vendor/mnt/persist/sensors/sensors_settings
+ chmod 0664 /vendor/mnt/persist/sensors/sensors_settings
+ chown system system /vendor/mnt/persist/PRSensorData.txt
+ chmod 0600 /vendor/mnt/persist/PRSensorData.txt
#Create directory for hostapd
mkdir /data/hostapd 0770 system wifi
diff --git a/rootdir/etc/init.target.rc b/rootdir/etc/init.target.rc
index b054763..5b78ba6 100755
--- a/rootdir/etc/init.target.rc
+++ b/rootdir/etc/init.target.rc
@@ -49,20 +49,27 @@ on fs
mount_all /vendor/etc/fstab.qcom
swapon_all /vendor/etc/fstab.qcom
+ # Set permissions for persist partition
+ chown root system /mnt/vendor/persist
+ chmod 0771 /mnt/vendor/persist
+ mkdir /mnt/vendor/persist/bms 0700 root system
+ mkdir /mnt/vendor/persist/data 0700 system system
+ restorecon_recursive /mnt/vendor/persist
+
# Keeping following partitions outside fstab file. As user may not have
# these partition flashed on the device. Failure to mount any partition in fstab file
# results in failure to launch late-start class.
- mkdir /persist/data 0700 system system
- mkdir /persist/bms 0700 root system
- restorecon_recursive /persist
- mkdir /persist/wlan_bt 0777 root system
+ mkdir /vendor/mnt/persist/data 0700 system system
+ mkdir /vendor/mnt/persist/bms 0700 root system
+ restorecon_recursive /vendor/mnt/persist
+ mkdir /vendor/mnt/persist/wlan_bt 0777 root system
#add by Quanyu.Lee for MI-feature
#only needed on Factory version,DO NOT push to MIUI!
- chmod 0644 /persist/wlan_bt/bt.mac
- chmod 0644 /persist/wlan_bt/wlan.mac
- chown system system /persist/wlan_bt/bt.mac
- chown system system /persist/wlan_bt/wlan.mac
+ chmod 0644 /vendor/mnt/persist/wlan_bt/bt.mac
+ chmod 0644 /vendor/mnt/persist/wlan_bt/wlan.mac
+ chown system system /vendor/mnt/persist/wlan_bt/bt.mac
+ chown system system /vendor/mnt/persist/wlan_bt/wlan.mac
write /sys/kernel/boot_adsp/boot 1
@@ -81,7 +88,7 @@ on post-fs-data
mkdir /data/tombstones/lpass 0771 system system
mkdir /data/tombstones/wcnss 0771 system system
mkdir /data/tombstones/dsps 0771 system system
- mkdir /persist/qti_fp 0700 system system
+ mkdir /vendor/mnt/persist/qti_fp 0700 system system
mkdir /data/misc/seemp 0700 system system
mkdir /data/misc/tloc 0700 system drmrpc
mkdir /data/thermal 0771 system system
@@ -96,22 +103,22 @@ on boot
write /dev/cpuset/system-background/cpus 0-7
write /dev/cpuset/restricted/cpus 0-7
####Regionalization config and prop files####
- chmod 0644 /persist/speccfg/spec
- chmod 0644 /persist/speccfg/devicetype
- chmod 0644 /persist/speccfg/mbnversion
- chmod 0644 /persist/speccfg/.not_triggered
- chmod 0644 /persist/speccfg/vendor_ro.prop
- chmod 0644 /persist/speccfg/vendor_persist.prop
- chmod 0644 /persist/speccfg/submask
- chmod 0644 /persist/speccfg/partition
- chown system system /persist/speccfg/spec
- chown system system /persist/speccfg/devicetype
- chown system system /persist/speccfg/mbnversion
- chown system system /persist/speccfg/.not_triggered
- chown system system /persist/speccfg/vendor_ro.prop
- chown system system /persist/speccfg/vendor_persist.prop
- chown system system /persist/speccfg/submask
- chown system system /persist/speccfg/partition
+ chmod 0644 /vendor/mnt/persist/speccfg/spec
+ chmod 0644 /vendor/mnt/persist/speccfg/devicetype
+ chmod 0644 /vendor/mnt/persist/speccfg/mbnversion
+ chmod 0644 /vendor/mnt/persist/speccfg/.not_triggered
+ chmod 0644 /vendor/mnt/persist/speccfg/vendor_ro.prop
+ chmod 0644 /vendor/mnt/persist/speccfg/vendor_persist.prop
+ chmod 0644 /vendor/mnt/persist/speccfg/submask
+ chmod 0644 /vendor/mnt/persist/speccfg/partition
+ chown system system /vendor/mnt/persist/speccfg/spec
+ chown system system /vendor/mnt/persist/speccfg/devicetype
+ chown system system /vendor/mnt/persist/speccfg/mbnversion
+ chown system system /vendor/mnt/persist/speccfg/.not_triggered
+ chown system system /vendor/mnt/persist/speccfg/vendor_ro.prop
+ chown system system /vendor/mnt/persist/speccfg/vendor_persist.prop
+ chown system system /vendor/mnt/persist/speccfg/submask
+ chown system system /vendor/mnt/persist/speccfg/partition
chmod 0660 /proc/nvt_wake_gesture
chown system system /proc/nvt_wake_gesture