servod: Implement get_files_and_version

When the cable is not connected properly, servod goes through a codepath
that shows a very confusing error, due to the lack of this function.

  File "/home/ribalda/.local/hdctools/lib/python3.10/site-packages/usbkm232-0.9999.0.dev0-py3.10.egg/servo/", line 329, in post_init
    faults = diagnose.diagnose_ccd(self.servod)
  File "/home/ribalda/.local/hdctools/lib/python3.10/site-packages/usbkm232-0.9999.0.dev0-py3.10.egg/servo/utils/", line 46, in diagnose_ccd
    servo_latest_fw = servo_dev.get('root.servo_latest_fw_version')
  File "/home/ribalda/.local/hdctools/lib/python3.10/site-packages/usbkm232-0.9999.0.dev0-py3.10.egg/servo/", line 474, in get
    val = drv.get()
  File "/home/ribalda/.local/hdctools/lib/python3.10/site-packages/usbkm232-0.9999.0.dev0-py3.10.egg/servo/drv/", line 289, in get
    return self._get()
  File "/home/ribalda/.local/hdctools/lib/python3.10/site-packages/usbkm232-0.9999.0.dev0-py3.10.egg/servo/drv/", line 46, in _get
    except servo_updater.ServoUpdaterException as e:
AttributeError: type object 'servo_updater' has no attribute 'ServoUpdaterException'


    self._servod = servo_server.Servod(
  File "/home/ribalda/.local/hdctools/lib/python3.10/site-packages/usbkm232-0.9999.0.dev0-py3.10.egg/servo/", line 166, in __init__
  File "/home/ribalda/.local/hdctools/lib/python3.10/site-packages/usbkm232-0.9999.0.dev0-py3.10.egg/servo/", line 366, in post_init
  File "/home/ribalda/.local/hdctools/lib/python3.10/site-packages/usbkm232-0.9999.0.dev0-py3.10.egg/servo/", line 347, in post_init
    raise ServoPostInitError('No device interface '
servo.servo_postinit.ServoPostInitError: No device interface (Servo Micro, C2D2, or CCD) connected.
libusb: debug [libusb_get_configuration] active config 1

TEST=on servo_v4p1 connected to volteer. Run servod -m volteer

Change-Id: I85b46057132b9ff28d9a66fe5f67494d1d9ff3ec
Tested-by: Ricardo Ribalda <>
Reviewed-by: Sergey Frolov <>
Reviewed-by: Mike Frysinger <>
Commit-Queue: Ricardo Ribalda <>
1 file changed
tree: 4d32738d7780cad4f8b0afadaf7a2ae5b7d69316
  1. flashrom
  3. servod

Standalone scripts for hardware debug and control

This is a repository of scripts that enable common hardware debug tasks outside of a Chromium chroot.

When all you need is quick access to servod, flashrom, or others, the wrapper scripts here will get you up and running without the overhead of creating, syncing, or entering a chroot.


This repo is designed such that you can clone or download the entire repo and run scripts within, or grab and run individual scripts.

Running individual scripts

You can download and run individual scripts without checking out the entire repo:

curl -f "${repo}/+/main/${script}?format=TEXT" | base64 -d > "${script}"


  • Follow the Chromium shell style guidelines.
  • Unless making a symlink, do not assume any other script in the repo is available.
  • With few exceptions, these scripts should download, prepare, and run other Chromium OS tools -- not provide any new functionality.

Making changes

Since this repo isn‘t in the manifest, it won’t show up in your chroot. Instead, to make changes:

git clone
cd standalone-hdctools
curl -Lo .git/hooks/commit-msg
chmod +x .git/hooks/commit-msg
git checkout -b changes
# (make some changes)
git commit -a
git push origin HEAD:refs/for/main

The above steps will upload a patch to where you can get your patch reviewed, and submit.