-
Notifications
You must be signed in to change notification settings - Fork 2
/
init.hugo.rc
444 lines (372 loc) · 18.2 KB
/
init.hugo.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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
# Init script for machine (init.hugo.rc) for Samsung Galaxy Player 4.2 running CM7
# Jonathan Grundmann, androthan<at>gmail.com, 2013
# Script gets executed by /init
on early-init
insmod /lib/modules/Si4709_driver.ko
insmod /lib/modules/gps.ko
insmod /lib/modules/vibetonz.ko
insmod /lib/modules/btwilink.ko
on init
export OTG_STORAGE /mnt/sdcard/otg_disk
export PM_TBLFILE /system/etc/policytable.tbl
export BT_FW_PATH /lib/firmware
# mkdir /dbdata 0771 system system
mkdir /efs 0770 radio radio
mkdir /debug
mount debugfs /sys/kernel/debug /sys/kernel/debug
# for debugging proposes
setprop ro.boot.targetrc running
# fake some battery state
setprop status.battery.state Slow
setprop status.battery.level 5
setprop status.battery.level_raw 50
setprop status.battery.level_scale 9
on fs
mount ext4 /dev/block/mmcblk0p1 /efs nosuid nodev noatime wait
chown radio radio /efs
chmod 0771 /efs
# mount param partition
insmod /lib/modules/j4fs.ko
mkdir /mnt/.lfs 0755 root root
mount j4fs /dev/block/mmcblk0p4 /mnt/.lfs
chmod 0755 /mnt/.lfs
insmod /lib/modules/param.ko
mount debugfs debugfs /debug
on post-fs
# change permissions for alsa nodes
symlink /dev/snd/pcmC0D0c /dev/pcmC0D0c
symlink /dev/snd/pcmC0D0p /dev/pcmC0D0p
symlink /dev/snd/controlC0 /dev/controlC0
symlink /dev/snd/timer /dev/timer
# create basic filesystem structure
mkdir /data/misc/radio 0771 radio radio
#change accelerometer permission
chmod 0664 /dev/accelerometer
chown system system /dev/accelerometer
# change ecompass device permission
chmod 0664 /dev/mmc328x
chmod 0664 /dev/ecompass_ctrl
chown system system /dev/mmc328x
chown system system /dev/ecompass_ctrl
# change permission for MPU6050 sensor
chmod 0777 /dev/mpu
chown system system /dev/mpu
chmod 0777 /dev/mpuirq
chown system system /dev/mpuirq
chmod 0777 /dev/slaveirq
chown system system /dev/slaveirq
chmod 0777 /dev/timerirq
chown system system /dev/timerirq
# change permission for YAS530C magnetic sensor
chown system input /sys/class/input/input0/delay
chown system input /sys/class/input/input0/enable
chown system input /sys/class/input/input0/filter_enable
chown system input /sys/class/input/input0/filter_len
chown system input /sys/class/input/input0/filter_threshold
chown system input /sys/class/input/input0/filter_noise
chown system input /sys/class/input/input0/data
chown system input /sys/class/input/input0/status
chown system input /sys/class/input/input0/wake
chown system input /sys/class/input/input0/position
chown system input /sys/class/input/input1/threshold
chown system input /sys/class/input/input1/distortion
chown system input /sys/class/input/input1/shape
chown compass input /sys/class/input/input1/offsets
write /sys/class/input1/filter_enable 0
# change permission for accelerometer
chown system input /sys/class/sensors/accelerometer_sensor/raw_data
chown system system /sys/class/sec/gsensorcal/calibration
# change permission for gyro sensor
chown system input /sys/class/sensors/gyro_sensor/power_on
chown system input /sys/class/sensors/gyro_sensor/temperature
chown system input /sys/class/sensors/gyro_sensor/selftest
# create log system
chmod 0771 /data/log
chmod 0777 /data/anr
# Added for testing WMDRM and DIVX DRM
mkdir /data/data/.drm/ 0775
mkdir /data/data/.drm/.wmdrm 0775
chown media system /data/data/.drm
chown media system /data/data/.drm/.wmdrm
# Permission for WMDRM sample.hds file
chmod 0775 /data/data/.drm/.wmdrm/sample.hds
# video play for m.youtube.com
mkdir /data/data/.youtube 0775
# GPS UART
mkdir /data/gps 771 system system
chown system system /data/gps
chown system system /sys/class/sec/GPS_PWR_EN/value
chown system system /sys/class/sec/GPS_NRST/value
chown system system /sys/class/sec/GPS_CNTL/value
chmod 660 /sys/class/sec/GPS_PWR_EN/value
chmod 660 /sys/class/sec/GPS_NRST/value
chmod 660 /sys/class/sec/GPS_CNTL/value
# Added for g-sensors
mkdir /data/misc/sensors 0775 system system
# Added for WMDRM
mkdir /data/data/.drm/ 0775
mkdir /data/data/.drm/.wmdrm 0775
chown media system /data/data/.drm
chown media system /data/data/.drm/.wmdrm
chown system radio /sys/devices/virtual/misc/level/control
# audio tune files
chmod 0666 /system/etc/audio/aeqcoe.txt
chmod 0666 /system/etc/audio/soundbooster.txt
chmod 0666 /system/etc/audio/srstunning.txt
# it will be deleted final release update by park dong yun
chmod 0666 /dev/i2c-1
mkdir /dbdata/databases
chown system system /dbdata/databases
chmod 0775 /dbdata/databases
mkdir /dbdata/system
chown system system /dbdata/system
chmod 0775 /dbdata/system
# add for user can pull out recovery.log file by ADB CMD
chown system cache /cache/log
chmod 0771 /cache/log
# DRM directory creation
# DivX DRM
mkdir /efs/.android 0775
mkdir /efs/.android/.dbtest 0775
mkdir /efs/.android/.mp301 0775
mkdir /efs/.android/.testAnrd 0775
chown media system /efs/.android
chown media system /efs/.android/.dbtest
chown media system /efs/.android/.mp301
chown media system /efs/.android/.testAnrd
mkdir /efs/drm 0775
chown radio radio /efs/drm
chmod 0775 /efs/drm
mkdir /efs/drm/system 0775
chown media system /efs/drm/system
chmod 0775 /efs/drm/system
# Usys_shlee KDRM 2011.09.24]]
# permission for dvfslock ctrl
chown radio system /sys/power/dvfslock_ctrl
chmod 0660 /sys/power/dvfslock_ctrl
# permission for battery
chown radio system /sys/class/power_supply/battery/batt_fuelgauge_reset
chmod 0664 /sys/class/power_supply/battery/batt_fuelgauge_reset
chown root system /sys/class/power_supply/battery/mp3
chown root system /sys/class/power_supply/battery/video
chown root system /sys/class/power_supply/battery/camera_preview
chown root system /sys/class/power_supply/battery/camera_recording
chown root system /sys/class/power_supply/battery/browser
chown root system /sys/class/power_supply/battery/wifi_browsing
# permission for CABC (AALTO_PROJECT)
chown root system /sys/devices/platform/omapfb/graphics/fb0/samsung_aalto_cabc
# cache folder for bigger file than /cache
mkdir /data/cache
chown system cache /data/cache
chmod 0770 /data/cache
# change permission of ftm_sleep
chown system system /sys/power/ftm_sleep
chmod 0664 /sys/power/ftm_sleep
# change permission of pm_debug
chmod 0664 /sys/kernel/debug/pm_debug/voltage/vdd_mpu/vp_errorgain
chmod 0664 /sys/kernel/debug/pm_debug/voltage/vdd_mpu/vp_smpswaittimemin
chmod 0664 /sys/kernel/debug/pm_debug/voltage/vdd_mpu/vp_stepmin
chmod 0664 /sys/kernel/debug/pm_debug/voltage/vdd_mpu/vp_smpswaittimemax
chmod 0664 /sys/kernel/debug/pm_debug/voltage/vdd_mpu/vp_stepmax
chmod 0664 /sys/kernel/debug/pm_debug/voltage/vdd_mpu/vp_vddmax
chmod 0664 /sys/kernel/debug/pm_debug/voltage/vdd_mpu/vp_vddmin
chmod 0664 /sys/kernel/debug/pm_debug/voltage/vdd_mpu/vp_timeout
chmod 0664 /sys/kernel/debug/pm_debug/voltage/vdd_mpu/fbb_enable
chmod 0664 /sys/kernel/debug/pm_debug/voltage/vdd_core/vp_errorgain
chmod 0664 /sys/kernel/debug/pm_debug/voltage/vdd_core/vp_smpswaittimemin
chmod 0664 /sys/kernel/debug/pm_debug/voltage/vdd_core/vp_stepmin
chmod 0664 /sys/kernel/debug/pm_debug/voltage/vdd_core/vp_smpswaittimemax
chmod 0664 /sys/kernel/debug/pm_debug/voltage/vdd_core/vp_stepmax
chmod 0664 /sys/kernel/debug/pm_debug/voltage/vdd_core/vp_vddmax
chmod 0664 /sys/kernel/debug/pm_debug/voltage/vdd_core/vp_vddmin
chmod 0664 /sys/kernel/debug/pm_debug/voltage/vdd_core/vp_timeout
chmod 0664 /sys/kernel/debug/pm_debug/smartreflex/sr_mpu/autocomp
chmod 0664 /sys/kernel/debug/pm_debug/smartreflex/sr_mpu/errweight
chmod 0664 /sys/kernel/debug/pm_debug/smartreflex/sr_mpu/errmaxlimit
chmod 0664 /sys/kernel/debug/pm_debug/smartreflex/sr_mpu/errminlimit
chmod 0664 /sys/kernel/debug/pm_debug/smartreflex/sr_core/autocomp
chmod 0664 /sys/kernel/debug/pm_debug/smartreflex/sr_core/errweight
chmod 0664 /sys/kernel/debug/pm_debug/smartreflex/sr_core/errmaxlimit
chmod 0664 /sys/kernel/debug/pm_debug/smartreflex/sr_core/errminlimit
chmod 0664 /sys/kernel/debug/pm_debug/voltage_off_while_idle
chmod 0664 /sys/kernel/debug/pm_debug/enable_off_mode
chmod 0664 /sys/kernel/debug/pm_debug/sleep_while_idle
chmod 0664 /sys/kernel/debug/pm_debug/wakeup_timer_seconds
chmod 0664 /sys/kernel/debug/pm_debug/wakeup_timer_milliseconds
chmod 0664 /sys/kernel/debug/pm_debug/enable_sr_vp_debug
# 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
# Enabling Smartreflex
write /debug/pm_debug/smartreflex/sr_mpu/autocomp 1
write /debug/pm_debug/smartreflex/sr_core/autocomp 1
# change permissions for Sensors
chown system system /sys/bus/i2c/drivers/cma3000_accl/4-001c
chown system system /sys/bus/i2c/drivers/cma3000_accl/4-001c/enable
chown system system /sys/bus/i2c/drivers/cma3000_accl/4-001c/delay
chown system system /sys/devices/platform/sfh7741.1
chown system system /sys/devices/platform/sfh7741.1/state
chown system system /sys/bus/i2c/drivers/bmp085/4-0077
chown system system /sys/bus/i2c/drivers/bmp085/4-0077/enable
chown system system /sys/bus/i2c/drivers/hmc5843/4-001e
chown system system /sys/bus/i2c/drivers/hmc5843/4-001e/enable
chown system system /sys/bus/i2c/drivers/hmc5843/4-001e/rate
# change permissions for overlay managers and display devices
chown system system /sys/devices/platform/omapdss/manager0/name
chown system system /sys/devices/platform/omapdss/manager1/name
chown system system /sys/devices/platform/omapdss/display0/name
chown system system /sys/devices/platform/omapdss/display1/name
chown system system /sys/devices/platform/omapdss/display0/enabled
chown system system /sys/devices/platform/omapdss/display1/enabled
chown system system /sys/devices/platform/omapdss/display1/timings
chown system system /sys/devices/platform/omapdss/display0/timings
chown system system /sys/devices/platform/omapdss/overlay0/manager
chown system system /sys/devices/platform/omapdss/overlay1/manager
chown system system /sys/devices/platform/omapdss/overlay2/manager
chown system system /sys/devices/platform/omapdss/overlay0/enabled
chown system system /sys/devices/platform/omapdss/overlay1/enabled
chown system system /sys/devices/platform/omapdss/overlay2/enabled
chown system system /sys/devices/platform/omapdss/overlay0/zorder
chown system system /sys/devices/platform/omapdss/overlay1/zorder
chown system system /sys/devices/platform/omapdss/overlay2/zorder
chown system system /sys/devices/platform/omapdss/overlay3/zorder
# change permissions for manager tranparency parameters
chown system system /sys/devices/platform/omapdss/manager0/name
chown system system /sys/devices/platform/omapdss/manager0/display
chown system system /sys/devices/platform/omapdss/manager0/trans_key_value
chown system system /sys/devices/platform/omapdss/manager0/trans_key_type
chown system system /sys/devices/platform/omapdss/manager0/trans_key_enabled
chown system system /sys/devices/platform/omapdss/manager1/name
chown system system /sys/devices/platform/omapdss/manager1/display
chown system system /sys/devices/platform/omapdss/manager1/trans_key_value
chown system system /sys/devices/platform/omapdss/manager1/trans_key_type
chown system system /sys/devices/platform/omapdss/manager1/trans_key_enabled
chown system system /sys/devices/platform/omapdss/manager2/name
chown system system /sys/devices/platform/omapdss/manager2/display
chown system system /sys/devices/platform/omapdss/manager2/trans_key_value
chown system system /sys/devices/platform/omapdss/manager2/trans_key_type
chown system system /sys/devices/platform/omapdss/manager2/trans_key_enabled
chown system system /sys/devices/platform/omapdss/overlay0/enabled
chown system system /sys/devices/platform/omapdss/overlay1/enabled
chown system system /sys/devices/platform/omapdss/overlay2/enabled
chown system system /sys/devices/platform/omapdss/overlay3/enabled
# change permissions for display timings to get the resolutions
chown system system /sys/devices/platform/omapdss/display0/timings
chown system system /sys/devices/platform/omapdss/display1/timings
chown system system /sys/devices/platform/omapdss/display2/timings
chown system system /sys/devices/platform/omapdss/display3/timings
chmod 0666 /sys/devices/platform/omapdss/display0/timings
chmod 0666 /sys/devices/platform/omapdss/display1/timings
chmod 0666 /sys/devices/platform/omapdss/display2/timings
chmod 0666 /sys/devices/platform/omapdss/display3/timings
# enable alpha blending on overlay managers to make gui controls visible
chown system system /sys/devices/platform/omapdss/manager0/alpha_blending_enabled
chown system system /sys/devices/platform/omapdss/manager1/alpha_blending_enabled
chmod 0666 /sys/devices/platform/omapdss/manager0/alpha_blending_enabled
chmod 0666 /sys/devices/platform/omapdss/manager1/alpha_blending_enabled
write /sys/devices/platform/omapdss/manager0/alpha_blending_enabled 1
write /sys/devices/platform/omapdss/manager1/alpha_blending_enabled 1
# change permissions for lcd_power
chown radio system /sys/class/backlight/omap_bl/device/lcd_power
chown radio system /sys/power/dvfslock_ctrl
chmod 0660 /sys/power/dvfslock_ctrl
# geomagnetic for rev 0.1
chown system input /sys/class/input/input3/enable
chown system input /sys/class/input/input3/delay
chown system input /sys/class/input/input3/filter_enable
chown system input /sys/class/input/input3/filter_len
chown system input /sys/class/input/input3/data
chown system input /sys/class/input/input3/status
chown system input /sys/class/input/input3/wake
chown system input /sys/class/input/input3/position
# geomagnetic for rev 0.8
chown system input /sys/class/input/input4/enable
chown system input /sys/class/input/input4/delay
chown system input /sys/class/input/input4/filter_enable
chown system input /sys/class/input/input4/filter_len
chown system input /sys/class/input/input4/data
chown system input /sys/class/input/input4/status
chown system input /sys/class/input/input4/wake
chown system input /sys/class/input/input4/position
# geomagnetic raw for rev 0.1
chown system input /sys/class/input/input4/threshold
chown system input /sys/class/input/input4/distortion
chown system input /sys/class/input/input4/shape
chown system input /sys/class/input/input4/offsets
# write /sys/class/input/input4/threshold 1
# write /sys/class/input/input4/distortion "20 20 15"
# geomagnetic raw for rev 0.8
chown system input /sys/class/input/input5/threshold
chown system input /sys/class/input/input5/distortion
chown system input /sys/class/input/input5/shape
chown system input /sys/class/input/input5/offsets
# write /sys/class/input/input5/threshold 1
# write /sys/class/input/input5/distortion "20 20 15"
# write /sys/class/input/input5/filter_enable 1
# accelerometer for rev 0.1
chown system input /sys/class/input/input5/enable
chown system input /sys/class/input/input5/delay
chown system input /sys/class/input/input5/position
chown system input /sys/class/input/input5/threshold
chown system input /sys/class/input/input5/wake
chown system input /sys/class/input/input5/data
chown system input /sys/class/input/input5/calibration
# accelerometer for rev 0.8
chown system input /sys/class/input/input6/enable
chown system input /sys/class/input/input6/delay
chown system input /sys/class/input/input6/position
chown system input /sys/class/input/input6/threshold
chown system input /sys/class/input/input6/wake
chown system input /sys/class/input/input6/data
chown system input /sys/class/input/input6/calibration
# orientation
chown system input /sys/class/input/input6/enable
chown system input /sys/class/input/input6/delay
chown system input /sys/class/input/input6/wake
chown system input /sys/class/input/input6/data
chown system input /sys/class/input/input6/status
# proximity
chown system input /sys/class/input/input7/enable
chown system input /sys/class/input/input7/delay
chown system input /sys/class/input/input7/wake
chown system input /sys/class/input/input7/data
chown system input /sys/class/input/input7/status
# light sensor
chown system input /sys/class/input/input8/enable
chown system input /sys/class/input/input8/delay
chown system input /sys/class/input/input8/wake
chown system input /sys/class/input/input8/data
chown system input /sys/class/input/input8/status
# for rev 0.8
chown system input /sys/class/input/input9/enable
chown system input /sys/class/input/input9/delay
chown system input /sys/class/input/input9/wake
chown system input /sys/class/input/input9/data
chown system input /sys/class/input/input9/status
chown system input /sys/class/input/input9/testmode
# Permissions for System Server and daemons.
chown system system /sys/class/backlight/omap_bl/brightness
# Vibetonz
export TMPDIR /data/local/tmp
symlink /data/local/tmp /tmp
# enable touch boost
# write /sys/touchscreen/touch_boost 1
# Set bluetooth address file path info.
setprop ro.bt.bdaddr_path "/efs/bluetooth/bt_addr"
# Permissions for bluetooth.
chown bluetooth bluetooth ro.bt.bdaddr_path
chmod 0660 /dev/ttyS1
chown bluetooth bluetooth /dev/ttyS1
chmod 0660 /sys/class/rfkill/rfkill0/state
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
write sys/class/rfkill/rfkill0/state 0
# permission for touchscreen
# chown system system /sys/touchscreen/bootcomplete
# chown system system /sys/touchscreen/set_qt_firm_update
# change ecompass device permission
chmod 0660 /dev/mmc328x
chmod 0660 /dev/ecompass_ctrl