forked from CyanogenMod/android_device_hp_tenderloin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.recovery.rc
64 lines (47 loc) · 1.52 KB
/
init.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
on early-init
start ueventd
on init
export PATH /sbin
export ANDROID_ROOT /system
export ANDROID_DATA /data
export EXTERNAL_STORAGE /sdcard
symlink /system/etc /etc
mkdir /boot
mkdir /sdcard
mkdir /sd-ext
mkdir /datadata
mkdir /emmc
mkdir /system
mkdir /data
mkdir /cache
mount /tmp /tmp tmpfs
# Enable LVM
mkdir /mnt
# We need to set LVM_SYSTEM_DIR for lvm to work and it does not work
# with embedded export command until too late, so we exploit
# the fact that there is /bin/sh on the 13th partition that we can use.
mount ext3 /dev/block/mmcblk0p13 /mnt wait noatime barrier=1
# Unfortunately it's dynamically linked so we need to create this
# /lib symlink first and kill it later when no longer needed.
symlink /mnt/lib /lib
# Also stupid lvm binary expects block devices to live in /dev,
# not /dev/block
symlink /dev/block/mmcblk0p14 /dev/mmcblk0p14
exec /sbin/sh -c "LVM_SYSTEM_DIR=/mnt/etc/lvm /mnt/usr/sbin/lvm.static vgchange -ay"
# remove all the lvm stuff as well as the moboot nextboot instruction
exec /sbin/rm -rf /dev/mmcblk0p14 /lib /var /mnt/moboot.next
umount /mnt
on boot
ifup lo
hostname localhost
domainname localdomain
class_start default
service ueventd /sbin/ueventd
critical
service recovery /sbin/recovery
service adbd /sbin/adbd recovery
disabled
on property:persist.service.adb.enable=1
start adbd
on property:persist.service.adb.enable=0
stop adbd