chromiumos/platform/crosh.git
14 months agoAdding a crosh option to upload crash reports 26/65526/2 master
Rohit Makasana [Sun, 11 Aug 2013 16:48:58 +0000 (22:18 +0530)]
Adding a crosh option to upload crash reports

BUG=None
Test=Manually

Change-Id: Iab43d0cc17fb20eac6a0f745c35920d245bdad79
Reviewed-on: https://gerrit.chromium.org/gerrit/65526
Commit-Queue: Rohit Makasana <rohitbm@chromium.org>
Reviewed-by: Rohit Makasana <rohitbm@chromium.org>
Tested-by: Rohit Makasana <rohitbm@chromium.org>
14 months agocrosh: s/ChromeOS/Chrome OS/g 96/63596/2 firmware-pit-4482.B stabilize-4512.B
Daniel Erat [Thu, 25 Jul 2013 21:35:42 +0000 (14:35 -0700)]
crosh: s/ChromeOS/Chrome OS/g

Contrary to popular belief, the name of this product is
"Chrome OS" or "Google Chrome OS", not "ChromeOS".

BUG=none
TEST=manual: ctrl-alt-t

Change-Id: If7579e04c1b2d1f1ab5e80a49fb8e7223775dc55
Reviewed-on: https://gerrit.chromium.org/gerrit/63596
Commit-Queue: Daniel Erat <derat@chromium.org>
Tested-by: Daniel Erat <derat@chromium.org>
Reviewed-by: Chris Masone <cmasone@chromium.org>
15 months agoAdd update_over_cellular crosh command. 21/60721/4 factory-4455.B factory-pit-4390.B factory-pit-4471.B firmware-falco_peppy-4389.B firmware-leon-4389.26.B firmware-wolf-4389.24.B stabilize-4443.B
Alex Deymo [Tue, 2 Jul 2013 03:00:06 +0000 (20:00 -0700)]
Add update_over_cellular crosh command.

This patch adds a new update_over_cellular crosh command to enable,
disable and get the status of the update over cellular network user
preference.

BUG=chromium:213401
TEST=Ran the command in crosh with "enabled", "disabled" and no arguments.

Change-Id: Ie71a9538a94508a7cafff7b26bf3edd5e808066a
Reviewed-on: https://gerrit.chromium.org/gerrit/60721
Tested-by: Alex Deymo <deymo@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>

16 months agoAdd crosh command for rollback. 03/59503/3
Chris Sosa [Fri, 21 Jun 2013 00:33:00 +0000 (17:33 -0700)]
Add crosh command for rollback.

This CL adds the crosh command for rollback so that early adopters
can have a way to rollback to a previous update on their system.

BUG=chromium:242665
TEST=Ran it on a device.

Change-Id: Ie2307355c99b40e77aa32b0bcc4f4e0fe0c08752
Reviewed-on: https://gerrit.chromium.org/gerrit/59503
Tested-by: Chris Sosa <sosa@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
16 months agocrosh: add support for set_cellular_ppp 91/59591/3
mukesh agrawal [Fri, 21 Jun 2013 19:14:21 +0000 (12:14 -0700)]
crosh: add support for set_cellular_ppp

This just plumbs the set_cellular_ppp into crosh, so that end-users
can access it.

BUG=chromium:246443
CQ-DEPEND=CL:59514
CQ-DEPEND=CL:59588
TEST=manual

Manual test
-----------
- open crosh
- set_cellular_ppp
  -> No PPP username.
- set_cellular_ppp -u foo -p bar
  -> Setting PPP username "foo" for service <service>
  -> Setting PPP password for service <service>
- set_cellular_ppp
  -> PPP username:  foo
- set_cellular_ppp -c
  -> Clearing Cellular.PPP.Username for service <service>
  -> Clearing Cellular.PPP.Password for service <service>
- set_cellular_ppp
  -> No PPP username.

Change-Id: I7b253aecdea81c983dcbae79f7ce3e44740240f5
Reviewed-on: https://gerrit.chromium.org/gerrit/59591
Reviewed-by: Ben Chan <benchan@chromium.org>
Tested-by: mukesh agrawal <quiche@chromium.org>
Commit-Queue: mukesh agrawal <quiche@chromium.org>

16 months agopacket_capture: Remove trailing quotes 35/58535/2 factory-4290.B factory-pit-4280.B stabilize-4287.B
Paul Stewart [Thu, 13 Jun 2013 14:07:04 +0000 (07:07 -0700)]
packet_capture: Remove trailing quotes

The help message had trailing double-quotes within a large
single-quoted string.  This change removes them.

BUG=chromium:249216
TEST=Run crosh

Change-Id: I7f16c427962df3a41720b8e84e89e0a9cc9ccdef
Reviewed-on: https://gerrit.chromium.org/gerrit/58535
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Commit-Queue: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
17 months agoAdd "packet_capture" as a dev command in crosh 14/50014/3 factory-4128.B factory-spring-4131.B factory-spring-4262.B release-R28-4100.B stabilize-4100.38.B stabilize-4255.B stabilize-spring-4100.53.B toolchainB
Paul Stewart [Fri, 3 May 2013 01:34:19 +0000 (18:34 -0700)]
Add "packet_capture" as a dev command in crosh

Add a dev-mode-only "packet_capture" command that uses debugd
to run a device-based or monitored packet capture.

CQ-DEPEND=CL:50010
BUG=chromium:218380
TEST=manual tests on a daisy with a USB WiFi dongle.

Change-Id: I057a27034a923310e7b8665d66b224af08958273
Reviewed-on: https://gerrit.chromium.org/gerrit/50014
Reviewed-by: Elly Jones <ellyjones@chromium.org>
Commit-Queue: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
17 months agocrosh: Adds 'progressive_scan' command. 86/49386/2
repo sync [Fri, 26 Apr 2013 23:17:14 +0000 (16:17 -0700)]
crosh: Adds 'progressive_scan' command.

Adds a crosh command to enable / disable the progressive scan feature in
shill.  This is a temporary feature until progressive scan has been
sufficiently checked out that it is permanently enabled.

BUG=chromium:236046
TEST=manual - on your chrome machine:
  - <ctrl><alt>T to bring up a new crosh tab
  - #1> 'progressive_scan' - it should be disabled
  - <ctrl><alt>T to bring up a second crosh tab
  - #2> 'shell'
  - #2> 'sudo bash'
  - #2> 'tail /var/log/net.log; restart shill'
  - #2> after 2 seconds, open /var/log/net.log and seek to the previous
        tail
  - #2> after seek beyond the previous tail for 'progressive' -  the
        message should indicate that progressive scan is disabled.
  - #1> 'progressive_scan on'
  - Repeat the #2 commands except, this time, the message should
    indicate that progressive scan is enabled.

Change-Id: I36d83eda89a388bebbe281de74874c384628fc57
Reviewed-on: https://gerrit.chromium.org/gerrit/49386
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Commit-Queue: Wade Guthrie <wdg@chromium.org>
Reviewed-by: Wade Guthrie <wdg@chromium.org>
Tested-by: Wade Guthrie <wdg@chromium.org>
17 months agoFixing crosh battery_test for ACPI devices 22/49622/2
Gediminas Ramanauskas [Tue, 30 Apr 2013 18:33:32 +0000 (11:33 -0700)]
Fixing crosh battery_test for ACPI devices

BUG=chrome-os-partner:18744
TEST=battery_test successfully runs on Daisy as well

Change-Id: Id34c596cf59728f7b990362bb2b151c97e1fee16
Reviewed-on: https://gerrit.chromium.org/gerrit/49622
Reviewed-by: Chirag Gupta <chiraggupta@chromium.org>
Reviewed-by: Rajeev Kumar Challapalli <rajeevkumar@chromium.org>
Reviewed-by: Elly Jones <ellyjones@chromium.org>
Commit-Queue: Gediminas Ramanauskas <gedis@chromium.org>
Tested-by: Gediminas Ramanauskas <gedis@chromium.org>
18 months agoAdding battery discharge test to crosh 26/48326/2 stabilize-4068.0.B
Gediminas Ramanauskas [Wed, 17 Apr 2013 01:06:11 +0000 (18:06 -0700)]
Adding battery discharge test to crosh

BUG=chrome-os-partner:18744
TEST=battery_test runs without errors

Change-Id: I04847ccedc430227915bc63b99d7804810f08a4a
Reviewed-on: https://gerrit.chromium.org/gerrit/48326
Reviewed-by: Elly Jones <ellyjones@chromium.org>
Commit-Queue: Gediminas Ramanauskas <gedis@chromium.org>
Tested-by: Gediminas Ramanauskas <gedis@chromium.org>
18 months agocrosh: add friendly intro text 46/48046/2 stabilize-4008.0.B stabilize-4035.0.B
Mike Frysinger [Fri, 12 Apr 2013 22:24:20 +0000 (18:24 -0400)]
crosh: add friendly intro text

Every once in a while, someone manages to hit CTRL+ALT+T by accident and
then gets super confused.  We've seen some users post things like "I think
I broke my system" when presented with crosh.

Add a bit more friendly intro text to try and head off that.

BUG=None
TEST=launched crosh and saw new msg

Change-Id: I9109eb746ba9fad98640b6afd28cee7b0cd6bf12
Reviewed-on: https://gerrit.chromium.org/gerrit/48046
Reviewed-by: Chris Sosa <sosa@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
18 months agoAdding memory and storage integrity tests to crosh 02/47202/3
Gediminas Ramanauskas [Fri, 15 Mar 2013 18:46:53 +0000 (11:46 -0700)]
Adding memory and storage integrity tests to crosh

BUG=chrome-os-partner:17258,18507
TEST=memory_test, storage_test_1, storage_test_2, storage_status work

Change-Id: I156ed2147691b48f07939f4a39cd35754859e006
Reviewed-on: https://gerrit.chromium.org/gerrit/47202
Reviewed-by: Elly Jones <ellyjones@chromium.org>
Commit-Queue: Gediminas Ramanauskas <gedis@chromium.org>
Tested-by: Gediminas Ramanauskas <gedis@chromium.org>
18 months agoRemoving bash dependency in crosh 87/47187/3
Rohit Makasana [Tue, 2 Apr 2013 22:07:25 +0000 (15:07 -0700)]
Removing bash dependency in crosh

BUG:chromium:197109
Change-Id: I2e668b5a8416cc8c0a5a150e348f040686c1435b
TEST:manual
Reviewed-on: https://gerrit.chromium.org/gerrit/47187
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Rohit Makasana <rohitbm@chromium.org>
Reviewed-by: Rohit Makasana <rohitbm@chromium.org>
Tested-by: Rohit Makasana <rohitbm@chromium.org>
18 months agoCrosh: compressed swap ON by default 17/46417/2
Luigi Semenzato [Mon, 25 Mar 2013 18:20:22 +0000 (11:20 -0700)]
Crosh: compressed swap ON by default

These changes are needed when compressed swap is turned on
by default in /etc/init/swap.conf.  These are mostly changes
in messages to reflect the new situation, and a change in
the way swap is disabled.

We wish to leave this hook for a little longer, mostly to
be able to keep experimenting, and to turn swap off if it
proves to be a disaster in specific circumstances (i.e.
under unexpected loads).

BUG=chromium:218338
TEST=manual

Change-Id: Ic0a2d61c3d930a8bc163e69dd998eddc5f32f10d
Reviewed-on: https://gerrit.chromium.org/gerrit/46417
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
Commit-Queue: Luigi Semenzato <semenzato@chromium.org>
Tested-by: Luigi Semenzato <semenzato@chromium.org>
18 months agoCrosh: change swap commands to reflect field trial end 13/46413/2
Luigi Semenzato [Mon, 25 Mar 2013 17:46:22 +0000 (10:46 -0700)]
Crosh: change swap commands to reflect field trial end

This ends the field trial, more or less reverting the
changes done in 0b21bbbb2b5ca145267e1c8dd3ecdebb5f934cef.
(I say "more or less" because of some cosmetic changes
and the addition of 4000MB as a swap size.)

BUG=chromium:218559
TEST=manual

Change-Id: Ie2b21ce4557c4a4c354277c0318f367a6f3a3f0b
Reviewed-on: https://gerrit.chromium.org/gerrit/46413
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
Commit-Queue: Luigi Semenzato <semenzato@chromium.org>
Tested-by: Luigi Semenzato <semenzato@chromium.org>
18 months agoAdding quotes to shell var for crosh sound play/record 61/46561/2
Rohit Makasana [Tue, 26 Mar 2013 22:12:27 +0000 (15:12 -0700)]
Adding quotes to shell var for crosh sound play/record

BUG=chromium:224034
TEST=manual

Change-Id: I1bdcf5e596d08d23747292a9e3dc5daca7b2be09
Reviewed-on: https://gerrit.chromium.org/gerrit/46561
Reviewed-by: Royans Tharakan <royans@google.com>
Commit-Queue: Royans Tharakan <royans@google.com>
Commit-Queue: Rohit Makasana <rohitbm@chromium.org>
Reviewed-by: Rohit Makasana <rohitbm@chromium.org>
Tested-by: Rohit Makasana <rohitbm@chromium.org>
19 months agoAdding a check to crosh sound record in case the recording duration is not specified. 61/46461/2
Rohit Makasana [Tue, 26 Mar 2013 00:07:13 +0000 (17:07 -0700)]
Adding a check to crosh sound record in case the recording duration is not specified.

BUG=chromium:197109
TEST=manual

Change-Id: I39c89a3780f0dda094e6228563905b1c8a2bf259
Reviewed-on: https://gerrit.chromium.org/gerrit/46461
Reviewed-by: Kris Rambish <krisr@chromium.org>
Reviewed-by: Rohit Makasana <rohitbm@chromium.org>
Tested-by: Rohit Makasana <rohitbm@chromium.org>
Commit-Queue: Rohit Makasana <rohitbm@chromium.org>

19 months agoAdding audio recording/playback options to crosh 78/45678/2 stabilize-3881.0.B
Rohit Makasana [Sat, 16 Mar 2013 02:41:42 +0000 (19:41 -0700)]
Adding audio recording/playback options to crosh

It will help to test audio samples recording/playing from crosh.

BUG=chromium:197109
TEST=Go to crosh, sound record 10, sound play <recorded filename>

Change-Id: I7e51615443766d9dea72dbe6003d9e01a424e7dd
Reviewed-on: https://gerrit.chromium.org/gerrit/45678
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Commit-Queue: Rohit Makasana <rohitbm@chromium.org>
Reviewed-by: Rohit Makasana <rohitbm@chromium.org>
Tested-by: Rohit Makasana <rohitbm@chromium.org>
19 months agoAdd bt_console command 85/45085/3 factory-spring-3842.B firmware-spring-3833.B
Scott James Remnant [Thu, 7 Mar 2013 22:36:26 +0000 (14:36 -0800)]
Add bt_console command

This provides access to the Bluetooth console D-Bus client, not
direct access to the Bluetooth hardware.

Almost all features of the client are available within the Chromium
UI itself, except for:

  discoverable <on/off>   Set controller discoverable mode

Which is not present in the UI since we don't offer services at this
time, and did not want a local information leak without user awareness
(enabling discoverability via an advanced console command can be
definitely considered awareness).

The console also provides additional information for the adapter,
discovered and paired devices, that is not available in the UI. This
information consists of the Class of device, exported service UUIDs,
and pairing-related properties. These are often required for
debugging.

BUG=chromium-os:38832
TEST=run on device

Change-Id: I1b42a1f766f661b4e83cdbb760bd79a3c15b16b4
Reviewed-on: https://gerrit.chromium.org/gerrit/45085
Commit-Queue: Scott James Remnant <keybuk@chromium.org>
Reviewed-by: Scott James Remnant <keybuk@chromium.org>
Tested-by: Scott James Remnant <keybuk@chromium.org>
19 months agoAdd 'sound' crosh command to enable/disable beam forming on Pixel. 47/44147/5 firmware-spring-3824.4.B firmware-spring-3824.55.B firmware-spring-3824.84.B firmware-spring-3824.B
Dylan Reid [Wed, 27 Feb 2013 05:09:00 +0000 (21:09 -0800)]
Add 'sound' crosh command to enable/disable beam forming on Pixel.

Use:
> sound beamforming <on|off>

This will enable or disable the beam forming for the built-in mic
array on Pixel.  It will be used to evaluate the feature while we
decide if a UI element is needed to toggle it.

BUG=chromium-os:39215
TEST=run command and check that value is set with amixer on Link.
Check that an error is returned on Lumpy where the codec doesn't
support it.

Change-Id: I4dba7a1303541c6f1ba3b75783f63b3fe26eb03f
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/44147
Reviewed-by: Chih-Chung Chang <chihchung@chromium.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
19 months agoCrosh: Use the new try_touch_experiment script 85/43185/3
Charlie Mooney [Wed, 13 Feb 2013 19:08:27 +0000 (11:08 -0800)]
Crosh: Use the new try_touch_experiment script

Crosh used to have it's own shell script version of try_touch_experiment,
but there is now a program that provides a much nicer user experience.
This removes the old version of the command in Crosh and replaces it with
a call out to the newly installed one instead.

BUG=chromium-os:38637
TEST=Manually tested on Link
CQ-DEPEND=Ia0090629e8d988e8f517ff83ceac03a9bf808c19

Change-Id: I1bc84453f25e088d3ac5960d54f2c2eb139617f4
Signed-off-by: Charlie Mooney <charliemooney@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/43185
Reviewed-by: Andrew de los Reyes <adlr@chromium.org>
20 months agocrosh: call debugd in network_diagnostics 43/42643/2 stabilize-3701.30.0 stabilize-3701.30.0b
Kees Cook [Tue, 5 Feb 2013 19:37:03 +0000 (11:37 -0800)]
crosh: call debugd in network_diagnostics

Change the --wifi argument to call out to debugd, which will use the new
--wifi-internal argument to do the real work as the debugd user. This
will allow all users of network_diagnostics to continue working as
before. This also changes the ath9k detection to examine the driver
rather than the debugfs directory to allow --wifi-monitor to still work
as the chronos user.

This also fixes usage for --wifi-mon and replaces iw with ${IW} where
needed.

BUG=chromium-os:23758
TEST=link build, network_diagnostics works with debugfs mounted strictly
CQ-DEPEND=I8e3ae0fe71aad45d8d5d769f4e6ea5e80243da0e,I30644f36e52b0a49f67689b4fff65406518ef16a

Change-Id: I2da4ace404216fb452f7eebd281c4289e3ec1ef9
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/42643
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
20 months agonetwork_diagnostics: argument parsing has been broken 34/42634/2
Kees Cook [Tue, 5 Feb 2013 19:23:39 +0000 (11:23 -0800)]
network_diagnostics: argument parsing has been broken

Something changed (bash?) to cause array appending to change. As a
result, arguments were being concatenated instead of appended to a list.
This fixes it and makes unknown argument reporting more clear.

BUG=chromium-os:38447
TEST=link build, chrome://system shows wifi output again

Change-Id: I30644f36e52b0a49f67689b4fff65406518ef16a
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/42634
Reviewed-by: Elly Jones <ellyjones@chromium.org>
Reviewed-by: mukesh agrawal <quiche@chromium.org>
20 months agocrosh: ping_cmd: Add option for broadcast 45/42545/3
Paul Stewart [Mon, 4 Feb 2013 18:14:28 +0000 (10:14 -0800)]
crosh: ping_cmd: Add option for broadcast

BUG=chromium-os:38526
TEST="ping -b" from crosh

Change-Id: I1dfc4937cd78a836ab51d64252d572561c90c5c4
Reviewed-on: https://gerrit.chromium.org/gerrit/42545
Reviewed-by: Elly Jones <ellyjones@chromium.org>
Commit-Queue: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
21 months agoCrosh: strip trailing whitespace from command name 41/41641/3 stabilize-3658.0.0
Charlie Mooney [Fri, 18 Jan 2013 17:04:07 +0000 (09:04 -0800)]
Crosh: strip trailing whitespace from command name

I'm not entirely sure why, but sometimes the space between a command and
its parameters is included into the command's name causing Crosh to
reject that command.  Only some machines that I've tested are effected,
but just making sure there are no spaces in the command string seems to
fix it in any case.

For example:
    crosh> tracepath cmooney.mtv
    Unknown command 'tracepath '

BUG=chromium-os:38028
TEST=manually ran this copy of Crosh on an effected computer and was
able to repeatedly run the troublesome commands.  Commands without
parameters such as "shell" still worked too.

Change-Id: Icfaa939671f04a63f3961e87b203f335de5246e1
Signed-off-by: Charlie Mooney <charliemooney@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/41641
Reviewed-by: Robert Ginda <rginda@chromium.org>
21 months agonetwork_diagnostics: fix show-macs argument 59/41459/2
mukesh agrawal [Wed, 16 Jan 2013 20:09:10 +0000 (12:09 -0800)]
network_diagnostics: fix show-macs argument

Most of the arguments to network_diagnostics cause network_diagnostics
to take some action immediately. "--show-macs" is different, in that
it's supposed to modify the output of other actions. Consequently, it
had to be listed before other arguments, in order to work as intended.

Fix this by procesing --show-macs before other arguments. While there,
modify the DHCP diagnostic module to run its output through mac_anonymize.

BUG=chromium-os:34907
TEST=manual (see below)

Manual testing
- /bin/bash network_diagnostics --show-macs --dhcp
  => shows DHCP leases, with MAC addresses
- /bin/bash network_diagnostics --dhcp
  => shows DHCP leases, without MAC addresses
- /bin/bash network_diagnostics --dhcp --show-macs
  => shows DHCP leases, with MAC addresses

Change-Id: I4d4c9b4e2b9c0be5bc6de6ed38271bf48ececf39
Reviewed-on: https://gerrit.chromium.org/gerrit/41459
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: mukesh agrawal <quiche@chromium.org>
Tested-by: mukesh agrawal <quiche@chromium.org>
21 months agoUse a login shell rather than a normal shell with modified $PATH. 60/41160/5
Chris Sosa [Fri, 11 Jan 2013 23:08:22 +0000 (15:08 -0800)]
Use a login shell rather than a normal shell with modified $PATH.

Right now the env of vt2 and crosh shell are totally different in dev
mode because vt2 inherits from /etc/profile and crosh does not.

This CL rectifies this difference.

BUG=chromium-os:21504
TEST=Ran with it on an R25 stumpy running Chrome OS in dev mode.

Change-Id: I8fa6e07dceeb39c6ebdba446af7d3ccc17ce1f1e
Reviewed-on: https://gerrit.chromium.org/gerrit/41160
Tested-by: Chris Sosa <sosa@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Commit-Queue: Chris Sosa <sosa@chromium.org>

21 months agoAdd zram field trial to crosh. 56/40356/8 factory-3536.B
Luigi Semenzato [Thu, 3 Jan 2013 02:07:36 +0000 (18:07 -0800)]
Add zram field trial to crosh.

If the user changes the zram setting, make the device go through
the field trial enrollment again.  Also, give users the option to
opt-out of the experiment and turn swap off.  (They can still turn
it back on manually, or opt back into the experiment.)

BUG=chromium-os:37583
TEST=extensive but not exhaustive manual testing of various situations

Change-Id: Ic71190a64eb780a55e44f2c59c9e1f81114d8987
Reviewed-on: https://gerrit.chromium.org/gerrit/40356
Tested-by: Luigi Semenzato <semenzato@chromium.org>
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-by: James Cook <jamescook@chromium.org>
Commit-Queue: Luigi Semenzato <semenzato@chromium.org>

21 months agocrosh: add an xset command 62/40362/3
Mike Frysinger [Wed, 2 Jan 2013 20:35:54 +0000 (15:35 -0500)]
crosh: add an xset command

This let's people directly control the mouse & repeat rates.

BUG=chromium-os:37573
TEST=built fine for x86-alex/stumpy/daisy
TEST=loaded up an alex and was able to manipulate repeat rates
CQ-DEPEND=CL:40361

Change-Id: Ie50a86809288cb4e245c5be1acafeacd43e3e185
Reviewed-on: https://gerrit.chromium.org/gerrit/40362
Reviewed-by: St├ęphane Marchesin <marcheu@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
21 months ago[crosh] invoke tlsdate by the right path 39/40439/2
Elly Fong-Jones [Fri, 4 Jan 2013 17:12:29 +0000 (12:12 -0500)]
[crosh] invoke tlsdate by the right path

BUG=chromium-os:36905
TEST=adhoc
Run network_diagnostics from crosh.

Change-Id: I3d591dc4cd2780543584a5262c4792be274fed95
Signed-off-by: Elly Fong-Jones <ellyjones@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/40439
Reviewed-by: Jorge Lucangeli Obes <jorgelo@chromium.org>
21 months agoadd some simple presubmit tests 44/40344/2
Mike Frysinger [Wed, 2 Jan 2013 20:04:36 +0000 (15:04 -0500)]
add some simple presubmit tests

Start a place to keep common tests so bugs don't creep back in.

BUG=None
TEST=`./run_tests.sh` passes

Change-Id: Ib8e062bb76b0bbf9d6231b053931368296973af9
Reviewed-on: https://gerrit.chromium.org/gerrit/40344
Reviewed-by: Daniel Erat <derat@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
21 months agosort help strings 32/40332/2
Mike Frysinger [Wed, 2 Jan 2013 20:03:40 +0000 (15:03 -0500)]
sort help strings

They're mostly sorted, but it's fallen out a little.

BUG=None
TEST=`./run_tests.sh` passes

Change-Id: I1c6810d032238ded201de9f62fcbfe91a15b4c58
Reviewed-on: https://gerrit.chromium.org/gerrit/40332
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
21 months agoenable license checks 31/40331/2
Mike Frysinger [Wed, 2 Jan 2013 19:47:30 +0000 (14:47 -0500)]
enable license checks

These plain script files can have comments w/copyright/license in them,
and we authored them, so enable the presubmit hook.

BUG=None
TEST=`repo upload` worked

Change-Id: Ibbb1e3913f6147d327676ec72eb3c7b1381f71b6
Reviewed-on: https://gerrit.chromium.org/gerrit/40331
Reviewed-by: Daniel Erat <derat@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
21 months agocrosh: fix bashism with `[` 30/40330/2
Mike Frysinger [Wed, 2 Jan 2013 19:44:47 +0000 (14:44 -0500)]
crosh: fix bashism with `[`

BUG=None
TEST=`checkbashisms` doesn't complain about this
TEST=`bash -n crosh` worked

Change-Id: I66665c794cd50e7108854ca7dd5001710aee9985
Reviewed-on: https://gerrit.chromium.org/gerrit/40330
Reviewed-by: Elly Jones <ellyjones@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
22 months agoAdd 'rlz' to advanced commands in crosh. 48/39548/3 toolchain-3428.65.B
Ivan Korotkov [Tue, 11 Dec 2012 14:30:54 +0000 (18:30 +0400)]
Add 'rlz' to advanced commands in crosh.

BUG=chromium:157348
TEST='rlz status' in crosh
Change-Id: I1c95b3f956e420b87ee355629a3e0c14631cb4e2
Reviewed-on: https://gerrit.chromium.org/gerrit/39548
Reviewed-by: Nikita Kostylev <nkostylev@chromium.org>
Commit-Ready: Ivan Korotkov <ivankr@chromium.org>
Reviewed-by: Ivan Korotkov <ivankr@chromium.org>
Tested-by: Ivan Korotkov <ivankr@chromium.org>
22 months agoSalsa: Adding in a try_touch_experiment option to crosh 36/39136/3
Charlie Mooney [Sat, 1 Dec 2012 00:04:37 +0000 (16:04 -0800)]
Salsa: Adding in a try_touch_experiment option to crosh

To facilitate the Salsa Touch testing framework, this is adding a new
command to Crosh.  This allows you to pass it an obfuscated command that
encodes a number of Touch Properties to change.  It will apply the
changes, but back up your original values.

The user can then, try out the new settings (and not know what they
changed since the values are hidden) and press Ctrl+C whenever they want
to revert.

So when a user is taking a Touch experiment, they will be given a big
command to copy/paste into Crosh and it will give them a temporary
experience without changing their own, personal settings.

BUG=chromium-os:36840
TEST=Run it with a sample input and confirm that the properties get
changed/revert correctly.  Try it with some invalid inputs and make sure
the users settings don't get messed up by it.

Change-Id: I6e1040d4a8e0e79868a579c11fe9266bdf2f0a67
Signed-off-by: Charlie Mooney <charliemooney@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39136
Reviewed-by: Andrew de los Reyes <adlr@chromium.org>
23 months agoAdd warning when users enable swap 39/38439/2 stabilize2
Luigi Semenzato [Wed, 21 Nov 2012 01:35:16 +0000 (17:35 -0800)]
Add warning when users enable swap

We have seen report of people enabling compressed swap in the field,
so we should be more clear on the level of support.

BUG=none
TEST=none

Change-Id: Ic818d14dc73a48cb3add30d4ba8e5ac9e4f18828
Reviewed-on: https://gerrit.chromium.org/gerrit/38439
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
Commit-Ready: Luigi Semenzato <semenzato@chromium.org>
Tested-by: Luigi Semenzato <semenzato@chromium.org>
23 months agonetwork_diagnostics: add support for HTTP hosts 13/38413/2
mukesh agrawal [Tue, 20 Nov 2012 19:50:30 +0000 (11:50 -0800)]
network_diagnostics: add support for HTTP hosts

When we do a diag_run, fallback from HTTPS to HTTP. Diagnose
curl failure only if both HTTPS and HTTP fail.

While there:
- make terminology more consistent ("hotspot" -> "captive portal")
- improve documentation of "--date" option

BUG=chromium-os:34404
TEST=manual (see below)

Manual testing:
- network_diagnostics www.google.com (passes on HTTPS)
- network_diagnostics www.engadget.com (passes on HTTP)
- network_diagnostics www.really.bogus.domain
  (observe "Entering diag_nameservers" in output)
- iptables -I OUTPUT --proto tcp --dport 443 -j DROP
  iptables -I OUTPUT --proto tcp --dport 80 -j DROP
  network_diagnostics www.google.com
  (observe "Entering diag_connectivity www.google.com")

Change-Id: I3919ec4ff5eeadf2444989401d58bf7a2bd2cac8
Reviewed-on: https://gerrit.chromium.org/gerrit/38413
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Ready: mukesh agrawal <quiche@chromium.org>
Tested-by: mukesh agrawal <quiche@chromium.org>
23 months agocrosh: network_diag: Report link latency 52/37952/4
Paul Stewart [Sat, 10 Nov 2012 02:53:29 +0000 (18:53 -0800)]
crosh: network_diag: Report link latency

Ask shill about the current link latency value.  Do so by
first refactoring some dbus access routines currently used in
diag_flimflam.  Trace down the highest priority service,
find it's associated device and retrieve the link monitor
value.

BUG=chromium-os:36315
TEST="network_diag --latency" with an active WiFi service
CQ-DEPEND=Ideec9e4b53cf7a47b1e0d038891f5bef3ddc757a

Change-Id: Ie02dc801b9d5abc01c44b629dabcfb00430def5a
Reviewed-on: https://gerrit.chromium.org/gerrit/37952
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
Commit-Ready: Paul Stewart <pstew@chromium.org>

23 months agonetwork_diagnostics: Fix inverted logic in diag_ip_collision
Gaurav Shah [Wed, 7 Nov 2012 23:25:03 +0000 (15:25 -0800)]
network_diagnostics: Fix inverted logic in diag_ip_collision

arping -D returns 0 (exits normally) if no duplicate IP was detected.

BUG=chromium-os:36146
TEST=ran "if ! arping -c 3 -I eth0 -D <myip>; then echo collision; fi"
     and verified it doesn't complain of a collision.

Change-Id: I26ba5244bd7fc9fba8090500085332d4456692b2
Reviewed-on: https://gerrit.chromium.org/gerrit/37580
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Commit-Ready: Gaurav Shah <gauravsh@chromium.org>
Tested-by: Gaurav Shah <gauravsh@chromium.org>
23 months ago[crosh] network_diagnostics: use tlsdate
Elly Fong-Jones [Tue, 6 Nov 2012 21:36:08 +0000 (16:36 -0500)]
[crosh] network_diagnostics: use tlsdate

Use tlsdate instead of htpdate to check system clock accuracy.

BUG=chromium-os:36104
TEST=adhoc
Run /usr/bin/network_diagnostics, check for PASS

Change-Id: If4df927f80910d33086a81d973375521f437999d
Signed-off-by: Elly Fong-Jones <ellyjones@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/37461
Reviewed-by: Will Drewry <wad@chromium.org>
2 years agoRemove shill_manager command from crosh.
Darin Petkov [Thu, 25 Oct 2012 09:06:53 +0000 (11:06 +0200)]
Remove shill_manager command from crosh.

Note that https://gerrit.chromium.org/gerrit/#/c/35424/ removed
flimflamd from the image so this command was "broken" anyway.

BUG=chromium-os:23531
TEST=gmerged crosh, ensured it works and shill_manager is unknown.

Change-Id: Ida33056a893121d2257e04d349a5dc65dcd2b65f
Reviewed-on: https://gerrit.chromium.org/gerrit/36548
Tested-by: Darin Petkov <petkov@chromium.org>
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Commit-Ready: Darin Petkov <petkov@chromium.org>

2 years agoFix up crosh so that it doesn't call chromeos-install
Liam McLoughlin [Tue, 23 Oct 2012 20:42:41 +0000 (16:42 -0400)]
Fix up crosh so that it doesn't call chromeos-install

BUG=chromium-os:35632
TEST=Build an image, boot in normal mode, verify crosh doesn't
     prompt for password

Change-Id: I87bd9de91ff6dc710bc057b59b48e59d950c9b74
Reviewed-on: https://gerrit.chromium.org/gerrit/36367
Reviewed-by: Robert Ginda <rginda@chromium.org>
Commit-Ready: Liam McLoughlin <lmcloughlin@chromium.org>
Tested-by: Liam McLoughlin <lmcloughlin@chromium.org>
2 years agocrosh: update network_diag help message displayed by help_advanced
Xiaowen Xin [Thu, 11 Oct 2012 05:02:14 +0000 (22:02 -0700)]
crosh: update network_diag help message displayed by help_advanced

BUG=None
TEST=Run help_advanced in crosh and see the message for network_diag

Change-Id: I3b04e3c7b4dff14e314635eebae21d6fce0645f2
Reviewed-on: https://gerrit.chromium.org/gerrit/35249
Reviewed-by: Ryan Cairns <rtc@chromium.org>
Commit-Ready: Xiaowen Xin <xiaowenx@chromium.org>
Tested-by: Xiaowen Xin <xiaowenx@chromium.org>
2 years agonetwork_diagnostics: diag_arp: Return proper failure value factory-2985.B factory-2993.B factory-3004.B
Paul Stewart [Wed, 19 Sep 2012 22:29:29 +0000 (15:29 -0700)]
network_diagnostics: diag_arp: Return proper failure value

This function always returned failure even when an ARP
entry was found.

BUG=None
TEST=Rerun network_diag

Change-Id: I677611f528950abd11243cccd2843c8f2e83cd44
Reviewed-on: https://gerrit.chromium.org/gerrit/33644
Reviewed-by: Ben Chan <benchan@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
Commit-Ready: Paul Stewart <pstew@chromium.org>

2 years agonetwork_diag: Use modification time instead of creation factory-2914.B release-R23-2913.B stabilize stabilize-daisy stabilize-link stabilize-link-2913.278
Paul Stewart [Thu, 13 Sep 2012 20:53:17 +0000 (13:53 -0700)]
network_diag: Use modification time instead of creation

Match what dhcpcd uses for determining the date of a lease
file.

BUG=chromium-os:34411
TEST=Use "cp -a" of an already existing lease file so we have
a file with a different ctime from mtime, and ensure the output
of "network_diagnostics --dhcp" is different between current
ToT and this modified copy.

Change-Id: Ib8e8ca3e9ce8562fb129846b80778354e2db1fc8
Reviewed-on: https://gerrit.chromium.org/gerrit/33226
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Commit-Ready: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
2 years agocrosh: Use 'modem set-logging' instead of 'mm_debug'
Ben Chan [Wed, 12 Sep 2012 19:28:14 +0000 (12:28 -0700)]
crosh: Use 'modem set-logging' instead of 'mm_debug'

Also add shill 'cellular' debug tag when `network_logging cellular` is
called.

BUG=chromium-os:34360
TEST=Verify that modem manager logging level is set correctly via network_logging.

Change-Id: I9c6f6417986331c41f0149e0908fc1e6cd5d887c
Reviewed-on: https://gerrit.chromium.org/gerrit/33116
Commit-Ready: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Thieu Le <thieule@chromium.org>
2 years agoRevert "crosh: add governor command" factory-2846.B factory-2848.B firmware-stout-2817.B
Sam Leffler [Fri, 24 Aug 2012 16:58:41 +0000 (09:58 -0700)]
Revert "crosh: add governor command"

This reverts commit 34e82037b1ab733e493e77bf8dd2c14b7fab785b.
It's time to remove this experiment.

BUG=chromium-os:32041
TEST=verify governor cmd is gone in crosh

Change-Id: I5025051e581fc9c47670a08977656911d38471b1
Reviewed-on: https://gerrit.chromium.org/gerrit/31345
Reviewed-by: Jim Hebert <jimhebert@chromium.org>
Commit-Ready: Sam Leffler <sleffler@chromium.org>
Tested-by: Sam Leffler <sleffler@chromium.org>
2 years agonetwork_diagnostics: harmonize diag_link_wifi and diag_wifi firmware-butterfly-2788.B
mukesh agrawal [Wed, 15 Aug 2012 18:17:05 +0000 (11:17 -0700)]
network_diagnostics: harmonize diag_link_wifi and diag_wifi

Change diag_link_wifi to call diag_wifi for wifi statistics, instead of
capturing a subset of the diag_wifi information on its own. With this
change, we can ask users to just run "network_diag" in crosh, instead of
both "network_diag" (for general diagnosis) and "network_diag --wifi" (for
wifi-specific data).

The down-side is that we gather info for all wifi devices instead of just
the failed one. But multiple devices should not be a common case.

BUG=chromium-os:33558
TEST=manual (see below)

Manual testing
1. connect to GoogleGuest
2. iptables -I INPUT -i wlan0 -j DROP
3. run network_diagnostics
4. observe that output includes contents of files like
   /sys/kernel/debug/ieee80211/phy0/ath9k/dma

Change-Id: I20e043846ec3a179a6fef330c30b2cb994a3c40f
Reviewed-on: https://gerrit.chromium.org/gerrit/30437
Commit-Ready: mukesh agrawal <quiche@chromium.org>
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Tested-by: mukesh agrawal <quiche@chromium.org>
2 years agonetwork_diagnostics: Add diagnostic for DHCP lease
Paul Stewart [Wed, 15 Aug 2012 18:42:08 +0000 (11:42 -0700)]
network_diagnostics: Add diagnostic for DHCP lease

Read DHCP lease files and report their current status.
Report these if we have a link failure, and manually
using "--dhcp" flag to network_diag.

BUG=chromium-os:33229
TEST=Run network_diagnostics --dhcp

Change-Id: If2d86945cdfd5e7f752e1f36d490e1d4a56358cf
Reviewed-on: https://gerrit.chromium.org/gerrit/30439
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Commit-Ready: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
2 years agocros-term: punt
Mike Frysinger [Tue, 7 Aug 2012 19:30:31 +0000 (15:30 -0400)]
cros-term: punt

This relies on urxvt which we no longer use or need now that we have hterm.

BUG=chromium-os:33348
TEST=`./build_packages+./build_image for x86-alex` can still launch crosh

Change-Id: I181c568dbd942ce272e17890c3af14c69b548c18
Reviewed-on: https://gerrit.chromium.org/gerrit/29430
Reviewed-by: Robert Ginda <rginda@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2 years agocrosh: remove mount_encrypted flag support factory-2717.B factory-2723.14.B firmware-link-2695.2.B firmware-link-2695.B firmware-parrot-2685.B firmware-snow-2695.90.B firmware-snow-2695.B
Kees Cook [Fri, 20 Jul 2012 17:59:59 +0000 (10:59 -0700)]
crosh: remove mount_encrypted flag support

This is now on by default, so remove the hidden crosh command for
handling its flag.

BUG=None
TEST=link build, manual verification

Change-Id: I55eeca0793aadccd878badcb18f1e06867b1ff94
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28027
Reviewed-by: Elly Jones <ellyjones@chromium.org>
2 years agoAdded a -scheduled option to autest to test scattering feature.
Jay Srinivasan [Wed, 11 Jul 2012 18:55:09 +0000 (11:55 -0700)]
Added a -scheduled option to autest to test scattering feature.

This option is needed for manual testing of the scattering feature because
by default scattering is disabled for user-initiated update checks.
By specifying this option, we tell update_engine to treat this update check
as a scheduled update check instead of as a user-initiated check. That way
the tester doesn't have to wait for hours for the next scheduled update
check to happen.

BUG=chromium-os:32289
TEST=crosh autest command with and without arguments works fine on zgb.
Change-Id: I90c22f2d595246cf2773348ebdc1ef9d88bd818f
CQ-DEPEND=Ib3d3e70f2e87632b6a61c7e5cd45791210c12c99
Reviewed-on: https://gerrit.chromium.org/gerrit/27055
Commit-Ready: Jay Srinivasan <jaysri@chromium.org>
Reviewed-by: Jay Srinivasan <jaysri@chromium.org>
Tested-by: Jay Srinivasan <jaysri@chromium.org>
2 years agocrosh: add governor command factory-2569.B
Sam Leffler [Wed, 20 Jun 2012 16:38:49 +0000 (09:38 -0700)]
crosh: add governor command

Add a new governor command in the advanced settings area to view /
change the cpu governor.  This is a temporary addition to enable testing
of the new interactive governor.

BUG=chromium-os:17379 chromium:118032
TEST=use governor to view+change the current setting

Change-Id: I8e36be0f63d6592fa65977cb4308c73294decd78
Reviewed-on: https://gerrit.chromium.org/gerrit/25796
Reviewed-by: Sam Leffler <sleffler@chromium.org>
Tested-by: Sam Leffler <sleffler@chromium.org>
Commit-Ready: Sam Leffler <sleffler@chromium.org>

2 years agoCreate files in /home/chronos when chaps verbose logging is enabled. factory-2460.B factory-2475.B
Darren Krahn [Fri, 8 Jun 2012 18:19:12 +0000 (11:19 -0700)]
Create files in /home/chronos when chaps verbose logging is enabled.

These files will ensure that when chapsd is restarted, it will continue
to use the verbose logging level.

BUG=None
TEST=Manual

Change-Id: Ie087fd937ae0813238de939b7a9aa820cd718004
Reviewed-on: https://gerrit.chromium.org/gerrit/24888
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Tested-by: Darren Krahn <dkrahn@chromium.org>
Commit-Ready: Darren Krahn <dkrahn@chromium.org>

2 years agonetwork_diagnostics: auto-run link diagnostics, support shill
mukesh agrawal [Thu, 7 Jun 2012 01:39:43 +0000 (18:39 -0700)]
network_diagnostics: auto-run link diagnostics, support shill

- If we suspect a problem with the link layer, be sure to run the link
  layer diagnostics.
- When checking that the connection manager is running, check for either
  flimflam or shill.

Collateral changes:
- make diag_linkall a enter_once function
- fix typo in a comment

BUG=chromium-os:31598
TEST=manual (see below)

Manual testing
--------------
- add bogus routes to dns servers. e.g.:
  # route add -host 192.0.2.1 wlan0
  # route add -host <dns1> gateway 192.0.2.1
  # route add -host <dns2> gateway 192.0.2.1
- switch to flimflam
- run network_diagnostics
  - verify that diag_linkall is run
  - verify that flimflam status is shown
- switch to shill
- run network_diagnostics
  - verify that diag_linkall is run
  - verify that shill status is shown

Change-Id: If3cdfc951697b5b27c250f99a2076cde1298fc65
Reviewed-on: https://gerrit.chromium.org/gerrit/24669
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Ready: mukesh agrawal <quiche@chromium.org>
Tested-by: mukesh agrawal <quiche@chromium.org>
2 years agocrosh: network_diagnostics: set timeout for curl
mukesh agrawal [Thu, 7 Jun 2012 00:13:33 +0000 (17:13 -0700)]
crosh: network_diagnostics: set timeout for curl

By default, curl takes about a minute before giving up, even if
the nameservers are unreachable. Reduce this to a more palatable
wait.

BUG=chromium-os:31597
TEST=manual (see below)

Manual testing: deliberately misconfigure resolv.conf, verify
that curl fails after 10 seconds (when invoked by network_diagnostics).

Change-Id: Ic35829fcd975d30b6467a69879a94a48ef467acb
Reviewed-on: https://gerrit.chromium.org/gerrit/24666
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Ready: mukesh agrawal <quiche@chromium.org>
Tested-by: mukesh agrawal <quiche@chromium.org>
2 years agoAdded a 'chaps_debug' command to set the chaps log level. factory-2338.B factory-2368.B factory-2394.B firmware-link-2348.B
Darren Krahn [Fri, 18 May 2012 00:56:37 +0000 (17:56 -0700)]
Added a 'chaps_debug' command to set the chaps log level.

BUG=chromium-os:30835
TEST=Manual

CQ-DEPEND=If74949ffb6c2116528262b70a5e86e7cfd180bdf

Change-Id: I99c552d11fb2488066045bad74130fb16bb5cb5e
Reviewed-on: https://gerrit.chromium.org/gerrit/23002
Commit-Ready: Darren Krahn <dkrahn@chromium.org>
Reviewed-by: Darren Krahn <dkrahn@chromium.org>
Tested-by: Darren Krahn <dkrahn@chromium.org>
2 years agoAdd "swap" command to crosh, to enable/disable swap factory-2305.B
Luigi Semenzato [Fri, 4 May 2012 19:13:24 +0000 (12:13 -0700)]
Add "swap" command to crosh, to enable/disable swap

Commands are:
swap enable [optional swap size in MB]
swap disable
swap status

The latter runs /sbin/swapon -s.

Note that for security we limit the input values of swap to the most likely
ones.

BUG=chromium-os:30254
TEST=tested manually

Change-Id: I0609a6d4741e79e9019877d0884b4d91f931a5f9
Reviewed-on: https://gerrit.chromium.org/gerrit/21879
Commit-Ready: Luigi Semenzato <semenzato@chromium.org>
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
Tested-by: Luigi Semenzato <semenzato@chromium.org>
2 years ago[crosh] test that the key file is a regular file factory-2268.16.B release-R20-2268.B
Elly Jones [Tue, 8 May 2012 18:05:08 +0000 (14:05 -0400)]
[crosh] test that the key file is a regular file

BUG=chromium-os:30640
TEST=adhoc
key /media/../dev/urandom fails now

Change-Id: I159c66b32c337ab21a1c7181c5221170c5820ea7
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/22127
Reviewed-by: Kees Cook <keescook@chromium.org>
2 years agocrosh: cope with the possibility of two flag files
mukesh agrawal [Tue, 1 May 2012 23:55:05 +0000 (16:55 -0700)]
crosh: cope with the possibility of two flag files

Depending on when a user ran the shill_manager command
in crosh previously, there may be two different flag
files. Update the command to handle these flags files
sensibly.

BUG=None
TEST=manual (see below)

Manual testing:
- "shill_manager"
  - both present -> "Currently misconfigured."
  - only enable -> "Currently enabled."
  - only disable -> "Currently disabled."
  - neither present -> "Currently defaulted."
- "shill_manager on"
  - when defaulted -> "must reboot", .enable_shill created
  - when disabled -> "must reboot", .enable_shill created, .disable_shill rm'd
  - when enabled -> "No change", no change
  - when misconfigured -> "must reboot", .disable_shill rm'd
- "shill_manager off"
  - when defaulted -> "must reboot", .disable_shill created
  - when enabled -> "must reboot", .disable_shill created, .enable_shill rm'd
  - when disabled -> "No change", no change
  - when misconfigured -> "must reboot", .enable_shill rm'd

Change-Id: I6f5c7df3eac2d21c41e5c71f104804df3d87da9b
Reviewed-on: https://gerrit.chromium.org/gerrit/21580
Reviewed-by: Paul Stewart <pstew@chromium.org>
Tested-by: mukesh agrawal <quiche@chromium.org>
Commit-Ready: mukesh agrawal <quiche@chromium.org>

2 years agoRevert "[crosh] use SECURE_NOROOT in non-dev mode."
rginda [Tue, 24 Apr 2012 23:07:05 +0000 (16:07 -0700)]
Revert "[crosh] use SECURE_NOROOT in non-dev mode."

This reverts commit 954abdcefaa8979ebcf722f34961fc40bad9e5f6.

This commit broke crosh, as described in http://crosbug.com/29925

TEST=manual testing
BUG=chromium-os:29925

Change-Id: Ibb79ce319cfb2df32361c0eda93d3f17e6daf6db
Reviewed-on: https://gerrit.chromium.org/gerrit/20997
Commit-Ready: Robert Ginda <rginda@chromium.org>
Reviewed-by: Robert Ginda <rginda@chromium.org>
Tested-by: Robert Ginda <rginda@chromium.org>
2 years ago[crosh] use SECURE_NOROOT in non-dev mode.
Elly Jones [Thu, 19 Apr 2012 21:55:07 +0000 (17:55 -0400)]
[crosh] use SECURE_NOROOT in non-dev mode.

In non-dev mode, disable privilege gain from setuid binaries in crosh and its
child processes.

BUG=chromium-os:23839
TEST=Adhoc
Run crosh --dev, shell, sudo.
Run crosh, shell, sudo fails.

Change-Id: Ib5efc563824c6c121c426102a54e03ca75e93561
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/20642

2 years agoMake 'mount-encrypted' available behind a flag
Kees Cook [Tue, 17 Apr 2012 20:52:05 +0000 (13:52 -0700)]
Make 'mount-encrypted' available behind a flag

The "mount_encrypted" command has been added to enable/disable using
the new mount-encrypted helper for an encrypted /var and /home/chronos.
This flag can only be enabled, since there is no "unmigrate" path. The
only way to disable mount-encrypted is to wipe the stateful partition.

BUG=chromium-os:22172
TEST=x86-alex build, manual testing
CQ-DEPENDS=If436544ca26b833c4c3455d929a21309974d7c1a

Change-Id: Ib075d1b16d1ede5b40f66a8ba96d8ad9c894f528
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/20514

2 years agocrosh: update shill_manager command
mukesh agrawal [Mon, 9 Apr 2012 23:11:31 +0000 (16:11 -0700)]
crosh: update shill_manager command

Update shill_manager command to work with updated flimflam.conf.
(See CQ-DEPEND for the flimflam.conf change.)

Specifically, instead of enabling/disabling shill by creating/removing
the ".enable_shill" flag file, we now enable/disable shill by
removing/creating the ".disable_shill" flag file.

CQ-DEPEND=I3ebc52a9c2445a82456f33b2e5d871fd4d094f04
BUG=chromium-os:23531
TEST=manual (see below)

Manual testing:
- load image on device, verify that shill is used as the
  connection manager
- run "shill_manager off", reboot, verify that flimflam is used
  as the connection manager
- run "shill_manager on", reboot, verify that shill is used as the
  connection manager

Change-Id: Id2ab4d8991196289a04ffbadf8b452f2cb349a58
Reviewed-on: https://gerrit.chromium.org/gerrit/19863
Commit-Ready: mukesh agrawal <quiche@chromium.org>
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Tested-by: mukesh agrawal <quiche@chromium.org>
2 years agoEnabled Chaps by default.
Darren Krahn [Wed, 11 Apr 2012 17:59:19 +0000 (10:59 -0700)]
Enabled Chaps by default.

BUG=chromium-os:22543
TEST=Manual

Change-Id: I12c109dc3bd84a98800d493ce401cda1c8b8b980
Reviewed-on: https://gerrit.chromium.org/gerrit/20004
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Tested-by: Darren Krahn <dkrahn@chromium.org>
Commit-Ready: Darren Krahn <dkrahn@chromium.org>

2 years agocrosh: Invoke 'modem set-carrier' instead of 'modem_set_carrier'.
Ben Chan [Tue, 17 Apr 2012 22:37:08 +0000 (15:37 -0700)]
crosh: Invoke 'modem set-carrier' instead of 'modem_set_carrier'.

The deprecated modem_set_carrier script calls 'modem set-carrier' under
the hood. This CL changes crosh to directly call 'modem set-carrier', so
that the modem_set_carrier script can be removed.

BUG=chromium-os:29601
TEST=Run 'modem_set_carrier' from crosh.

Change-Id: Id2fc36e9e951cf05edb7a63db632bbb3f3024de1
Reviewed-on: https://gerrit.chromium.org/gerrit/20416
Tested-by: Ben Chan <benchan@chromium.org>
Commit-Ready: Ben Chan <benchan@chromium.org>
Reviewed-by: Jason Glasgow <jglasgow@chromium.org>
2 years agocrosh: add systrace support for developers
Sam Leffler [Thu, 1 Mar 2012 17:35:32 +0000 (09:35 -0800)]
crosh: add systrace support for developers

Add a systrace command to control system event logging (via debugd).
This is enabled only in developer mode.

BUG=chromium-os:27809
TEST=enter crosh; systrace start, systrace status, systrace stop

Change-Id: Ia76da4ab88a59e847dbd647f87e47d015b37fd07
Reviewed-on: https://gerrit.chromium.org/gerrit/17148
Reviewed-by: Kees Cook <keescook@chromium.org>
Tested-by: Sam Leffler <sleffler@chromium.org>
Commit-Ready: Sam Leffler <sleffler@chromium.org>

2 years agocrosh: add tab completion for commands
Mike Frysinger [Mon, 2 Apr 2012 17:06:19 +0000 (13:06 -0400)]
crosh: add tab completion for commands

Since bash does not allow custom tab completion with `read`, fake it out
by binding tab to history completion and automatically seed the history
with all the available commands.

BUG=None
TEST=launch crosh & type "she<tab>" & see "shell" completed

Change-Id: Iab64bf4144875134e053f1ebaadffc085faec4c0
Reviewed-on: https://gerrit.chromium.org/gerrit/19467
Reviewed-by: Elly Jones <ellyjones@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2 years agocrosh: Pass user commandline to network_diag release-R19-2046.B
Paul Stewart [Sat, 17 Mar 2012 01:03:01 +0000 (18:03 -0700)]
crosh: Pass user commandline to network_diag

This way "network_diag --wifi" will work.

BUG=None
TEST=Run on device

Change-Id: Ied06cf0038c1622bd217ca8da040bc47f4326fd3
Reviewed-on: https://gerrit.chromium.org/gerrit/18416
Commit-Ready: Paul Stewart <pstew@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
2 years agoAdded a 'chaps' command to enable / disable Chaps. factory-1987.B
Darren Krahn [Tue, 13 Mar 2012 17:02:47 +0000 (10:02 -0700)]
Added a 'chaps' command to enable / disable Chaps.

This command works with the /home/chronos/.enable_chaps file to enable
or disable Chaps. A reboot is required for any changes to take effect.

BUG=None
TEST=Manually tested using the command to enable and disable Chaps.

Change-Id: I0cb09cddf2f0ff745b420e3223d071673f9cc124
Reviewed-on: https://gerrit.chromium.org/gerrit/18143
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Tested-by: Darren Krahn <dkrahn@chromium.org>
Commit-Ready: Darren Krahn <dkrahn@chromium.org>

2 years agonetwork_diagnostics: Show routes
Paul Stewart [Fri, 10 Feb 2012 02:43:00 +0000 (18:43 -0800)]
network_diagnostics: Show routes

Add raw IPv4 and IPv6 tables.  Dump routes if ping fails.  Add "--route"
flag to manually dump routes.

BUG=None
TEST=Manual: Ran without command line options and ran with --route

Change-Id: I5d2df0225f02476aa0acafe855b953fc63aafacd
Reviewed-on: https://gerrit.chromium.org/gerrit/15644
Reviewed-by: Stanley Wong <stanleyw@chromium.org>
Tested-by: Stanley Wong <stanleyw@chromium.org>
Reviewed-by: Sam Leffler <sleffler@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
Commit-Ready: Paul Stewart <pstew@chromium.org>

2 years agocrosh: Remove enterprise_ca_approve/disapprove commands release-R18-1660.B
Ken Mixter [Mon, 9 Jan 2012 22:02:17 +0000 (14:02 -0800)]
crosh: Remove enterprise_ca_approve/disapprove commands

TEST=verify commands not parsed and not in help
BUG=chromium-os:21362

Change-Id: I74fc5800a9760f168ef1c8e4e08c34b9ef721c9a
Reviewed-on: https://gerrit.chromium.org/gerrit/13884
Tested-by: Ken Mixter <kmixter@chromium.org>
Commit-Ready: Ken Mixter <kmixter@chromium.org>
Reviewed-by: Robert Ginda <rginda@chromium.org>
2 years ago[crosh] tracepath: use debugd
Elly Jones [Wed, 21 Dec 2011 22:12:02 +0000 (17:12 -0500)]
[crosh] tracepath: use debugd

TEST=Adhoc
Start crosh, and run:
  tracepath 4.2.2.1
  tracepath -n 4.2.2.1

Change-Id: I271c808930f5175b9546376a0d1870b375f2e9a4
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/13356
Reviewed-by: Kees Cook <keescook@chromium.org>
2 years ago[crosh] use debugd for route
Elly Jones [Wed, 21 Dec 2011 19:29:34 +0000 (14:29 -0500)]
[crosh] use debugd for route

BUG=chromium-os:23839
TEST=Adhoc
Run crosh. Try:
  route
  route -n
  route -6

Change-Id: Iac125af2278d99ff4a0ede254d5d511dcd1660e3
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/13350
Reviewed-by: Kees Cook <keescook@chromium.org>
2 years agocrosh: use debugd for ping.
Elly Jones [Mon, 5 Dec 2011 23:28:27 +0000 (18:28 -0500)]
crosh: use debugd for ping.

TEST=Adhoc
Start crosh, run 'ping -c 100 4.2.2.1', C-c it.

Change-Id: I7d1bf1b6f008ecce7997190100063e9dabf78970
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/12470
Reviewed-by: Kees Cook <keescook@chromium.org>
2 years agocrosh: trap SIGHUP
Elly Jones [Wed, 7 Dec 2011 20:32:49 +0000 (15:32 -0500)]
crosh: trap SIGHUP

Trapping SIGHUP ensures that we always make it back to the main loop when our
window is closed, which gives cleanup code in helpers a chance to run.

BUG=None
TEST=Adhoc
Build, run crosh, kill the window, see the crosh process is properly dead.

Change-Id: I95cdec47da27f4d572ef767eeca5fb22b3857948
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/12574

2 years agonetwork_diagnostics: Add WiFi monitor
Paul Stewart [Tue, 22 Nov 2011 02:36:07 +0000 (18:36 -0800)]
network_diagnostics: Add WiFi monitor

Add a "--wifi_monitor" command line option that causes this
script to continually monitor link, station, and survey
parameters, as well as running "iw event" in the background.
This should allow capture of data samples to validate what
the system is up to in vague terms and what may have
instigated a roaming/disconnection event.

BUG=chromium-os:23251
TEST=This is WIP.  Sent here so others can play.

Change-Id: Ice9b867f624c9ba6f7c9475a746710a4c8a09516
Reviewed-on: https://gerrit.chromium.org/gerrit/12018
Reviewed-by: Sam Leffler <sleffler@chromium.org>
Commit-Ready: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
2 years agocrosh: Remove the enable_shill command from the help text factory-1412.B release-R17-1412.B
Gaurav Shah [Thu, 1 Dec 2011 23:59:48 +0000 (15:59 -0800)]
crosh: Remove the enable_shill command from the help text

It's not ready for use by end users, and we can avoid conops pain by
removing it from the help, so people don't accidentally enable it.

BUG=chromium-os:23492
TEST=none

Change-Id: I693765dd4957f86a2133a7d2406456c0fdfc19f3
Reviewed-on: https://gerrit.chromium.org/gerrit/12353
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Commit-Ready: Gaurav Shah <gauravsh@chromium.org>
Tested-by: Gaurav Shah <gauravsh@chromium.org>
2 years agocrosh: Add command to switch to using shill as the connection manager
Gaurav Shah [Mon, 28 Nov 2011 22:10:00 +0000 (14:10 -0800)]
crosh: Add command to switch to using shill as the connection manager

This is to allow shill as an "experimental" connection manager which can
be used in lieu of flimflam until when we can switch to it completely.

BUG=chromium-os:23492, chromium-os:23531
TEST=manually checked the command worked with on|off and displaying status.

Change-Id: I22da0bcad6870eb81d7fcaadf7a5ed9a5a46a82d
Reviewed-on: https://gerrit.chromium.org/gerrit/12178
Commit-Ready: Gaurav Shah <gauravsh@chromium.org>
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Tested-by: Gaurav Shah <gauravsh@chromium.org>
2 years agocrosh: add 'syslog' command.
Elly Jones [Mon, 28 Nov 2011 18:32:15 +0000 (13:32 -0500)]
crosh: add 'syslog' command.

BUG=chromium-os:23378
TEST=Adhoc
Build, boot, run 'syslog foo' from crosh; grep foo /var/log/messages

Change-Id: I854a640f3f176bafe680675788c22bc481445722
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/12132
Reviewed-by: Stanley Wong <stanleyw@chromium.org>
Tested-by: Stanley Wong <stanleyw@chromium.org>
Reviewed-by: Kris Rambish <krisr@chromium.org>
3 years agocrosh: network_diagnostics: Add option to disable logging factory-1235.B factory-1284.B firmware-kiev-2.112.B firmware-uboot_v2-1299.B
Paul Stewart [Tue, 25 Oct 2011 22:46:27 +0000 (15:46 -0700)]
crosh: network_diagnostics: Add option to disable logging

BUG=chromium-os:22084
TEST=Rerun with and without new "--no-log" argument, test to make sure
Downloads has no new content with this argument set.

Change-Id: I44e8fac88019fe9a603379ebcadd52afa8d5b7be
Reviewed-on: http://gerrit.chromium.org/gerrit/10682
Reviewed-by: Sam Leffler <sleffler@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
3 years agoRemove UUIDs from network_diagnostics --wifi output release-R16-1193.B
Paul Stewart [Wed, 12 Oct 2011 17:35:35 +0000 (10:35 -0700)]
Remove UUIDs from network_diagnostics --wifi output

Not useful to us

BUG=chromium-os:20831
TEST=Manual.  Ensure WPS UUIDs do not appear in output.

Change-Id: I521e50f60ba83571160d848af6dfb686e189ec9f
Reviewed-on: http://gerrit.chromium.org/gerrit/9949
Reviewed-by: Sam Leffler <sleffler@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
3 years agoAdd scan statistics to network_diag --wifi
Paul Stewart [Tue, 27 Sep 2011 22:11:56 +0000 (15:11 -0700)]
Add scan statistics to network_diag --wifi

Report some more information about current WiFi interfaces:

    iw survey dump
    iw station dump
    iw scan dump
    iw link

This way, on demand we can get more information about AP
parameters.

BUG=chromium-os:20831
TEST=Manual.

Change-Id: Ia047546e824f7940ad781fd90060670215e47010
Reviewed-on: http://gerrit.chromium.org/gerrit/9877
Reviewed-by: Sam Leffler <sleffler@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
3 years agocrosh: quote crossystem commands to prevent shell globbing
Hung-Te Lin [Tue, 27 Sep 2011 00:01:54 +0000 (08:01 +0800)]
crosh: quote crossystem commands to prevent shell globbing

When using "crossystem A?B", we should always quote it because '?' is special
for shell.

BUG=chromium-os:20861
TEST=emerge-x86-generic crosh

Change-Id: Ib8b8047f4ab122b2f40763d1eb1da68c500f7125
Reviewed-on: http://gerrit.chromium.org/gerrit/8320
Reviewed-by: Kees Cook <keescook@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
3 years agonetwork_diag: Debug wifi params
Paul Stewart [Mon, 26 Sep 2011 20:41:33 +0000 (13:41 -0700)]
network_diag: Debug wifi params

Add a command line parser that allows direct access to specific
diagnostic steps instead of running diagnostics depending on errors
generated by the "curl" probe.  Add a diag_wifi that dumps ath9k
phy debug files.

BUG=chromium-os:20831
TEST=Manual.  Run with each argument and verify the output looks reasonable.

Change-Id: Iba0b373f0e02eb3a692e4845703f2c95bc714d7a
Reviewed-on: http://gerrit.chromium.org/gerrit/8302
Reviewed-by: Sam Leffler <sleffler@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
3 years agocrosh ssh: add a command for ServerAliveInterval
ttuttle [Fri, 9 Sep 2011 21:11:06 +0000 (17:11 -0400)]
crosh ssh: add a command for ServerAliveInterval

I would much prefer to add a generic way of setting options and a
whitelist of safe options, to avoid manually adding every option as
needed, but there's a bug open for this.

BUG=chromium-os:17299
TEST=Adhoc; adding echo before the ssh command shows the arg

Change-Id: I2f074dfb1f89fa33690dcc1b9c60cdaf5c47004d
Reviewed-on: http://gerrit.chromium.org/gerrit/7499
Reviewed-by: Jason Glasgow <jglasgow@chromium.org>
Tested-by: ttuttle <ttuttle@chromium.org>
3 years agocrosh: move rarely used commands from help to help_advanced factory-1020.B factory-980.B release-1011.B test-982.B
Guillaume Brunerie [Sun, 28 Aug 2011 02:44:40 +0000 (04:44 +0200)]
crosh: move rarely used commands from help to help_advanced

Add a new "help_advanced" command for help about debugging or more
advanced commands. This makes the output of "help" clearer and
removes the need for a paginated output.

BUG=chromium-os:12768,chromium-os:19672
TEST=Run "crosh --dev --usb", check that the output of "help" and
"help_advanced" fit in a page and that every command is present.

Change-Id: I31bac1cca20b3e8e6d4db911e426f854e050e1ec
Reviewed-on: http://gerrit.chromium.org/gerrit/6816
Tested-by: Guillaume Brunerie <guillaume.brunerie@gmail.com>
Reviewed-by: Daniel Erat <derat@chromium.org>
3 years agoChange SIGINT to INT for POSIX (and dash) compatibility
Guillaume Brunerie [Sun, 28 Aug 2011 02:28:16 +0000 (04:28 +0200)]
Change SIGINT to INT for POSIX (and dash) compatibility

A comment at the beginning of crosh says that crosh should work with
dash, but the (non POSIX conforming) "trap command SIGINT" construct
does not seem supported by dash.

BUG=None
TEST=Ran "/bin/dash crosh --dash"

Change-Id: I91b0f6ae5b3edaee8a691bb93b047f035cf1c2fc
Reviewed-on: http://gerrit.chromium.org/gerrit/6815
Reviewed-by: Daniel Erat <derat@chromium.org>
Tested-by: Guillaume Brunerie <guillaume.brunerie@gmail.com>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
3 years agoAdd usage parameter line to crosh help for tpcontrol command
Terry Lambert [Fri, 19 Aug 2011 22:19:51 +0000 (15:19 -0700)]
Add usage parameter line to crosh help for tpcontrol command

BUG=chromium-os:19433
TEST=tested on device

Change-Id: I68c909ad3c2fe466788b0aaec8d97991c951b411
Reviewed-on: http://gerrit.chromium.org/gerrit/6368
Tested-by: Andrew de los Reyes <adlr@chromium.org>
Reviewed-by: Andrew de los Reyes <adlr@chromium.org>
3 years agoAdd tpcontrol command
Daniel Kurtz [Mon, 15 Aug 2011 15:54:17 +0000 (23:54 +0800)]
Add tpcontrol command

Add a command to allow manual adjustment of touchpad settings.

BUG=chromium-os:19167
TEST=(0) /usr/bin/crosh help
     -> shows tpcontrol
     (1) tpcontrol taptoclick on
     -> Enables Tap To Click
     (2) tpcontrol status
     -> Shows current touchpad settings

Change-Id: Ic69ed42402761ef39b5c56521050cd5e8f3d14b5
Reviewed-on: http://gerrit.chromium.org/gerrit/6060
Reviewed-by: Dave Moore <davemoore@chromium.org>
Reviewed-by: Andrew de los Reyes <adlr@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
3 years agonetwork_diagnostics: Anonymize more FF parameters 0.15.877.B firmware-881-u-boot-v1 firmware-u-boot-v1
Paul Stewart [Tue, 9 Aug 2011 21:51:17 +0000 (14:51 -0700)]
network_diagnostics: Anonymize more FF parameters

A few more flimflam data fields now contain PII.  Make sure
network_diag doesn't expose them.

BUG=chromium-os:18517
TEST=Spot test mac_anonymize on (fake) user data.

Change-Id: Icd61a02bfbf7ba1bd59400b63e5d310fdf4fd2f7
Reviewed-on: http://gerrit.chromium.org/gerrit/5602
Reviewed-by: Sam Leffler <sleffler@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
3 years agocrosh: Add set_arpgw
Paul Stewart [Fri, 1 Jul 2011 04:03:39 +0000 (21:03 -0700)]
crosh: Add set_arpgw

Add "set_arpgw" command to crosh

BUG=chromium-os:16885
TEST=Run "crosh".  Run "help" and confirm presence of "set_arpgw".  Run
command.

Change-Id: I140ee96f42fd54a78694ea63b0652cedf4de9816
Reviewed-on: http://gerrit.chromium.org/gerrit/3542
Reviewed-by: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
3 years agocrosh ssh: Properly validate dynamic-forward ports.
ttuttle [Fri, 22 Jul 2011 19:30:20 +0000 (15:30 -0400)]
crosh ssh: Properly validate dynamic-forward ports.

Our regex for validating dynamic-forward ports was incorrect.

BUG=chromium-os:18071
TEST=Adhoc (no longer accepts invalid input)

Change-Id: I4e91de7538efa6ca431e916cbed15c3656b2dd3c
Reviewed-on: http://gerrit.chromium.org/gerrit/4600
Reviewed-by: Elly Jones <ellyjones@chromium.org>
Tested-by: ttuttle <ttuttle@chromium.org>
3 years agoAdd experimental_storage command to enable experimental features in cros-disks.
Ben Chan [Thu, 21 Jul 2011 00:49:43 +0000 (17:49 -0700)]
Add experimental_storage command to enable experimental features in cros-disks.

BUG=chromium-os:17945
TEST=Tested enabling/disabling experimental features in cros-disks on Cr48

Change-Id: Idf917b533caecd544ed83d3be3a5e8f1b076636c
Reviewed-on: http://gerrit.chromium.org/gerrit/4457
Reviewed-by: Robert Ginda <rginda@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
3 years agocrosh ssh: Clear params if there aren't any. 780.B
ttuttle [Tue, 19 Jul 2011 14:16:43 +0000 (10:16 -0400)]
crosh ssh: Clear params if there aren't any.

If there's a space in a line input to ssh, it splits it into cmd and params.
If not, it sets cmd, but leaves params set to whatever it used to be.
This makes "port 2222" followed by "key" with no filename give the odd error
message that there is no key named 2222.

This patch forces params to the empty string if the line does not contain a
space.

BUG=None
TEST=Adhoc (see above test case)

Change-Id: I99e958bbcbbd8ad138ce8dd919019207035f4466
Reviewed-on: http://gerrit.chromium.org/gerrit/4306
Reviewed-by: Elly Jones <ellyjones@chromium.org>
Tested-by: ttuttle <ttuttle@chromium.org>
3 years agoAdd "connectivity" command to crosh
David Rochberg [Mon, 11 Jul 2011 18:58:11 +0000 (14:58 -0400)]
Add "connectivity" command to crosh

connectivity list devices
connectivity list services

BUG=chromium-os:17155
TEST=ran connectivity from crosh, ran help from crosh

Change-Id: I2f8ebfea5b1e6d9dd159dbf903dc03433749340f
Reviewed-on: http://gerrit.chromium.org/gerrit/3880
Reviewed-by: Nikita Kostylev <nkostylev@chromium.org>
Tested-by: David Rochberg <rochberg@chromium.org>
3 years agoCall mm_debug from network_logging() routine.
Nathan Williams [Fri, 8 Jul 2011 20:14:28 +0000 (16:14 -0400)]
Call mm_debug from network_logging() routine.

BUG=chromium-os:15199
TEST=Run 'network_logging cellular' from crosh; check
/var/log/messages for AT commands.

Change-Id: Iae89eb2c8917b6e762a8f46161a233c30ac4235e
Reviewed-on: http://gerrit.chromium.org/gerrit/3806
Reviewed-by: Nathan J. Williams <njw@chromium.org>
Tested-by: Nathan J. Williams <njw@chromium.org>
3 years agocrosh: Add ssh options to documentation.
Daniel Erat [Thu, 7 Jul 2011 16:30:56 +0000 (09:30 -0700)]
crosh: Add ssh options to documentation.

This adds the quick forms of the ssh command
(e.g. "ssh user@host") to the help text.

BUG=none
TEST=manual

Change-Id: I396782bc8053d3fb327e7c8b2d9a62fe62293bd2
Reviewed-on: http://gerrit.chromium.org/gerrit/3738
Tested-by: ttuttle <ttuttle@chromium.org>
Reviewed-by: ttuttle <ttuttle@chromium.org>
3 years agocrosh ssh: Remove keyfile on exit.
ttuttle [Thu, 30 Jun 2011 17:55:50 +0000 (13:55 -0400)]
crosh ssh: Remove keyfile on exit.

Makes several changes:
1. Does not remove .ssh.  (If we want to ignore known_hosts, why does
   ssh_forget_host still exist?)
2. Creates .ssh before copying keyfile if needed.
3. Removes keyfile on exit.

Also:
1. Changes "quit" to "exit", for consistency between crosh and ssh.
2. Starts a new line if shell_read in ssh fails, so the crosh prompt is on
   its own line (instead of "ssh> crosh> _").

BUG=chromium-os:17178
TEST=Adhoc; after "ssh", "key test.key" creates key, "exit" removes key.

Change-Id: I9f24f69a0642ff8cf56000497f127dfcdf61934a
Reviewed-on: http://gerrit.chromium.org/gerrit/3467
Reviewed-by: Elly Jones <ellyjones@chromium.org>
Reviewed-by: ttuttle <ttuttle@chromium.org>
Tested-by: ttuttle <ttuttle@chromium.org>