forked from CyanogenMod/android_device_samsung_p1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.p1.rc
148 lines (114 loc) · 5.17 KB
/
init.p1.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
import init.p1-common.rc
import init.p1.usb.rc
on init
export EXTERNAL_STORAGE /storage/sdcard0
export SECONDARY_STORAGE /storage/sdcard1
mkdir /storage/sdcard0 0000 root root
mkdir /storage/sdcard1 0000 root root
# for backwards compability
symlink /storage/sdcard0 /mnt/sdcard
symlink /storage/sdcard0 /sdcard
symlink /storage/sdcard1 /mnt/emmc
symlink /storage/sdcard1 /emmc
on fs
mkdir /radio 0775 radio radio
mkdir /efs 0775 radio radio
mount yaffs2 mtd@efs /efs
mount yaffs2 mtd@radio /radio
mount ext4 /dev/block/mmcblk0p2 /data
mount ext4 /dev/block/mmcblk0p3 /cache
mount_all /fstab.p1
chown radio radio /radio/modem.bin
# set permissions for files in /efs
chown radio radio /efs
chmod 770 /efs/bluetooth
chmod 770 /efs/imei
# set permissions for files in /radio
chown radio radio /radio/modem.bin
on post-fs
# symlink for SamsungRIL
symlink /radio/modem.bin /dev/block/bml12
on post-fs-data
# gps P1 only
chown gps root /sys/class/sec/gps/GPS_PWR_EN/value
chmod 660 /sys/class/sec/gps/GPS_PWR_EN/value
chown gps root /sys/class/sec/gps/GPS_nRST/value
chmod 660 /sys/class/sec/gps/GPS_nRST/value
# sensors P1 only
# this needs to be fixed correctly, see: frameworks/base/services/sensorservice/SensorDevice.cp
write /sys/class/input/input5/enable 1 # enable lightsensor-level
# ------
# COMMENT eaut: some of the permission settings might qualify for p1-common
#
# actually all the permission lines could be moved to ueventd.<hw>.rc
# since ueventd.rc has no "import" logic we need additional makefile glue to
# have all common stuff in p1-common and just the device specific stuff in p1/p1c
# System server can control backlight brightness
chmod 0664 /sys/class/lcd/s5p_lcd/lcd_power
chown system system /sys/class/lcd/s5p_lcd/lcd_power
# Allow net_raw to have access to /dev/socket directory
chown root net_raw /dev/socket
chmod 0775 /dev/socket
# Permission changes
chown system radio /sys/devices/platform/s3c2440-i2c.2/i2c-2/2-004a/update_fw
chown system radio /sys/class/power_supply/battery/reset_soc
chown system radio /sys/class/power_supply/battery/reset_cap
chown system radio /sys/class/power_supply/battery/fg_reg
chown system radio /sys/class/power_supply/battery/charging_mode_booting
chown system radio /sys/devices/platform/gpio-keys/key_pressed
chown system radio /sys/class/misc/level/control
chown system radio /sys/class/jack/jack_selector/select_jack
chown system radio /sys/class/cabcset/switch_cabcset/cabcset_file_cmd
chown system radio /sys/class/cabcset/switch_cabcset/lightsensor_file_state
chown system radio /sys/class/sec/sec_tune_cmc623/color_saturation
chown system radio /sys/class/mdnieset_ui/switch_mdnieset_ui/mdnieset_ui_file_cmd
chown system radio /sys/class/mdnieset_ui/switch_mdnieset_ui/mdnieset_region_file_cmd
chown system radio /sys/class/mdnieset_outdoor/switch_mdnieset_outdoor/mdnieset_outdoor_file_cmd
# usb permission settings
chmod 0664 /sys/devices/virtual/sec/switch/disable_vbus
chmod 0664 /sys/devices/virtual/sec/switch/usb_state
chmod 0664 /sys/devices/virtual/sec/switch/usb_sel
chmod 0664 /sys/devices/virtual/sec/switch/uart_sel
chown system radio /sys/devices/virtual/sec/switch/disable_vbus
chown system radio /sys/devices/virtual/sec/switch/usb_state
chown system radio /sys/devices/virtual/sec/switch/usb_sel
chown system radio /sys/devices/virtual/sec/switch/uart_sel
chmod 0664 /sys/devices/platform/android_usb/tethering
chmod 0664 /sys/devices/platform/android_usb/UmsStatus
chmod 0664 /sys/devices/platform/android_usb/UsbMenuSel
chmod 0664 /sys/devices/platform/android_usb/AskOnStatus
chmod 0664 /sys/devices/platform/android_usb/AskOnMenuSel
chown system radio /sys/devices/platform/android_usb/tethering
chown system radio /sys/devices/platform/android_usb/UmsStatus
chown system radio /sys/devices/platform/android_usb/UsbMenuSel
chown system radio /sys/devices/platform/android_usb/AskOnStatus
chown system radio /sys/devices/platform/android_usb/AskOnMenuSel
on boot
setprop ro.build.product p1
setprop ro.product.device p1
service gpsd /system/vendor/bin/gpsd -c /system/vendor/etc/gps.xml
class main
socket gps seqpacket 0660 gps system
user gps system
group system inet
# --------------------------------------------------------------------------------------
# GT-P1000L (p1l) only
# --------------------------------------------------------------------------------------
#
# Latin MobileTV [ISDB-T]
#
service mobileTV /system/bin/broadcastProcessObserver
class main
user system
group system audio camera graphics inet net_bt net_bt_admin net_raw sdcard_rw
disabled
service mtvmf /system/bin/mtvmfservice
class main
user system
group system audio camera graphics inet net_bt net_bt_admin net_raw sdcard_rw
disabled
service mtvmfrec /system/bin/mtvmfrecservice
class main
user system
group system audio camera graphics inet net_bt net_bt_admin net_raw sdcard_rw
disabled