# Originally device/intel/brightonpier/vm300/config/init.m300.rc import init.common.rc import init.debug.rc import init.diag.rc import init.avc.rc import init.wifi.rc import init.platform.usb.rc import init.platform.gfx.rc import init.gps.rc #import init.nfc.rc import init.bt.rc #import init.modem.rc on early-init # Set boot_min_cap for boot to android setprop ro.boot.min.cap 2 #end on early-init on init mkdir /data/system/ 0770 system system mkdir /data/misc 01771 system misc mkdir /data/misc/audio 0770 audio audio mkdir /dev/input 0755 root root # Insert graphics driver insmod /lib/modules/tngdisp.ko insmod /lib/modules/hdmi_audio.ko # Insert fps throttle driver insmod /lib/modules/fps_throttle.ko write /proc/sys/kernel/hung_task_timeout_secs 0 # Android creates by-name disk links with the disk controller # in the generated path, so that the names pulled out of the GPT # can be associated with the correct disk. Create a shortcut to # /dev/block/by-name so that we can use the same fstabs everywhere. symlink /dev/block/pci/pci0000:00/0000:00:01.0/by-name /dev/block/by-name # system-backgroud is set to use 2 cores. write /dev/cpuset/system-background/cpus 0-1 # End on init on fs # No actions # End on fs on post-fs # Note: This gets run immediately after on fs (as expected) then again multiple times thanks to # on property:vold.decrypt=trigger_post_fs_data calling trigger post-fs-data start serialize write /sys/class/graphics/fbcon/cursor_blink 0 # Assume SMP uses shared cpufreq policy for all CPUs chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq chown system system /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq chmod 0660 /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq # Performance tweaks for interactive governor chown system system /sys/devices/system/cpu/cpufreq/interactive/timer_rate chown system system /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse chown system system /sys/devices/system/cpu/cpufreq/interactive/touchboostpulse chown system system /sys/devices/system/cpu/cpufreq/interactive/touchboost_freq chmod 0220 /sys/devices/system/cpu/cpufreq/interactive/touchboostpulse chmod 0220 /sys/devices/system/cpu/cpufreq/interactive/boostpulse #disable timer_slack by default on Merrifield write /sys/devices/system/cpu/cpufreq/interactive/timer_slack -1 # Volume keys wakeup capability chmod 0664 /sys/devices/platform/gpio-keys/enabled_wakeup chmod 0664 /sys/devices/platform/gpio-keys/disabled_wakeup chown media system /sys/devices/platform/gpio-keys/enabled_wakeup chown media system /sys/devices/platform/gpio-keys/disabled_wakeup # Insert touchscreen module insmod /lib/modules/rmi4.ko # Permissons for touchpad chmod +x /vendor/touchpad chown system system /sys/bus/i2c/devices/7-0008/enabled chown system system /sys/bus/i2c/devices/7-0008/periodic_reset chown system system /sys/bus/i2c/devices/7-0008/sensitivity chown system system /sys/bus/i2c/devices/7-0008/sen_y chown system system /sys/bus/i2c/devices/7-0008/sen_x chown system system /sys/bus/i2c/devices/7-0008/deadzone_sen_y chown system system /sys/bus/i2c/devices/7-0008/deadzone_sen_x # Permissions for Sensors # accelerometer lsm303dlhc chown system system /sys/bus/i2c/devices/5-0019/lis3dh/enable chown system system /sys/bus/i2c/devices/5-0019/lis3dh/poll #barometer lps331ap chown system system /sys/bus/i2c/devices/5-005c/enable chown system system /sys/bus/i2c/devices/5-005c/poll #compass lsm303dlhc chown system system /sys/bus/i2c/devices/5-001e/lsm303cmp/enable chown system system /sys/bus/i2c/devices/5-001e/lsm303cmp/poll #als/ps apds990x chmod 0755 /dev/apds990x_lsensor chmod 0755 /dev/apds990x_psensor #als/ps apds9960 chown system system /sys/bus/i2c/devices/4-0039/light_enable chown system system /sys/bus/i2c/devices/4-0039/proximity_enable chown system system /sys/bus/i2c/devices/4-0039/cdata chown system system /sys/bus/i2c/devices/4-0039/pdata chown system system /sys/bus/i2c/devices/7-0039/enable_proximity_sensor # SEP (Chaabi) chown system system /dev/dx_sep_q0 chmod 0660 /dev/dx_sep_q0 chown system system /dev/dx_sep_q1 chmod 0660 /dev/dx_sep_q1 #Gyroscope l3g4200d chown system system /sys/bus/i2c/devices/5-0068/poll chown system system /sys/bus/i2c/devices/5-0068/enable # Permissions for LED chown system system /sys/class/leds/intel_keypad_led/brightness # Permissions for BCU sysfs interface and make generic path to access by apps chown system system /sys/devices/platform/bcove_bcu/camflash_ctrl symlink /sys/devices/platform/bcove_bcu /dev/bcu # workaround for PMIC errors on resume write /sys/power/wake_lock sku3_workaround write /sys/devices/system/cpu/cpu0/cpuidle/state4/disable 1 write /sys/devices/system/cpu/cpu1/cpuidle/state4/disable 1 write /sys/devices/system/cpu/cpu0/cpuidle/state3/disable 1 write /sys/devices/system/cpu/cpu1/cpuidle/state3/disable 1 # Enable iTUX setprop persist.service.thermal 1 #End on post-fs on post-fs-data # we will remap this as /mnt/sdcard with the sdcard fuse tool mkdir /data/media 0770 media_rw media_rw chown media_rw media_rw /data/media setprop ro.crypto.fuse_sdcard true mkdir /data/misc/firmware 0770 system system #Invoke fuel gauging helper binary to restore config data chmod 0770 /dev/max170xx chown system system /dev/max170xx chown system system /sys/class/power_supply/max17047_battery/model_name chown system system /sys/class/power_supply/max17047_battery/serial_number symlink /dev/max170xx /dev/fg chmod 0770 /dev/intel_fg chown system system /dev/intel_fg start fg_conf # Create directory for sensor hub calibration data, and empty calibration files mkdir /data/sensorhubdcal 0755 system system write /data/sensorhubdcal/GYRO.conf "" chown system system /data/sensorhubdcal/GYRO.conf chmod 0644 /data/sensorhubdcal/GYRO.conf write /data/sensorhubdcal/COMPS.conf "" chown system system /data/sensorhubdcal/COMPS.conf chmod 0644 /data/sensorhubdcal/COMPS.conf write /data/sensorhubdcal/ACCEL.conf "" chown system system /data/sensorhubdcal/ACCEL.conf chmod 0644 /data/sensorhubdcal/ACCEL.conf # Enable Dynamic Turbo feature setprop persist.thermal.turbo.dynamic 0 # Permissions for crec binary chmod 0755 /system/vendor/bin/crec # Disable adoptable setprop vold.has_adoptable 0 # Enable settings for Current Management service setprop persist.sys.enableCameraFlash 0 setprop persist.sys.enableUsbHostMode 0 setprop persist.sys.callMode 0 # Settings for logcat spewage suppression setprop ro.logcat.suppress "D/hwcomposer D/RouteManager" # Update touchpad firmware chmod 0777 /dev/i2c-7 start touchpad_update #on post-fs-data on early-boot # no early-boot actions #End on early-boot on boot # Permissions for Thermal Management chown system system /sys/class/power_supply/bq24192_charger/device/charge_current_limit chown system system /sys/module/intel_mid_osip/parameters/force_shutdown_occured chown system system /sys/module/intel_mid_osip/parameters/thermal_shutdown_occured chown system system /sys/class/thermal/cooling_device0/cur_state chown system system /sys/class/thermal/cooling_device1/cur_state chown system system /sys/devices/platform/coretemp.0/temp2_threshold1 chown system system /sys/devices/platform/coretemp.0/temp2_threshold2 chown system system /sys/devices/platform/coretemp.0/temp3_threshold1 chown system system /sys/devices/platform/coretemp.0/temp3_threshold2 chown system system /sys/class/powercap/intel-rapl/intel-rapl:0/constraint_0_power_limit_uw chown system system /sys/fps_throttle/notify chown system system /sys/fps_throttle/handshake # disable enable ois chown media system /sys/devices/pci0000:00/0000:00:08.3/i2c-4/4-001a/enable_ois chown media system /sys/devices/pci0000:00/0000:00:08.3/i2c-4/4-0010/enable_ois # Bluetooth audio role supported setprop persist.sys.intel.bt.a2dp_role source # Offload specific properties setprop audio.offload.disable 0 setprop audio.offload.min.duration.secs 20 setprop offload.compress.device 1 setprop audio.device.name phoenixaudio # audio.offload.capabilities # A 32 bit value. To be set in HEX # |---------|--------|--------|------------| # |Byte 3 |Byte 2 |Byte 1 | Byte 0 | # |Reserved |Reserved|Reserved|capabilities| # |---------|--------|--------|------------| # First byte (Byte 0) from the right represents capabilities # Bit position 8th,7th,6th,5th,4th 3rd 2nd 1st # Indication Reserved for future Multichannel Effects Video # Second, Third and Fourth byte reserved for future use # Set the HEX value by ORing the bits for each format/feature # Example usage: To enable multichannel offload, value to be set is 4 setprop audio.offload.capabilities 4 # set scalability to 1 to enable it in system. setprop audio.offload.scalability 1 setprop offload.mixer.volume.ctl.name "media0_in volume 0 volume" setprop offload.mixer.mute.ctl.name "media0_in volume 0 mute" setprop offload.mixer.rp.ctl.name "media0_in volume 0 rampduration" # Set the wov device and card setprop audio.wov.card phoenixaudio setprop audio.wov.device 7 # Enable/Disable deep buffer property for saltbay setprop lpa.deepbuffer.enable 1 chown system system /sys/class/pci_bus/0000:00/device/0000:00:16.1/control chown system system /sys/class/pci_bus/0000:00/device/0000:00:16.1/data chown system system /sys/class/pci_bus/0000:00/device/0000:00:16.1/data_size chown system system /sys/class/pci_bus/0000:00/device/0000:00:16.1/fw_version # Lte coexistence ( can be enabled the following: NRT / NRT+RT ) # Disable LTE Coexistence NRT (Non Real Time) - no modem setprop persist.service.cwsmgr.coex 0 # Disable LTE coexistence RT (Real Time). Should be set to 0 to enable. setprop persist.service.cwsmgr.nortcoex 1 # Set this property so surfaceflinger is not started by system_init setprop system_init.startsurfaceflinger 0 # Reboot in COS on shutdown request when charger is plugged setprop ro.rebootchargermode true # Load BCM Wifi kernel module for saltbay at boot time insmod /lib/modules/bcmdhd.ko # Enable submix audio path for widi setprop widi.audio.module submix # Enable HDCP 2.1/2.2 for Widi setprop widi.hdcp.enable auto # Enable frc stting for merr setprop vppsettings.frc 1 # Enable DPST setprop intel.dpst.enable 0 # DPST ALG 4_5 for TNG setprop intel.dpst.alg 3 # DPST USERLEVEL setprop intel.dpst.userlevel 3 # Camera ois settings setprop vuzix.camera.ois.enable 0 # Set debugfs ownership to media chown media media /sys/kernel/debug/sst/fw_ssp_reg chown media media /sys/kernel/debug/sst/shim_dump chown media media /sys/kernel/debug/sst/sram_ia_lpe_mailbox chown media media /sys/kernel/debug/sst/sram_lpe_checkpoint chown media media /sys/kernel/debug/sst/sram_lpe_ia_mailbox # set clickthrough setprop persist.vuzix.clickthrough.0 /vendor/vuzix_license #End on boot on property:init.svc.pvrsrvctl=stopped # Insert devfreq driver insmod /lib/modules/dfrgx.ko #end on property:init.svc.pvrsrvctl=stopped on property:sys.boot_completed=1 # Permissions for Thermal Management chown system system /sys/class/thermal/cooling_device2/cur_state chown system system /sys/class/thermal/cooling_device3/cur_state # Change permissions for sysfs LED files so that they are accessible by the Vuzix Hardware Service chown system system /sys/class/leds/as3645a:white:camera_flash/brightness chown system system /sys/class/leds/vuzix:power_status/brightness # Disable boost on boot complete write /sys/devices/system/cpu/cpufreq/interactive/boost 0 write /sys/bus/i2c/drivers/cyttsp5_touch/7-0024/hw_reset 1 write /sys/bus/i2c/drivers/cyttsp5_touch/7-0024/command "04 00 06 00 2f 00 70 00" write /sys/devices/pci0000:00/0000:00:07.1/pxa2xx-spi.5/power/autosuspend_delay_ms 0 # Install private keys for apps that need them, derived from factory RSA private key start rsakey start mock_location # End on property:sys.boot_completed=1 on charger mount ext4 /dev/block/by-name/system /system ro noatime barrier=1,data=ordered start watchdogd insmod /lib/modules/rmi4.ko boot_mode=1 # Invoke fuel gauging helper binary to restore config data chmod 0770 /dev/max170xx chown system system /dev/max170xx symlink /dev/max170xx /dev/fg chmod 0770 /dev/intel_fg wait /system/bin/fg_conf start fg_conf insmod /lib/modules/atomisp-css2400b0_v21.ko dypool_enable=n repool_pgnr=0 dypool_pgnr=0 chmod 0664 /sys/devices/pci0000:00/0000:00:10.0/hsic_enable write /sys/devices/pci0000:00/0000:00:10.0/hsic_enable 0 setprop thermal.lite.crash 0 # workaround for PMIC errors on resume write /sys/power/wake_lock sku3_workaround write /sys/devices/system/cpu/cpu0/cpuidle/state4/disable 1 write /sys/devices/system/cpu/cpu1/cpuidle/state4/disable 1 write /sys/devices/system/cpu/cpu0/cpuidle/state3/disable 1 write /sys/devices/system/cpu/cpu1/cpuidle/state3/disable 1 # End on charger service fg_conf /system/bin/fg_conf -w group system oneshot disabled service sensorhubd /system/bin/sensorhubd class main user system group system socket sensorhubd stream 666 system system #service dpst /system/bin/dpstmgr # class main # Radio service. This service was not being started. Apparently we don't need it. Removed #service rservice /system/bin/rservice # class main # user radio # group inet wifi bluetooth gps misc system cache audio nfc # disabled service serialize /system/bin/serialize group system oneshot disabled service rsakey /system/bin/rsakey group system oneshot disabled # Load Touchpad Firmware service touchpad_update /system/vendor/bin/touchpad t /system/vendor/firmware/touchpad_fw.cyacd oneshot disabled #daemon voice recognition capture service daemon_vreco /system/bin/daemon_vreco user root group system class main #Daemon makes its own socket! (socket daemon_vreco stream 666 system system) seclabel u:r:daemon_vreco:s0 #daemon usage odometer service odometer /system/bin/odometer user root group system class main seclabel u:r:odometer:s0 service mock_location /system/bin/sh /system/bin/appops set de.mobilej.btgps.system android:mock_location allow group system disabled oneshot