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