blob: 15ca572aa739215b870ca3de0100aa937cb11818 [file] [log] [blame]
Iliyan Malchevce7d34c2012-04-03 13:06:15 -07001on early-init
2 export EXTERNAL_STORAGE /mnt/sdcard
3 mkdir /mnt/sdcard 0000 system system
4 # for backwards compatibility
5 symlink /mnt/sdcard /sdcard
6
Vladimir Chtchetkine2aced2d2011-04-05 17:28:43 -07007on boot
8 setprop ARGH ARGH
Iliyan Malchevce7d34c2012-04-03 13:06:15 -07009 setprop net.eth0.gw 10.0.2.2
Vladimir Chtchetkine2aced2d2011-04-05 17:28:43 -070010 setprop net.eth0.dns1 10.0.2.3
11 setprop net.gprs.local-ip 10.0.2.15
12 setprop ro.radio.use-ppp no
13 setprop ro.build.product generic
14 setprop ro.product.device generic
15
16# fake some battery state
17 setprop status.battery.state Slow
18 setprop status.battery.level 5
19 setprop status.battery.level_raw 50
20 setprop status.battery.level_scale 9
21
22# disable some daemons the emulator doesn't want
23 stop dund
24 stop akmd
25
Iliyan Malchevce7d34c2012-04-03 13:06:15 -070026# start essential services
27 start qemud
28 start goldfish-logcat
29# start goldfish-setup
30 start netcfg
31
Vladimir Chtchetkine2aced2d2011-04-05 17:28:43 -070032 setprop ro.setupwizard.mode EMULATOR
33
Iliyan Malchevce7d34c2012-04-03 13:06:15 -070034on fs
Iliyan Malchev277e68b2012-04-05 16:11:15 -070035# mount sda (system) and sdb (data) partitions
Iliyan Malchevce7d34c2012-04-03 13:06:15 -070036 mount ext4 /dev/block/sda6 /system
37 mount ext4 /dev/block/sda6 /system ro remount
Iliyan Malchev277e68b2012-04-05 16:11:15 -070038 mount ext4 /dev/block/sdb6 /data nosuid nodev
39 mount ext4 /dev/block/sdb7 /cache nosuid nodev
Iliyan Malchevce7d34c2012-04-03 13:06:15 -070040
Vladimir Chtchetkine2aced2d2011-04-05 17:28:43 -070041# enable Google-specific location features,
42# like NetworkLocationProvider and LocationCollector
43 setprop ro.com.google.locationfeatures 1
44
45# For the emulator, which bypasses Setup Wizard, you can specify
46# account info for the device via these two properties. Google
47# Login Service will insert these accounts into the database when
48# it is created (ie, after a data wipe).
49#
50# setprop ro.config.hosted_account username@hosteddomain.org:password
51# setprop ro.config.google_account username@gmail.com:password
52#
53# You MUST have a Google account on the device, and you MAY
54# additionally have a hosted account. No other configuration is
55# supported, and arbitrary breakage may result if you specify
56# something else.
57
58service goldfish-setup /system/etc/init.goldfish.sh
Iliyan Malchevce7d34c2012-04-03 13:06:15 -070059 user root
60 group root
61 oneshot
62
63# The qemu-props program is used to set various system
64# properties on boot. It must be run early during the boot
65# process to avoid race conditions with other daemons that
66# might read them (e.g. surface flinger), so define it in
67# class 'core'
68#
69service qemu-props /system/bin/qemu-props
70 class core
71 user root
72 group root
73 oneshot
Vladimir Chtchetkine2aced2d2011-04-05 17:28:43 -070074
75service qemud /system/bin/qemud
76 socket qemud stream 666
77 oneshot
78
79# -Q is a special logcat option that forces the
80# program to check wether it runs on the emulator
81# if it does, it redirects its output to the device
82# named by the androidboot.console kernel option
Iliyan Malchevce7d34c2012-04-03 13:06:15 -070083# if not, it simply exits immediately
Vladimir Chtchetkine2aced2d2011-04-05 17:28:43 -070084
85service goldfish-logcat /system/bin/logcat -Q
86 oneshot
Iliyan Malchevce7d34c2012-04-03 13:06:15 -070087
88# Enable networking so that adb can connect
89service netcfg /system/bin/netcfg eth0 dhcp
90 oneshot