forked from gokhanmoral/initramfs3
-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathrecovery.rc
134 lines (103 loc) · 3.4 KB
/
recovery.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
on early-init
start ueventd
start healthd
on init
export PATH /sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin
export ANDROID_ROOT /system
export ANDROID_DATA /data
export EXTERNAL_STORAGE /sdcard
symlink /system/etc /etc
mkdir /boot
mkdir /recovery
mkdir /sdcard
mkdir /internal_sd
mkdir /external_sd
mkdir /sd-ext
mkdir /datadata
mkdir /emmc
mkdir /system
mkdir /data
mkdir /data/property
mkdir /cache
mount tmpfs tmpfs /tmp
chown root root /data/property
chmod 0700 /data/property
chown root shell /tmp
chmod 0775 /tmp
mkdir /mnt 0775 root system
mkdir /storage 0050 root sdcard_r
mount tmpfs tmpfs /storage mode=0050,uid=0,gid=1028
# See storage config details at http://source.android.com/tech/storage/
mkdir /mnt/shell 0700 shell shell
write /proc/sys/vm/legacy_va_layout 0
write /proc/sys/kernel/randomize_va_space 2
# Directory for putting things only root should see.
mkdir /mnt/secure 0700 root root
# Create private mountpoint so we can MS_MOVE from staging
mount tmpfs tmpfs /mnt/secure mode=0700,uid=0,gid=0
# Directory for staging bindmounts
mkdir /mnt/secure/staging 0700 root root
# Fuse public mount points.
mkdir /mnt/fuse 0700 root system
mount tmpfs tmpfs /mnt/fuse mode=0775,gid=1000
on post-fs-data
# insmod kernel modules
insmod /lib/modules/exfat.ko
on fs
# check encryption status, checking UMS & data should be excuted after this command
exec check_encryption_status /dev/block/mmcblk0p10
# verfiy filesystem (UMS)
exec sformat /dev/block/mmcblk0p11 vfat
on boot
mount debugfs /sys/kernel/debug /sys/kernel/debug
setprop ro.build.product GT-I9100
setprop ro.product.device GT-I9100
# Permissions for mDNIe
chown system media_rw /sys/class/mdnie/mdnie/mode
chown system media_rw /sys/class/mdnie/mdnie/outdoor
chown system media_rw /sys/class/mdnie/mdnie/scenario
write /sys/class/mdnie/mdnie/scenario 0
write /sys/class/mdnie/mdnie/mode 1
ifup lo
hostname localhost
domainname localdomain
class_start default
on property:sys.powerctl=*
powerctl ${sys.powerctl}
service ueventd /sbin/ueventd
critical
service healthd /sbin/healthd -n
critical
service console /sbin/sh
class core
console
disabled
group log
on property:ro.debuggable=1
start console
service recovery /sbin/recovery-loader
service setup_adbd /sbin/setup_adbd
oneshot
service adbd /sbin/adbd recovery
disabled
socket adbd stream 660 system system
service vold /sbin/minivold
socket vold stream 0660 root mount
ioprio be 2
# Always start adbd on userdebug and eng builds
# In recovery, always run adbd as root.
on property:ro.debuggable=1
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 04e8
write /sys/class/android_usb/android0/idProduct 685e
write /sys/class/android_usb/android0/functions mass_storage,adb
write /sys/class/android_usb/android0/enable 1
write /sys/class/android_usb/android0/iManufacturer Samsung
write /sys/class/android_usb/android0/iProduct GT-I9100
start adbd
setprop service.adb.root 1
# Restart adbd so it can run as root
on property:service.adb.root=1
write /sys/class/android_usb/android0/enable 0
restart adbd
write /sys/class/android_usb/android0/enable 1