CB_Inventory icon indicating copy to clipboard operation
CB_Inventory copied to clipboard

Method(s) to upload serial-number and device-info to spreadsheet from un-managed and/or non-workspace chromebooks... ideas?

Open porteusconf opened this issue 10 months ago • 0 comments

Ideas how to programatically populate the devices spreadsheet from unmanaged/non-workspace plain-old Chromebooks? I have about 20 unmanaged non-dev chromebooks that are used only a few months a year (tax season) by a non-profit org, ideally from guest login. I physically login to each laptop to run updates once a year, so I was wondering if I could gather and push device info at that time.

I noticed I can obtain the serial-number of an unmanaged Chromebook, even from guest account, by navigating to file:///tmp/machine-info

file:///tmp/machine-info

There I see that 4-line text file similar to the following:

serial_number="5CD333DF1G"
customization_id="yaviks"
rlz_brand_code="OFRL"
wpsw_cur="1"

I've obfuscated the serial_number above, but verified it is correct on all Chromebooks I've tested.

On each laptop, I was thinking of doing a save-as of this file to a folder on GDrive or flash-drive, renaming each file for Chromebooks 01 through 20 something like so:

machine-info-cb01.txt 
machine-info-cb02.txt
...
machine-info-cb20.txt

A script of some sort (like shell) could parse filename and serial number for each chromebook and write to one csv file perhaps.

Alternatively, even on unmanaged chromebooks, NOT in developer mode, if I go to chrome://system, search for vpd, then expand vpd_2.0 then I see info below similar to below:

"model_name"="HP Chromebook 15a-nb0xxx"
"oem_name"="HP"
"region"="us"
"serial_number"="5CD333DF1G"
"sku_number"="7J298UA#ABA"
"ActivateDate"="2024-09"
"block_devmode"="0"
"check_enrollment"="0"
"should_send_rlz_ping"="0"

I can print a pdf of 11 pages with above info on last page. Not sure how to harvest just the vpd_2.0 info other than copy and paste. It would be nice to have model_name and rest of the info that are not in the 4-line /tmp/machine-info file.

The model name is in file:///var/log/vpd_2.0.txt but browser won't open it (because it is a symlink to /mnt/statefull... I think), tho other items in file:///var open just fine in chrome like file:///var/log/bios_info.txt and almost all the *.log files in /var/log folder. The browser says permission denied for anything under file:///mnt including file:///mnt/stateful_partition/unencrypted/cache/vpd/filtered.txt

file:///var/log/
# browser lists vpd_2.0.txt but won't open it (because it is symlink?) opens most other items in file:///var/log/
chronos@localhost /var/log $ ls -l vpd_2.0.txt 
lrwxrwxrwx 1 root root 58 Jan 24 17:56 vpd_2.0.txt -> /mnt/stateful_partition/unencrypted/cache/vpd/filtered.txt

chronos@localhost /var/log $ cat vpd_2.0.txt 
"model_name"="HP Chromebook 15a-nb0xxx"
"region"="us"
"serial_number"="5CD333DF1G"
"sku_number"="7J298UA#ABA"
"ActivateDate"="2024-09"
"block_devmode"="0"
"check_enrollment"="0"
"should_send_rlz_ping"="0"
chronos@localhost /var/log $ 

Ideas/suggestions? Write an extension or somehow script chrome browser? The sysinfo extensions I looked at do not show model nor serial number. For some reason the lshw always show serial as 123456789 and a different SKU...

$ crew install lshw
$ lshw
localhost
    description: Laptop
    product: Yaviks_Ufs (sku983055)
    vendor: Google
    version: rev7
    serial: 123456789
    width: 64 bits
    capabilities: smbios-3.0.0 dmi-3.0.0 smp vsyscall32
    configuration: boot=normal chassis=laptop family=Google_Nissa sku=sku983055
  *-core
       description: Motherboard
       product: Yaviks_Ufs
       vendor: HP
       physical id: 0
       version: rev7
       serial: 123456789
...

porteusconf avatar Jan 29 '25 20:01 porteusconf