summaryrefslogtreecommitdiffstats
path: root/rootdir/init.gta04.rc
blob: 57f81f12ed082786914c29003b819d76db3f56a4 (plain)
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
import init.gta04.usb.rc

on init
	mkdir /mnt/boot 0700 system system

	mkdir /mnt/shell/emulated 0700 shell shell
	mkdir /storage/emulated 0555 root root

	export EXTERNAL_STORAGE /storage/emulated/legacy
	export EMULATED_STORAGE_SOURCE /mnt/shell/emulated
	export EMULATED_STORAGE_TARGET /storage/emulated

	# Legacy
	symlink /storage/emulated/legacy /sdcard
	symlink /storage/emulated/legacy /mnt/sdcard
	symlink /storage/emulated/legacy /storage/sdcard
	symlink /mnt/shell/emulated/0 /storage/emulated/legacy

	# USB disk
	mkdir /storage/usbdisk 0666 system system
	symlink /storage/usbdisk /mnt/usbdisk
	symlink /mnt/usbdisk /usbdisk

	symlink /mnt/boot /boot

	chmod 0660 /dev/cpuctl

on boot
	# Modem GPIO
	chown radio radio /sys/class/gpio/gpio186/value
	chmod 660 /sys/class/gpio/gpio186/value

	# Lights
	chown system system /sys/class/backlight/pwm-backlight/brightness
	chown system system /sys/class/backlight/pwm-backlight/max_brightness
	chown system system /sys/class/leds/gta04:red:power/brightness
	chown system system /sys/class/leds/gta04:red:power/max_brightness
	chown system system /sys/class/leds/gta04:green:power/brightness
	chown system system /sys/class/leds/gta04:green:power/max_brightness
	chown system system /sys/class/leds/gta04:red:aux/brightness
	chown system system /sys/class/leds/gta04:red:aux/max_brightness
	chown system system /sys/class/leds/gta04:green:aux/brightness
	chown system system /sys/class/leds/gta04:green:aux/max_brightness

	# Audio
	chown system audio /sys/class/gpio/gpio55/value
	chmod 0660 /sys/class/gpio/gpio55/value

on fs
	mount_all /fstab.gta04

	setprop ro.crypto.fuse_sdcard true

on post-fs-data
	mkdir /data/media 0770 media_rw media_rw

service sdcard /system/bin/sdcard /data/media /mnt/shell/emulated 1023 1023
	class late_start