Devtools for OOBE screens

290 views
Skip to first unread message

Tudor Brindus

unread,
Jun 25, 2018, 7:49:19 PM6/25/18
to Chromium OS Development
Hi,

I'm trying to do some work on OOBE screens, and being able to do remote debugging would be a huge help.

I've added relevant flags to /etc/chromeos_dev.conf:

--show-login-dev-overlay
--enable-ui-devtools=9222
--remote-debugging-port=9223

and ran `restart ui`. `ps aux | grep chrome` shows that Chrome is in fact started with the flags.

My device is SSH-able at 100.127.30.93, but whenever I visit chrome-devtools://devtools/bundled/inspector.html?ws=100.127.30.93:9223/0 I get disconnected shortly after (timeout?). `telnet 100.127.30.93` also shows that the connection is refused. I thought this might be firewall related so I tried port-forwarding it over SSH via `-L 9223:localhost:9223` and pointing devtools to localhost, and now when I connect I get the following message in /var/log/chrome/chrome:

[19772:19772:0625/163436.189633:ERROR:devtools_server.cc(157)]: Not implemented reached in virtual void ui_devtools::UiDevToolsServer::OnConnect(int)

I'm hoping there's something obvious I'm missing to getting devtools to work, but I've run out of ideas.

Noel Gordon

unread,
Jun 25, 2018, 11:51:29 PM6/25/18
to tbri...@chromium.org, chromiu...@chromium.org
Not sure what an OOBE is (not sure I need to know :)  The method I use for remote inspection of a developer mode ChromeOS test device is to first setup the device for remote devtools debugging.

On your ChromeOS developer mode test device, press Ctrl+Alt+2 and login as user chronos and type shell to get a bash prompt and run:
% sudo /usr/libexec/debugd/helpers/dev_features_rootfs_verification
% sudo reboot
% sudo /usr/libexec/debugd/helpers/dev_features_ssh
% sudo /usr/libexec/debugd/helpers/dev_features_chrome_remote_debugging
% sudo reboot
Couple of boots needed there yes, but your developer mode ChromeOS test device is now permanently setup for remote inspection on (the default) port 9222. You can confirm; on the test device run:
% netstat -al | grep 9222
tcp 0 0 localhost:9222 0.0.0.0:* LISTEN
and also check the file /etc/chrome_remote_debugging_on exists on the device. If so, you're maybe good to go. 

In a terminal on your Linux developer machine, create a local ssh port forward to the developer tools port 9222 on the test device, assuming the test device is connected via Ethernet cable to the Linux machine, and has IP address x.x.x.x
% ssh -L 9000:localhost:9222 x.x.x.x
localhost ~ #
Now navigate your Linux Chrome browser to localhost:9000. A list of the remote pages on ChromeOS test device that are available for inspection should be shown.

~noel

--
--
Chromium OS Developers mailing list: chromiu...@chromium.org
View archives, change email options, or unsubscribe:
https://groups.google.com/a/chromium.org/group/chromium-os-dev

Yves Arrouye

unread,
Jun 26, 2018, 12:05:10 AM6/26/18
to no...@chromium.org, tbri...@chromium.org, Chromium OS dev
The first errors were due to port forwarding issues. The latter ones probably to device setup, so Noel steps should help. (Noel, you don't need to know but OOBE = Out Of Box Experience: the set of screens you go to when you open a new/newly wiped devices).


Noel Gordon

unread,
Jun 26, 2018, 12:40:57 AM6/26/18
to drc...@chromium.org, tbri...@chromium.org, chromiu...@chromium.org
Thanks. And since --enable-ui-devtools=<port> is new-ish, it might need some more ChromeOS setup to get it working.

~noel

Steven Bennetts

unread,
Jun 26, 2018, 12:29:30 PM6/26/18
to no...@chromium.org, drc...@chromium.org, tbri...@chromium.org, Chromium OS dev
I do this fairly regularly, but haven't done so in a few weeks:

Add to chromeos_dev.conf
--remote-debugging-port=8888

ssh to the device:
ssh -L 8888:127.0.0.1:8888 root@${DEVICE_IP}

Then navigate on my desktop browser to localhost:8888



You received this message because you are subscribed to the Google Groups "Chromium OS Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-os-d...@chromium.org.

Noel Gordon

unread,
Jul 9, 2018, 4:42:39 AM7/9/18
to stev...@google.com, drc...@chromium.org, tbri...@chromium.org, chromiu...@chromium.org
etc/chrome_dev.conf  ??

In other news, my steps don't seem to work anymore (I tried them today & no joy).

~noel



Steven Bennetts

unread,
Jul 9, 2018, 12:30:33 PM7/9/18
to no...@chromium.org, drc...@chromium.org, tbri...@chromium.org, Chromium OS dev
Er, yes, correct. I just tried this today and it worked:

1. Make sure you have a test image on your device and your rootfs is writable (a regular deploy_chrome will take care of that).
2. (device) $ cat "--remote-debugging-port=8888" >> /etc/chrome_dev.conf && restart ui
3, (dev machine) $ ssh -L 8888:127.0.0.1:8888 root@${DEVICE_IP}
4. Navigate to localhost:8888


Noel Gordon

unread,
Jul 9, 2018, 10:32:54 PM7/9/18
to Steven Bennetts, drc...@chromium.org, tbri...@chromium.org, chromiu...@chromium.org
Yeap thanks, works for me also.

~noel
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages