1on 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
7on boot
8    setsebool in_qemu=1
9    restorecon /sys/qemu_trace/process_name
10    restorecon /sys/qemu_trace/state
11    restorecon /sys/qemu_trace/symbol
12    setprop ARGH ARGH
13    setprop net.eth0.gw 10.0.2.2
14    setprop net.eth0.dns1 10.0.2.3
15    setprop net.gprs.local-ip 10.0.2.15
16    setprop ro.radio.use-ppp no
17    setprop ro.build.product generic
18    setprop ro.product.device generic
19
20# fake some battery state
21    setprop status.battery.state Slow
22    setprop status.battery.level 5
23    setprop status.battery.level_raw  50
24    setprop status.battery.level_scale 9
25
26# disable some daemons the emulator doesn't want
27    stop dund
28    stop akmd
29
30# start essential services
31    start qemud
32    start goldfish-logcat
33    start goldfish-setup
34
35    setprop ro.setupwizard.mode EMULATOR
36
37# enable Google-specific location features,
38# like NetworkLocationProvider and LocationCollector
39    setprop ro.com.google.locationfeatures 1
40
41# For the emulator, which bypasses Setup Wizard, you can specify
42# account info for the device via these two properties.  Google
43# Login Service will insert these accounts into the database when
44# it is created (ie, after a data wipe).
45#
46#   setprop ro.config.hosted_account username@hosteddomain.org:password
47#   setprop ro.config.google_account username@gmail.com:password
48#
49# You MUST have a Google account on the device, and you MAY
50# additionally have a hosted account.  No other configuration is
51# supported, and arbitrary breakage may result if you specify
52# something else.
53
54service goldfish-setup /system/etc/init.goldfish.sh
55    user root
56    group root
57    oneshot
58
59# The qemu-props program is used to set various system
60# properties on boot. It must be run early during the boot
61# process to avoid race conditions with other daemons that
62# might read them (e.g. surface flinger), so define it in
63# class 'core'
64#
65service qemu-props /system/bin/qemu-props
66    class core
67    user root
68    group root
69    oneshot
70
71service qemud /system/bin/qemud
72    socket qemud    stream 666
73    oneshot
74
75# -Q is a special logcat option that forces the
76# program to check wether it runs on the emulator
77# if it does, it redirects its output to the device
78# named by the androidboot.console kernel option
79# if not, is simply exits immediately
80
81service goldfish-logcat /system/bin/logcat -Q
82    oneshot
83