forked from galaxyishere/android_device_samsung_galaxysl
-
Notifications
You must be signed in to change notification settings - Fork 3
/
lpm.rc
executable file
·115 lines (83 loc) · 2.54 KB
/
lpm.rc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
on early-init
start ueventd
on init
sysclktz 0
loglevel 3
# setup the global environment
export PATH /sbin:/system/bin
export LD_LIBRARY_PATH /system/lib
export ANDROID_BOOTLOGO 0
export ANDROID_ROOT /system
mkdir /mnt 0775 root system
mkdir /system
mkdir /data 0771 system system
# Secure container public mount points.
mkdir /mnt/asec 0700 root system
mount tmpfs tmpfs /mnt/asec mode=0755,gid=1000
# add opps panic
write /proc/sys/kernel/panic_on_oops 1
# make debug directory for debugfs
# Mount Debug file system for enabling Power Management features
mkdir /debug
mount debugfs debugfs /debug
# load linux-kernel modules
insmod /lib/modules/fsr.ko
insmod /lib/modules/fsr_stl.ko
insmod /lib/modules/rfs_glue.ko
insmod /lib/modules/rfs_fat.ko
on fs
# mount rfs partitions
mount ext4 /dev/block/stl9 /system
mount ext4 /dev/block/stl9 /system ro remount
insmod /system/lib/modules/samsung_battery.ko
# We chown/chmod /data again so because mount is run as root + defaults
mount ext4 /dev/block/stl10 /data nosuid nodev noatime
# mount param partition
insmod /lib/modules/j4fs.ko
mkdir /mnt/.lfs 0755 root root
mount j4fs /dev/block/stl6 /mnt/.lfs
insmod /lib/modules/param.ko
on post-fs
# once everything is setup, no need to modify /
mount rootfs rootfs / ro remount
# create log system
chmod 0777 /data/log
chmod 0777 /data/anr
# install switch_sio driver
insmod /system/lib/modules/switch_sio.ko
# Enabling sleep in idle path
write /debug/pm_debug/sleep_while_idle 1
# Enabling Voltage OFF in idle path
write /debug/pm_debug/voltage_off_while_idle 1
# Enabling OFF mode
write /debug/pm_debug/enable_off_mode 1
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor conservative
# Permissions for System Server and daemons.
chown system system /sys/class/backlight/omap_bl/brightness
on boot
# basic network init
ifup lo
hostname localhost
domainname localdomain
class_start default
service debuggerd /system/bin/debuggerd
## Daemon processes to be run by init.
##
service ueventd /sbin/ueventd
critical
service console /system/bin/sh
console
disabled
user shell
group log
on property:ro.secure=0
start console
# adbd is controlled by the ro.secure system property
service adbd /sbin/adbd
disabled
on property:ro.secure=0
start adbd
service playlpm /system/bin/playlpm
user root
service lpmkey /system/bin/charging_mode
user root