Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

mogami: update init.semc.rc

Signed-off-by: Michael Bestas <mikeioannina@gmail.com>

Change-Id: I3d81c53e7ba2ca7bcf57abf8c7d4b7656db08ba4
  • Loading branch information...
commit 9dbc202e846ae84f0f296a171ec72a3bcffb58dd 1 parent 512c058
@mikeNG mikeNG authored committed
Showing with 24 additions and 14 deletions.
  1. +24 −14 rootdir/init.semc.rc
View
38 rootdir/init.semc.rc
@@ -1,6 +1,8 @@
import init.semc.usb.rc
on early-init
+ mount debugfs debugfs /sys/kernel/debug
+
mkdir /storage 0555 root root
mkdir /storage/sdcard0 0555 root root
export EXTERNAL_STORAGE /storage/sdcard0
@@ -28,6 +30,10 @@ on early-boot
exec /system/bin/chargemon
on boot
+ # Disable idle power collapse during boot.
+ # These features will be enabled at the end of boot
+ write /sys/module/pm2/parameters/idle_sleep_mode 3
+
# Radio fix
mkdir /data/radio 0775 radio radio
mkdir /data/radio/log 0775 radio radio
@@ -89,27 +95,25 @@ on boot
# LM35xx/cameralight
chown system system /sys/devices/i2c-0/0-0053/torch_enable
+ chmod 666 /sys/devices/i2c-0/0-0053/torch_enable
chown system system /sys/devices/i2c-0/0-0053/torch_current
+ chmod 666 /sys/devices/i2c-0/0-0053/torch_current
chown system system /sys/devices/i2c-0/0-0053/cm_torch
+ chmod 666 /sys/devices/i2c-0/0-0053/cm_torch
chown system system /sys/devices/i2c-0/0-0053/privacy_enable
+ chmod 666 /sys/devices/i2c-0/0-0053/privacy_enable
chown system system /sys/devices/i2c-0/0-0053/privacy_current
+ chmod 666 /sys/devices/i2c-0/0-0053/privacy_current
chown system system /sys/devices/i2c-0/0-0053/flash_enable
+ chmod 666 /sys/devices/i2c-0/0-0053/flash_enable
chown system system /sys/devices/i2c-0/0-0053/flash_duration
+ chmod 666 /sys/devices/i2c-0/0-0053/flash_duration
chown system system /sys/devices/i2c-0/0-0053/flash_synchronization
+ chmod 666 /sys/devices/i2c-0/0-0053/flash_synchronization
chown system system /sys/devices/i2c-0/0-0053/flash_current
+ chmod 666 /sys/devices/i2c-0/0-0053/flash_current
chown system system /sys/devices/i2c-0/0-0053/status
-
- # Torch
- chmod 0666 /sys/devices/i2c-0/0-0053/privacy_enable
- chmod 0666 /sys/devices/i2c-0/0-0053/privacy_current
- chmod 0666 /sys/devices/i2c-0/0-0053/flash_enable
- chmod 0666 /sys/devices/i2c-0/0-0053/flash_duration
- chmod 0666 /sys/devices/i2c-0/0-0053/flash_synchronization
- chmod 0666 /sys/devices/i2c-0/0-0053/flash_current
- chmod 0666 /sys/devices/i2c-0/0-0053/status
- chmod 0666 /sys/devices/i2c-0/0-0053/torch_enable
- chmod 0666 /sys/devices/i2c-0/0-0053/torch_current
- chmod 0666 /sys/devices/i2c-0/0-0053/cm_torch
+ chmod 666 /sys/devices/i2c-0/0-0053/status
# Owner for the proximity sensor
chown system system /sys/devices/i2c-0/0-0054/threshold
@@ -131,6 +135,8 @@ on boot
chmod 0660 /sys/devices/platform/msm_hsusb/gadget/lun1/file
chown usb usb /sys/devices/platform/msm_hsusb/gadget/lun1/file
+ chmod 0444 /sys/devices/platform/msm_hsusb/gadget/usb_state
+ chown system system /sys/devices/platform/msm_hsusb/gadget/wakeup
# power-management
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ondemand
@@ -143,7 +149,8 @@ on boot
write /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor 4
write /sys/devices/system/cpu/cpufreq/ondemand/down_differential 10
- mount debugfs /sys/kernel/debug /sys/kernel/debug
+ # Don't disable dmesg access for apps
+ write /proc/sys/kernel/dmesg_restrict 0
on property:init.svc.bluetoothd=running
write /sys/devices/virtual/bluetooth/hci0/link_supervision_timeout 6400
@@ -200,7 +207,7 @@ service iprenew_bnep0 /system/bin/dhcpcd -n
oneshot
on property:init.svc.wpa_supplicant=stopped
- stop dhcpcd
+ stop dhcpcd
service port-bridge /system/bin/port-bridge /dev/smd0 /dev/ttyGS0 &
class main
@@ -236,3 +243,6 @@ on property:dhcp.wlan0.result=ok
on property:init.svc.hostapd_bin=stopped
exec /system/bin/iw dev mon.wlan0 del
+
+on property:sys.boot_completed=1
+ write /sys/module/pm2/parameters/idle_sleep_mode 1
Please sign in to comment.
Something went wrong with that request. Please try again.