18
15

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

ChromeOSのcroshコマンド一覧

Last updated at Posted at 2019-11-12

概要

  • ChromeOSのcroshにて使用できるコマンドを一覧化
  • croshCtrl + Alt + Tにて起動できる
  • デベロッパーモードじゃなくても使用可能だが、デベロッパーモードじゃないと表示されないコマンドがある
  • croshのURL → chrome-untrusted://crosh
  • ドキュメント等 → crosh - chromiumos/platform2 - Git at Google
  • 以下はhelp_advancedコマンドの実行結果
  • バージョン: 125.0.6422.19(Official Build)beta (64 ビット)にて確認

arc

Usage: arc
  [ ping [ NETWORK ] [ <ip address> | <hostname> ] |
    http [ NETWORK ] <url> |
    dns [ NETWORK ] <domain> |
    proxy <url> |
    list [ networks ] |
    stats [ sockets | traffic | idle ]
  ]
  where NETWORK := [ wifi | eth | ethernet | cell | cellular | vpn ]
  If NETWORK is not specified, the default network is used.

ping:           check the reachability of a host or IP address.
http:           do a GET request to an URL and print the response header.
dns:            perform a DNS lookup of a domain name.
proxy:          resolve the current proxy configuration for a given URL.
list networks:  show properties of all networks connected in Android.
stats sockets:  show TCP connect and DNS statistics by Android Apps.
stats traffic:  show traffic packet statistics by Android Apps.
stats idle   :  show system idle stats of Android.

autest

autest [--scheduled]
  Trigger an auto-update against a **test** update server.

  WARNING: This may update to an untested version of ChromeOS which was never
  intended for end users!

  The --scheduled option fakes a scheduled update.

battery_firmware

battery_firmware <info>
  info   : Query battery info.

battery_test

battery_test [<test length>]
  Tests battery discharge rate for given number of seconds. Without an argument,
  defaults to 300 seconds.

bt_console

bt_console
  Enters a Bluetooth debugging console.

ccd_pass

ccd_pass
  When prompted, set or clear CCD password (use the word 'clear' to clear
  the password).

chaps_debug

chaps_debug [start|stop|<log_level>]
  Sets the chapsd logging level.  No arguments will start verbose logging.

connectivity

connectivity
  Shows connectivity status.  'connectivity help' for more details

cras

cras [ enable <flag> | disable <flag> | telephony <event> [arg] ]
  Interact with CRAS(CrOS Audio Server) to set flags or trigger events.

  Subcommands:
    enable/disable <flag>:
      Enable or disable feature flag inside CRAS.
      Available flags:
      - wbs: Turn on this flag to make CRAS try to use wideband speech mode in
        Bluetooth HFP, if both the Bluetooth controller and peripheral supports
        this feature.
      - noise_cancellation: Turn on this flag to enable noise cancellation
        processing to input devices who support noise cancellation.

      Notice: The flag changes made through this command do not persist after
      reboot.

    telephony <event> [args...]:
      Trigger a telephony event pass to CRAS in Bluetooth HFP.

      Available events:
      - IncomingCall <PhoneNumber>: Make a call from external line.
          Ex: $ cras telephony IncomingCall 12345678
      - AnswerCall: Answer the call.
      - TerminateCall: Terminate the call.
      - SetDialNumber [DailNumber]: Set the last dialed number recorded. Clear
        the recorded number if no DailNumber is provided.
      - SetBatteryLevel <BatteryLevel>: Set and transfer the battery level to
        HF. The BatteryLevel should range from 0 to 5.
      - SetSignalStrength <SignalStrength>: Set and transfer the signal strength
        to HF. The SignalStrength should range from 0 to 5.
      - SetServiceAvailability <0/1>: Set if the service is available or not.
      - SetCallheld <CallHeldIndicator>: Set the callheld indicator.
        CallHeldIndicator:
          0 = No calls held
          1 = Call is placed on hold or active/held calls swapped
          (The AG has both an active AND a held call)
          2 = Call on hold, no active call
      - SetCallsetup <CallSetupIndicator>: Set the callsetup indicator.
        CallSetupIndicator:
          0 = No call setup in progress
          1 = Incoming call setup in progress
          2 = Outgoing call setup in dialing state
          3 = Outgoing call setup in alerting state
      - SetCall <CallIndicator>: Set the call indicator.
        CallIndicator:
          0 = No call (held or active)
          1 = Call is present (active or held)

diag

diag
Usage: [list|routine]

display_debug

display_debug
  A tool to assist with collecting logs when reproducing display related issues.

  Subcommands:
    trace_start Usage: display_debug trace_start
      Increase size and verbosity of logging through drm_trace.

    trace_stop Usage: display_debug trace_stop
      Reset size and verbosity of logging through drm_trace to defaults.

    trace_annotate Usage: display_debug trace_annotate <message>
      Append |message| to the drm_trace log.

    diagnose Usage: display_debug diagnose
      Give a sequence of steps to assist in debugging display issues.

dlc_install

dlc_install <dlc-id>
  Trigger a DLC installation against a **test** update server.

The **test** update server will serve signed DLC payloads which will only
successfully install if signed and verifiable. Otherwise, installations will
fail. The magical string 'autest' is passed into update_engine during this
installation, which will make requests against QA Omaha server and not the
production Omaha server.

WARNING: This may install an untested version of the DLC which was never
intended for end users!

dmesg

Usage: dmesg [options]
        -d, --show_delta
                Display the timestamp and the time delta
            spent between messages
        -H, --human
                Enable human-readable output.
        -k, --kernel
                Print kernel messages.
        -L, --color
                Colorize the output.
        -p, --force-prefix
                Add facility, level or timestamp
            information to each line of a multi-line message.
        -r, --raw
                Print the raw message buffer.
        -T, --ctime
                Print human-readable timestamps.
        -t, --notime
                Do not print kernel's timestamps.
        -u, --userspace
                Print userspace messages.
        -x, --decode
                Decode facility and level (priority) numbers
            to human-readable prefixes.

enroll_status

enroll_status [--mode] [--domain] [--realm] [--user]
  Displays device enrollment information.

evtest

evtest
  Run evtest in safe mode.

exit

exit
  Exit crosh.

ff_debug

ff_debug
Usage: ff_debug [<tag_expression>] [--level <level>] [--persist]
       ff_debug --help
       ff_debug --reset
       ff_debug --list_valid_tags

  ff_debug adds and removes debug tags for flimflam.
  Current debug settings are displayed if no parameters are provided

  <tag_expression> is defined in boolean notation using <debug_tag> separated
    by an operator [+-], where + and - imply adding and removing of the tag immediately
    following the operator. An expression beginning with either operators [+-]
    takes the existing tags and modifies them appropriately.  Otherwise, the existing tags
    are replaced by those specified in the command.

    <debug_tag> can be listed using the --list_valid_tags

    e.g.: ff_debug network+wifi
      Sets debug tags to network and wifi
    e.g.: ff_debug +network-service
      Adds network and removes service tags from the existing debug settings

  --list_valid_tags : Displays all valid tags

  --level : Displays or sets current debug level for logging
    All messages at, or above, the current log level are logged. Normal log
    levels range from 4 (LOG_FATAL) to 0 (LOG_INFO). In addition VERBOSE log
    levels are available starting at -1.

    e.g.: ff_debug --level 4
      Logs only FATAL messages.
    e.g.: ff_debug --level 0
      Logs INFO, WARNING, ERROR, ERROR_REPORT, and FATAL messages.
    e.g.: ff_debug --level -4
      Logs everything that "--level 0" does, plus SLOG(<tag>, <n>) messages,
      where <tag> has been enabled for logging, and <n> <= 4. (NOTE: you must
      negate SLOG levels for use with ff_debug. In this example, SLOG(<tag>, 4)
      maps to "--level -4".)

  --reset : Removes all tagging and persistent debug configuration (if any) and
    restores default log level

  --persist : Stores the current debug configuration so that it is
    reused after restart.

  --help : Displays this output

force_activate_fips

force_activate_fips
  Force activate FIPS mode for the built-in security key.

free

free [options]
  Display free/used memory info.

gesture_prop

gesture_prop [ devices | list <device ID> | get <device ID> <property name> | set <device ID> <property name> <value> ]
  Read and change gesture properties for attached input devices. The "Enable
  gesture properties D-Bus service" flag must be enabled for this command to
  work.

  For more details, see:
  https://chromium.googlesource.com/chromiumos/platform/gestures/+/HEAD/docs/gesture_properties.md

  Subcommands:
    devices, devs:
      List the devices managed by the gestures library, with their numeric IDs.

    list <device ID>:
      List the properties for the device with the given ID.

    get <device ID> <property name>:
      Get the current value of a property. Property names containing spaces
      should be quoted. For example:
      $ gesture_prop get 12 "Mouse CPI"

    set <device ID> <property name> <value>:
      Set the value of a property. Values use the same syntax as dbus-send
      (https://dbus.freedesktop.org/doc/dbus-send.1.html#description), and
      should either be arrays or strings. For example:
      $ gesture_prop set 12 "Mouse CPI" array:double:500
      $ gesture_prop set 12 "Log Path" string:/tmp/foo.txt

help

help [command]
  Display general help, or details for a specific command.

help_advanced

help_advanced
  Display the help for more advanced commands, mainly used for debugging.

ipaddrs

ipaddrs [-4] [-6]
  Display IP addresses.
  -4: Only show IPv4 addresses.
  -6: Only show IPv6 addresses.

live_in_a_coal_mine

live_in_a_coal_mine
  Switch to the canary channel.

  WARNING: This is bleeding edge software and is often more buggy than the dev
  channel.  Please do not use this unless you are a developer.  This is often
  updated daily and has only passed automated tests -- the QA level is low!

  This channel may not always boot reliably or have a functioning auto update
  mechanism. Do not do this unless you are prepared to recover your ChromeOS
  device, please be familiar with this article first:
  https://support.google.com/chromebook/answer/1080595

meminfo

meminfo
  Display detailed memory statistics.

memory_test

memory_test
  Performs extensive memory testing on the available free memory.

modem

modem <command> [args...]
  Interact with the 3G modem. Run "modem help" for detailed help.

p2p_update

p2p_update [enable|disable] [--num-connections] [--show-peers]
  Enables or disables the peer-to-peer (P2P) sharing of updates over the local
  network. This will both attempt to get updates from other peers in the
  network and share the downloaded updates with them. Run this command without
  arguments to see the current state.  Additional switches will display number
  of connections and P2P peers.

packet_capture

Usage: packet_capture [options]
        --device        <device>
        --max-size      <max size in MiB>
        --frequency     <frequency>
        --ht-location   <above|below>
        --vht-width     <80|160>
        --monitor-connection-on         <monitored_device>

Start packet capture.  Start a device-based capture on <device>,
  or do an over-the-air capture on <frequency> with an optionally
  provided HT channel location or VHT channel width.  An over-the-air
  capture can also be initiated using the channel parameters of a
  currently connected <monitored_device>.  Note that over-the-air
  captures are not available with all 802.11 devices. Set <max_size>
  to stop the packet capture if the output .pcap file size exceedes this
  limit. Only device-based capture options (--device and --max-size) are
  available in verified mode. Switch to developer mode to use other
  options.

ping

ping [-4] [-6] [-c count] [-i interval] [-n] [-s packetsize] [-W waittime] <destination>
  Send ICMP ECHO_REQUEST packets to a network host.  If <destination> is "gw"
  then the next hop gateway for the default route is used.
  Default is to use IPv4 [-4] rather than IPv6 [-6] addresses.

  https://en.wikipedia.org/wiki/Ping_(networking_utility)

printscan_debug

printscan_debug
  A tool to assist with collecting logs when reproducing printing and scanning related issues.

  Subcommands:
    start Usage: printscan_debug start [all|scanning|printing]
      Start collecting printscan debug logs.

    stop Usage: printscan_debug stop
      Stop collecting printscan debug logs.

rlz

rlz < status | enable | disable >
  Enable or disable RLZ.  See this site for details:
  http://dev.chromium.org/developers/design-documents/extensions/proposed-changes/apis-under-development/rlz-api

rollback

rollback

  Attempt to rollback to the previous update cached on your system. Only
  available on non-stable channels and non-enterprise enrolled devices.

  Please note that this will powerwash your device.

route

route [-4] [-6] [--all]
  Display the network routing tables.
  https://en.wikipedia.org/wiki/Routing_table

  -4: Only show IPv4 routes.
  -6: Only show IPv6 routes.
  --all: Show all routing tables.

set_apn

set_apn [-c] [-n <network-id>] [-u <username>] [-p <password>] <apn>
  Set the APN to use when connecting to the network specified by <network-id>.
  If <network-id> is not specified, use the network-id of the currently
  registered network.

  The -c option clears the APN to be used, so that the default APN will be used
  instead.

set_arpgw

set_arpgw <true | false>
  Turn on extra network state checking to make sure the default gateway
  is reachable.

  https://en.wikipedia.org/wiki/Default_gateway

set_time

set_time <time string>
  Sets the system time if the the system has been unable to get it from the
  network.  The time may be initialized only once per-boot.

  The <time string> uses the format of the GNU coreutils date command.
  https://www.gnu.org/software/coreutils/manual/html_node/Date-input-formats.html
  https://www.gnu.org/software/coreutils/faq/coreutils-faq.html#The-date-command-is-not-working-right_002e

  Please see the timekeeping documentation for more information in general:
  https://www.chromium.org/chromium-os/chromiumos-design-docs/timekeeping/

set_wake_on_lan

set_wake_on_lan <true | false>
  Enable or disable Wake on LAN for Ethernet devices.  This command takes
  effect after re-connecting to Ethernet and is not persistent across system
  restarts.

shell

shell
  Open a command line shell.

storage_test_1

storage_test_1
  Performs a short offline SMART test.

storage_test_2

storage_test_2
  Performs an extensive readability test.

swap

swap [ enable <size (MB)> | disable | start | stop | status ]
  Change kernel memory manager parameters
  (FOR EXPERIMENTS ONLY --- USE AT OWN RISK)

  "swap status" (also "swap" with no arguments) shows the values of various
  memory manager parameters and related statistics.

  The enable/disable options enable or disable compressed swap (zram)
  persistently across reboots, and take effect at the next boot.  The enable
  option takes the size of the swap area (in megabytes before compression).
  If the size is omitted, the factory default is chosen.

  The start/stop options turn swap on/off immediately, but leave the settings
  alone, so that the original behavior is restored at the next boot.

  WARNING: if swap is in use, turning it off can cause the system to
  temporarily hang while the kernel frees up memory.  This can take
  a long time to finish.

sync

sync
  Synchronize cached writes to persistent storage.

syslog

syslog <message>
  Logs a message to syslog (the system log daemon).

  This can help mark/flag/label the logs just before & after running a different
  operation so you can locate the relevant errors faster.

systrace

systrace [<start | stop | status>]
  Start/stop system tracing.  Turning tracing off will generate a trace
  log file in the Downloads directory with all the events collected
  since the last time tracing was enabled.  One can control the events
  collected by specifying categories after "start"; e.g. "start gfx"
  will collect only graphics-related system events.  "systrace status"
  (or just "systrace") will display the current state of tracing, including
  the set of events being traced.

time_info

time_info
  Returns the current synchronization state for the time service.

top

top
  Run top.  This will tell you what resources are currently being used and low
  level system processes.

  Users should use the Chrome Task Monitor: press Search+Escape to open it.

  https://man7.org/linux/man-pages/man1/top.1.html
  https://gitlab.com/procps-ng/procps

tracepath

tracepath [-4] [-6] [-n] <destination>[/port]
  Trace the path/route to a network host.
  Default is to trace IPv4 [-4] rather than IPv6 [-6] targets.

  https://en.wikipedia.org/wiki/Traceroute

u2f_flags

u2f_flags <u2f | g2f>[, user_keys, verbose]
  Set flags to override the second-factor authentication daemon configuration.
  u2f: Always enable the standard U2F mode even if not set in device policy.
  g2f: Always enable the U2F mode plus some additional extensions.
  user_keys: Enable user-specific keys.
  verbose: Increase the daemon logging verbosity in /var/log/messages.

uname

uname [options]
  Display system info.

upload_crashes

upload_crashes
  Uploads available crash reports to the crash server.

  Check chrome://crashes for processed crashes.

upload_devcoredumps

upload_devcoredumps <enable|disable>
  Enable or disable the upload of devcoredump reports.

uptime

uptime
  Display uptime/load info.

  https://en.wikipedia.org/wiki/Uptime
  https://en.wikipedia.org/wiki/Load_(computing)

verify_ro

verify_ro
  Verify AP and EC RO firmware on a ChromeOS device connected over SuzyQ
  cable, if supported by the device.

vmc

USAGE: vmc
   [ start [--enable-gpu] [--enable-dgpu-passthrough] [--enable-big-gl] [--enable-virtgpu-native-context] [--enable-audio-capture] [--extra-disk PATH] [--kernel PATH] [--initrd PATH] [--writable-rootfs] [--kernel-param PARAM] [--bios PATH] [--timeout PARAM] [--oem-string STRING] <name> |
     stop <name> |
     launch <name> |
     create [-p] [--size SIZE] <name> [<source media> [<removable storage name>]] [-- additional parameters] |
     create-extra-disk --size SIZE <file name> [<removable storage name>] |
     adjust <name> <operation> [additional parameters] |
     destroy [-y] <name> |
     disk-op-status <command UUID> |
     export [-d] [-f] <vm name> <file name> [<removable storage name>] |
     import [-p] <vm name> <file name> [<removable storage name>] |
     resize <vm name> <size> |
     list |
     logs <vm name> |
     share <vm name> <path> |
     unshare <vm name> <path> |
     container <vm name> <container name> [ (<image server> <image alias>) | (<rootfs path> <metadata path>) ] [--privileged <true/false>] [--timeout PARAM] |
     update-container-devices <vm_name> <container_name> (<vm device>:<enable/disable>)... |
     usb-attach <vm name> <bus>:<device> [<container name>] |
     usb-detach <vm name> <port> |
     usb-list <vm name> |
     key-attach <vm name> <hidraw path> |
     pvm.send-problem-report [-n <vm name>] [-e <reporter's email>] <description of the problem> |
     --help | -h ]

vmstat

vmstat [options]
  Report virtual memory statistics.

vsh

vsh <vm_name> [<container_name>]
  Connect to a shell inside the VM <vm_name>, or to a shell inside the container
  <container_name> within the VM <vm_name>.

wifi_power_save

wifi_power_save < status | enable | disable >
  Enable or disable WiFi power save mode.  This command is not persistent across
  system restarts.

wireguard

wireguard wireguard <cmd> [<args>]

Available subcommands:

list
    Show all configured WireGuard services.
show <name>
    Show the WireGuard service with name <name>.
new <name>
    Create a new WireGuard service with name <name>.
del <name>
    Delete the configured WireGuard service with name <name>.
set <name> [local-ip <ip1>[,<ip2>]] [private-key] [mtu <mtu>] [dns <ip1>[,<ip2>]...]
           [peer <base64-public-key> [remove]
                                     [endpoint <hostname>/<ip>:<port>]
                                     [preshared-key]
                                     [allowed-ips <ip1>/<cidr1>[,<ip2>/<cidr2>]...]
                                     [persistent-keepalive <interval seconds>] ]...
    Configure properties for the WireGuard service with name <name>. Most options should
    have the same meaning and usage as in `wireguard-tools` (and `wg-quick`). Exceptions
    are:
    - At most one IPv4 address and one IPv6 address is supported for `local-ip`.
    - If `dns` is not set, it will be defaulted to "8.8.8.8,8.8.4.4".
    - If `mtu` is not set, it will be determined automatically. Set it to 0 to reset the
      existing value.
    - `endpoint` must be set before using `connect` command.
    - `private-key` and `preshared-key` take no parameters. If they are used, this command
      will prompt you to change the key (or remove the key) via stdin, to avoid leaving
      them in the history of shell.
connect <name>
    Connect to the configured WireGuard service with name <name>.
disconnect <name>
    Disconnect from the configured WireGuard service with name <name>.

  Utility to configure and control a WireGuard VPN service

変更履歴

  • help_advancedコマンドの実行結果の変更履歴であり、各コマンドの実行結果等は確認していない
  • M78 → M80
    • 追加:wifi_fw_dump
    • 更新:packet_capture, vmc
    • 削除:modem_set_carrier
  • M80 → M84
    • 追加:ipaddrs, sync
    • 更新:cras, gesture_prop, rollback, route, u2f_flags, vmc, wifi_power_save
    • 削除:newblue
  • M84 → M87
    • 追加:arc, borealis, diag
    • 更新:cras, dmesg, set_time, vmc, wifi_power_save
    • 削除:
  • M87 → M89
    • 追加:
    • 更新:arc, dmesg, gesture_prop, network_diag, vmc
    • 削除:cryptohome_status, tpm_status
  • M89 → M92
    • 追加:
    • 更新:cras, network_diag, packet_capture, route, vmc
    • 削除:
  • M92 → M94
    • 追加:
    • 更新:packet_capture, vmc
    • 削除:borealis, update_over_cellular
  • M94 → M97
    • 追加:wireguard
    • 更新:vmc
    • 削除:
  • M97 → M101
    • 追加:display_debug
    • 更新:vmc
    • 削除:
  • M101 → M105
    • 追加:builtin_corpssh, dlc_install
    • 更新:battery_test, exit, swap, vmc
    • 削除:bt_console
  • M105 → M110
    • 追加:printscan_debug
    • 更新:vmc
    • 削除:
  • M110 → M115
    • 追加:
    • 更新:battery_firmware, builtin_corpssh, network_diag, vmc, wireguard
    • 削除:
  • M115 → M117
    • 追加:hibernate
    • 更新:vmc
    • 削除:
  • M117 → M125
    • 追加:bt_console, force_activate_fips
    • 更新:arc, exit, ff_debug, ping, route, set_arpgw, set_time, sync, syslog, top, tracepath, u2f_flags, uname, upload_crashes, uptime, vmc, vmstat
    • 削除:authpolicy_debug, builtin_corpssh, dump_emk, hibernate, network_diag, set_cellular_ppp, wifi_fw_dump
18
15
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
18
15

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?