gooftool: Turn off developer switch on finalization.
BUG=chrome-os-partner:10007
TEST=./gooftool verify_switch_dev
Change-Id: I1a89ac1924f787bdd49efba9acf22ba424ec3a8e
Reviewed-on: https://gerrit.chromium.org/gerrit/26910
Reviewed-by: Chinyue Chen <chinyue@chromium.org>
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
diff --git a/py/gooftool.py b/py/gooftool.py
index 4d33725..bf1def1 100755
--- a/py/gooftool.py
+++ b/py/gooftool.py
@@ -406,12 +406,12 @@
raise Error, 'developer mode is enabled'
else:
return
- # Try ChromeOS-EC. This may hang 15 seconds if the EC does not respond.
- logging.warn('VerifyDevSwitch: Trying ChromeOS-EC...')
- if not Shell('ectool vboot 0').success:
+ # devsw_cur is not available -- probably a device using keyboard-based
+ # developer/recovery mode. We can't verify this until next reboot, because
+ # the real values are stored in TPM.
+ logging.warn('VerifyDevSwitch: Trying disable_dev_request...')
+ if not Shell('crossystem disable_dev_request=1').success:
raise Error, 'failed to turn off developer mode.'
- # TODO(hungte) Verify if the switch is turned off properly, using "ectoo
- # vboot" and parse the key-value pairs, when the names are determined.
@Command('write_protect')