From 393121b700deed5522b00ee4f84315b706f636c0 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Wed, 17 Feb 2021 12:33:27 -0500 Subject: [PATCH] update fastboot.js to v1.0.5 --- process_static | 2 +- static/install/web.html | 4 ++-- static/js/fastboot | 2 +- static/js/web-install.js | 11 +++++------ 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/process_static b/process_static index 53120a0a..fc48b2eb 100755 --- a/process_static +++ b/process_static @@ -7,7 +7,7 @@ export PATH="$PWD/node_modules/.bin:$PATH" rm -rf static_tmp cp -a static static_tmp -rm -rf static_tmp/js/fastboot/{!(dist),dist/!(fastboot.min.mjs|vendor)} +rm -rf static_tmp/js/fastboot/{!(dist),dist/!(fastboot.min.mjs|fastboot.min.mjs.map|vendor)} for file in static_tmp/**/*.@(json|webmanifest); do json_reformat -m < "$file" | sponge "$file" diff --git a/static/install/web.html b/static/install/web.html index a4694da7..70c870f5 100644 --- a/static/install/web.html +++ b/static/install/web.html @@ -27,8 +27,8 @@ - - + +
diff --git a/static/js/fastboot b/static/js/fastboot index 9762e777..7a60c4f4 160000 --- a/static/js/fastboot +++ b/static/js/fastboot @@ -1 +1 @@ -Subproject commit 9762e7777b07dcef9c0076c73476cfe69295fe72 +Subproject commit 7a60c4f4b7a3ea059a338ada2dcfec8988835414 diff --git a/static/js/web-install.js b/static/js/web-install.js index c38eefa1..9571b49f 100644 --- a/static/js/web-install.js +++ b/static/js/web-install.js @@ -1,6 +1,6 @@ // @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT -import * as fastboot from "./fastboot/dist/fastboot.min.mjs?6"; +import * as fastboot from "./fastboot/dist/fastboot.min.mjs?7"; const RELEASES_URL = "https://releases.grapheneos.org"; @@ -196,10 +196,9 @@ async function flashRelease(setProgress) { } setProgress("Flashing release..."); - await fastboot.FactoryImages.flashZip( - device, blob, true, reconnectCallback, + await device.flashFactoryZip(blob, true, reconnectCallback, (action, item, progress) => { - let userAction = fastboot.FactoryImages.USER_ACTION_MAP[action]; + let userAction = fastboot.USER_ACTION_MAP[action]; let userItem = item === "avb_custom_key" ? "verified boot key" : item; setProgress(`${userAction} ${userItem}...`, progress); } @@ -267,9 +266,9 @@ function addButtonHook(id, callback) { // This doesn't really hurt, and because this page is exclusively for web install, // we can tolerate extra logging in the console in case something goes wrong. -fastboot.setDebugMode(true); +fastboot.setDebugLevel(2); -fastboot.FactoryImages.configureZip({ +fastboot.configureZip({ workerScripts: { inflate: ["/js/fastboot/dist/vendor/z-worker-pako.js", "pako_inflate.min.js"], },