Last active
January 21, 2024 03:06
-
-
Save greatwolf/a972765d2423a7c6d03d447138cefca3 to your computer and use it in GitHub Desktop.
Allow deprecated Chrome Apps to work again on latest Chromium version
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
-- This script replaces one of the extension ids hardcoded in Chromium | |
-- with our own desired app extension id so it can function again. | |
-- See https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/web_applications/extensions/extension_status_utils.cc;l=30 | |
local filename = ... | |
assert(filename, "missing filename") | |
local file = assert(io.open(filename, 'r+b')) | |
local bin = file:read '*a' | |
local kk_appid = 'idgiipeogajjpkgheijapngmlbohdhjg' | |
local replacement_appid = 'jdfhpkjeckflbbleddjlpimecpbjdeep' | |
bin = bin:gsub(replacement_appid, kk_appid) | |
print('offset:', bin:find(kk_appid)) | |
file:seek 'set' | |
file:write(bin) | |
file:close() | |
print(filename .. " patched ok.") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment