summaryrefslogtreecommitdiff
path: root/init.hardware.rc
diff options
context:
space:
mode:
authorChris Fries <cfries@google.com>2018-07-27 16:45:25 -0500
committerChris Fries <cfries@google.com>2018-07-27 17:01:10 -0500
commit838cab2a46a34891cd7bfb8a01b42b7383d5f5a3 (patch)
tree82dc81ea98bb5f02d4f41d522520d32f9e2d55c9 /init.hardware.rc
parent1363a7980274d9d28c7edb988e0bafbf51a7f4cc (diff)
Add init.firstboot.sh, for factory use case
In the factory they need an automated way to shut down the device after setupwizard finishes, but we also don't want to let them talk to Android over USB on a user / locked device. When bootmode is "firstboot" (Set by bootloader), the device will wait for USB cable to be disconnected, then shut down. Bug: 110896488 Change-Id: I9b831ef37e0d8d3f84a315c4d23b8258702b95fc
Diffstat (limited to 'init.hardware.rc')
-rw-r--r--init.hardware.rc8
1 files changed, 8 insertions, 0 deletions
diff --git a/init.hardware.rc b/init.hardware.rc
index fb242cf..d07097c 100644
--- a/init.hardware.rc
+++ b/init.hardware.rc
@@ -907,3 +907,11 @@ on property:persist.vendor.charge.start.level=*
# it should be written by the system init.
on property:ro.boot.hardware.radio.subtype=1
setprop audio.camerasound.force true
+
+on property:sys.boot_completed=1 && property:ro.boot.mode=firstboot
+ start init-firstboot-sh
+
+service init-firstboot-sh /vendor/bin/init.firstboot.sh
+ user nobody
+ disabled
+ oneshot