summaryrefslogtreecommitdiffstats
path: root/init.goldfish.rc
diff options
context:
space:
mode:
authorbohu <bohu@google.com>2016-02-04 09:48:42 -0800
committerBo Hu <bohu@google.com>2016-02-22 21:32:59 +0000
commit6bcfbeee87d435d1ff31a9220fde50009dcd8607 (patch)
tree5152817f34e68921636c065a326387b6472886d5 /init.goldfish.rc
parented348d5ec61e8ba8573af40856e00e4f53d0091b (diff)
downloadandroid_device_google_atv-6bcfbeee87d435d1ff31a9220fde50009dcd8607.tar.gz
android_device_google_atv-6bcfbeee87d435d1ff31a9220fde50009dcd8607.tar.bz2
android_device_google_atv-6bcfbeee87d435d1ff31a9220fde50009dcd8607.zip
Enable network on android TV
Since there is no WiFi support yet, DHCP is used to enable the network connection on andorid TV. bug: 22978990 Change-Id: If7a630753c0d425fbc7a0c878f62fd290846ce3f (cherry picked from commit 17249d3d903f7f54db676fca994b87c2c08e22e2)
Diffstat (limited to 'init.goldfish.rc')
-rw-r--r--init.goldfish.rc94
1 files changed, 94 insertions, 0 deletions
diff --git a/init.goldfish.rc b/init.goldfish.rc
new file mode 100644
index 0000000..0d801c1
--- /dev/null
+++ b/init.goldfish.rc
@@ -0,0 +1,94 @@
+
+on early-init
+ mount debugfs debugfs /sys/kernel/debug
+
+on init
+ # Support legacy paths
+ symlink /sdcard /mnt/sdcard
+
+on boot
+ setprop ARGH ARGH
+ setprop net.eth0.gw 10.0.2.2
+ setprop net.eth0.dns1 10.0.2.3
+ setprop net.dns1 10.0.2.3
+ setprop net.gprs.local-ip 10.0.2.15
+ setprop ro.radio.use-ppp no
+ setprop ro.build.product generic
+ setprop ro.product.device generic
+
+# fake some battery state
+ setprop status.battery.state Slow
+ setprop status.battery.level 5
+ setprop status.battery.level_raw 50
+ setprop status.battery.level_scale 9
+
+# disable some daemons the emulator doesn't want
+ stop dund
+ stop akmd
+
+# start essential services
+ start qemud
+ start goldfish-logcat
+ start goldfish-setup
+
+ setprop ro.setupwizard.mode EMULATOR
+
+# enable dhcpcd on eth0 interface
+service dhcpcd_eth0 /system/bin/dhcpcd -ABDKL
+ class main
+ disabled
+ oneshot
+
+# enable Google-specific location features,
+# like NetworkLocationProvider and LocationCollector
+ setprop ro.com.google.locationfeatures 1
+
+# For the emulator, which bypasses Setup Wizard, you can specify
+# account info for the device via these two properties. Google
+# Login Service will insert these accounts into the database when
+# it is created (ie, after a data wipe).
+#
+# setprop ro.config.hosted_account username@hosteddomain.org:password
+# setprop ro.config.google_account username@gmail.com:password
+#
+# You MUST have a Google account on the device, and you MAY
+# additionally have a hosted account. No other configuration is
+# supported, and arbitrary breakage may result if you specify
+# something else.
+
+on fs
+ mount_all /fstab.goldfish
+
+service goldfish-setup /system/etc/init.goldfish.sh
+ user root
+ group root
+ oneshot
+
+# The qemu-props program is used to set various system
+# properties on boot. It must be run early during the boot
+# process to avoid race conditions with other daemons that
+# might read them (e.g. surface flinger), so define it in
+# class 'core'
+#
+service qemu-props /system/bin/qemu-props
+ class core
+ user root
+ group root
+ oneshot
+
+service qemud /system/bin/qemud
+ socket qemud stream 666
+ oneshot
+
+# -Q is a special logcat option that forces the
+# program to check wether it runs on the emulator
+# if it does, it redirects its output to the device
+# named by the androidboot.console kernel option
+# if not, is simply exits immediately
+
+service goldfish-logcat /system/bin/logcat -Q
+ oneshot
+
+service fingerprintd /system/bin/fingerprintd
+ class late_start
+ user system