summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbohu <bohu@google.com>2017-09-22 00:37:32 -0700
committerbohu <bohu@google.com>2017-09-22 11:53:49 -0700
commit7f84e335bc71a35c8d64f4cb890871fd77dfb161 (patch)
tree3a7405125dd9ec05e76006a2f64c2b974a208edf
parent49079b0599b4853a0d417f972c5ccc2873cd418f (diff)
downloaddevice_google_atv-7f84e335bc71a35c8d64f4cb890871fd77dfb161.tar.gz
device_google_atv-7f84e335bc71a35c8d64f4cb890871fd77dfb161.tar.bz2
device_google_atv-7f84e335bc71a35c8d64f4cb890871fd77dfb161.zip
atv sdk: get emulator TV image to boot
The original init.ranchu.rc file does not setprop vold.post_fs_data_done 1 and consequently, the data partition cannot be mounted correctly. BUG: 64401460 Test: build sdk_google_atv_x86-sdk and boot it to home Change-Id: I00046e57c3c568c4ab9ff2393cb989d0f42c0aa7 Merged-In: I00046e57c3c568c4ab9ff2393cb989d0f42c0aa7
-rw-r--r--init.ranchu.rc37
1 files changed, 33 insertions, 4 deletions
diff --git a/init.ranchu.rc b/init.ranchu.rc
index 5baf9ed..c5b2a83 100644
--- a/init.ranchu.rc
+++ b/init.ranchu.rc
@@ -2,13 +2,16 @@ on fs
mount_all /fstab.ranchu
on early-init
- mount debugfs debugfs /sys/kernel/debug
+ mount debugfs debugfs /sys/kernel/debug mode=755
on init
symlink /dev/goldfish_pipe /dev/android_pipe
symlink /dev/goldfish_pipe /dev/qemu_pipe
+on post-fs-data
+ setprop vold.post_fs_data_done 1
+
on boot
setprop net.eth0.gw 10.0.2.2
setprop net.eth0.dns1 10.0.2.3
@@ -17,6 +20,7 @@ on boot
setprop ro.build.product generic
setprop ro.product.device generic
setprop ro.hardware.audio.primary goldfish
+ setprop ro.setupwizard.mode EMULATOR
# fake some battery state
setprop status.battery.state Slow
@@ -46,34 +50,59 @@ on boot
start goldfish-logcat
start goldfish-setup
+
# enable Google-specific location features,
# like NetworkLocationProvider and LocationCollector
setprop ro.com.google.locationfeatures 1
-service goldfish-setup /system/etc/init.goldfish.sh
+#emulator is not much useful before boot complete
+#start it later
+on property:sys.boot_completed=1
+ setprop sys.usb.config adb
+ start adbd
+ start goldfish-logcat
+
+# allow goldfish-setup to take wake lock
+ chown root system /sys/power/wake_lock
+ chown root system /sys/power/wake_unlock
+
+service ranchu-setup /vendor/bin/init.ranchu-core.sh
+ class core
user root
group root
oneshot
+service ranchu-net /vendor/bin/init.ranchu-net.sh
+ class late_start
+ user root
+ group root wakelock
+ 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
+service qemu-props /vendor/bin/qemu-props
class core
user root
group root
oneshot
+on property:qemu.logcat=start
+ start goldfish-logcat
+
# -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
-
+# logd user added to prevent logcat from logging content.
+# log group added to support access to read logs socket.
service goldfish-logcat /system/bin/logcat -Q
+ user logd
+ group log
oneshot
service fingerprintd /system/bin/fingerprintd