Last active
August 8, 2024 06:15
-
-
Save sj-dan/e103425b4b3c3125b393831c3b4c0748 to your computer and use it in GitHub Desktop.
Script to fetch and download the latest version of the Chrome OS Flex image
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
URLs=$(curl "https://dl.google.com/dl/edgedl/chromeos/recovery/cloudready_recovery2.json" \ | |
-s --output - | \ | |
grep "^.*\"url\".*$" | \ | |
sed "s/.*\"url\": \"\(.*\)\".*$/\1/g") | |
printf "\nPick which channel to download your image from. Channel name is near the end of the URL.\n\n" | |
select URL in $URLs; | |
do | |
if [[ $URL != "" ]]; then | |
printf "\nDownloading now...\n\n" | |
curl -L -C - -O $URL && break | |
else | |
printf "\nInvalid selection, please pick one of the above displayed numbers.\n\n" | |
fi | |
done | |
printf "\nFinished downloading!\n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As an alternative to shell script, you can download flex recovery images in your browser using this non-google site https://chromeos.exerra.xyz/ It also lets you choose any of these 3: stable, LTC (newer) or LTR (older) and shows you for each of the 3, the size, current versions of the recovery image. chrome version, hashes, etc. When I tested it seemed legit and safe as it actually did downloads directly from Google site https://dl.google.com with same download URL as the script got (below): for example https://dl.google.com/dl/edgedl/chromeos/recovery/chromeos_15662.115.0_reven_recovery_lts-channel_mp-v3.bin.zip
If you want to try the recovery.sh script instead, note that when I tested today, 2024-08-08, the downloads part of the script failed on a Chromebook in dev mode until I added -k option to curl and then I see this:
The /tmp tmpfs partition on my flex laptop is only 1.9 gig, so it is a good thing the unzip fails because crew installed an ancient 2009 version 6 of unzip. However if you do
crew install p7zip
you can uncompress the zip file with7z x chromeos*.zip
(after moving to a partition with at least 8-9 gig free space, and able to hold a 9 gig file, (not a fat32 USB, tho maybe ExFAT might work).