diff options
author | Arian <arian.kulmer@web.de> | 2019-08-17 18:15:24 +0200 |
---|---|---|
committer | Arian <arian.kulmer@web.de> | 2019-10-25 22:16:13 +0200 |
commit | f830aea419318e71934683a56652b18db782105f (patch) | |
tree | 073827de9637ae83a69e96716db62bf973245ef1 /rootdir/etc | |
parent | 03e187ba0c3beba4ad529922d9328887d222aa90 (diff) |
shinano-common: Restructure rootdir folder
Diffstat (limited to 'rootdir/etc')
-rw-r--r-- | rootdir/etc/fstab.qcom | 16 | ||||
-rw-r--r-- | rootdir/etc/init.camera.rc | 152 | ||||
-rw-r--r-- | rootdir/etc/init.platform-common.rc | 17 | ||||
-rw-r--r-- | rootdir/etc/init.qcom.power.rc | 109 | ||||
-rw-r--r-- | rootdir/etc/init.qcom.rc | 575 | ||||
-rw-r--r-- | rootdir/etc/init.recovery.qcom.rc | 75 | ||||
-rw-r--r-- | rootdir/etc/init.sony.rc | 23 | ||||
-rw-r--r-- | rootdir/etc/init.sony.usb.rc | 106 | ||||
-rw-r--r-- | rootdir/etc/ueventd.qcom.rc | 245 |
9 files changed, 1318 insertions, 0 deletions
diff --git a/rootdir/etc/fstab.qcom b/rootdir/etc/fstab.qcom new file mode 100644 index 0000000..e5cdaf7 --- /dev/null +++ b/rootdir/etc/fstab.qcom @@ -0,0 +1,16 @@ +# Android fstab file. +# 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 +#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags> +/dev/block/platform/msm_sdcc.1/by-name/boot /boot emmc defaults recoveryonly +/dev/block/platform/msm_sdcc.1/by-name/FOTAKernel /recovery emmc defaults recoveryonly +/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,barrier=1 wait,recoveryonly +/dev/block/platform/msm_sdcc.1/by-name/cache /cache f2fs noatime,nosuid,nodev,rw,inline_xattr wait,check +/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 noatime,nosuid,nodev,barrier=1,noauto_da_alloc,errors=panic wait,check +/dev/block/platform/msm_sdcc.1/by-name/userdata /data f2fs noatime,nosuid,nodev,rw,inline_xattr wait,check,formattable,encryptable=footer,length=-16384 +/dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,noauto_da_alloc,errors=panic wait,check,encryptable=footer,length=-16384 +/dev/block/platform/msm_sdcc.1/by-name/apps_log /misc emmc defaults defaults +tmpfs /idd tmpfs size=8M,nosuid,nodev,noatime,noexec defaults +/devices/msm_sdcc.2/mmc_host* auto auto defaults voldmanaged=sdcard1:auto,encryptable=userdata +/devices/platform/xhci-hcd/usb* auto auto nosuid,nodev voldmanaged=usb:auto +/dev/block/zram0 none swap defaults zramsize=536870912,max_comp_streams=4,notrim diff --git a/rootdir/etc/init.camera.rc b/rootdir/etc/init.camera.rc new file mode 100644 index 0000000..eb1092c --- /dev/null +++ b/rootdir/etc/init.camera.rc @@ -0,0 +1,152 @@ +# +# Copyright (C) 2017 The LineageOS Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +on init + +on early-fs + wait /dev/block/mmcblk0p1 + class_start trimarea + exec u:r:qti_init_shell:s0 -- /sbin/wait4tad_static + +on early-boot + #SONY early boot + start ta_qmi_service + start sct_service + +on boot + # PM8941 flash + chown system camera /sys/class/misc/pm8941-flash/device/current1 + chown system camera /sys/class/misc/pm8941-flash/device/current2 + chown system camera /sys/class/misc/pm8941-flash/device/fault_status + chown system camera /sys/class/misc/pm8941-flash/device/fine_current1 + chown system camera /sys/class/misc/pm8941-flash/device/fine_current2 + chown system camera /sys/class/misc/pm8941-flash/device/flash_timer + chown system camera /sys/class/misc/pm8941-flash/device/mask_clamp_current + chown system camera /sys/class/misc/pm8941-flash/device/mask_enable + chown system camera /sys/class/misc/pm8941-flash/device/max_current + chown system camera /sys/class/misc/pm8941-flash/device/mode + chown system camera /sys/class/misc/pm8941-flash/device/startup_delay + chown system camera /sys/class/misc/pm8941-flash/device/strobe + chown system camera /sys/class/misc/pm8941-flash/device/vph_pwr_droop + +on post-fs-data + # we will remap this as /mnt/sdcard with the sdcard fuse tool + mkdir /data/misc/camera 0770 media camera + mkdir /data/misc/cameraserver 0700 cameraserver cameraserver + + # create directory for scd + mkdir /dev/socket/scd 0755 system system + mkdir /data/scd 0755 system system + +on post-fs-data + # SONY: Start early TA-users + mkdir /data/etc 0755 root shell + exec -- /system/vendor/bin/taimport + + # SONY: Create dir for Widevine keybox + mkdir /data/persist/wv 0700 system system + + # SONY: Camera + mkdir /data/camera 0770 media camera + chown media camera /sys/devices/sony_camera_0/info + + chmod 0660 /sys/devices/sony_camera_0/info + chown media camera /sys/devices/sony_camera_1/info + chmod 0660 /sys/devices/sony_camera_1/info + + # SONY: Import MiscTA to System properties + exec -- /system/vendor/bin/taimport property + setprop init.taimport.ready true + # taimport ready, use this as trigger for multi-cdf-symlinker + +service taimport /system/vendor/bin/taimport + class late_start + user root + group system + oneshot + +# This script init /cache/CredentialManagerData if /data/credmgr doesn't meet our requirements +service initcredmgr /system/vendor/bin/credmgrfirstboot.sh + class late_start + user root + group root + oneshot + +# When credmgrfirstboot is ready it set sys.credmgrdready=true. +# Start credmgrd after that +on property:sys.credmgrdready=true +start credmgrd + +# Start Credential manager daemon +service credmgrd /system/vendor/bin/credmgrd + user system + group system camera media + socket credmgr stream 0660 system camera + disabled + +# Secure Config Transfer service +service sct_service /system/vendor/bin/sct_service + user root + disabled + +# Trim Area QMI service +service ta_qmi_service /system/vendor/bin/ta_qmi_service + user system + group system root net_raw wakelock + disabled + +service scd /system/vendor/bin/scd + class late_start + user system + group system + +#service wvkbd_installer /system/bin/logwrapper /system/vendor/bin/wvkbd +service wvkbd_installer /system/vendor/bin/wvkbd + user system + group system + oneshot + disabled + +# All services that use qseecomd daemon listeners should +# start on sys.listeners.registered property to make sure that +# all of its service listeners are registered before calling them +on property:sys.listeners.registered=true + start wvkbd_installer + +#service qcamerasvr /system/bin/logwrapper /system/bin/mm-qcamera-daemon +service qcamerasvr /system/vendor/bin/mm-qcamera-daemon + class late_start + user camera + group camera media system inet input graphics +# seclabel u:r:mm-qcamerad:s0 + +# SONY: TrimArea Daemon +# Last 2 args: start block(blk size 128k), number of blocks(partitionsize(kb)/128(kb)) +service tad_static /sbin/tad_static /dev/block/bootdevice/by-name/TA 0,16 +#service tad_static /sbin/tad_static /data/credmgr/ta_part.bin 0,16 + class core + user system + group system root camera media + socket tad stream 0770 system system + +# tad_static is in rootfs, normal file_context does not work + seclabel u:r:tad:s0 + +service updatemiscta /system/vendor/bin/updatemiscta + class main + user system + group system + oneshot diff --git a/rootdir/etc/init.platform-common.rc b/rootdir/etc/init.platform-common.rc new file mode 100644 index 0000000..58a3063 --- /dev/null +++ b/rootdir/etc/init.platform-common.rc @@ -0,0 +1,17 @@ +on boot + # Touch + chown system system /sys/devices/virtual/input/clearpad/wakeup_gesture + chown system system /sys/devices/virtual/input/max1187x/wakeup_gesture + + # Glove input + chown system system /sys/devices/virtual/input/clearpad/glove + chown system system /sys/devices/virtual/input/max1187x/glove + chmod 0660 /sys/devices/virtual/input/clearpad/glove + chmod 0660 /sys/devices/virtual/input/max1187x/glove + +# TFA9890 AMP +service tfa9890_amp /system/bin/tfa9890_amp + class late_start + user root + group root + oneshot diff --git a/rootdir/etc/init.qcom.power.rc b/rootdir/etc/init.qcom.power.rc new file mode 100644 index 0000000..809e37e --- /dev/null +++ b/rootdir/etc/init.qcom.power.rc @@ -0,0 +1,109 @@ +on early-init + write /sys/block/mmcblk0/bdi/read_ahead_kb 512 + +on charger + write /sys/module/lpm_levels/enable_low_power/l2 2 + write /sys/module/msm_pm/modes/cpu0/power_collapse/suspend_enabled 1 + write /sys/module/msm_pm/modes/cpu1/power_collapse/suspend_enabled 1 + write /sys/module/msm_pm/modes/cpu2/power_collapse/suspend_enabled 1 + write /sys/module/msm_pm/modes/cpu3/power_collapse/suspend_enabled 1 + write /sys/module/msm_pm/modes/cpu0/power_collapse/idle_enabled 1 + write /sys/module/msm_thermal/core_control/enabled 0 + write /sys/devices/system/cpu/cpu1/online 1 + write /sys/devices/system/cpu/cpu2/online 1 + write /sys/devices/system/cpu/cpu3/online 1 + write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "powersave" + write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor "powersave" + write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor "powersave" + write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor "powersave" + write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 300000 + write /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq 300000 + write /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq 300000 + write /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq 300000 + write /sys/module/msm_thermal/core_control/enabled 1 + write /sys/devices/system/cpu/cpu1/online 0 + write /sys/devices/system/cpu/cpu2/online 0 + write /sys/devices/system/cpu/cpu3/online 0 + +on enable-low-power + write /sys/module/lpm_levels/enable_low_power/l2 4 + write /sys/module/msm_pm/modes/cpu0/power_collapse/suspend_enabled 1 + write /sys/module/msm_pm/modes/cpu1/power_collapse/suspend_enabled 1 + write /sys/module/msm_pm/modes/cpu2/power_collapse/suspend_enabled 1 + write /sys/module/msm_pm/modes/cpu3/power_collapse/suspend_enabled 1 + write /sys/module/msm_pm/modes/cpu0/power_collapse/idle_enabled 1 + write /sys/module/msm_pm/modes/cpu1/power_collapse/idle_enabled 1 + write /sys/module/msm_pm/modes/cpu2/power_collapse/idle_enabled 1 + write /sys/module/msm_pm/modes/cpu3/power_collapse/idle_enabled 1 + write /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/suspend_enabled 1 + write /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/suspend_enabled 1 + write /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/suspend_enabled 1 + write /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/suspend_enabled 1 + write /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/idle_enabled 1 + write /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/idle_enabled 1 + write /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/idle_enabled 1 + write /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/idle_enabled 1 + write /sys/module/msm_pm/modes/cpu1/retention/suspend_enabled 1 + write /sys/module/msm_pm/modes/cpu2/retention/suspend_enabled 1 + write /sys/module/msm_pm/modes/cpu3/retention/suspend_enabled 1 + write /sys/module/msm_pm/modes/cpu0/retention/idle_enabled 1 + write /sys/module/msm_pm/modes/cpu1/retention/idle_enabled 1 + write /sys/module/msm_pm/modes/cpu2/retention/idle_enabled 1 + write /sys/module/msm_pm/modes/cpu3/retention/idle_enabled 1 + write /sys/module/msm_thermal/core_control/enabled 0 + write /sys/devices/system/cpu/cpu1/online 1 + write /sys/devices/system/cpu/cpu2/online 1 + write /sys/devices/system/cpu/cpu3/online 1 + + write /sys/class/devfreq/qcom,cpubw.40/governor "cpubw_hwmon" + + write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 300000 + write /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq 300000 + write /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq 300000 + write /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq 300000 + + chown root system /sys/devices/system/cpu/cpu1/online + chown root system /sys/devices/system/cpu/cpu2/online + chown root system /sys/devices/system/cpu/cpu3/online + chmod 664 /sys/devices/system/cpu/cpu1/online + chmod 664 /sys/devices/system/cpu/cpu2/online + chmod 664 /sys/devices/system/cpu/cpu3/online + + write /dev/cpuctl/cpu.notify_on_migrate 1 + + write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "interactive" + write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor "interactive" + write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor "interactive" + write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor "interactive" + write /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay "19000 1400000:39000 1700000:19000" + write /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load 99 + write /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq 1190400 + write /sys/devices/system/cpu/cpufreq/interactive/io_is_busy 1 + write /sys/devices/system/cpu/cpufreq/interactive/target_loads "85 1500000:90 1800000:70" + write /sys/devices/system/cpu/cpufreq/interactive/min_sample_time 40000 + write /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor 100000 + write /sys/devices/system/cpu/cpufreq/interactive/timer_rate 30000 + + write /sys/module/msm_thermal/core_control/enabled 1 + + write /sys/module/cpu_boost/parameters/boost_ms 20 + write /sys/module/cpu_boost/parameters/sync_threshold 1728000 + write /sys/module/cpu_boost/parameters/input_boost_freq 1497600 + write /sys/module/cpu_boost/parameters/input_boost_ms 40 + +on boot + trigger enable-low-power + +on property:init.svc.recovery=running + trigger enable-low-power + write /sys/class/android_usb/android0/idVendor 0FCE + write /sys/class/android_usb/android0/idProduct 6${ro.usb.pid_suffix} + +on property:dev.bootcomplete=1 + # Set max mA current for usb/dc charger + write /sys/class/power_supply/qpnp-dc/current_max 1800000 + write /sys/class/power_supply/usb/current_max 1500000 + + rm /data/system/perfd/default_values + setprop sys.io.scheduler "bfq" + start mpdecision diff --git a/rootdir/etc/init.qcom.rc b/rootdir/etc/init.qcom.rc new file mode 100644 index 0000000..b84f7b8 --- /dev/null +++ b/rootdir/etc/init.qcom.rc @@ -0,0 +1,575 @@ +# +# Copyright 2012 The Android Open Source Project +# Copyright (C) 2013 The CyanogenMod Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import /init.qcom.power.rc +import /init.sony.rc +import /init.sony.usb.rc +import /init.platform-common.rc +import /init.camera.rc + +on early-init + mount debugfs /sys/kernel/debug /sys/kernel/debug mode=755 + chown system system /sys/kernel/debug/kgsl/proc + +on init + symlink /dev/block/platform/msm_sdcc.1 /dev/block/bootdevice + + # Enable subsystem restart + write /sys/module/subsystem_restart/parameters/enable_ramdumps 0 + write /sys/bus/msm_subsys/devices/subsys0/restart_level "RELATED" + write /sys/bus/msm_subsys/devices/subsys1/restart_level "RELATED" + write /sys/bus/msm_subsys/devices/subsys2/restart_level "RELATED" + write /sys/bus/msm_subsys/devices/subsys3/restart_level "RELATED" + + # for backwards compatibility + symlink /sdcard /storage/sdcard0 + + mkdir /tmp + mount tmpfs tmpfs /tmp nosuid mode=0755,uid=0,gid=0 + chmod 0664 /proc/rdtag + chown root system /proc/rdtag + + wait /dev/block/mmcblk0p1 + chown system system /dev/block/mmcblk0p1 + chmod 0770 /dev/block/mmcblk0p1 + + # Bluetooth address setting + setprop ro.bt.bdaddr_path "/data/etc/bluetooth_bdaddr" + chown bluetooth bluetooth ro.bt.bdaddr_path + + #Enable Bluetooth HFP 1.6 + setprop ro.bluetooth.hfp.ver 1.6 + + #Disable Bluetooth A2DP SNK + setprop bluetooth.a2dp.sink.enabled false + + write /sys/module/qpnp_rtc/parameters/poweron_alarm 1 + + # Enable panic on out of memory + write /proc/sys/vm/panic_on_oom 2 + + # Setup zram options + write /sys/block/zram0/comp_algorithm lz4 + + # Create a tmpfs for dynamic network mounting + mkdir /storage/removable/remote 0700 root system + mount tmpfs tmpfs /storage/removable/remote mode=0755,uid=0,gid=0 + + # Set the property to indicate type of virtual display to 0 + # 0 indicates that virtual display is not a Wifi display and that the + # session is not exercised through RemoteDisplay in the android framework + setprop persist.sys.wfd.virtual 0 + +on fs + mount_all ./fstab.qcom + mkdir /lta-label 0555 system system + wait /dev/block/platform/msm_sdcc.1/by-name/LTALabel + mount ext4 /dev/block/platform/msm_sdcc.1/by-name/LTALabel /lta-label nosuid nodev noatime noexec ro barrier=0 + chown system system /lta-label + chmod 0555 /lta-label + + # Mount ZRAM + swapon_all fstab.qcom + + # Adaptive LMK + write /sys/module/lowmemorykiller/parameters/enable_adaptive_lmk 1 + write /sys/module/lowmemorykiller/parameters/vmpressure_file_min 53059 + + symlink /sdcard /storage/sdcard0 + + # Start hvdcp to enable quck charge 2.0 in power off charge + start hvdcp + +on early-boot + # set RLIMIT_MEMLOCK to 64MB + setrlimit 8 67108864 67108864 + + write /sys/kernel/boot_adsp/boot 1 + + # Run pre_hw_config.sh before entering charge only mode. + exec /system/bin/sh /system/etc/pre_hw_config.sh + +on boot + write /sys/module/qpnp_power_on/parameters/forcecrash_on 1 + + # Bluetooth + chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type + chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state + # bluetooth LPM + chown bluetooth bluetooth /proc/bluetooth/sleep/lpm + chown bluetooth bluetooth /proc/bluetooth/sleep/btwrite + + # BT DUN port-bridge + chmod 0660 /dev/smd7 + chown bluetooth bluetooth /dev/smd7 + + chmod 0660 /sys/class/rfkill/rfkill0/state + chown bluetooth bluetooth /dev/ttyHS0 + chmod 0660 /dev/ttyHS0 + chown bluetooth bluetooth /sys/devices/platform/msm_serial_hs.0/clock + chmod 0660 /sys/devices/platform/msm_serial_hs.0/clock + + #Create QMUX deamon socket area + mkdir /dev/socket/qmux_radio 0770 radio radio + chmod 2770 /dev/socket/qmux_radio + mkdir /dev/socket/qmux_audio 0770 media audio + chmod 2770 /dev/socket/qmux_audio + mkdir /dev/socket/qmux_bluetooth 0770 bluetooth bluetooth + chmod 2770 /dev/socket/qmux_bluetooth + mkdir /dev/socket/qmux_gps 0770 gps gps + chmod 2770 /dev/socket/qmux_gps + + # Create PERFD deamon related dirs + mkdir /data/misc/perfd 0755 root system + chmod 2755 /data/misc/perfd + mkdir /data/system/perfd 0770 root system + chmod 2770 /data/system/perfd + + #Create NETMGR daemon socket area + mkdir /dev/socket/netmgr 0750 radio radio + + # Wlan Interface Port + setprop wifi.interface wlan0 + + # WiFi Firmware + chown wifi wifi /sys/module/bcmdhd/parameters/firmware_path + + # Send single UNSOL_CALL_RING notification + setprop ro.telephony.call_ring.multiple false + + # Create folder for timekeep + mkdir /data/time/ 0700 system system + chmod 0770 /data/time/ats_2 + + # port-bridge + chmod 0660 /dev/smd0 + chown system system /dev/smd0 + + chmod 0444 /sys/devices/platform/msm_hsusb/gadget/usb_state + + # Graphics + chown system graphics /sys/class/graphics/fb0/idle_time + chmod 0664 /sys/devices/virtual/graphics/fb0/idle_time + chown system graphics /sys/class/graphics/fb0/dynamic_fps + chmod 0664 /sys/devices/virtual/graphics/fb0/dynamic_fps + chown system graphics /sys/class/graphics/fb0/dyn_pu + chmod 0664 /sys/devices/virtual/graphics/fb0/dyn_pu + chown system graphics /sys/class/graphics/fb0/modes + chmod 0664 /sys/devices/virtual/graphics/fb0/modes + chown system graphics /sys/class/graphics/fb0/mode + chmod 0664 /sys/devices/virtual/graphics/fb0/mode + + chown system graphics /sys/class/graphics/fb1/hpd + chmod 0664 /sys/devices/virtual/graphics/fb1/hpd + chown system graphics /sys/class/graphics/fb1/res_info + chmod 0664 /sys/class/graphics/fb1/res_info + chmod 0664 /sys/devices/virtual/graphics/fb1/res_info + chown system graphics /sys/class/graphics/fb1/vendor_name + chmod 0664 /sys/devices/virtual/graphics/fb1/vendor_name + chown system graphics /sys/class/graphics/fb1/product_description + chmod 0664 /sys/devices/virtual/graphics/fb1/product_description + chown system graphics /sys/class/graphics/fb1/video_mode + chmod 0664 /sys/devices/virtual/graphics/fb1/video_mode + chown system graphics /sys/class/graphics/fb1/format_3d + chmod 0664 /sys/devices/virtual/graphics/fb1/format_3d + chown system graphics /sys/class/graphics/fb1/s3d_mode + chmod 0664 /sys/devices/virtual/graphics/fb1/s3d_mode + chown system graphics /sys/class/graphics/fb1/cec/enable + chmod 0664 /sys/devices/virtual/graphics/fb1/cec/enable + chown system graphics /sys/class/graphics/fb1/cec/logical_addr + chmod 0664 /sys/devices/virtual/graphics/fb1/cec/logical_addr + chown system graphics /sys/class/graphics/fb1/cec/rd_msg + chmod 0664 /sys/devices/virtual/graphics/fb1/cec/rd_msg + chown system graphics /sys/class/graphics/fb1/pa + chmod 0664 /sys/devices/virtual/graphics/fb1/pa + chown system graphics /sys/class/graphics/fb1/cec/wr_msg + chmod 0664 /sys/devices/virtual/graphics/fb1/cec/wr_msg + chown system graphics /sys/class/graphics/fb1/hdcp/tp + chmod 0664 /sys/devices/virtual/graphics/fb1/hdcp/tp + + # create symlink for fb1 as HDMI + symlink /dev/graphics/fb1 /dev/graphics/hdmi + + # Change owner and group to get adopter/device ids from MHL driver + chown system system /sys/class/mhl/sii8334/adopter_id + chown system system /sys/class/mhl/sii8334/device_id + + # For bridgemgr daemon to inform the USB driver of the correct transport + chown radio radio /sys/class/android_usb/f_rmnet_smd_sdio/transport + + # For setting tcp delayed ack + chown system system /sys/kernel/ipv4/tcp_delack_seg + chown system system /sys/kernel/ipv4/tcp_use_userconfig + + # Define TCP delayed ack settings for WiFi & LTE + setprop net.tcp.delack.default 1 + setprop net.tcp.delack.wifi 20 + setprop net.tcp.delack.lte 8 + setprop net.tcp.usercfg.default 0 + setprop net.tcp.usercfg.wifi 1 + setprop net.tcp.usercfg.lte 1 + + # Assign TCP buffer thresholds to be ceiling value of technology maximums + # Increased technology maximums should be reflected here. + write /proc/sys/net/core/rmem_max 2097152 + write /proc/sys/net/core/wmem_max 2097152 + + chmod 660 /dev/rtc0 + chown system system /dev/rtc0 + + # To allow interfaces to get v6 address when tethering is enabled + write /proc/sys/net/ipv6/conf/rmnet0/accept_ra 2 + write /proc/sys/net/ipv6/conf/rmnet1/accept_ra 2 + write /proc/sys/net/ipv6/conf/rmnet2/accept_ra 2 + write /proc/sys/net/ipv6/conf/rmnet3/accept_ra 2 + write /proc/sys/net/ipv6/conf/rmnet4/accept_ra 2 + write /proc/sys/net/ipv6/conf/rmnet5/accept_ra 2 + write /proc/sys/net/ipv6/conf/rmnet6/accept_ra 2 + write /proc/sys/net/ipv6/conf/rmnet7/accept_ra 2 + + # To prevent out of order acknowledgements from making + # connection tracking to treat them as not belonging to + # the connection they belong to. + # Otherwise, a weird issue happens in which some long + # connections on high-throughput links get dropped when + # an ack packet comes out of order + write /proc/sys/net/netfilter/nf_conntrack_tcp_be_liberal 1 + + # Set the console loglevel to < KERN_INFO + # Set the default message loglevel to KERN_INFO + write /proc/sys/kernel/printk "6 6 1 7" + + chown system /sys/devices/virtual/timed_output/vibrator/vtg_level + + # charger + chown root system /sys/module/qpnp_charger/parameters/charger_monitor + chown root system /sys/class/power_supply/battery/input_current_max + chown root system /sys/class/power_supply/battery/input_current_trim + chown root system /sys/class/power_supply/battery/voltage_min + chmod 0644 /sys/module/qpnp_charger/parameters/charger_monitor + chmod 0644 /sys/class/power_supply/battery/input_current_max + chmod 0644 /sys/class/power_supply/battery/input_current_trim + chmod 0644 /sys/class/power_supply/battery/voltage_min + + # thermananger + chmod 0644 /sys/class/power_supply/usb/current_max + + chown system system /sys/devices/virtual/graphics/fb0/rgb + chmod 0660 /sys/devices/virtual/graphics/fb0/rgb + +on post-fs + # Change to socket location on libkeyctrl/suntory for /data encryption + # Create suntory data directory + mkdir /dev/socket/suntory 0755 system system + mkdir /data/suntory 0755 system system + + # led RGB + chown system system /sys/class/leds/rgb/sync_state + chown system system /sys/class/leds/rgb/start_blink + chown system system /sys/class/leds/led:rgb_red/brightness + chown system system /sys/class/leds/led:rgb_red/lut_pwm + chown system system /sys/class/leds/led:rgb_red/step_duration + chown system system /sys/class/leds/led:rgb_red/pause_lo_multi + chown system system /sys/class/leds/led:rgb_red/pause_hi_multi + chown system system /sys/class/leds/led:rgb_green/brightness + chown system system /sys/class/leds/led:rgb_green/lut_pwm + chown system system /sys/class/leds/led:rgb_green/step_duration + chown system system /sys/class/leds/led:rgb_green/pause_lo_multi + chown system system /sys/class/leds/led:rgb_green/pause_hi_multi + chown system system /sys/class/leds/led:rgb_blue/brightness + chown system system /sys/class/leds/led:rgb_blue/lut_pwm + chown system system /sys/class/leds/led:rgb_blue/step_duration + chown system system /sys/class/leds/led:rgb_blue/pause_lo_multi + chown system system /sys/class/leds/led:rgb_blue/pause_hi_multi + +on post-fs-data + # Observe dnsmasq.leases file for dhcp information of soft ap. + chown dhcp dhcp /data/misc/dhcp + + mkdir /data/misc/bluetooth 0770 bluetooth bluetooth + + # led RGB + chown system system /sys/class/leds/rgb/sync_state + chown system system /sys/class/leds/rgb/start_blink + chown system system /sys/class/leds/led:rgb_red/brightness + chown system system /sys/class/leds/led:rgb_red/lut_pwm + chown system system /sys/class/leds/led:rgb_red/step_duration + chown system system /sys/class/leds/led:rgb_red/pause_lo_multi + chown system system /sys/class/leds/led:rgb_red/pause_hi_multi + chown system system /sys/class/leds/led:rgb_green/brightness + chown system system /sys/class/leds/led:rgb_green/lut_pwm + chown system system /sys/class/leds/led:rgb_green/step_duration + chown system system /sys/class/leds/led:rgb_green/pause_lo_multi + chown system system /sys/class/leds/led:rgb_green/pause_hi_multi + chown system system /sys/class/leds/led:rgb_blue/brightness + chown system system /sys/class/leds/led:rgb_blue/lut_pwm + chown system system /sys/class/leds/led:rgb_blue/step_duration + chown system system /sys/class/leds/led:rgb_blue/pause_lo_multi + chown system system /sys/class/leds/led:rgb_blue/pause_hi_multi + + mkdir /data/tombstones 0755 system system + mkdir /data/tombstones/vendor 0755 system system + mkdir /data/pc 0700 radio radio + + # Create directory used by audio subsystem + mkdir /data/misc/audio 0770 audio audio + + # IR Blaster + chown system system /dev/ttyHSL2 + chmod 0660 /dev/ttyHSL2 + chown system system /sys/devices/platform/ir_remote_control/enable + chmod 0220 /sys/devices/platform/ir_remote_control/enable + + 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 + chmod 0664 /sys/devices/platform/msm_sdcc.4/polling + + # NFC local data and nfcee xml storage + mkdir /data/nfc 0770 nfc nfc + mkdir /data/nfc/param 0770 nfc nfc + + # QCOM Sensors + mkdir /data/system/sensors 0775 system system + mkdir /data/misc/sensors 0775 system system + write /data/system/sensors/settings 1 + chmod 664 /data/system/sensors/settings + chown system /data/system/sensors/settings + + # Chown polling nodes as needed from UI running on system server + chown system system /sys/devices/platform/msm_sdcc.1/polling + chown system system /sys/devices/platform/msm_sdcc.2/polling + chown system system /sys/devices/platform/msm_sdcc.3/polling + chown system system /sys/devices/platform/msm_sdcc.4/polling + + chown system system /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/pwrscale/policy + + # Create directories for gpsone_daemon services + mkdir /data/misc/location/gpsone_d 0770 system gps + + # Create directories for QuIPS + mkdir /data/misc/quipc 0770 gps system + + # Create directories for Location services + mkdir /data/misc/location 0770 gps gps + mkdir /data/misc/location/mq 0770 gps gps + mkdir /data/misc/location/xtwifi 0770 gps gps + mkdir /data/misc/location/gsiff 0770 gps gps + + # Create the directories used by the Wireless subsystem + mkdir /data/vendor/wifi 0770 wifi wifi + mkdir /data/vendor/wifi/wpa 0770 wifi wifi + mkdir /data/vendor/wifi/wpa/sockets 0770 wifi wifi + + # Create directory used by bluetooth subsystem + mkdir /data/vendor/bluetooth 2770 bluetooth bluetooth + + # Provide the access to hostapd.conf only to root and group + chmod 0660 /data/hostapd/hostapd.conf + + mkdir /data/audio 0770 media audio + + # Create /data/time folder for time-services + mkdir /data/time 0700 system system + + # Enable Power save functionality for modem + setprop persist.radio.add_power_save 1 + + chown system /dev/block/platform/msm_sdcc.1/by-name + + setprop vold.post_fs_data_done 1 + + # Create directory for TZ Apps + mkdir /data/misc/qsee 0770 system system + + # SONY: Create a dir on data partition not to be deleted during mr and wipedata + mkdir /data/persist 0770 system system + + # SONY: Create dir for Widevine keybox + mkdir /data/persist/wv 0700 system system + + # SONY: Create dir for marlin sdata + mkdir /data/persist/marlin 0700 system system + + # SONY: Create a dir for pin-cache components + mkdir /data/pc 0600 radio radio + mkdir /cache/pc 0770 radio system + + start wvkbd_installer + +on property:bluetooth.isEnabled=true +# start btwlancoex + write /sys/class/bluetooth/hci0/idle_timeout 7000 + +# QMUX must be in multiple groups to support external process connections +service qmuxd /system/vendor/bin/qmuxd + class main + user root + group radio audio bluetooth gps nfc diag wakelock oem_2950 + +# Wi-Fi and BT MAC addresses +service macaddrsetup /system/vendor/bin/macaddrsetup /sys/devices/platform/bcmdhd_wlan/macaddr + class late_start + user root + oneshot + +service netmgrd /system/vendor/bin/netmgrd + class late_start + user root + group root wifi wakelock radio inet system + seclabel u:r:netmgrd:s0 + +on property:ro.radio.noril=true + stop ril-daemon + stop netmgrd + +service qseecomd /system/vendor/bin/qseecomd + class core + user root + group drmrpc root + +service wpa_supplicant /system/vendor/bin/hw/wpa_supplicant \ + -O/data/vendor/wifi/wpa/sockets -puse_p2p_group_interface=1 \ + -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 + class main + socket wpa_wlan0 dgram 660 wifi wifi + disabled + oneshot + +on property:ro.data.large_tcp_window_size=true + # Adjust socket buffer to enlarge TCP receive window for high bandwidth (e.g. DO-RevB) + write /proc/sys/net/ipv4/tcp_adv_win_scale 2 + +service ril-daemon2 /system/bin/rild -c 2 + class late_start + socket rild2 stream 660 root radio + socket rild-debug2 stream 660 radio system + user root + disabled + group radio cache inet misc audio sdcard_r sdcard_rw oem_2950 log + +on property:persist.radio.multisim.config=dsds + start ril-daemon2 + +# Start suntrold +service suntrold /system/vendor/bin/suntrold + user system + group system camera + oneshot + class main + +# Modem Log QMI service +service mlog_qmi_service /system/vendor/bin/mlog_qmi_service + class late_start + user root + +# Thermal Manager service +service thermanager /system/vendor/bin/thermanager /system/vendor/etc/thermanager.xml + class main + user root + group root + +service irsc_util /system/vendor/bin/irsc_util "/system/vendor/etc/sec_config" + class main + user root + oneshot + +service rmt_storage /system/vendor/bin/rmt_storage + class core + user root + group system wakelock + +service sensors /system/vendor/bin/sensors.qcom + class core + user root + group root wakelock + +service qcom-sensor-sh /system/vendor/bin/init.qcom-sensor.sh + class main + user root + oneshot + +# HexagonDSP FastRPC daemon +service adsprpcd /system/vendor/bin/adsprpcd + class main + user media + group media + seclabel u:r:adsprpcd:s0 + +service charger /charger + class charger + group system graphics + seclabel u:r:healthd:s0 + +# Redefined Service +service audioserver /system/bin/audioserver + class main + user audioserver + # media gid needed for /dev/fm (radio) and for /data/misc/media (tee) + group audio camera drmrpc inet media mediadrm net_bt bluetooth net_bw_acct oem_2950 + ioprio rt 4 + +service drm /system/bin/drmserver + class main + user drm + group drm system inet drmrpc readproc + + +service media /system/bin/mediaserver + class main + user media + group audio camera inet net_bt bluetooth net_bw_acct drmrpc mediadrm system + ioprio rt 4 + +service mediadrm /system/bin/mediadrmserver + class main + user media + group mediadrm drmrpc + ioprio rt 4 + +service mpdecision /system/vendor/bin/mpdecision --avg_comp + class main + user root + group root readproc + disabled + +# brcm-uim-sysfs (BT/FM/ANT+) + service uim /system/bin/brcm-uim-sysfs + class late_start + user root + group bluetooth net_bt + seclabel u:r:uim:s0 + +# OSS time +service timekeep /system/vendor/bin/timekeep restore + class late_start + user root + group root + oneshot + writepid /dev/cpuset/system-background/tasks + +# Quick Charge +service hvdcp /system/vendor/bin/hvdcp + class core + user root + disabled diff --git a/rootdir/etc/init.recovery.qcom.rc b/rootdir/etc/init.recovery.qcom.rc new file mode 100644 index 0000000..4d427f1 --- /dev/null +++ b/rootdir/etc/init.recovery.qcom.rc @@ -0,0 +1,75 @@ +on init + write /sys/class/android_usb/android0/idVendor 0fce + write /sys/class/android_usb/android0/idProduct 6182 + symlink /dev/block/platform/msm_sdcc.1 /dev/block/bootdevice + + setprop sys.usb.ffs.aio_compat 1 + +on boot + # Allow core adjustements + write /sys/module/msm_thermal/core_control/enabled 0 + write /sys/devices/system/cpu/cpu1/online 1 + write /sys/devices/system/cpu/cpu2/online 1 + write /sys/devices/system/cpu/cpu3/online 1 + + write /sys/module/lpm_levels/system/cpu0/pc/suspend_enabled 1 + write /sys/module/lpm_levels/system/cpu0/wfi/suspend_enabled 1 + write /sys/module/lpm_levels/system/cpu0/retention/suspend_enabled 1 + write /sys/module/lpm_levels/system/cpu0/standalone_pc/suspend_enabled 1 + + write /sys/module/lpm_levels/system/cpu1/pc/suspend_enabled 1 + write /sys/module/lpm_levels/system/cpu1/wfi/suspend_enabled 1 + write /sys/module/lpm_levels/system/cpu1/retention/suspend_enabled 1 + write /sys/module/lpm_levels/system/cpu1/standalone_pc/suspend_enabled 1 + + write /sys/module/lpm_levels/system/cpu2/pc/suspend_enabled 1 + write /sys/module/lpm_levels/system/cpu2/wfi/suspend_enabled 1 + write /sys/module/lpm_levels/system/cpu2/retention/suspend_enabled 1 + write /sys/module/lpm_levels/system/cpu2/standalone_pc/suspend_enabled 1 + + write /sys/module/lpm_levels/system/cpu3/pc/suspend_enabled 1 + write /sys/module/lpm_levels/system/cpu3/wfi/suspend_enabled 1 + write /sys/module/lpm_levels/system/cpu3/retention/suspend_enabled 1 + write /sys/module/lpm_levels/system/cpu3/standalone_pc/suspend_enabled 1 + + write /sys/module/lpm_levels/system/cpu0/pc/idle_enabled 1 + write /sys/module/lpm_levels/system/cpu0/wfi/idle_enabled 1 + write /sys/module/lpm_levels/system/cpu0/retention/idle_enabled 1 + write /sys/module/lpm_levels/system/cpu0/standalone_pc/idle_enabled 1 + + write /sys/module/lpm_levels/system/cpu1/pc/idle_enabled 1 + write /sys/module/lpm_levels/system/cpu1/wfi/idle_enabled 1 + write /sys/module/lpm_levels/system/cpu1/retention/idle_enabled 1 + write /sys/module/lpm_levels/system/cpu1/standalone_pc/idle_enabled 1 + + write /sys/module/lpm_levels/system/cpu2/pc/idle_enabled 1 + write /sys/module/lpm_levels/system/cpu2/wfi/idle_enabled 1 + write /sys/module/lpm_levels/system/cpu2/retention/idle_enabled 1 + write /sys/module/lpm_levels/system/cpu2/standalone_pc/idle_enabled 1 + + write /sys/module/lpm_levels/system/cpu3/pc/idle_enabled 1 + write /sys/module/lpm_levels/system/cpu3/wfi/idle_enabled 1 + write /sys/module/lpm_levels/system/cpu3/retention/idle_enabled 1 + write /sys/module/lpm_levels/system/cpu3/standalone_pc/idle_enabled 1 + + write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "ondemand" + write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor "ondemand" + write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor "ondemand" + write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor "ondemand" + write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 300000 + write /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 1500000 + write /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq 300000 + write /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq 1500000 + write /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq 300000 + write /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq 1500000 + write /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq 300000 + write /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq 1500000 + + # Restore core auto control with new settings + write /sys/module/msm_thermal/core_control/enabled 1 + write /sys/class/devfreq/qcom,cpubw.40/governor "cpubw_hwmon" + write /sys/class/kgsl/kgsl-3d0/devfreq/governor msm-adreno-tz + write /dev/cpuctl/cpu.notify_on_migrate 1 + + +service qseecomd /sbin/qseecomd diff --git a/rootdir/etc/init.sony.rc b/rootdir/etc/init.sony.rc new file mode 100644 index 0000000..0902fd2 --- /dev/null +++ b/rootdir/etc/init.sony.rc @@ -0,0 +1,23 @@ +# This file includes specific init configs used by Sony devices + +on fs + # SONY: create mount point for idd + mkdir /idd 0751 system system + + # SONY: setup idd partition + chown system system /idd + chmod 0751 /idd + exec u:r:qti_init_shell:s0 -- /system/bin/rm -r /idd/lost+found + symlink /idd /mnt/idd + restorecon_recursive /idd + +on post-fs-data + mkdir /idd/lost+found 0770 root root + mkdir /idd/output 0755 system system + mkdir /idd/socket 0711 system system + restorecon_recursive /idd + +service iddd /system/vendor/bin/iddd + class main + user system + group system log inet cameraserver media diff --git a/rootdir/etc/init.sony.usb.rc b/rootdir/etc/init.sony.usb.rc new file mode 100644 index 0000000..679a600 --- /dev/null +++ b/rootdir/etc/init.sony.usb.rc @@ -0,0 +1,106 @@ +# Copyright 2012 The Android Open Source Project +# Copyright (C) 2015 The CyanogenMod Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +on init + write /sys/class/android_usb/android0/f_rndis/manufacturer Sony + write /sys/class/android_usb/android0/f_rndis/vendorID 0fce + write /sys/class/android_usb/android0/f_rndis/wceis 1 + +on boot + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/iManufacturer ${ro.product.manufacturer} + write /sys/class/android_usb/android0/iProduct ${ro.product.model} + +on fs + 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 + write /sys/class/android_usb/android0/f_ffs/aliases adb + mkdir /dev/bus 0755 root root + mkdir /dev/bus/usb 0755 root root + + setprop sys.usb.ffs.aio_compat 1 + +on property:sys.usb.config=mtp + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 0FCE + write /sys/class/android_usb/android0/idProduct 0${ro.usb.pid_suffix} + write /sys/class/android_usb/android0/bDeviceClass 0 + write /sys/class/android_usb/android0/bDeviceSubClass 0 + write /sys/class/android_usb/android0/bDeviceProtocol 0 + write /sys/class/android_usb/android0/functions ${sys.usb.config} + write /sys/class/android_usb/android0/enable 1 + stop adbd + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=mtp,adb + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 0FCE + write /sys/class/android_usb/android0/idProduct 5${ro.usb.pid_suffix} + write /sys/class/android_usb/android0/bDeviceClass 0 + write /sys/class/android_usb/android0/bDeviceSubClass 0 + write /sys/class/android_usb/android0/bDeviceProtocol 0 + write /sys/class/android_usb/android0/functions ${sys.usb.config} + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=rndis + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 0FCE + write /sys/class/android_usb/android0/idProduct 7${ro.usb.pid_suffix} + write /sys/class/android_usb/android0/bDeviceClass 239 + write /sys/class/android_usb/android0/bDeviceSubClass 2 + write /sys/class/android_usb/android0/bDeviceProtocol 1 + write /sys/class/android_usb/android0/functions ${sys.usb.config} + write /sys/class/android_usb/android0/enable 1 + stop adbd + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=rndis,adb + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 0FCE + write /sys/class/android_usb/android0/idProduct 8${ro.usb.pid_suffix} + write /sys/class/android_usb/android0/bDeviceClass 239 + write /sys/class/android_usb/android0/bDeviceSubClass 2 + write /sys/class/android_usb/android0/bDeviceProtocol 1 + write /sys/class/android_usb/android0/functions ${sys.usb.config} + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=ptp + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 0FCE + write /sys/class/android_usb/android0/idProduct 9${ro.usb.pid_suffix} + write /sys/class/android_usb/android0/bDeviceClass 0 + write /sys/class/android_usb/android0/bDeviceSubClass 0 + write /sys/class/android_usb/android0/bDeviceProtocol 0 + write /sys/class/android_usb/android0/functions ${sys.usb.config} + write /sys/class/android_usb/android0/enable 1 + stop adbd + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=ptp,adb + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 0FCE + write /sys/class/android_usb/android0/idProduct A${ro.usb.pid_suffix} + write /sys/class/android_usb/android0/bDeviceClass 0 + write /sys/class/android_usb/android0/bDeviceSubClass 0 + write /sys/class/android_usb/android0/bDeviceProtocol 0 + write /sys/class/android_usb/android0/functions ${sys.usb.config} + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} diff --git a/rootdir/etc/ueventd.qcom.rc b/rootdir/etc/ueventd.qcom.rc new file mode 100644 index 0000000..e1ae27d --- /dev/null +++ b/rootdir/etc/ueventd.qcom.rc @@ -0,0 +1,245 @@ +# Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. +# Copyright (C) 2013-2014 Sony Mobile Communications AB. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of The Linux Foundation nor +# the names of its contributors may be used to endorse or promote +# products derived from this software without specific prior written +# permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# + +# the DIAG device node is not world writable/readable. +/dev/diag 0660 system oem_2950 + +/dev/genlock 0666 system system +/dev/kgsl 0666 system system +/dev/kgsl-3d0 0666 system system +/dev/kgsl-2d0 0666 root root +/dev/kgsl-2d1 0666 root root +/dev/ion 0664 system system +/dev/rtc0 0600 system system +/dev/smd0 0660 system system +/dev/smd4 0660 system system +/dev/smd_cxm_qmi 0640 radio radio +/dev/smd5 0660 system system +/dev/smd6 0660 system system +/dev/smd7 0660 bluetooth bluetooth +/dev/ttyHS0 0660 bluetooth bluetooth + +#permissions for CSVT +/dev/smd11 0660 radio radio + +# BT/FM/ANT+ V4L2 +/dev/brcm_bt_drv 0660 bluetooth bluetooth +/dev/radio1 0660 system bluetooth +/dev/rfcomm0 0660 bluetooth bluetooth +/dev/ttyUSB0 0660 bluetooth bluetooth +/dev/smd3 0660 bluetooth bluetooth +/dev/smd2 0660 bluetooth bluetooth + +# BT +/dev/rfkill 0660 bluetooth bluetooth +/dev/ttyHS0 0660 bluetooth bluetooth +/dev/ttyMSM0 0660 bluetooth bluetooth + +/dev/radio0 0640 system system +/dev/smdcntl0 0640 radio radio +/dev/smdcntl1 0640 radio radio +/dev/smdcntl2 0640 radio radio +/dev/smdcntl3 0640 radio radio +/dev/smdcntl4 0640 radio radio +/dev/smdcntl5 0640 radio radio +/dev/smdcntl6 0640 radio radio +/dev/smdcntl7 0640 radio radio +/dev/smdcntl8 0640 radio radio +/dev/smdcntl9 0640 radio radio +/dev/smdcntl10 0640 radio radio +/dev/smdcntl11 0640 radio radio +/dev/smdcnt_rev0 0640 radio radio +/dev/smdcnt_rev1 0640 radio radio +/dev/smdcnt_rev2 0640 radio radio +/dev/smdcnt_rev3 0640 radio radio +/dev/smdcnt_rev4 0640 radio radio +/dev/smdcnt_rev5 0640 radio radio +/dev/smdcnt_rev6 0640 radio radio +/dev/smdcnt_rev7 0640 radio radio +/dev/smdcnt_rev8 0640 radio radio +/dev/smuxctl32 0640 radio radio +/dev/sdioctl0 0640 radio radio +/dev/sdioctl1 0640 radio radio +/dev/sdioctl2 0640 radio radio +/dev/sdioctl3 0640 radio radio +/dev/sdioctl4 0640 radio radio +/dev/sdioctl5 0640 radio radio +/dev/sdioctl6 0640 radio radio +/dev/sdioctl7 0640 radio radio +/dev/sdioctl8 0640 radio radio +/dev/rmnet_mux_ctrl 0640 radio radio +/dev/hsicctl0 0640 radio radio +/dev/hsicctl1 0640 radio radio +/dev/hsicctl2 0640 radio radio +/dev/hsicctl3 0640 radio radio +/dev/hsicctl4 0640 radio radio +/dev/hsicctl5 0640 radio radio +/dev/hsicctl6 0640 radio radio +/dev/hsicctl7 0640 radio radio +/dev/hsicctl8 0640 radio radio +/dev/hsicctl9 0640 radio radio +/dev/hsicctl10 0640 radio radio +/dev/hsicctl11 0640 radio radio +/dev/hsicctl12 0640 radio radio +/dev/hsicctl13 0640 radio radio +/dev/hsicctl14 0640 radio radio +/dev/hsicctl15 0640 radio radio +/dev/hsicctl16 0640 radio radio + +/dev/video* 0660 media camera +/dev/media* 0660 media camera +/dev/v4l-subdev* 0660 media camera +/dev/qseecom 0660 system drmrpc +/dev/gemini0 0660 media camera +/dev/jpeg0 0660 media camera +/dev/jpeg1 0660 media camera +/dev/jpeg2 0660 media camera +/dev/adsprpc-smd 0664 system system +/dev/msm_camera/* 0660 media camera +/dev/gemini0 0660 media camera +/dev/gemini/ 0660 media camera +/dev/mercury0 0660 media camera + +/dev/msm_vidc_reg 0660 system audio +/dev/msm_vidc_dec 0660 system audio +/dev/msm_vidc_dec_sec 0660 system audio +/dev/msm_vidc_enc 0660 system audio +/dev/msm_rotator 0660 system system +/dev/adsprpc-smd 0664 system system + +#permissions for audio +/dev/msm_qcelp 0660 system audio +/dev/msm_evrc 0660 system audio +/dev/msm_wma 0660 system audio +/dev/msm_wmapro 0660 system audio +/dev/msm_amrnb 0660 system audio +/dev/msm_amrwb 0660 system audio +/dev/msm_amrwbplus 0660 system audio +/dev/msm_aac 0660 system audio +/dev/msm_multi_aac 0660 system audio +/dev/msm_aac_in 0660 system audio +/dev/msm_qcelp_in 0660 system audio +/dev/msm_evrc_in 0660 system audio +/dev/msm_amrnb_in 0640 system audio +/dev/msm_a2dp_in 0660 system audio +/dev/msm_ac3 0660 system audio +/dev/msm_acdb 0660 system audio +/dev/msm_cad 0660 system audio +/dev/msm_fm 0660 system audio +/dev/msm_mvs 0660 system audio +/dev/msm_pcm_lp_dec 0660 system audio +/dev/msm_preproc_ctl 0660 system audio +/dev/msm_rtac 0660 system audio +/dev/msm_voicememo 0660 system audio +/dev/ttyHSL1 0660 system system +/dev/mdm 0660 system radio +/sys/devices/virtual/smdpkt/smdcntl* open_timeout 0664 radio radio +/dev/sdio_tty_ciq_00 0660 system system +/dev/tty_sdio_00 0660 system system +/dev/ttyGS0 0660 system system +/dev/i2c-5 0660 media media + +# DVB devices +/dev/dvb/adapter0/demux* 0660 system system +/dev/dvb/adapter0/dvr* 0660 system system +/dev/dvb/adapter0/video* 0660 media media + +# Broadcast devices +/dev/tsc_mux0 0660 media media +/dev/tsc_ci0 0660 media media + +# sensors +/sys/devices/i2c-12/12-* pollrate_ms 0664 system system +/sys/devices/f9925000.i2c/i2c-0/0-* enable 0660 input system +/sys/devices/f9925000.i2c/i2c-0/0-* poll_delay 0660 input system +/sys/devices/virtual/optical_sensors/proximity ps_adc 0660 input system +/sys/devices/virtual/optical_sensors/proximity ps_poll_delay 0660 input system +/sys/devices/virtual/optical_sensors/lightsensor ls_auto 0660 input system +/sys/devices/virtual/optical_sensors/lightsensor ls_poll_delay 0660 input system +/sys/devices/virtual/input/input* poll 0660 input system +/sys/devices/virtual/input/input* pollrate_ms 0660 input system +/sys/devices/virtual/cap_sensor/ad7146 dac_calibrate 0660 system system +/sys/devices/virtual/cap_sensor/ad7146 dac_mid_val 0660 system system +/sys/devices/virtual/cap_sensor/ad7146 force_calib 0220 system system +/sys/devices/virtual/cap_sensor/ad7146 obj_detect 0660 system system +/sys/devices/virtual/cap_sensor/ad7146 pad_set 0220 system system +/sys/devices/virtual/cap_sensor/ad7146 pad_num 0220 system system +/sys/devices/virtual/cap_sensor/ad7146 pad_data 0440 system system +/sys/devices/virtual/cap_sensor/ad7146 pad_offset 0660 system system +/sys/devices/virtual/cap_sensor/ad7146 sw_updata 0440 system system +/sys/devices/virtual/switch/ad7146 state 0660 system system +/sys/devices/virtual/switch/ad7146_* state 0660 system system + +# BT +/dev/hidraw0 0666 system system +/dev/hidraw1 0666 system system +/dev/hidraw2 0666 system system + +# wlan +/dev/wcnss_wlan 0660 system system +/dev/wcnss_ctrl 0660 system system +#nfc permissions +#/dev/nfc-nci 0660 nfc nfc + +# RTC +/sys/devices/soc.0/qpnp-rtc-* since_epoch 0660 system system + +# NFC +/sys/devices/f9928000.i2c/i2c-6/6-0028 init_deinit 0200 nfc nfc +/sys/devices/f9928000.i2c/i2c-6/6-0028 set_pwr 0200 nfc nfc +/sys/devices/f9928000.i2c/i2c-6/6-0028 res_ready 0400 nfc nfc +/sys/devices/f9928000.i2c/i2c-6/6-0028 recv_rsp 0600 nfc nfc +/sys/devices/f9928000.i2c/i2c-6/6-0028 send_cmd 0200 nfc nfc + +# UIO devices +/dev/uio0 0660 system system +/dev/uio1 0660 system system +/dev/uio2 0660 system system + +# IR Remote +/dev/ttyHSL1 0660 system system +/sys/devices/1.ir-remote enable 0220 system system + +# audio NXP speaker amp control device +/dev/tfa98xx 0660 system audio + +# S-Force +/dev/sforce 0660 system audio + +# NFC +/dev/pn547 0660 nfc nfc + +# TA +/dev/block/bootdevice/by-name/TA 0770 system root +/dev/block/platform/msm_sdcc.1/by-name/TA 0770 system root + +/dev/cam 0660 root camera +/dev/pmem 0660 system graphics +/dev/pmem_adsp* 0660 system audio +/dev/pmem_camera* 0660 system camera +/dev/msm_hw3dm 0660 system graphics |