• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1on boot
2    mount debugfs /sys/kernel/debug /sys/kernel/debug
3
4    mkdir /data/misc/wifi 0770 wifi wifi
5    mkdir /data/misc/wifi/sockets 0770 wifi wifi
6    mkdir /data/misc/dhcp 0770 dhcp dhcp
7    chown dhcp dhcp /data/misc/dhcp
8
9    # bluetooth power up/down interface
10    chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
11    chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
12    chmod 0660                /sys/class/rfkill/rfkill0/state
13
14    # bluetooth MAC address programming
15    chown bluetooth bluetooth /sys/module/board_mahimahi/parameters/bdaddr
16    setprop ro.bt.bdaddr_path /sys/module/board_mahimahi/parameters/bdaddr
17
18    # bluetooth car dock pin
19    chown system system /sys/class/switch/dock/bt_pin
20
21    # Permissions for Liblights.
22    chown system system /sys/class/leds/green/brightness
23    chown system system /sys/class/leds/green/blink
24    chown system system /sys/class/leds/amber/brightness
25    chown system system /sys/class/leds/amber/blink
26    chown system system /sys/class/leds/red/brightness
27    chown system system /sys/class/leds/red/blink
28    chown system system /sys/class/leds/blue/brightness
29    chown system system /sys/class/leds/blue/blink
30    chown system system /sys/class/leds/jogball-backlight/brightness
31    chown system system /sys/class/leds/jogball-backlight/color
32    chown system system /sys/class/leds/jogball-backlight/period
33    chown system system /sys/class/leds/button-backlight/brightness
34    chown system system /sys/class/leds/lcd-backlight/brightness
35
36    # enable the GPS
37    setprop ro.ril.def.agps.mode 2
38
39    # performance tweaks for flash
40    write /sys/block/mtdblock3/bdi/read_ahead_kb 4
41    write /sys/block/mtdblock4/bdi/read_ahead_kb 4
42    write /sys/block/mtdblock5/bdi/read_ahead_kb 4
43
44    # Power Management
45    write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 245000
46    write /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 998400
47    write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ondemand
48    write /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate 40000
49
50    # Wakelock debug
51    write /sys/module/wakelock/parameters/debug_mask 7
52
53    # Fast dormancy settings
54    setprop ro.ril.fast.dormancy.rule 1
55    setprop ro.ril.fd.scron.timeout 4
56    setprop ro.ril.fd.scroff.timeout 3
57
58    # GPRS class
59    setprop ro.ril.gprsclass 10
60
61# compass/accelerometer daemon
62service akmd /system/bin/akmd
63    user compass
64    group compass misc input
65
66service wpa_supplicant /system/bin/wpa_supplicant \
67    -Dwext -ieth0 -c/data/misc/wifi/wpa_supplicant.conf
68#   we will start as root and wpa_supplicant will switch to user wifi
69#   after setting up the capabilities required for WEXT
70#   user wifi
71#   group wifi inet keystore
72    socket wpa_eth0 dgram 660 wifi wifi
73    disabled
74    oneshot
75
76service dhcpcd_eth0 /system/bin/dhcpcd -ABKL
77    disabled
78    oneshot
79
80# bugreport is triggered by the KEY_VOLUMEUP and BTN_MOUSE keycodes
81service bugreport /system/bin/dumpstate -d -v -o /sdcard/bugreports/bugreport
82    disabled
83    oneshot
84    keycodes 115 272
85
86service hciattach /system/bin/brcm_patchram_plus --enable_hci --enable_lpm \
87    --baudrate 3000000 --patchram /etc/firmware/bcm4329.hcd /dev/ttyHS0
88    user bluetooth
89    group bluetooth net_bt_admin
90    disabled
91
92service dspcrashd /system/bin/dspcrashd
93
94