forked from bekriebel/android_device_malata_smb-common
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.nvidia.rc
156 lines (128 loc) · 5.2 KB
/
init.nvidia.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
on boot
mount debugfs /sys/kernel/debug /sys/kernel/debug
on init
# set variables
export PHONE_STORAGE /mnt/emmc
export EXTERNAL_STORAGE_SD2 /mnt/emmc
export EXTERNAL_STORAGE_UDISK /mnt/udisk
export BOOTCLASSPATH /system/framework/core.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/core-junit.jar:/system/framework/com.tapntap.platform.jar:/system/framework/com.nvidia.graphics.jar
on fs
# Mount file systems
mkdir /system
mkdir /data 0771 system system
mkdir /cache 0770 system cache
mkdir /devlog 0700 root root
mount yaffs2 /dev/block/mtdblock3 /system wait ro relatime
mount ext3 /dev/block/mmcblk3p2 /data wait rw nosuid nodev relatime errors=continue data=writeback
mount yaffs2 /dev/block/mtdblock4 /cache wait rw nosuid nodev relatime
# create secondary sd and usbdisk mount points
mkdir /mnt/emmc 0000 system system
symlink /mnt/emmc /emmc
mkdir /mnt/usbdisk 0000 system system
symlink /mnt/usbdisk /usbdisk
# Create dump dir and collect dumps.
# Do this before we mount cache so eventually we can use cache for
# storing dumps on platforms which do not have a dedicated dump partition.
mkdir /data/dontpanic
chown root log /data/dontpanic
chmod 0750 /data/dontpanic
# Collect apanic data, free resources and re-arm trigger
copy /proc/apanic_console /data/dontpanic/apanic_console
chown root log /data/dontpanic/apanic_console
chmod 0640 /data/dontpanic/apanic_console
copy /proc/apanic_threads /data/dontpanic/apanic_threads
chown root log /data/dontpanic/apanic_threads
chmod 0640 /data/dontpanic/apanic_threads
write /proc/apanic_console 1
# create basic filesystem structure
mkdir /data/misc 01771 system misc
mkdir /data/misc/bluetoothd 0770 bluetooth bluetooth
mkdir /data/misc/bluetooth 0770 system system
mkdir /data/misc/keystore 0700 keystore keystore
mkdir /data/misc/vpn 0770 system system
mkdir /data/misc/systemkeys 0700 system system
mkdir /data/misc/vpn/profiles 0770 system system
# give system access to wpa_supplicant.conf for backup and restore
mkdir /data/misc/wifi 0770 wifi wifi
chmod 0770 /data/misc/wifi
chmod 0660 /data/misc/wifi/wpa_supplicant.conf
mkdir /data/local 0771 shell shell
mkdir /data/local/tmp 0771 shell shell
mkdir /data/data 0771 system system
mkdir /data/app-private 0771 system system
mkdir /data/app 0771 system system
mkdir /data/property 0700 root root
# create dalvik-cache and double-check the perms
mkdir /data/dalvik-cache 0771 system system
chown system system /data/dalvik-cache
chmod 0771 /data/dalvik-cache
# create the lost+found directories, so as to enforce our permissions
mkdir /data/lost+found 0770
# double check the perms, in case lost+found already exists, and set owner
chown root root /data/lost+found
chmod 0770 /data/lost+found
# allow net_raw to have access to /dev/socket directory
chown root net_raw /dev/socket
chmod 0775 /dev/socket
# nvrm permissions
chmod 666 /dev/nvrm
# knvrm permissions
chmod 660 /dev/knvrm
chown root system /dev/knvrm
# nvrpc permissions
chmod 666 /dev/nvrpc
# nvmap permissions
chmod 666 /dev/nvmap
# nvos permissions
chmod 666 /dev/nvos
# nvhost permissions
chmod 666 /dev/nvhost-ctrl
chmod 666 /dev/nvhost-display
chmod 666 /dev/nvhost-gr3d
chmod 666 /dev/nvhost-gr2d
chmod 666 /dev/nvhost-dsi
chmod 666 /dev/nvhost-isp
chmod 666 /dev/nvhost-mpe
chmod 666 /dev/nvhost-vi
# wlan permissions
mkdir /data/misc/wifi 0771 wifi wifi
mkdir /data/misc/wifi/sockets 0771 wifi wifi
chmod 0771 /data/misc/wifi
mkdir /data/misc/dhcp 0771 dhcp dhcp
chown dhcp dhcp /data/misc/dhcp
mkdir /data/misc/dhcpcd 0771 dhcp dhcp
chown dhcp dhcp /data/misc/dhcpcd
setprop wifi.interface wlan0
# bluetooth permissions
chmod 0660 /dev/ttyHS2
chown bluetooth bluetooth /dev/ttyHS2
chmod 0660 /sys/class/rfkill/rfkill0/state
chmod 0660 /sys/class/rfkill/rfkill0/type
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
write /sys/class/rfkill/rfkill0/state 0
copy system/lib/hw/wlan/BCM4329B1.hcd /data/BCM4329B1.hcd
chmod 0777 /data/BCM4329B1.hcd
#do calibration when have file calibration.ini in sdcard
service TSCalibration /system/bin/TSCalibration
user root
oneshot
service nvrm_daemon /system/bin/nvrm_daemon
user root
onrestart restart servicemanager
service wpa_supplicant /system/bin/wpa_supplicant -Dwext -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf
socket wpa_wlan0 dgram 660 wifi wifi
disabled
oneshot
service dhcpcd_wlan0 /system/bin/dhcpcd -ABKL wlan0
disabled
oneshot
service abtfilt /system/bin/abtfilt -c -d -z -n
user root
service hciattach /system/bin/bc_hciattach -n -t 100 -s 115200 ttyHS2 bcm4329 921600 flow
user bluetooth
group system bluetooth net_bt_admin misc
oneshot
disabled
on property:init.svc.wpa_supplicant=stopped
stop dhcpcd