1#
2# Copyright 2015 The Android Open Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8#      http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16
17on init
18    # Android creates by-name disk links with the disk controller
19    # in the generated path, so that the names pulled out of the GPT
20    # can be associated with the correct disk. Create a shortcut to
21    # /dev/block/by-name so that we can use the same fstabs everywhere.
22    symlink /dev/block/pci/pci0000:00/0000:00:01.0/by-name /dev/block/by-name
23    chown system root /dev/watchdog
24    chown root system /sys/module/bcm4334x/parameters/firmware_path
25    chmod 0660 /sys/module/bcm4334x/parameters/firmware_path
26    chown root system /sys/module/bcm4334x/parameters/nvram_path
27    chmod 0660 /sys/module/bcm4334x/parameters/nvram_path
28
29
30on fs
31    mount_all /fstab.${ro.hardware}
32    mkdir /dev/usb-ffs 0770 shell shell
33    mkdir /dev/usb-ffs/adb 0770 shell shell
34    mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=2000
35    write /sys/class/android_usb/android0/f_ffs/aliases adb
36    write /sys/class/android_usb/android0/iSerial ${ro.serialno}
37
38service watchdogd /sbin/watchdogd
39    user system
40    group root
41    class core
42    critical
43    seclabel u:r:watchdogd:s0
44