exynos9610: import init files
authorJan Altensen <info@stricted.net>
Fri, 15 May 2020 19:45:08 +0000 (21:45 +0200)
committerJan Altensen <info@stricted.net>
Sat, 17 Oct 2020 14:30:53 +0000 (16:30 +0200)
Change-Id: I71f2e36e9ff50bac3753e437e6c1c873f92f6810

28 files changed:
common.mk
configs/fstab.exynos9610 [new file with mode: 0644]
configs/init/carrier/init.default.rc [new file with mode: 0644]
configs/init/carrier/init.retin.rc [new file with mode: 0644]
configs/init/dmd.rc [new file with mode: 0644]
configs/init/hw/init.mmi.debug.rc [new file with mode: 0644]
configs/init/hw/init.mmi.overlay.rc [new file with mode: 0644]
configs/init/init.ets.rc [new file with mode: 0644]
configs/init/init.exynos.sensorhub.rc [new file with mode: 0644]
configs/init/init.exynos9610.rc [new file with mode: 0644]
configs/init/init.exynos9610.usb.rc [new file with mode: 0644]
configs/init/init.mmi.rc [new file with mode: 0644]
configs/init/init.mot-factory.rc [new file with mode: 0644]
configs/init/init.nfc.sec.rc [new file with mode: 0644]
configs/init/mobicore.rc [new file with mode: 0644]
configs/init/mplog.rc [new file with mode: 0644]
configs/init/rfsd.rc [new file with mode: 0644]
configs/init/rild.rc [new file with mode: 0644]
configs/init/sced.rc [new file with mode: 0644]
configs/init/sctd.rc [new file with mode: 0644]
configs/init/smcd.rc [new file with mode: 0644]
configs/init/spad.rc [new file with mode: 0644]
configs/init/swcnd.rc [new file with mode: 0644]
configs/init/tcmd.receiver.rc [new file with mode: 0644]
configs/init/tcmd.simulater.rc [new file with mode: 0644]
configs/init/ueventd.rc [new file with mode: 0644]
configs/init/vcd.rc [new file with mode: 0644]
configs/init/vendor.mmi.carrier.rc [new file with mode: 0644]

index f2c895f99530180f41e01018ba6145f9f2d8df36..e68e921a85581179c24ec9d9b811170ad1c83522 100644 (file)
--- a/common.mk
+++ b/common.mk
@@ -105,7 +105,34 @@ PRODUCT_COPY_FILES += \
 
 # init
 PRODUCT_COPY_FILES += \
-    $(COMMON_PATH)/configs/init/init.recovery.exynos9610.rc:$(TARGET_COPY_OUT_ROOT)/init.recovery.exynos9610.rc
+    $(COMMON_PATH)/configs/init/carrier/init.default.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/carrier/init.default.rc \
+    $(COMMON_PATH)/configs/init/carrier/init.retin.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/carrier/init.retin.rc \
+    $(COMMON_PATH)/configs/init/hw/init.mmi.debug.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.mmi.debug.rc \
+    $(COMMON_PATH)/configs/init/hw/init.mmi.overlay.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.mmi.overlay.rc \
+    $(COMMON_PATH)/configs/init/dmd.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/dmd.rc \
+    $(COMMON_PATH)/configs/init/init.ets.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.ets.rc \
+    $(COMMON_PATH)/configs/init/init.exynos.sensorhub.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.exynos.sensorhub.rc \
+    $(COMMON_PATH)/configs/init/init.exynos9610.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.exynos9610.rc \
+    $(COMMON_PATH)/configs/init/init.exynos9610.usb.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.exynos9610.usb.rc \
+    $(COMMON_PATH)/configs/init/init.mmi.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.mmi.rc \
+    $(COMMON_PATH)/configs/init/init.mot-factory.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.mot-factory.rc \
+    $(COMMON_PATH)/configs/init/init.nfc.sec.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.nfc.sec.rc \
+    $(COMMON_PATH)/configs/init/init.recovery.exynos9610.rc:$(TARGET_COPY_OUT_ROOT)/init.recovery.exynos9610.rc \
+    $(COMMON_PATH)/configs/init/mobicore.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/mobicore.rc \
+    $(COMMON_PATH)/configs/init/mplog.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/mplog.rc \
+    $(COMMON_PATH)/configs/init/rfsd.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/rfsd.rc \
+    $(COMMON_PATH)/configs/init/rild.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/rild.rc \
+    $(COMMON_PATH)/configs/init/sced.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/sced.rc \
+    $(COMMON_PATH)/configs/init/sctd.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/sctd.rc \
+    $(COMMON_PATH)/configs/init/smcd.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/smcd.rc \
+    $(COMMON_PATH)/configs/init/spad.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/spad.rc \
+    $(COMMON_PATH)/configs/init/swcnd.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/swcnd.rc \
+    $(COMMON_PATH)/configs/init/tcmd.receiver.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/tcmd.receiver.rc \
+    $(COMMON_PATH)/configs/init/tcmd.simulater.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/tcmd.simulater.rc \
+    $(COMMON_PATH)/configs/init/ueventd.rc:$(TARGET_COPY_OUT_VENDOR)/ueventd.rc \
+    $(COMMON_PATH)/configs/init/vcd.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/vcd.rc \
+    $(COMMON_PATH)/configs/init/vendor.mmi.carrier.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/vendor.mmi.carrier.rc \
+    $(COMMON_PATH)/configs/fstab.exynos9610:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.exynos9610
 
 # Media
 PRODUCT_COPY_FILES += \
diff --git a/configs/fstab.exynos9610 b/configs/fstab.exynos9610
new file mode 100644 (file)
index 0000000..233e61f
--- /dev/null
@@ -0,0 +1,19 @@
+# Android fstab file.
+#<src>                  <mnt_point>         <type>    <mnt_flags and options>                               <fs_mgr_flags>
+# The filesystem that contains the filesystem checker binary (typically /system) cannot
+# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
+
+
+/dev/block/bootdevice/by-name/system     /                     ext4    ro                                                  wait,slotselect
+/dev/block/bootdevice/by-name/userdata   /data                 f2fs    rw,discard,nosuid,nodev,noatime,nodiratime,nobarrier,inline_xattr,inline_data,reserve_root=32768,resgid=1065   wait,check,formattable,fileencryption=aes-256-xts,quota,reservedsize=128M
+/dev/block/bootdevice/by-name/efs        /mnt/vendor/efs       ext4    noatime,nosuid,nodev,barrier=1,rw                   wait
+/dev/block/bootdevice/by-name/persist    /mnt/vendor/persist   ext4    noatime,nosuid,nodev,barrier=1,data=ordered,nodelalloc,nomblk_io_submit,errors=panic wait,notrim
+/dev/block/bootdevice/by-name/misc       /misc                 emmc    defaults                                            defaults
+/dev/block/bootdevice/by-name/slotinfo   /slotinfo             emmc    defaults                                            defaults
+/dev/block/bootdevice/by-name/persist2   /mnt/product/persist  ext4    noatime,nosuid,nodev,barrier=1                      wait,formattable,nofail
+/dev/block/zram0                         none                  swap    defaults                                            zramsize=2147483648,max_comp_streams=8
+
+# VOLD
+/devices/platform/13550000.dwmmc2/mmc_host*             auto    auto    default voldmanaged=sdcard1:auto,encryptable=userdata
+/devices/platform/13200000.usb*                                auto    vfat    default voldmanaged=usb1:auto
+/devices/platform/13200000.usb/13200000.dwc3*          auto    vfat    default voldmanaged=usb2:auto
diff --git a/configs/init/carrier/init.default.rc b/configs/init/carrier/init.default.rc
new file mode 100644 (file)
index 0000000..45dcc6b
--- /dev/null
@@ -0,0 +1,2 @@
+on early-fs
+    setprop ro.telephony.default_network 10,0
diff --git a/configs/init/carrier/init.retin.rc b/configs/init/carrier/init.retin.rc
new file mode 100644 (file)
index 0000000..6b5990c
--- /dev/null
@@ -0,0 +1,2 @@
+on early-fs
+    setprop ro.telephony.default_network 10,10
diff --git a/configs/init/dmd.rc b/configs/init/dmd.rc
new file mode 100644 (file)
index 0000000..2476553
--- /dev/null
@@ -0,0 +1,6 @@
+# DM daemon
+    service DM-daemon /vendor/bin/dmd
+    class main
+    user system 
+    group system media_rw sdcard_rw
+    seclabel u:r:dmd:s0
diff --git a/configs/init/hw/init.mmi.debug.rc b/configs/init/hw/init.mmi.debug.rc
new file mode 100644 (file)
index 0000000..3c36b40
--- /dev/null
@@ -0,0 +1,3 @@
+on boot && property:ro.boot.adb_early=1
+    start vendor.mmi-usb-sh
+
diff --git a/configs/init/hw/init.mmi.overlay.rc b/configs/init/hw/init.mmi.overlay.rc
new file mode 100644 (file)
index 0000000..c70690f
--- /dev/null
@@ -0,0 +1,45 @@
+on init
+    # Allow adspd to access headset detect event
+    chmod 0664 /dev/input/event5
+
+   # Change ownership and permission for vibrator awinic with extra functions
+   chown system system /sys/class/leds/vibrator/seq
+   chmod 0660 /sys/class/leds/vibrator/seq
+   chown system system /sys/class/leds/vibrator/extra
+   chmod 0660 /sys/class/leds/vibrator/extra
+
+on boot
+    #change permission for capsensor
+    chmod 0660 /sys/class/capsense/reset
+    chown system system /sys/class/capsense/reset
+
+   # Change ownership and permission for camera dual calibration data
+   chown system camera /mnt/vendor/persist/camera/dualcal/dual_cal_data.bin
+   chown system camera /mnt/vendor/persist/camera/dualcal/module_id.bin
+   chmod 0664 /mnt/vendor/persist/camera/dualcal/dual_cal_data.bin
+   chmod 0664 /mnt/vendor/persist/camera/dualcal/module_id.bin
+   start ufs_ffu
+
+service capsense_reset /vendor/bin/capsense_reset
+    class core
+    user system
+    group system input
+    disabled
+
+on property:sys.boot_completed=1
+  start capsense_reset
+
+on property:ro.carrier=tmo
+  write /sys/class/power_supply/battery/device/force_max_chrg_temp 55
+
+on property:ro.carrier=metropcs
+  write /sys/class/power_supply/battery/device/force_max_chrg_temp 55
+
+service ufs_ffu /vendor/bin/ufs_ffu.sh
+    user root
+    class core
+    oneshot
+    disabled
+
+on property:vendor.ufs_need_ffu=1
+    setprop sys.dbg.ufs_ffu_start 1
diff --git a/configs/init/init.ets.rc b/configs/init/init.ets.rc
new file mode 100644 (file)
index 0000000..abfb34f
--- /dev/null
@@ -0,0 +1,8 @@
+# Egistec fingerprint feature
+on fs
+    chmod 0660 /dev/esfp0
+    chown system system /dev/esfp0
+    chmod 0660 /sys/devices/platform/egis_input/navigation_event
+    chmod 0660 /sys/devices/platform/egis_input/navigation_enable
+    chown system system /sys/devices/platform/egis_input/navigation_enable
+    chown system system /sys/devices/platform/egis_input/navigation_event
diff --git a/configs/init/init.exynos.sensorhub.rc b/configs/init/init.exynos.sensorhub.rc
new file mode 100644 (file)
index 0000000..5a3d04c
--- /dev/null
@@ -0,0 +1,15 @@
+on post-fs
+## ensure correct calibration file permissions
+    chown system system /mnt/vendor/persist/sensorcal.json
+    chmod 0660 /mnt/vendor/persist/sensorcal.json
+## Update Nanohub FW if needed
+#    start flash-nanohub-fw
+
+on post-fs-data
+    mkdir /data/vendor/sensor
+    chown root system /data/vendor/sensor
+    chmod 0770 /data/vendor/sensor
+
+service flash-nanohub-fw /vendor/bin/nanoapp_cmd download
+    oneshot
+    disabled
diff --git a/configs/init/init.exynos9610.rc b/configs/init/init.exynos9610.rc
new file mode 100644 (file)
index 0000000..f55ffeb
--- /dev/null
@@ -0,0 +1,650 @@
+on early-init
+    mkdir /mnt/vendor/efs 0771 radio system
+    mkdir /mnt/vendor/efsbk 0755 system system
+    mkdir /mnt/vendor/persist 0771 system system
+    mount debugfs /sys/kernel/debug /sys/kernel/debug
+    mount proc proc /proc remount hidepid=2,gid=3009
+
+on init
+    # Set permissions for persist partition
+    mkdir /persist 0771 system system
+
+    # See storage config details at http://source.android.com/tech/storage/
+    mkdir /storage/sdcard 0000 root root
+    mkdir /storage/usb1 0000 root root
+    mkdir /storage/usb2 0000 root root
+    mkdir /mnt/media_rw/sdcard 0700 media_rw media_rw
+    mkdir /mnt/media_rw/usb1 0700 media_rw media_rw
+    mkdir /mnt/media_rw/usb2 0700 media_rw media_rw
+
+    export SECONDARY_STORAGE /storage/sdcard:/storage/usb1:/storage/usb2
+
+    # Support legacy paths
+    symlink /storage/sdcard /mnt/ext_sd
+    symlink /data/app /factory
+
+    ## SCSC WLAN
+    # SD-755: Increase default socket rx buffer limit
+    # Apply network parameters for high data performance.
+    write /proc/sys/net/core/rmem_default 327680
+    write /proc/sys/net/core/rmem_max 8388608
+    write /proc/sys/net/core/wmem_default 327680
+    write /proc/sys/net/core/wmem_max 8388608
+    write /proc/sys/net/core/optmem_max 20480
+    write /proc/sys/net/core/netdev_max_backlog 10000
+    write /proc/sys/net/ipv4/tcp_rmem "2097152 4194304 8388608"
+    write /proc/sys/net/ipv4/tcp_wmem "262144 524288 1048576"
+    write /proc/sys/net/ipv4/tcp_mem "44259 59012 88518"
+    write /proc/sys/net/ipv4/udp_mem "88518 118025 177036"
+
+    write /sys/class/net/rmnet0/queues/rx-0/rps_cpus fe
+    write /sys/class/net/rmnet0/queues/rx-0/rps_flow_cnt 64
+    write /sys/class/net/rmnet1/queues/rx-0/rps_cpus fe
+    write /sys/class/net/rmnet1/queues/rx-0/rps_flow_cnt 64
+    write /sys/class/net/rmnet2/queues/rx-0/rps_cpus fe
+    write /sys/class/net/rmnet2/queues/rx-0/rps_flow_cnt 64
+    write /sys/class/net/rmnet3/queues/rx-0/rps_cpus fe
+    write /sys/class/net/rmnet3/queues/rx-0/rps_flow_cnt 64
+    write /sys/class/net/rmnet4/queues/rx-0/rps_cpus fe
+    write /sys/class/net/rmnet4/queues/rx-0/rps_flow_cnt 64
+    write /sys/class/net/rmnet5/queues/rx-0/rps_cpus fe
+    write /sys/class/net/rmnet5/queues/rx-0/rps_flow_cnt 64
+    write /sys/class/net/rmnet6/queues/rx-0/rps_cpus fe
+    write /sys/class/net/rmnet6/queues/rx-0/rps_flow_cnt 64
+    write /sys/class/net/rmnet7/queues/rx-0/rps_cpus fe
+    write /sys/class/net/rmnet7/queues/rx-0/rps_flow_cnt 64
+    write /proc/sys/net/core/rps_sock_flow_entries 64
+
+    ## SCSC BT
+    chown bluetooth bluetooth /sys/module/scsc_bt/parameters/bluetooth_address
+
+    # add stune/hot
+    mkdir /dev/stune/hot
+    chown system system /dev/stune/hot
+    chown system system /dev/stune/hot/tasks
+    chmod 0664 /dev/stune/hot/tasks
+
+    # EAS stune boosting interfaces
+    chown system system /dev/stune/top-app/schedtune.boost
+    chown system system /dev/stune/top-app/schedtune.prefer_idle
+    chown system system /dev/stune/top-app/schedtune.prefer_perf
+    chown system system /dev/stune/top-app/cgroup.procs
+
+    chown system system /dev/stune/foreground/schedtune.boost
+    chown system system /dev/stune/foreground/schedtune.prefer_idle
+    chown system system /dev/stune/foreground/schedtune.prefer_perf
+    chown system system /dev/stune/foreground/cgroup.procs
+
+    chown system system /dev/stune/background/schedtune.boost
+    chown system system /dev/stune/background/schedtune.prefer_idle
+    chown system system /dev/stune/background/schedtune.prefer_perf
+    chown system system /dev/stune/background/cgroup.procs
+
+    chown system system /dev/stune/schedtune.boost
+    chown system system /dev/stune/schedtune.prefer_idle
+    chown system system /dev/stune/schedtune.prefer_perf
+    chown system system /dev/stune/cgroup.procs
+
+    write /dev/stune/top-app/schedtune.boost 0
+    write /dev/stune/top-app/schedtune.prefer_idle 1
+    write /dev/stune/top-app/schedtune.prefer_perf 0
+    write /dev/stune/top-app/schedtune.util_est_en 1
+    write /dev/stune/top-app/schedtune.ontime_en 1
+
+    write /dev/stune/foreground/schedtune.boost 0
+    write /dev/stune/foreground/schedtune.prefer_idle 0
+    write /dev/stune/foreground/schedtune.prefer_perf 0
+    write /dev/stune/foreground/schedtune.util_est_en 1
+    write /dev/stune/foreground/schedtune.ontime_en 1
+
+    write /dev/stune/background/schedtune.boost 0
+    write /dev/stune/background/schedtune.prefer_idle 0
+    write /dev/stune/background/schedtune.prefer_perf 0
+
+    write /dev/stune/schedtune.boost 0
+
+    chown system system /dev/cpuset/tasks
+    chown system system /dev/cpuset/cgroup.procs
+    chmod 0664 /dev/cpuset/tasks
+
+    chown system system /sys/power/cpufreq_min_limit
+
+    #sensor
+    chmod 0664 /dev/nanohub
+    chmod 0664 /dev/nanohub_comms
+    chmod 0664 /dev/chub_dev
+    chown system system /dev/nanohub
+    chown system system /dev/nanohub_comms
+    chown system system /dev/chub_dev
+
+    #capsense
+    chmod 0644 /sys/class/sensors/capsense_bottom/enable
+    chmod 0644 /sys/class/sensors/capsense_bottom/poll_delay
+    chmod 0644 /sys/class/sensors/capsense_top/enable
+    chmod 0644 /sys/class/sensors/capsense_top/poll_delay
+    chmod 0644 /dev/input/event1
+    chmod 0644 /dev/input/event2
+    chmod 0644 /sys/class/capsense/reset
+    chown system system /sys/class/sensors/capsense_bottom/enable
+    chown system system /sys/class/sensors/capsense_bottom/poll_delay
+    chown system system /sys/class/sensors/capsense_top/enable
+    chown system system /sys/class/sensors/capsense_top/poll_delay
+    chown system system /dev/input/event1
+    chown system system /dev/input/event2
+    chown system system /sys/class/capsense/reset
+    ##capsensor for sx933x
+    chmod 0644 /sys/class/sensors/Moto_CapSense_Ch0/enable
+    chown system system /sys/class/sensors/Moto_CapSense_Ch0/enable
+    chmod 0644 /sys/class/sensors/Moto_CapSense_Ch0/poll_delay
+    chown system system /sys/class/sensors/Moto_CapSense_Ch0/poll_delay
+    chmod 0644 /sys/class/sensors/Moto_CapSense_Ch1/enable
+    chown system system /sys/class/sensors/Moto_CapSense_Ch1/enable
+    chmod 0644 /sys/class/sensors/Moto_CapSense_Ch1/poll_delay
+    chown system system /sys/class/sensors/Moto_CapSense_Ch1/poll_delay
+    chmod 0644 /sys/class/sensors/Moto_CapSense_Ch3/enable
+    chown system system /sys/class/sensors/Moto_CapSense_Ch3/enable
+    chmod 0644 /sys/class/sensors/Moto_CapSense_Ch3/poll_delay
+    chown system system /sys/class/sensors/Moto_CapSense_Ch3/poll_delay
+    chmod 0644 /dev/input/event4
+    chown system system /dev/input/event4
+    chmod 0644 /dev/input/event2
+    chown system system /dev/input/event2
+    chmod 0644 /dev/input/event3
+    chown system system /dev/input/event3
+    # NFC permission
+    chmod 0666 /dev/sec-nfc
+
+    # NFC hal surfix
+    setprop ro.hardware.nfc_nci sec
+
+    # Limit to ION page pool (Three UHD 32bpp RGB)
+    write /sys/module/ion_system_heap/parameters/max_page_pool_size 24300
+
+    # Configuration to G2D blocking mode
+    write /sys/module/g2d_task/parameters/block_on_contension 1
+
+    start watchdogd
+
+    # set reap mem
+    write /proc/sys/vm/reap_mem_on_sigkill 1
+
+on post-fs
+    # set RLIMIT_MEMLOCK to 64MB
+    setrlimit 8 67108864 67108864
+
+on post-fs-data
+# Exynos Data folder
+    mkdir /data/vendor 0775 root system
+    mkdir /data/vendor/log 0771 root system
+    mkdir /data/vendor/log/cbd 0775 root system
+    mkdir /data/vendor/gps 0771 system system
+    mkdir /data/vendor/log/gps 0771 system system
+    mkdir /data/vendor/log/chub 0771 root system
+    mkdir /data/vendor/ramdump 0775 root system
+
+    mkdir /data/vendor/rild 0771 radio system
+    mkdir /data/vendor/dump 0771 radio system
+    mkdir /data/vendor/slog 0771 system log
+
+# IPSEC PIDDIR for VoWiFi
+    mkdir /data/vendor/misc 0771 root system
+    mkdir /data/vendor/misc/vpn 0777 root system
+
+# Log data folder
+    mkdir /data/exynos/log 0771 radio system
+    mkdir /data/vendor 0771 root system
+    mkdir /data/vendor/log 0771 root system
+    mkdir /data/vendor/log/abox 0771 audioserver system
+
+    restorecon_recursive /dev/block/platform/13520000.ufs/by-name/proinfo
+    restorecon_recursive /dev/block/platform/13520000.ufs/by-name/proinfo_backup
+
+
+    restorecon_recursive /dev/block/bootdevice/by-name/proinfo
+    restorecon_recursive /dev/block/bootdevice/by-name/proinfo_backup
+
+    setprop vold.post_fs_data_done 1
+
+# Directory for GPS
+    rm /data/system/gps/gps_started
+    rm /data/system/gps/glonass_started
+    rm /data/system/gps/beidou_started
+    rm /data/system/gps/smd_started
+    rm /data/system/gps/sv_cno.info
+
+## SCSC WLAN
+    # Setup Wi-Fi permissions
+    mkdir /data/vendor/wifi 0770 wifi system
+    mkdir /data/vendor/wifi/wpa 0770 wifi system
+    mkdir /data/vendor/wifi/wpa/sockets 0770 wifi wifi
+    mkdir /data/vendor/wifi/hostapd/sockets 0770 wifi wifi
+    mkdir /vendor/etc/wifi 0770 system system
+    mkdir /data/vendor/log/wifi 0770 wifi wifi
+    chown wifi wifi /sys/wifi/memdump
+
+    write /sys/class/net/wlan0/queues/rx-0/rps_cpus fe
+
+# Permissions Camera
+    mkdir /data/camera 0770 system camera
+    rm /data/vendor/camera/dump_12a10_eeprom_data.bin
+    rm /data/vendor/camera/dump_12a10ff_eeprom_data.bin
+    rm /data/vendor/camera/dump_16885c_eeprom_data.bin
+    rm /data/vendor/camera/dump_5e9_troika_eeprom_data.bin
+    rm /data/vendor/camera/2x5_otp_cal_data.bin
+    rm /data/vendor/camera/5e9_eeprom_data.bin
+    rm /data/vendor/camera/gm1_eeprom_data.bin
+    mkdir /data/vendor/camera 0770 system camera
+    mkdir /mnt/vendor/persist/camera 0770 system camera
+    mkdir /mnt/vendor/persist/camera/ledcal 0770 system camera
+
+# Change ownership and permission for camera dual calibration data
+    chown root root /mnt/vendor/persist/camera/dualcal/dual_cal_data.bin
+    chown root root /mnt/vendor/persist/camera/dualcal/module_id.bin
+    chmod 0666 /mnt/vendor/persist/camera/dualcal/dual_cal_data.bin
+    chmod 0666 /mnt/vendor/persist/camera/dualcal/module_id.bin
+
+    # Allow to access WebView
+    chmod 0755 /sys/kernel/debug/tracing
+    restorecon /sys/kernel/debug/tracing/trace_marker
+
+# HWC data
+    mkdir /data/vendor/log/hwc 0771 system graphics
+
+# IMS-WFC
+    copy /system/etc/pcscf_routes.sh /vendor/bin/pcscf_routes.sh
+    chmod 0755 /vendor/bin/pcscf_routes.sh
+    chown root root /vendor/bin/pcscf_routes.sh
+
+# CP AUDIO Tuned parameter
+    copy /vendor/firmware/CP_AUDIO_SLSI.bin /mnt/vendor/efs/CP_AUDIO_SLSI.bin
+    chown radio radio /mnt/vendor/efs/CP_AUDIO_SLSI.bin
+
+# Create directory used by media clients
+    mkdir /data/vendor/media 0770 mediacodec media
+
+# CP AUDIO Tuned parameter
+    copy /vendor/firmware/CP_AUDIO_SLSI.bin /mnt/vendor/efs/CP_AUDIO_SLSI.bin
+    chown radio radio /mnt/vendor/efs/CP_AUDIO_SLSI.bin
+
+on boot
+    setprop wifi.interface wlan0
+    write /proc/sys/vm/min_free_order_shift 4
+
+    restorecon_recursive /sys/kernel/debug
+    write /sys/module/scsc_mx/parameters/disable_recovery_handling 0
+
+    # Allow to access debugfs for system:system
+    chmod 0755 /sys/kernel/debug
+    chown system system /sys/kernel/debug
+
+    setprop ro.radio.noril no
+
+    # Set up kernel tracing, but disable it by default
+    chmod 0222 /sys/kernel/debug/tracing/trace_marker
+    write /sys/kernel/debug/tracing/tracing_on 0
+
+    # Change permission for interactive governor
+    chown system system /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_rate
+    chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_rate
+    chown system system /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_slack
+    chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_slack
+    chown system system /sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time
+    chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time
+    chown system system /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq
+    chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq
+    chown system system /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads
+    chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads
+    chown system system /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load
+    chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load
+    chown system system /sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay
+    chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay
+    chown system system /sys/devices/system/cpu/cpu0/cpufreq/interactive/boost
+    chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/interactive/boost
+    chown system system /sys/devices/system/cpu/cpu0/cpufreq/interactive/boostpulse
+    chown system system /sys/devices/system/cpu/cpu0/cpufreq/interactive/input_boost
+    chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/interactive/input_boost
+    chown system system /sys/devices/system/cpu/cpu0/cpufreq/interactive/boostpulse_duration
+    chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/interactive/boostpulse_duration
+    chown system system /sys/devices/system/cpu/cpu0/cpufreq/interactive/io_is_busy
+    chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/interactive/io_is_busy
+
+    chown system system /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_rate
+    chmod 0660 /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_rate
+    chown system system /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_slack
+    chmod 0660 /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_slack
+    chown system system /sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time
+    chmod 0660 /sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time
+    chown system system /sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq
+    chmod 0660 /sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq
+    chown system system /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads
+    chmod 0660 /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads
+    chown system system /sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load
+    chmod 0660 /sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load
+    chown system system /sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay
+    chmod 0660 /sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay
+    chown system system /sys/devices/system/cpu/cpu4/cpufreq/interactive/boost
+    chmod 0660 /sys/devices/system/cpu/cpu4/cpufreq/interactive/boost
+    chown system system /sys/devices/system/cpu/cpu4/cpufreq/interactive/boostpulse
+    chown system system /sys/devices/system/cpu/cpu4/cpufreq/interactive/input_boost
+    chmod 0660 /sys/devices/system/cpu/cpu4/cpufreq/interactive/input_boost
+    chown system system /sys/devices/system/cpu/cpu4/cpufreq/interactive/boostpulse_duration
+    chmod 0660 /sys/devices/system/cpu/cpu4/cpufreq/interactive/boostpulse_duration
+    chown system system /sys/devices/system/cpu/cpu4/cpufreq/interactive/io_is_busy
+    chmod 0660 /sys/devices/system/cpu/cpu4/cpufreq/interactive/io_is_busy
+    # Change permission for A-Box firmware logs file & GPR dump
+    chown audioserver system /sys/devices/platform/14a50000.abox/reset
+    chown audioserver system /sys/devices/platform/14a50000.abox/service
+    chown audioserver system /sys/devices/platform/14a50000.abox/0.abox-debug/gpr
+    chown audioserver system /sys/devices/platform/14a50000.abox/0.abox-debug/calliope_sram
+    chown audioserver system /sys/devices/platform/14a50000.abox/0.abox-debug/calliope_dram
+    chown audioserver system /sys/kernel/debug/regmap/14a50000.abox/registers
+    chown audioserver system /sys/kernel/debug/abox/log-00
+
+# Permission for USB SELECT
+    chown system system /sys/class/android_usb/android0/enable
+    chmod 0660 /sys/class/android_usb/android0/enable
+    chown system system /sys/class/android_usb/android0/idVendor
+    chmod 0660 /sys/class/android_usb/android0/idVendor
+    chown system system /sys/class/android_usb/android0/idProduct
+    chmod 0660 /sys/class/android_usb/android0/idProduct
+    chown system system /sys/class/android_usb/android0/f_diag/clients
+    chmod 0660 /sys/class/android_usb/android0/f_diag/clients
+    chown system system /sys/class/android_usb/android0/functions
+    chmod 0660 /sys/class/android_usb/android0/functions
+    chown system system /sys/class/android_usb/android0/bDeviceClass
+    chmod 0660 /sys/class/android_usb/android0/bDeviceClass
+
+# Permission for UART SWITCH
+    chmod 0660 /sys/class/sec/switch/uart_sel
+    chown system system /sys/class/sec/switch/uart_sel
+
+on fs
+    wait /dev/block/platform/${ro.boot.bootdevice}
+    symlink /dev/block/platform/${ro.boot.bootdevice} /dev/block/bootdevice
+
+    mount_all /vendor/etc/fstab.exynos9610
+    setprop ro.crypto.fuse_sdcard true
+
+    restorecon_recursive /mnt/vendor/efs
+    restorecon_recursive /mnt/vendor/efsbk
+    restorecon_recursive /mnt/vendor/persist
+    restorecon_recursive /data
+
+    chown radio system /mnt/vendor/efs
+    #chown root system /mnt/vendor/efsbk
+    chown system system /mnt/vendor/persist
+
+    mkdir /mnt/vendor/persist/data/sfs 0700 system system
+    mkdir /mnt/vendor/persist/data/tz 0700 system system
+
+# Gatekeeper data
+    mkdir /mnt/vendor/persist/gk 0700 system system
+
+    # Enable rmnet data and aggregation
+    setprop persist.rmnet.mux enabled
+    setprop persist.rmnet.data.enable true
+    setprop persist.data.wda.enable true
+    setprop persist.data.df.agg.dl_pkt 10
+    setprop persist.data.df.agg.dl_size 4096
+
+# Permissions for ION
+    chmod 0660 /sys/class/ion_cma/ion_video_ext/isolated
+    chown system system /sys/class/ion_cma/ion_video_ext/isolated
+
+# Permissions for backlight
+    chmod 0660 /sys/class/backlight/pwm-backlight.0/brightness
+    chown system system /sys/class/backlight/pwm-backlight.0/brightness
+    chmod 0660 /sys/class/backlight/backlight_0/brightness
+    chown system system /sys/class/backlight/backlight_0/brightness
+    chmod 0660 /sys/class/panel/panel/cabc_mode
+    chown system system /sys/class/panel/panel/cabc_mode
+    chmod 0660 /sys/class/backlight/hbm/hbm_mode
+    chown system system /sys/class/backlight/hbm/hbm_mode
+
+# Permissions for dqe
+    chmod 0660 /sys/class/dqe/dqe/gamma
+    chown system system /sys/class/dqe/dqe/gamma
+    chmod 0660 /sys/class/dqe/dqe/cgc
+    chown system system /sys/class/dqe/dqe/cgc
+    chmod 0660 /sys/class/dqe/dqe/hsc
+    chown system system /sys/class/dqe/dqe/hsc
+    chmod 0440 /sys/class/dqe/dqe/xml
+    chown system system /sys/class/dqe/dqe/xml
+    chmod 0660 /sys/class/dqe/dqe/tune_mode1
+    chown system system /sys/class/dqe/dqe/tune_mode1
+    chmod 0660 /sys/class/dqe/dqe/tune_mode2
+    chown system system /sys/class/dqe/dqe/tune_mode2
+    chmod 0660 /sys/class/dqe/dqe/tune_onoff
+    chown system system /sys/class/dqe/dqe/tune_onoff
+    chmod 0660 /sys/class/dqe/dqe/aosp_colors
+    chown system system /sys/class/dqe/dqe/aosp_colors
+
+# Permissions for gnss
+    chmod 0660 /dev/gnss_ipc
+    chown system system /dev/gnss_ipc
+
+#mail
+chown root system /sys/devices/platform/11500000.mali/dvfs_min_lock
+chown root system /sys/devices/platform/11500000.mali/dvfs_max_lock
+chmod 664 /sys/devices/platform/11500000.mali/dvfs_min_lock
+chmod 664 /sys/devices/platform/11500000.mali/dvfs_max_lock
+
+# Copy DRM Key
+#    copy /system/app/wv.keys /factory/wv.keys
+
+# Permission for DRM Key
+#    chmod 0644 /factory/wv.keys
+
+# FM Radio
+    chmod 0666 /dev/radio0
+
+# Permission for flashlight control for HAL3.3
+# The Istor espresso board does not have the flash led h/w, So the below permission line are blocked.
+# If you want to test the flashlight in board which have the flash led h/w, Enable the below blocked lines.
+    chmod 0660 /sys/class/camera/flash/rear_torch_flash
+    chown system camera /sys/class/camera/flash/rear_torch_flash
+
+# Flashlight control for HAL3
+   chmod 0660 /sys/class/leds/fled-s2mu106/fled_mode
+   chown system camera /sys/class/leds/fled-s2mu106/fled_mode
+   chmod 0660 /sys/class/leds/fled-s2mu106/fled_torch_curr
+   chown system camera /sys/class/leds/fled-s2mu106/fled_torch_curr
+
+#load ecd firmware
+    write /proc/ecd/load_firmware 1
+
+service fuse_sdcard /system/bin/sdcard -u 1023 -g 1023 -d /mnt/media_rw/sdcard /storage/sdcard
+    class late_start
+    disabled
+service fuse_usb1 /system/bin/sdcard -u 1023 -g 1023 -d /mnt/media_rw/usb1 /storage/usb1
+    class late_start
+    disabled
+service fuse_usb2 /system/bin/sdcard -u 1023 -g 1023 -d /mnt/media_rw/usb2 /storage/usb2
+    class late_start
+    disabled
+
+service abox /vendor/bin/main_abox 14a50000.abox /data/vendor/log/abox
+    class late_start
+    user audioserver
+    group system
+
+# scsc daemon
+service wlbtd /vendor/bin/wlbtd
+    class main
+    user wifi
+    group wifi inet log sdcard_rw misc diag
+
+# Modem boot daemon
+    service cpboot-daemon /vendor/bin/cbd -p /dev/block/platform/13520000.ufs/by-name/modem${ro.boot.slot_suffix}
+    class main
+    user root
+    group radio cache inet misc audio sdcard_rw log system diag
+    seclabel u:r:cbd:s0
+
+# GPS daemon
+    service gpsd /vendor/bin/hw/gpsd
+    class main
+    user gps
+    group system inet net_raw wakelock
+    capabilities BLOCK_SUSPEND
+    ioprio be 0
+    seclabel u:r:gpsd:s0
+
+#service charger /system/bin/charger
+#    class charger
+#    group log
+#    seclabel u:r:charger:s0
+
+# on userdebug and eng builds, enable kgdb on the serial console
+on property:ro.debuggable=1
+    write /sys/module/kgdboc/parameters/kgdboc ttyFIQ1
+    write /sys/module/fiq_debugger/parameters/kgdb_enable 1
+
+# shutdown animation
+service shutdownanim /system/bin/bootanimation -shutdown
+    class core animation
+    user graphics
+    group graphics audio
+    disabled
+    oneshot
+
+## SCSC WLAN
+on property:ro.boot.wifimacaddr=*
+    write /sys/module/scsc_wlan/parameters/mac_addr_override ${ro.boot.wifimacaddr}
+
+# WiFi wpa suppplicant service
+service wpa_supplicant /vendor/bin/hw/wpa_supplicant -ddd -t \
+    -ip2p0  -Dnl80211 -c/data/vendor/wifi/wpa/p2p_supplicant.conf -N \
+    -iwlan0 -Dnl80211 -c/data/vendor/wifi/wpa/wpa_supplicant.conf \
+    -O/data/vendor/wifi/wpa/sockets \
+    -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
+    #   we will start as root and wpa_supplicant will switch to user wifi
+    #   after setting up the capabilities required for WEXT
+    #   user wifi
+    #   group wifi inet keystore
+    interface android.hardware.wifi.supplicant@1.0::ISupplicant default
+    interface android.hardware.wifi.supplicant@1.1::ISupplicant default
+    interface android.hardware.wifi.supplicant@1.2::ISupplicant default
+    class main
+    socket wpa_wlan0 dgram 660 wifi wifi
+    disabled
+    oneshot
+    seclabel u:r:hal_wifi_supplicant_default:s0
+
+service dhcpcd_wlan0 /vendor/bin/dhcpcd -aABDKL
+        class main
+        disabled
+        oneshot
+
+service iprenew_wlan0 /vendor/bin/dhcpcd -n
+        class main
+        disabled
+        oneshot
+
+service dhcpcd_p2p /vendor/bin/dhcpcd -aABKL
+        class main
+        disabled
+        oneshot
+
+service iprenew_p2p /vendor/bin/dhcpcd -n
+        class main
+        disabled
+        oneshot
+
+# SPE-1748: PANU DHCP Client not launched
+service dhcpcd_bt-pan /vendor/bin/dhcpcd -ABKL
+        class main
+        disabled
+        oneshot
+
+service iprenew_bt-pan /vendor/bin/dhcpcd -n
+        class main
+        disabled
+        oneshot
+
+# IMS WiFi Calling [START] #
+service charonservice /system/vendor/bin/charon
+        class main
+        user root
+        disabled
+        seclabel u:r:charonservice:s0
+
+# bugreport is triggered by holding down volume down, volume up and power
+service bugreport /system/bin/dumpstate -d -p -B -z \
+        -o /data/user_de/0/com.android.shell/files/bugreports/bugreport
+    class main
+    disabled
+    oneshot
+    keycodes 114 115 116
+
+# daemon for saving offline ramdump data
+service dssd /vendor/bin/dssd ramdump
+    class late_start
+    user root
+    group root system
+    oneshot
+    file /data/vendor/ramdump "r"
+    file /dev/block/by-name/ramdump "r"
+    seclabel u:r:dssd:s0
+
+on property:vendor.charon=1
+    rm /data/vendor/misc/vpn/charon.pid
+    chmod 0666 /dev/tun
+    start charonservice
+
+on property:vendor.charon=0
+    stop charonservice
+    rm /data/vendor/misc/vpn/charon.pid
+# IMS WiFi Calling [END] #
+
+# IMS packet router daemon
+service pktrouter /system/bin/wfc-pkt-router
+    class core
+    user root
+    disabled
+    seclabel u:r:netutils_wrapper:s0
+
+on property:init.svc.vendor.pktrouter=1
+    start pktrouter
+
+on property:init.svc.vendor.pktrouter=0
+    stop pktrouter
+
+on property:ro.bootmode=charger
+    mkdir /config/usb_gadget/g1
+    mkdir /config/usb_gadget/g1/strings/0x409
+    mkdir /config/usb_gadget/g1/configs/c.1
+    mkdir /config/usb_gadget/g1/configs/c.1/strings/0x409
+    mkdir /config/usb_gadget/g1/functions/mass_storage.0
+    write /config/usb_gadget/g1/strings/0x409/serialnumber ${ro.serialno}
+    write /config/usb_gadget/g1/strings/0x409/manufacturer "Google Inc."
+    write /config/usb_gadget/g1/strings/0x409/product "Exynos"
+    write /config/usb_gadget/g1/configs/c.1/strings/0x409/configuration "Conf 1"
+    write /config/usb_gadget/g1/configs/c.1/MaxPower 0x3f
+    symlink /config/usb_gadget/g1/functions/mass_storage.0 /config/usb_gadget/g1/configs/c.1/mass_storage.0
+    write /sys/class/android_usb/android0/enable 0
+    write /config/usb_gadget/g1/idVendor 0x22b8
+    write /config/usb_gadget/g1/idProduct 0x2eb7
+    write /sys/class/android_usb/android0/functions mass_storage
+    write /config/usb_gadget/g1/UDC "13200000.dwc3"
+    write /sys/class/android_usb/android0/enable 1
+    setprop sys.usb.state charging
+
+service exynos-thermald /vendor/bin/exynos-thermald
+       class late_start
+       group system root
+#      oneshot
+       file /sys/class/thermal/thermal_zone0 "r"
+       seclabel u:r:exynos-thermald:s0
+
+service vendor.mmi-usb-sh /vendor/bin/init.mmi.usb.sh
+    class late_start
+    user root
+    group system
+oneshot
+
+# Set watchdog timer to 30 seconds and pet it every 10 seconds to get a 20 second margin
+service watchdogd /sbin/watchdogd 10 20
+    class core
+    oneshot
+    seclabel u:r:watchdogd:s0
diff --git a/configs/init/init.exynos9610.usb.rc b/configs/init/init.exynos9610.usb.rc
new file mode 100644 (file)
index 0000000..5e05050
--- /dev/null
@@ -0,0 +1,352 @@
+on init
+    mkdir /config/usb_gadget/g1
+    mkdir /config/usb_gadget/g1/strings/0x409
+    mkdir /config/usb_gadget/g1/configs/c.1
+    mkdir /config/usb_gadget/g1/configs/c.1/strings/0x409
+    mkdir /config/usb_gadget/g1/functions/mtp.mtp
+    mkdir /config/usb_gadget/g1/functions/ptp.ptp
+    mkdir /config/usb_gadget/g1/functions/acm.acm
+    mkdir /config/usb_gadget/g1/functions/dm.dm
+    mkdir /config/usb_gadget/g1/functions/rndis.rndis
+    mkdir /config/usb_gadget/g1/functions/midi.midi
+    mkdir /config/usb_gadget/g1/functions/usbnet.usbnet
+    mkdir /config/usb_gadget/g1/functions/mass_storage.0
+    mkdir /config/usb_gadget/g1/functions/accessory.gs2
+    mkdir /config/usb_gadget/g1/functions/ffs.adb 0770 shell shell
+    mkdir /dev/usb-ffs 0770 shell shell
+    mkdir /dev/usb-ffs/adb 0770 shell shell
+    mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=2000
+    restorecon_recursive /dev/usb-ffs/adb
+    chown system system /sys/class/android_usb/android0/secure
+    chmod 0660 /sys/class/android_usb/android0/secure
+
+on boot
+    write /config/usb_gadget/g1/strings/0x409/serialnumber ${ro.serialno}
+    write /config/usb_gadget/g1/strings/0x409/manufacturer ${ro.product.manufacturer}
+    write /config/usb_gadget/g1/strings/0x409/product ${ro.product.model}
+    write /config/usb_gadget/g1/configs/c.1/strings/0x409/configuration "default"
+    write /config/usb_gadget/g1/configs/c.1/MaxPower 0x3f
+    write /config/usb_gadget/g1/bcdDevice "0x0409"
+    symlink /config/usb_gadget/g1/functions/mtp.mtp /config/usb_gadget/g1/configs/c.1/mtp.mtp
+    symlink /config/usb_gadget/g1/functions/ptp.ptp /config/usb_gadget/g1/configs/c.1/ptp.ptp
+    symlink /config/usb_gadget/g1/functions/acm.acm /config/usb_gadget/g1/configs/c.1/acm.acm
+    symlink /config/usb_gadget/g1/functions/dm.dm /config/usb_gadget/g1/configs/c.1/dm.dm
+    symlink /config/usb_gadget/g1/functions/rndis.rndis /config/usb_gadget/g1/configs/c.1/rndis.rndis
+    symlink /config/usb_gadget/g1/functions/midi.midi /config/usb_gadget/g1/configs/c.1/midi.midi
+    symlink /config/usb_gadget/g1/functions/usbnet.usbnet /config/usb_gadget/g1/configs/c.1/usbnet.usbnet
+    symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/c.1/ffs.adb
+    symlink /config/usb_gadget/g1/functions/mass_storage.0 /config/usb_gadget/g1/configs/c.1/mass_storage.0
+    symlink /config/usb_gadget/g1/functions/accessory.gs2 /config/usb_gadget/g1/configs/c.1/accessory.gs2
+    write /config/usb_gadget/g1/os_desc/b_vendor_code 0x1
+    write /config/usb_gadget/g1/os_desc/qw_sign "MSFT100"
+    write /config/usb_gadget/g1/os_desc/use  1
+    symlink /config/usb_gadget/g1/configs/c.1 /config/usb_gadget/g1/os_desc/c.1
+    write /config/usb_gadget/g1/functions/mtp.mtp/os_desc/interface.MTP/compatible_id "MTP"
+    chmod 444 /sys/class/android_usb/android0/f_midi/alsa
+
+on property:sys.usb.config=none
+    setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=mtp
+    start vendor.tcmd
+    start TCMDReceiver
+    write /sys/class/android_usb/android0/enable 0
+    write /config/usb_gadget/g1/idProduct 0x2e82
+    write /config/usb_gadget/g1/idVendor 0x22b8
+    write /sys/class/android_usb/android0/functions ${sys.usb.config}
+    write /config/usb_gadget/g1/UDC "13200000.dwc3"
+    write /sys/class/android_usb/android0/enable 1
+    setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=adb
+    start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=adb
+    write /sys/class/android_usb/android0/enable 0
+    write /config/usb_gadget/g1/idProduct 0x2e81
+    write /config/usb_gadget/g1/idVendor 0x22b8
+    write /sys/class/android_usb/android0/functions ${sys.usb.config}
+    write /config/usb_gadget/g1/UDC "13200000.dwc3"
+    write /sys/class/android_usb/android0/enable 1
+    setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=midi
+    write /sys/class/android_usb/android0/enable 0
+    write /config/usb_gadget/g1/idProduct 0x18D1
+    write /config/usb_gadget/g1/idVendor 0x4EE8
+    write /sys/class/android_usb/android0/functions ${sys.usb.config}
+    write /config/usb_gadget/g1/UDC "13200000.dwc3"
+    write /sys/class/android_usb/android0/enable 1
+    setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=midi,adb
+    start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=midi,adb
+    write /sys/class/android_usb/android0/enable 0
+    write /config/usb_gadget/g1/idProduct 0x18D1
+    write /config/usb_gadget/g1/idVendor 0x4EE9
+    write /sys/class/android_usb/android0/functions ${sys.usb.config}
+    write /config/usb_gadget/g1/UDC "13200000.dwc3"
+    write /sys/class/android_usb/android0/enable 1
+    setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=usbnet,adb
+    start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=usbnet,adb
+    start vendor.tcmd
+    start TCMDReceiver
+    write /sys/class/android_usb/android0/enable 0
+    write /config/usb_gadget/g1/idProduct 0x2e2d
+    write /config/usb_gadget/g1/idVendor 0x22b8
+    write /config/usb_gadget/g1/os_desc/use  1
+    write /sys/class/android_usb/android0/functions ${sys.usb.config}
+    write /config/usb_gadget/g1/UDC "13200000.dwc3"
+    write /sys/class/android_usb/android0/enable 1
+    setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=usbnet
+    start vendor.tcmd
+    start TCMDReceiver
+    write /sys/class/android_usb/android0/enable 0
+    write /config/usb_gadget/g1/idProduct 0x2e2c
+    write /config/usb_gadget/g1/idVendor 0x22b8
+    write /config/usb_gadget/g1/os_desc/use  0
+    write /sys/class/android_usb/android0/functions ${sys.usb.config}
+    write /config/usb_gadget/g1/UDC "13200000.dwc3"
+    write /sys/class/android_usb/android0/enable 1
+    setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=mtp,adb
+    start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=mtp,adb
+    write /sys/class/android_usb/android0/enable 0
+    write /config/usb_gadget/g1/idProduct 0x2e76
+    write /config/usb_gadget/g1/idVendor 0x22b8
+    write /sys/class/android_usb/android0/functions ${sys.usb.config}
+    write /config/usb_gadget/g1/UDC "13200000.dwc3"
+    write /sys/class/android_usb/android0/enable 1
+    setprop sys.usb.state ${sys.usb.config}
+
+### Charging Compositions
+on property:sys.usb.config=charging
+    write /config/usb_gadget/g1/strings/0x409/serialnumber ${ro.serialno}
+    write /config/usb_gadget/g1/strings/0x409/manufacturer ${ro.product.manufacturer}
+    write /config/usb_gadget/g1/strings/0x409/product ${ro.product.model}
+    write /config/usb_gadget/g1/configs/c.1/strings/0x409/configuration "Motorola Charge only"
+    write /config/usb_gadget/g1/bcdDevice "0x0409"
+    rm /config/usb_gadget/g1/configs/c.1/mass_storage.0
+    symlink /config/usb_gadget/g1/functions/mass_storage.0 /config/usb_gadget/g1/configs/c.1/mass_storage.0
+    write /config/usb_gadget/g1/os_desc/b_vendor_code 0x1
+    write /config/usb_gadget/g1/os_desc/qw_sign "MSFT100"
+    write /config/usb_gadget/g1/os_desc/use  1
+    symlink /config/usb_gadget/g1/configs/c.1 /config/usb_gadget/g1/os_desc/c.1
+    write /config/usb_gadget/g1/UDC "none"
+    write /sys/class/android_usb/android0/enable 0
+    write /config/usb_gadget/g1/idVendor 0x22b8
+    write /config/usb_gadget/g1/idProduct 0x2eb7
+    write /sys/class/android_usb/android0/functions mass_storage
+    write /config/usb_gadget/g1/UDC "13200000.dwc3"
+    write /sys/class/android_usb/android0/enable 1
+    setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=rndis
+    write /sys/class/android_usb/android0/enable 0
+    write /config/usb_gadget/g1/idProduct 0x2e24
+    write /config/usb_gadget/g1/idVendor 0x22b8
+    write /sys/class/android_usb/android0/functions ${sys.usb.config}
+    write /config/usb_gadget/g1/UDC "13200000.dwc3"
+    write /sys/class/android_usb/android0/enable 1
+    setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=rndis,adb
+    start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,adb
+    write /sys/class/android_usb/android0/enable 0
+    write /config/usb_gadget/g1/idProduct 0x2e25
+    write /config/usb_gadget/g1/idVendor 0x22b8
+    write /sys/class/android_usb/android0/functions ${sys.usb.config}
+    write /config/usb_gadget/g1/UDC "13200000.dwc3"
+    write /sys/class/android_usb/android0/enable 1
+    setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=ptp
+    start vendor.tcmd
+    start TCMDReceiver
+    write /sys/class/android_usb/android0/enable 0
+    write /config/usb_gadget/g1/idProduct 0x2e83
+    write /config/usb_gadget/g1/idVendor 0x22b8
+    write /sys/class/android_usb/android0/functions ${sys.usb.config}
+    write /config/usb_gadget/g1/UDC "13200000.dwc3"
+    write /sys/class/android_usb/android0/enable 1
+    setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=ptp,adb
+    start vendor.tcmd
+    start TCMDReceiver
+    start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=ptp,adb
+    write /sys/class/android_usb/android0/enable 0
+    write /config/usb_gadget/g1/idProduct 0x2e84
+    write /config/usb_gadget/g1/idVendor 0x22b8
+    write /sys/class/android_usb/android0/functions ${sys.usb.config}
+    write /config/usb_gadget/g1/UDC "13200000.dwc3"
+    write /sys/class/android_usb/android0/enable 1
+    setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=rndis,dm
+    write /sys/class/android_usb/android0/enable 0
+    write /sys/class/android_usb/android0/functions ${sys.usb.config}
+    write /config/usb_gadget/g1/idProduct 0x6862
+    write /config/usb_gadget/g1/idVendor 0x04E8
+    write /config/usb_gadget/g1/UDC "13200000.dwc3"
+    write /sys/class/android_usb/android0/enable 1
+    setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=rndis,acm,dm
+    write /sys/class/android_usb/android0/enable 0
+    write /sys/class/android_usb/android0/functions ${sys.usb.config}
+    write /config/usb_gadget/g1/idProduct 0x6862
+    write /config/usb_gadget/g1/idVendor 0x04E8
+    write /config/usb_gadget/g1/UDC "13200000.dwc3"
+    write /sys/class/android_usb/android0/enable 1
+    setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=rndis,acm,dm,adb
+    stop adbd
+    start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,acm,dm,adb
+    write /sys/class/android_usb/android0/enable 0
+    write /sys/class/android_usb/android0/functions ${sys.usb.config}
+    write /config/usb_gadget/g1/idProduct 0x6862
+    write /config/usb_gadget/g1/idVendor 0x04E8
+    write /config/usb_gadget/g1/UDC "13200000.dwc3"
+    write /sys/class/android_usb/android0/enable 1
+    setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=dm,acm,adb
+    start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=dm,acm,adb
+    write /sys/class/android_usb/android0/enable 0
+    write /sys/class/android_usb/android0/functions ${sys.usb.config}
+    write /config/usb_gadget/g1/idProduct 0x685D
+    write /config/usb_gadget/g1/idVendor 0x04E8
+    write /config/usb_gadget/g1/UDC "13200000.dwc3"
+    write /sys/class/android_usb/android0/enable 1
+    setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=mass_storage
+    stop adbd
+    write /sys/class/android_usb/android0/enable 0
+    write /config/usb_gadget/g1/idProduct 0x685B
+    write /config/usb_gadget/g1/idVendor 0x04E8
+    write /sys/class/android_usb/android0/functions ${sys.usb.config}
+    write /sys/class/android_usb/android0/enable 1
+    setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=mass_storage,adb
+    start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=mass_storage,adb
+    write /sys/class/android_usb/android0/enable 0
+    write /config/usb_gadget/g1/idProduct 0x685E
+    write /config/usb_gadget/g1/idVendor 0x04E8
+    write /sys/class/android_usb/android0/functions ${sys.usb.config}
+    write /sys/class/android_usb/android0/enable 1
+    setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=mass_storage,acm
+    write /sys/class/android_usb/android0/enable 0
+    write /sys/class/android_usb/android0/idVendor 04e8
+    write /sys/class/android_usb/android0/idProduct 685e
+    write /sys/class/android_usb/android0/functions ${sys.usb.config}
+    write /sys/class/android_usb/android0/enable 1
+    setprop sys.usb.state ${sys.usb.config}
+
+# rndis,acm,diag and diag,acm,adb used for Hidden Menu
+
+on property:sys.usb.config=rndis,diag
+    write /sys/class/android_usb/android0/enable 0
+    write /sys/class/android_usb/android0/idVendor 04e8
+    write /sys/class/android_usb/android0/idProduct 6862
+    write /sys/class/android_usb/android0/f_diag/clients diag_mdm
+    write /sys/class/android_usb/android0/functions ${sys.usb.config}
+    write /sys/class/android_usb/android0/enable 1
+    setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,acm
+    write /sys/class/android_usb/android0/enable 0
+    write /sys/class/android_usb/android0/idVendor 04E8
+    write /sys/class/android_usb/android0/idProduct 685d
+    write /sys/class/android_usb/android0/f_diag/clients diag_mdm
+    write /sys/class/android_usb/android0/functions ${sys.usb.config}
+    write /sys/class/android_usb/android0/enable 1
+    setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=rndis,acm,diag
+    write /sys/class/android_usb/android0/enable 0
+    write /sys/class/android_usb/android0/idVendor 04E8
+    write /sys/class/android_usb/android0/idProduct 6864
+    write /sys/class/android_usb/android0/f_diag/clients diag_mdm
+    write /sys/class/android_usb/android0/functions ${sys.usb.config}
+    write /sys/class/android_usb/android0/enable 1
+    setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=accessory
+    write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "accessory"
+    write /config/usb_gadget/g1/idVendor 0x18d1
+    write /config/usb_gadget/g1/idProduct 0x2d00
+    write /sys/class/android_usb/android0/functions ${sys.usb.config}
+    write /config/usb_gadget/g1/UDC "13200000.dwc3"
+    setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=accessory,adb
+    start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=accessory,adb
+    write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "accessory_adb"
+    write /config/usb_gadget/g1/idVendor 0x18d1
+    write /config/usb_gadget/g1/idProduct 0x2d01
+    write /sys/class/android_usb/android0/functions ${sys.usb.config}
+    write /config/usb_gadget/g1/UDC "13200000.dwc3"
+    setprop sys.usb.state ${sys.usb.config}
+
+on load_persist_props_action
+    setprop vendor.usb.config  ${sys.usb.config}
+    setprop persist.vendor.mot.usb.config  ${persist.sys.usb.config:-" "}
+    setprop persist.sys.usb.config "  "
+    setprop persist.vendor.usb.config ${persist.sys.usb.config}
+
+on property:sys.boot_completed=*
+    setprop vendor.boot_completed ${sys.boot_completed}
+
+on property:persist.vendor.usb.config=*
+    setprop persist.sys.usb.config ${persist.vendor.usb.config}
+
+on property:vendor.usb.config=*
+    setprop sys.usb.config ${vendor.usb.config}
+
+on property:vendor.usb.controller=*
+    setprop sys.usb.controller ${vendor.usb.controller}
+
+on property:persist.vendor.usb.bp-tools.config=*
+    setprop persist.sys.usb.bp-tools.config ${persist.vendor.usb.bp-tools.config}
+    setprop persist.sys.usb.bp-tools.func ${persist.vendor.usb.bp-tools.config}
+
+on property:persist.vendor.usb.mot-factory.config=*
+    setprop persist.sys.usb.mot-factory.config ${persist.vendor.usb.mot-factory.config}
+    setprop persist.sys.usb.mot-factory.func ${persist.vendor.usb.mot-factory.config}
+
+
+
+service vendor.mmi-usb-sh /vendor/bin/init.mmi.usb.sh
+    class late_start
+    user root
+    group system
+    oneshot
diff --git a/configs/init/init.mmi.rc b/configs/init/init.mmi.rc
new file mode 100644 (file)
index 0000000..1a8b841
--- /dev/null
@@ -0,0 +1,516 @@
+# Chipset-specific file
+import /vendor/etc/init/hw/init.mmi.chipset.rc
+
+# Target-specific file
+import /vendor/etc/init/hw/init.mmi.overlay.rc
+
+# Moto USB configuration
+#import /vendor/etc/init/hw/init.mmi.usb.rc
+# Moto debugging
+import /vendor/etc/init/hw/init.mmi.debug.rc
+
+
+
+#import /vendor/etc/init/hw/init.oem.rc
+#import /vendor/etc/init/hw/init.mmi.common.rc
+#import /vendor/etc/init/hw/init.mmi.nonab.rc
+
+# Moto verified boot extension
+#import /vendor/etc/init/hw/init.mmi.hab.rc
+
+# Test commands
+import /vendor/etc/init/hw/init.mmi.tcmd.rc
+
+# Carrier specific script
+# Begin moto, huangzye 2019.08.29 IKSWQ-7064
+import /vendor/etc/init/carrier/init.${ro.boot.carrier}.rc
+import /vendor/etc/init/carrier/init.default.rc
+# End IKSWQ-7064
+
+on early-init
+
+on init
+    # Initialize cpusets to boot-time values
+    write /dev/cpuset/foreground/cpus 0-7
+    write /dev/cpuset/background/cpus 0-7
+    write /dev/cpuset/system-background/cpus 0-7
+    write /dev/cpuset/top-app/cpus 0-7
+    write /dev/cpuset/restricted/cpus 0-7
+
+    # set default schedTune value for foreground/top-app
+    write /dev/stune/foreground/schedtune.prefer_idle 1
+    write /dev/stune/top-app/schedtune.boost 10
+    write /dev/stune/top-app/schedtune.prefer_idle 1
+    write /dev/stune/rt/schedtune.boost 30
+    write /dev/stune/rt/schedtune.prefer_idle 1
+
+    write /sys/block/zram0/comp_algorithm lz4
+    write /proc/sys/vm/page-cluster 0
+    write /proc/sys/vm/swappiness 100
+    write /dev/memcg/memory.swappiness 100
+    write /dev/memcg/system/memory.swappiness 100
+    write /dev/memcg/apps/memory.swappiness 100
+
+    chown system log /sys/fs/pstore/console-ramoops-0
+    chmod 0440 /sys/fs/pstore/console-ramoops-0
+    chown system log /sys/fs/pstore/annotate-ramoops-0
+    chmod 0640 /sys/fs/pstore/annotate-ramoops-0
+    chown system log /sys/fs/pstore/dmesg-ramoops-0
+    chmod 0640 /sys/fs/pstore/dmesg-ramoops-0
+    # Setup kernel dropbox permission so that dropboxd can utilize it
+    chown root diag /sys/kernel/dropbox/event
+    chown root diag /sys/kernel/dropbox/data
+
+on fs
+    wait /dev/block/bootdevice/by-name/hw
+    exec_start vendor.oem-hw-sh
+
+    # Make sure ro.boot.product.hardware.sku is set before hwservicemanager startup.
+    setprop ro.boot.product.hardware.sku ${ro.vendor.product.hardware.sku.variant}
+
+    # Map oem properties, this must follow
+    # execution of vendor.oem-hw-sh to set
+    # required properties.
+    setprop ro.carrier ${ro.boot.carrier}
+    setprop ro.sf.lcd_density ${ro.boot.lcd_density}
+    setprop ro.vendor.fsg-id ${ro.boot.fsg-id}
+    setprop ro.vendor.hw.device ${ro.boot.device}
+    setprop ro.vendor.hw.hwrev ${ro.boot.hwrev}
+    setprop ro.vendor.hw.modelno ${ro.boot.modelno}
+    setprop ro.vendor.hw.revision ${ro.boot.revision}
+    setprop ro.vendor.hw.nav_keys ${ro.boot.nav_keys}
+    setprop ro.product.vendor.device ${ro.vendor.product.device}
+    setprop ro.product.vendor.name ${ro.vendor.product.name}
+    setprop ro.vendor.boot.cid ${ro.boot.cid}
+    setprop ro.vendor.boot.powerup_reason ${ro.boot.powerup_reason}
+    setprop ro.vendor.boot.bl_state ${ro.boot.bl_state}
+    setprop ro.vendor.boot.serialno ${ro.boot.serialno}
+    setprop ro.vendor.zygote ${ro.zygote}
+
+on post-fs
+    mkdir /mnt/vendor/persist/camera 0755 vendor_tcmd vendor_tcmd
+    mkdir /mnt/vendor/persist/camera/dualcal 0775 camera vendor_tcmd
+    mkdir /mnt/vendor/persist/camera/focus 0775 camera vendor_tcmd
+    mkdir /mnt/vendor/persist/camera/ledcal 0775 camera vendor_tcmd
+    mkdir /mnt/vendor/persist/batt_health 0755 vendor_pwric vendor_pwric
+    mkdir /mnt/vendor/persist/mdm 0770 radio radio
+    mkdir /mnt/vendor/persist/factory 0755 vendor_tcmd vendor_tcmd
+    mkdir /mnt/vendor/persist/factory/audio 0755 vendor_tcmd system
+    mkdir /mnt/vendor/persist/factory/wlan 0755 vendor_tcmd vendor_tcmd
+    mkdir /mnt/vendor/persist/factory/regulatory 0755 vendor_tcmd system
+    mkdir /mnt/vendor/persist/public 0755 vendor_tcmd vendor_tcmd
+    mkdir /persist/public/atvc 0770 mot_atvc shell
+    mkdir /mnt/vendor/persist/public/att_dm 0775 radio vendor_tcmd
+    mkdir /mnt/vendor/persist/public/hiddenmenu 0775 radio vendor_tcmd
+    mkdir /mnt/vendor/persist/public/hiddenmenu/data 0775 system vendor_tcmd
+    mkdir /persist/public/locale 0700 system system
+    mkdir /persist/public/omadm 0700 radio radio
+    mkdir /persist/public/svcs 0770 system system
+    mkdir /mnt/vendor/persist/wifi 0755 vendor_tcmd vendor_tcmd
+    mkdir /mnt/vendor/persist/bt 0755 vendor_tcmd bluetooth
+    mkdir /persist/public/usc_dm 0775 radio radio
+    mkdir /persist/sds 0700 vold vold
+    mkdir /mnt/vendor/persist/rfs/msm/mpss/mot_rfs 0771 rfs system
+
+    # This dir is used to store any OMA(both DM and CP) files in persist partition
+    # Any app with radio UID or vendor_tcmd GID can read/write/execute files in this dir.
+    mkdir /mnt/vendor/persist/public/oma 0775 radio vendor_tcmd
+
+    chown vendor_tcmd vendor_tcmd /mnt/vendor/persist/factory/fti
+    chmod 0664 /mnt/vendor/persist/factory/fti
+    chown vendor_tcmd vendor_tcmd /mnt/vendor/persist/factory/byte
+    chmod 0660 /mnt/vendor/persist/factory/byte
+    chmod 0660 /mnt/vendor/persist/wifi/wlan_mac.bin
+    chown vendor_tcmd vendor_tcmd /mnt/vendor/persist/bt/bt_bdaddr
+    chmod 0664 /mnt/vendor/persist/bt/bt_bdaddr
+
+    # Set life_calls and life_timer file permissions
+    chown radio vendor_tcmd /mnt/vendor/persist/public/hiddenmenu/life_calls
+    chmod 0775 /mnt/vendor/persist/public/hiddenmenu/life_calls
+    chown radio vendor_tcmd /mnt/vendor/persist/public/hiddenmenu/life_timer
+    chmod 0775 /mnt/vendor/persist/public/hiddenmenu/life_timer
+
+    # sensorcal.json
+    mkdir /mnt/vendor/persist/sensor
+    chown root system /mnt/vendor/persist/sensor
+    chmod 0770 /mnt/vendor/persist/sensor
+    chown root system /mnt/vendor/persist/sensor/sensorcal.json
+    chmod 0660 /mnt/vendor/persist/sensor/sensorcal.json
+
+    swapon_all /vendor/etc/fstab.exynos9610
+
+    # Set dm-verity property for system partition
+#    verity_update_state
+
+on post-fs-data
+    setprop  ro.vendor.build.fingerprint ${ro.product.vendor.brand}/${ro.product.vendor.name}/${ro.product.vendor.device}:${ro.vendor.build.version.release}/${ro.vendor.build.id}/${ro.vendor.build.version.incremental}:${ro.vendor.build.type}/${ro.vendor.build.tags}
+
+    # Setup folders for security
+    mkdir /mnt/vendor/persist/security 02775 system vendor_tcmd
+    mkdir /mnt/vendor/persist/mobicore 0775 system system
+    mkdir /data/vendor/dbvc 0750 vendor_tcmd shell
+    mkdir /data/vendor/mcRegistry 0775 system drmrpc
+    chown system vendor_tcmd /mnt/vendor/persist/security
+    chmod 0644 /mnt/vendor/persist/security/attest_keybox.so
+    chmod 0644 /mnt/vendor/persist/security/wv.keys
+    symlink /mnt/vendor/persist/security/wv.keys /mnt/vendor/persist/wv.keys
+    symlink /mnt/vendor/persist/security/attest_keybox.so /mnt/vendor/persist/attest_keybox.so
+    symlink /mnt/vendor/persist/mobicore/00000000.authtokcont /data/vendor/mcRegistry/00000000.authtokcont.backup
+
+    # Setup folder for Pre-Activation Kill Switch app (PAKS)
+    mkdir /mnt/vendor/persist/paks 02770 vendor_tcmd vendor_tcmd
+
+    # Create directory used by power_supply_logger
+    mkdir /data/vendor/power_supply_logger 0750 vendor_pwric log
+    # Create directory power_supply_logger used by memtest and batt_health
+    mkdir /data/vendor_de/power_supply_logger 0770 root log
+
+    # Permissions for Factory Test of Charging Paths
+    chown vendor_pwric vendor_pwric /sys/class/power_supply/battery/device/force_chg_auto_enable
+    chown vendor_pwric vendor_pwric /sys/class/power_supply/battery/device/force_chg_ibatt
+    chown vendor_pwric vendor_pwric /sys/class/power_supply/battery/device/force_chg_itrick
+    chown vendor_pwric vendor_pwric /sys/class/power_supply/battery/device/force_chg_iusb
+    chown vendor_pwric vendor_pwric /sys/class/power_supply/battery/device/force_chg_idc
+    chown vendor_pwric vendor_pwric /sys/class/power_supply/battery/device/force_chg_usb_suspend
+    chown vendor_pwric vendor_pwric /sys/class/power_supply/battery/device/force_chg_fail_clear
+    chown vendor_pwric vendor_pwric /sys/class/power_supply/battery/device/force_chg_usb_otg_ctl
+
+
+    chown root vendor_mod /sys/class/power_supply/usb/usb_priority
+    chmod 0660 /sys/class/power_supply/usb/usb_priority
+    chown root vendor_mod /sys/module/dwc3_msm/parameters/usb_priority
+    chmod 0660 /sys/module/dwc3_msm/parameters/usb_priority
+
+    # Thermal charging limitation
+    chmod 0660 /sys/class/power_supply/battery/charge_control_limit
+
+    # Setup folder for native to transfer data to NativeDropBoxAgent
+    mkdir /data/vendor/dropbox-add 0730 log diag
+
+    # Create panic dump dir.
+    mkdir /data/vendor/dontpanic 0750 root log
+
+    # Create directory for cutback
+    mkdir /data/vendor/misc/cutback 0770 radio wifi
+
+    # Create directory for fm_radio
+    mkdir /data/misc/fm_radio 0770 system system
+
+    # mkdir IPLog folder
+    mkdir /data/vendor/misc/iplog 0770 system system
+
+
+    # Create bug2go folder
+    mkdir /data/vendor/bug2go 0770 log log
+
+    # Setup folder for aplogd
+    mkdir /data/vendor/aplogd 0750 log log
+
+    # Create directory used by chargeonlymode
+    mkdir /data/vendor/chargeonly 0750 root log
+
+    # Permissions for phone power off log
+    mkdir /data/vendor/power_log 0750 root log
+    chmod 0660 /sys/module/power_supply_log/parameters/log_file
+    write /sys/module/power_supply_log/parameters/log_file /data/vendor/power_log/power_off.log
+
+    # folder for Blueooth ramdump
+    mkdir /data/vendor/bt-ram-dumps 0750 bluetooth log
+
+    #Folder for hardware properties
+    mkdir /data/vendor/hardware_revisions 0755 system system
+
+    # Imager tuning data for camera subsystem
+    mkdir /data/vendor/misc/imager 0771 camera camera
+
+    # NFC vendor data
+    mkdir /data/vendor/nfc 0770 nfc nfc
+
+on boot
+   # restore default console_loglevel to KERN_DEBUG
+   # restore default_message_loglevel to KERN_WARNING
+   write /proc/sys/kernel/printk "7 4 1 7"
+
+    # MOTO, NJH348, IKHALFMWK-1864, change system max tcp buffer sizes based on RAT changes
+    # Define system changable TCP buffer max values
+    chown system system /proc/sys/net/core/rmem_max
+    chown system system /proc/sys/net/core/wmem_max
+
+ # Change ownership and permission for leds backlight
+   chmod 0664 /sys/class/leds/lcd-backlight/brightness
+   chown system system /sys/class/leds/charging/brightness
+   chmod 0664 /sys/class/leds/charging/brightness
+
+   # change permission of red leds
+   chown system system /sys/class/leds/red/brightness
+   chmod 0664 /sys/class/leds/red/brightness
+
+   # Change ownership and permission for vibrator
+   chown system system /sys/class/timed_output/vibrator/enable
+   chmod 0660 /sys/class/timed_output/vibrator/enable
+   chown system system /sys/class/leds/vibrator/state
+   chmod 0660 /sys/class/leds/vibrator/state
+   chown system system /sys/class/leds/vibrator/activate
+   chmod 0660 /sys/class/leds/vibrator/activate
+   chown system system /sys/class/leds/vibrator/duration
+   chmod 0660 /sys/class/leds/vibrator/duration
+   chown root vendor_mod /sys/bus/i2c/devices/2-005a/reduce
+
+   # Change ownership of aov related sysfs entries
+   chown audio audio /sys/kernel/aov/trigger
+   chown audio audio /sys/kernel/aov/register
+   chown audio audio /sys/kernel/aov/event
+
+   # Quiet binder logs
+   write /sys/module/binder/parameters/debug_mask 0x5
+
+   # Clear cooldown state
+   mkdir /mnt/vendor/persist/chargeonly 0770 system system
+   write /mnt/vendor/persist/chargeonly/cooldown n
+   chown system system /mnt/vendor/persist/chargeonly/cooldown
+   chmod 0660 /mnt/vendor/persist/chargeonly/cooldown
+
+   # Flashlight control for HAL3
+   chmod 0660 /sys/class/leds/fled-s2mu106/fled_mode
+   chown system camera /sys/class/leds/fled-s2mu106/fled_mode
+   chmod 0660 /sys/class/leds/fled-s2mu106/fled_torch_curr
+   chown system camera /sys/class/leds/fled-s2mu106/fled_torch_curr
+
+   chown system system sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq
+   chown system system sys/devices/system/cpu/cpufreq/policy4/scaling_max_freq
+   chmod 0666 sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq
+   chmod 0666 sys/devices/system/cpu/cpufreq/policy4/scaling_max_freq
+
+service vendor.mmi-block-perm /vendor/bin/init.mmi.block_perm.sh
+    class main
+    user root
+    oneshot
+
+
+service vendor.pstore_annotate /vendor/bin/pstore_annotate.sh build
+    class main
+    group log
+    oneshot
+
+service vendor.apanic_copy /vendor/bin/apanic_copy.sh
+    class late_start
+    group log
+    oneshot
+    disabled
+
+service vendor.bl_logs_copy /vendor/bin/apanic_copy.sh -i
+    class late_start
+    group log
+    oneshot
+    disabled
+
+on property:sys.boot_completed=1 && property:ro.bootmode=bp-tools
+   start VC-daemon
+
+on property:sys.boot_completed=1 && property:ro.bootmode=mot-factory
+   start VC-daemon
+
+# For not to impact boot completed broadcast, set cpusets after broadcast.
+on property:sys.bootbroadcast_completed=1
+    write /dev/cpuset/foreground/cpus 0-7
+    write /dev/cpuset/top-app/cpus 0-7
+    write /dev/cpuset/background/cpus 0-3
+    write /dev/cpuset/system-background/cpus 0-7
+    write /dev/cpuset/restricted/cpus 0-3
+
+on charger
+    trigger early-fs
+    trigger fs
+    trigger post-fs
+    trigger late-fs
+    trigger post-fs-data
+    trigger moto-charger
+    class_stop main
+    class_stop late_start
+
+on moto-charger
+    chown radio wakelock /sys/power/wake_lock
+    chown radio wakelock /sys/power/wake_unlock
+    chmod 0660 /sys/power/wake_lock
+    chmod 0660 /sys/power/wake_unlock
+#    setprop ro.board.platform msm8953
+    load_system_props
+    trigger firmware_mounts_complete
+    setprop sys.usb.configfs 1
+    setprop sys.usb.config charging
+    start  qcom-post-boot
+#    start vendor.hvdcp_opti
+    start gbmodinstall
+    start system_suspend
+    start vendor.charge_only_mode
+    start batt_health
+    start thermal-com
+
+service vendor.apanic_annotate /vendor/bin/apanic_save.sh build
+    class late_start
+    group log
+    oneshot
+    disabled
+
+#service vendor.batt_health /vendor/bin/batt_health
+#    class late_start
+#    user vendor_pwric
+#    group vendor_pwric cache net_admin log
+#    disabled
+
+on property:ro.vendor.bootreason=coldboot
+    start vendor.apanic_copy
+
+on property:ro.vendor.bootreason=watchdog
+    stop surfaceflinger
+    stop zygote
+    stop zygote_secondary
+    stop sensors
+    start vendor.apanic_annotate
+
+on property:ro.vendor.bootreason=pmic_watchdog
+    stop surfaceflinger
+    stop zygote
+    stop zygote_secondary
+    stop sensors
+    start vendor.apanic_annotate
+
+on property:ro.vendor.bootreason=kernel_panic
+    stop surfaceflinger
+    stop zygote
+    stop zygote_secondary
+    stop sensors
+    start vendor.apanic_annotate
+
+on property:persist.vendor.log.aplogd.enable=1
+    start vendor.aplogd
+
+on property:persist.vendor.log.aplogd.enable=0
+    stop vendor.aplogd
+
+service vendor.aplogd /vendor/bin/aplogd
+    class late_start
+    #user log
+    #group log system sdcard_rw sdcard_r media_rw mount
+    # The user and group definitions above are intentionally disabled and left
+    # only as documentation. It actually starts as root and immediately drops
+    # to log plus those groups after preserving CAP_SYS_ADMIN, which is required
+    # for kernel logging.
+    disabled
+
+# from P onwards aplogd cannot read vold.post_fs_data_done so a new property
+# shall be used to allow aplogd checking if FBE has finished /data decryption
+on property:vold.post_fs_data_done=*
+     setprop vendor.vold.post_fs_data_done ${vold.post_fs_data_done}
+
+service vendor.mmi-boot-sh /vendor/bin/init.mmi.boot.sh
+    class core
+    user root
+    oneshot
+
+on property:ro.vendor.hw.dualsim=true
+   setprop persist.radio.multisim.config dsds
+
+on property:ro.vendor.hw.dualsim=false
+   setprop persist.radio.multisim.config ""
+
+service vendor.mbm_spy /vendor/bin/mbm_spy
+    class late_start
+    user system
+    group system
+    oneshot
+    disabled
+
+on property:sys.boot_completed=1
+    start vendor.mbm_spy
+
+service dropboxd /vendor/bin/dropboxd
+    class late_start
+    user diag
+    group diag
+
+service vendor.hw_revs /vendor/bin/hardware_revisions.sh
+    class late_start
+    user system
+    group system
+    oneshot
+
+service vendor.mmi-touch-sh /vendor/bin/init.mmi.touch.sh
+    class core
+    user root
+    oneshot
+
+service vendor.oem-hw-sh /vendor/bin/init.oem.hw.sh
+    class core
+    user root
+    oneshot
+    disabled
+
+#service vendor.touch-dead-sh /vendor/bin/init.oem.hw.sh -f
+#    class main
+#    user root
+#    oneshot
+#    disabled
+
+#service vendor.touch-ready-sh /vendor/bin/init.oem.hw.sh -r
+#    class main
+#    user root
+#    oneshot
+#    disabled
+
+#service vendor.oem-hw-config-sh /vendor/bin/init.oem.hw.sh -p
+#    class main
+#    user root
+#    oneshot
+#    disabled
+
+#on property:vendor.hw.touch.status="dead"
+#    start vendor.touch-dead-sh
+
+#on property:vendor.hw.touch.status="ready"
+#    start vendor.touch-ready-sh
+
+service vendor.charge_only_mode /vendor/bin/charge_only_mode
+    user root
+    group graphics system input
+    disabled
+
+#service vendor.thermal-com /vendor/bin/thermal-engine --minimode
+#    class main
+#    user root
+#    disabled
+
+
+# bugreport is triggered by holding down volume down, volume up and power
+service bugreport /system/bin/dumpstate -d -p -B -z \
+        -o /data/user_de/0/com.android.shell/files/bugreports/bugreport
+    class main
+    disabled
+    oneshot
+    keycodes 114 115 116
+
+
+#on property:vendor.wifi.tethering=false
+#    write /sys/module/wlan/parameters/fwpath apdown
+
+# Override the AOSP sensor HAL service definition to add input group access
+#service vendor.sensors-hal-1-0 /vendor/bin/hw/android.hardware.sensors@1.0-service
+#    class hal
+#    user system
+#    group system input wakelock
+#    capabilities BLOCK_SUSPEND
+#    rlimit rtprio 10 10
+
+#Override fwpath string when wpa_supplicant server was killed
+#on property:init.svc.wpa_supplicant=running
+#    write /sys/module/wlan/parameters/fwpath sta
+
+#on property:init.svc.wpa_supplicant=stopped
+#    write /sys/module/wlan/parameters/fwpath wpadown
+
+# androidboot.hardware.sku represents the SKU name being used for Regulatory approval (e.g. XT1101-01).
+# This property is used in AOSP for the Settings app to display an appropriate Regulatory E-Label
+# androidboot.product.hardware.sku represents a SKU name to assist the vendor image in determining
+# a unique HW form factor for purposes of determining a unique VINTF manifest
+#on property:ro.boot.hardware.sku=*
+#    setprop ro.boot.product.hardware.sku ${ro.boot.hardware.sku}
diff --git a/configs/init/init.mot-factory.rc b/configs/init/init.mot-factory.rc
new file mode 100644 (file)
index 0000000..6a58b9b
--- /dev/null
@@ -0,0 +1,15 @@
+
+on early-init && property:ro.bootmode=mot-factory
+    mkdir /mnt/vendor/efsbk 0755 root system
+
+on fs && property:ro.bootmode=mot-factory
+       mount_all /vendor/etc/fstab.mptool
+
+on post-fs-data && property:ro.bootmode=mot-factory
+    restorecon_recursive /mnt/vendor/efsbk
+    chmod 750 /mnt/vendor/efsbk
+
+on boot && property:ro.bootmode=mot-factory
+       class_start factory
+
+
diff --git a/configs/init/init.nfc.sec.rc b/configs/init/init.nfc.sec.rc
new file mode 100644 (file)
index 0000000..dbbe530
--- /dev/null
@@ -0,0 +1,6 @@
+on boot
+
+# NFC permission
+    chown nfc nfc /dev/sec-nfc
+    chmod 0770 /dev/sec-nfc
+
diff --git a/configs/init/mobicore.rc b/configs/init/mobicore.rc
new file mode 100644 (file)
index 0000000..34cd4d2
--- /dev/null
@@ -0,0 +1,16 @@
+on late-fs
+    export MC_AUTH_TOKEN_PATH /mnt/vendor/persist/mobicore
+    start mobicore
+
+on nonencrypted
+    mkdir /mnt/vendor/persist/mobicore 0775 system system
+    mkdir /data/vendor/mcRegistry 0775 system drmrpc
+
+on property:vold.decrypt=trigger_restart_framework
+    mkdir /mnt/vendor/persist/mobicore 0775 system drmrpc
+    mkdir /data/vendor/mcRegistry 0775 system drmrpc
+
+service mobicore /vendor/bin/mcDriverDaemon -r FFFFFFFF000000000000000000000001 -r /vendor/app/mcRegistry/FFFFFFFFD00000000000000000000016.tlbin
+    user drmrpc
+    group system drmrpc
+    class core
diff --git a/configs/init/mplog.rc b/configs/init/mplog.rc
new file mode 100644 (file)
index 0000000..41e00ae
--- /dev/null
@@ -0,0 +1,34 @@
+
+##off = 0
+##on = 1
+##default 0
+on property:persist.mptool.dumplog.on=*
+       setprop mptool.dumplog.on ${persist.mptool.dumplog.on}
+
+#default 1024
+on property:persist.mptool.log.buffer.size=*
+       setprop mptool.log.buffer.size ${persist.mptool.log.buffer.size}
+
+#verbose       -       0
+#debug -       1
+#info  -       2
+#warn  -       3
+##default 2
+on property:persist.mptool.log.severity=*
+       setprop mptool.log.severity ${persist.mptool.log.severity}
+
+##off = 0
+##on = 1
+#default 0
+on property:persist.mptool.log.on=*
+       setprop mptool.log.on ${persist.mptool.log.on}
+
+#smcd 0x00010000
+#swcnd 0x00001000
+#spad 0x00000010
+#sctd 0x00000001
+#sfmd 0x00000100
+on property:persist.mptool.log.catgory=*
+       setprop mptool.log.catgory ${persist.mptool.log.catgory}
+
+
diff --git a/configs/init/rfsd.rc b/configs/init/rfsd.rc
new file mode 100644 (file)
index 0000000..4c8c8d2
--- /dev/null
@@ -0,0 +1,6 @@
+# RFS daemon
+    service RFS-daemon /vendor/bin/rfsd -d
+    class main
+    user root
+    group radio cache inet misc audio sdcard_rw log
+    seclabel u:r:rfsd:s0
diff --git a/configs/init/rild.rc b/configs/init/rild.rc
new file mode 100644 (file)
index 0000000..c80b931
--- /dev/null
@@ -0,0 +1,14 @@
+service ril-daemon /vendor/bin/hw/rild_exynos
+    class main
+    user radio
+    group radio cache inet misc audio log readproc wakelock
+    capabilities BLOCK_SUSPEND NET_ADMIN NET_RAW
+    seclabel u:r:rild:s0
+
+on property:vendor.sys.rild_reset=1
+    setprop vendor.sys.rild_reset 0
+    
+on property:vendor.sys.modem_reset=1
+    stop cpboot-daemon
+    setprop vendor.sys.modem_reset 0
+    start cpboot-daemon
diff --git a/configs/init/sced.rc b/configs/init/sced.rc
new file mode 100644 (file)
index 0000000..f9cddc9
--- /dev/null
@@ -0,0 +1,6 @@
+service SCE-daemon /vendor/bin/sced
+    class main
+    user system
+    group system
+    capabilities NET_ADMIN NET_RAW
+    seclabel u:r:sced:s0
diff --git a/configs/init/sctd.rc b/configs/init/sctd.rc
new file mode 100644 (file)
index 0000000..a1e4dad
--- /dev/null
@@ -0,0 +1,6 @@
+
+service sctd /vendor/bin/sctd --json "/vendor/etc/sctd.json"
+    class factory
+    user root
+    group root system bluetooth radio misc
+
diff --git a/configs/init/smcd.rc b/configs/init/smcd.rc
new file mode 100644 (file)
index 0000000..de3bd72
--- /dev/null
@@ -0,0 +1,5 @@
+service smcd /vendor/bin/smcd -m ${mptool.smcd.mode:-vcd} -t ${mptool.smcd.timeout:-60}
+    class factory
+    user system
+    group system radio
+
diff --git a/configs/init/spad.rc b/configs/init/spad.rc
new file mode 100644 (file)
index 0000000..6224324
--- /dev/null
@@ -0,0 +1,5 @@
+service SPA-daemon  /vendor/bin/spad
+    class factory
+    group system root radio cache inet misc audio log
+    user root
+
diff --git a/configs/init/swcnd.rc b/configs/init/swcnd.rc
new file mode 100644 (file)
index 0000000..c0f0e29
--- /dev/null
@@ -0,0 +1,8 @@
+on post-fs-data && property:ro.bootmode=sfactory
+       setprop sys.boot_completed 1
+
+service swcnd /vendor/bin/swcnd --json "/vendor/etc/swcnd.json"
+    class factory
+    user root
+    group system bluetooth radio misc
+
diff --git a/configs/init/tcmd.receiver.rc b/configs/init/tcmd.receiver.rc
new file mode 100644 (file)
index 0000000..92a2f49
--- /dev/null
@@ -0,0 +1,5 @@
+service TCMDReceiver /vendor/bin/tcmd_receiver
+    class factory
+    user root
+    group system
+
diff --git a/configs/init/tcmd.simulater.rc b/configs/init/tcmd.simulater.rc
new file mode 100644 (file)
index 0000000..d263d2f
--- /dev/null
@@ -0,0 +1,6 @@
+
+service tcmd_simulater /vendor/bin/tcmd_simulater
+    class simulater
+    user root
+    group root system bluetooth radio misc
+
diff --git a/configs/init/ueventd.rc b/configs/init/ueventd.rc
new file mode 100644 (file)
index 0000000..18f3f21
--- /dev/null
@@ -0,0 +1,193 @@
+/dev/mali0                0666   system     system
+/dev/ion                  0666   system     system
+/dev/ump                  0666   system     graphics
+/dev/exynos-mem           0660   system     graphics
+/dev/video0               0660   system     camera
+/dev/video1               0660   system     camera
+/dev/video2               0660   system     camera
+/dev/video3               0660   system     camera
+/dev/video20              0660   system     system
+# media0 is used for GSC, DECON, etc
+/dev/media0               0660   system     camera
+# media1 is used for DECON Ext WB
+/dev/media1               0660   system     graphics
+# Various devices use the v4l-subdev interface
+# We declare all such nodes simultaneously here
+/dev/v4l-subdev0          0660   system     camera
+/dev/v4l-subdev1          0660   system     camera
+/dev/v4l-subdev2          0660   system     camera
+/dev/v4l-subdev3          0660   system     camera
+/dev/v4l-subdev4          0660   system     camera
+/dev/v4l-subdev5          0660   system     camera
+/dev/v4l-subdev6          0660   system     camera
+/dev/v4l-subdev7          0660   system     camera
+/dev/v4l-subdev8          0660   system     camera
+/dev/v4l-subdev9          0660   system     camera
+/dev/v4l-subdev10         0660   system     camera
+/dev/v4l-subdev11         0660   system     camera
+/dev/v4l-subdev12         0660   system     camera
+/dev/v4l-subdev13         0660   system     camera
+/dev/v4l-subdev14         0660   system     camera
+/dev/v4l-subdev15         0660   system     camera
+/dev/v4l-subdev16         0660   system     camera
+/dev/v4l-subdev17         0660   system     camera
+/dev/v4l-subdev18         0660   system     camera
+/dev/v4l-subdev19         0660   system     camera
+# v4l-subdev20 is used for DECON Ext WB
+/dev/v4l-subdev20         0660   system     graphics
+/dev/v4l-subdev21         0660   system     graphics
+/dev/v4l-subdev32         0660   system     graphics
+
+# gscalers
+/dev/video23              0660   media      graphics
+/dev/video26              0660   media      graphics
+/dev/video24              0660   media      graphics
+/dev/video27              0660   media      graphics
+/dev/video29              0660   media      graphics
+/dev/video30              0660   media      graphics
+# video31 is used for DECON Ext WB
+/dev/video31              0660   media      graphics
+
+# mscalers
+/dev/video50              0660   mediacodec      drmrpc
+/dev/m2m1shot_scaler0     0660   mediacodec      drmrpc
+
+/dev/video55              0666   system     graphics
+/dev/g2d                  0660   system     graphics
+/dev/fimg2d               0666   system     graphics
+/dev/i2c-2                0660   system     system
+/dev/HPD                  0660   system     system
+
+# mfc
+/dev/video6               0660   mediacodec mediadrm
+/dev/video7               0660   mediacodec mediadrm
+/dev/video8               0660   mediacodec mediadrm
+/dev/video9               0660   mediacodec mediadrm
+/dev/video10              0660   mediacodec mediadrm
+/dev/video11              0660   mediacodec mediadrm
+
+# camera
+/dev/video101             0660   cameraserver   camera
+/dev/video102             0660   cameraserver   camera
+/dev/video103             0660   cameraserver   camera
+/dev/video104             0660   cameraserver   camera
+/dev/video107             0660   cameraserver   camera
+/dev/video109             0660   cameraserver   camera
+/dev/video110             0660   cameraserver   camera
+/dev/video111             0660   cameraserver   camera
+/dev/video112             0660   cameraserver   camera
+/dev/video120             0660   cameraserver   camera
+/dev/video121             0660   cameraserver   camera
+/dev/video122             0660   cameraserver   camera
+/dev/video130             0660   cameraserver   camera
+/dev/video131             0660   cameraserver   camera
+/dev/video132             0660   cameraserver   camera
+/dev/video140             0660   cameraserver   camera
+/dev/video141             0660   cameraserver   camera
+/dev/video142             0660   cameraserver   camera
+/dev/video148             0660   cameraserver   camera
+/dev/video150             0660   cameraserver   camera
+/dev/video151             0660   cameraserver   camera
+/dev/video152             0660   cameraserver   camera
+/dev/video153             0660   cameraserver   camera
+/dev/video154             0660   cameraserver   camera
+/dev/video155             0660   cameraserver   camera
+/dev/video156             0660   cameraserver   camera
+/dev/video157             0660   cameraserver   camera
+/dev/video160             0660   cameraserver   camera
+/dev/video161             0660   cameraserver   camera
+/dev/video170             0660   cameraserver   camera
+/dev/video171             0660   cameraserver   camera
+/dev/video172             0660   cameraserver   camera
+/dev/video173             0660   cameraserver   camera
+/dev/video174             0660   cameraserver   camera
+/dev/video175             0660   cameraserver   camera
+/dev/video180             0660   cameraserver   camera
+/dev/video190             0660   cameraserver   camera
+/dev/video191             0660   cameraserver   camera
+/dev/video192             0660   cameraserver   camera
+/dev/video193             0660   cameraserver   camera
+/dev/video210             0660   cameraserver   camera
+/dev/video211             0660   cameraserver   camera
+/dev/video212             0660   cameraserver   camera
+/dev/video213             0660   cameraserver   camera
+/dev/video214             0660   cameraserver   camera
+/dev/video215             0660   cameraserver   camera
+/dev/video216             0660   cameraserver   camera
+/dev/video217             0660   cameraserver   camera
+/dev/video218             0660   cameraserver   camera
+/dev/video219             0660   cameraserver   camera
+/dev/video220             0660   cameraserver   camera
+/dev/video221             0660   cameraserver   camera
+/dev/video222             0660   cameraserver   camera
+/dev/video223             0660   cameraserver   camera
+/dev/video224             0660   cameraserver   camera
+/dev/video225             0660   cameraserver   camera
+/dev/video240             0660   cameraserver   camera
+/dev/video241             0660   cameraserver   camera
+/dev/media2               0660   media      media
+/dev/hdcp2                0660   media      media
+
+# jpeg
+/dev/m2m1shot_jpeg           0660   media          media
+/dev/video12              0660   cameraserver   media
+
+# audio
+/dev/seiren               0660   system     audio
+
+# Mobicore
+/dev/mobicore             0600   drmrpc     drmrpc
+/dev/mobicore-user        0666   drm        drmrpc
+
+# Secure MEM driver
+/dev/s5p-smem             0660   drm        drmrpc
+
+#temporary
+/data/modem.bin           0400   radio      system
+
+# Diag and AT
+/dev/umts_dm0             0660   system     system
+/dev/umts_router          0660   system     system
+/dev/ttyGS0               0660   system     system
+/dev/ttyGS1               0660   system     system
+/dev/ttyGS2               0660   system     system
+
+# IPC RIL
+/dev/umts_boot0           0660   radio      system
+/dev/umts_ipc0            0660   radio      radio
+/dev/umts_ipc1            0660   radio      radio
+/dev/umts_rfs0            0660   radio      radio
+/dev/block/platform/13520000.ufs/by-name/frp 0660   root     system
+# interactive governor parameters
+/sys/devices/system/cpu/cpu*   cpufreq/interactive/timer_rate                  0660    system  system
+/sys/devices/system/cpu/cpu*   cpufreq/interactive/timer_slack                 0660    system  system
+/sys/devices/system/cpu/cpu*   cpufreq/interactive/min_sample_time             0660    system  system
+/sys/devices/system/cpu/cpu*   cpufreq/interactive/hispeed_freq                0660    system  system
+/sys/devices/system/cpu/cpu*   cpufreq/interactive/target_loads                0660    system  system
+/sys/devices/system/cpu/cpu*   cpufreq/interactive/go_hispeed_load             0660    system  system
+/sys/devices/system/cpu/cpu*   cpufreq/interactive/above_hispeed_delay         0660    system  system
+/sys/devices/system/cpu/cpu*   cpufreq/interactive/boost                       0660    system  system
+/sys/devices/system/cpu/cpu*   cpufreq/interactive/boostpulse                  0200    system  system
+/sys/devices/system/cpu/cpu*   cpufreq/interactive/input_boost                 0660    system  system
+/sys/devices/system/cpu/cpu*   cpufreq/interactive/boostpulse_duration         0660    system  system
+/sys/devices/system/cpu/cpu*   cpufreq/interactive/io_is_busy                  0660    system  system
+
+# Vision
+/dev/vertex0             0660   cameraserver   camera
+/dev/vertex1             0660   media      media
+/dev/vipx                0660   cameraserver   camera
+
+#SCSC Bluetooth
+/dev/scsc_h4_0           0660   bluetooth  bluetooth
+
+# SCSC WLAN
+/dev/mx_0_r4_gdb          0660   wifi     wifi
+/dev/mx_0_m4_gdb          0660   wifi     wifi
+/dev/mx_0_mmap            0660   wifi     wifi
+/dev/mx_client_test_0     0660   wifi     wifi
+/dev/mx_0_debug_sampler   0660   wifi     wifi
+/dev/mx140_usb_clk_test_0 0660   wifi     wifi
+/dev/scsc_log_collector_0 0660   wifi     wifi
+
+# Add device block for FRP
+/dev/block/platform/13520000.ufs/by-name/frp   0600   system     system
diff --git a/configs/init/vcd.rc b/configs/init/vcd.rc
new file mode 100644 (file)
index 0000000..bb1a177
--- /dev/null
@@ -0,0 +1,7 @@
+# VC daemon
+    service VC-daemon /vendor/bin/vcd
+    class late_start
+    user system
+    group system
+    seclabel u:r:vcd:s0
+    disabled
diff --git a/configs/init/vendor.mmi.carrier.rc b/configs/init/vendor.mmi.carrier.rc
new file mode 100644 (file)
index 0000000..d376428
--- /dev/null
@@ -0,0 +1,21 @@
+on fs && property:ro.boot.carrier=amxmx
+    setprop persist.vendor.radio.suppress_ussd_rel 1
+
+on fs && property:ro.boot.carrier=reteu
+    setprop persist.vendor.radio.suppress_ussd_rel 1
+
+on fs && property:ro.boot.carrier=reteu2
+    setprop persist.vendor.radio.suppress_ussd_rel 1
+
+on fs && property:ro.boot.carrier=amxbr
+    setprop persist.vendor.radio.use_se_table_only 1
+
+on fs && property:ro.boot.carrier=wndca
+    setprop persist.vendor.radio.process_sups_ind 1
+
+on fs && property:ro.boot.carrier=retca
+    setprop persist.vendor.radio.process_sups_ind 1
+
+on property:ro.vendor.product.display=* && property:ro.boot.carrier=tracfone
+    setprop ro.build.tf_modelnumber ${ro.boot.hardware.sku}
+    setprop ro.build.sw_version ${ro.build.display.id}