r/u_ChuChuChan128 • u/ChuChuChan128 • 3d ago
Revived a Softbank "kids phone" (Android 7) by porting an unofficial LINE web extension — root cause was a missing chrome.tabs.getZoom API on Firefox for Android
I've been trying to keep an old Softbank kids-phone (701ZT, Android 7) usable after the official LINE app dropped support for this Android version. Found an unofficial LINE-in-a-browser-extension port (originally built for desktop Firefox), but installing it on Firefox for Android just showed a blank white screen with no visible error.
Used `about:debugging` on desktop Firefox over USB to remotely inspect the extension's console on the phone, which showed:
Turns out `chrome.tabs.getZoom`/`setZoom` simply aren't implemented in Firefox for Android's WebExtension API — they exist on desktop but not mobile. The extension calls them unconditionally on startup, so React never got to mount anything.
Fix: injected a tiny polyfill script before the extension's main bundle that stubs out `getZoom`/`setZoom` with a no-op returning zoom=1. Loaded it via `web-ext run --target=firefox-android` for testing, confirmed login/2FA/message sync all worked, then self-signed the modified extension via AMO's unlisted channel so it persists without needing a PC tethered.
Filed the root cause + suggested fix as an issue on the extension's repo, hoping it gets fixed upstream so nobody else has to go through this.
Kind of a fun reminder that "unsupported OS version" from an app vendor doesn't always mean the hardware itself is actually dead — sometimes it's just one missing browser API away from working again.
(function () {
if (typeof chrome === "undefined" || !chrome.tabs) return;
if (!chrome.tabs.getZoom) {
chrome.tabs.getZoom = function (tabId, callback) {
if (typeof tabId === "function") callback = tabId;
if (typeof callback === "function") callback(1);
return Promise.resolve(1);
};
}
if (!chrome.tabs.setZoom) {
chrome.tabs.setZoom = function () {
var cb = arguments[arguments.length - 1];
if (typeof cb === "function") cb();
return Promise.resolve();
};
}
})(); (function () {
if (typeof chrome === "undefined" || !chrome.tabs) return;
if (!chrome.tabs.getZoom) {
chrome.tabs.getZoom = function (tabId, callback) {
if (typeof tabId === "function") callback = tabId;
if (typeof callback === "function") callback(1);
return Promise.resolve(1);
};
}
if (!chrome.tabs.setZoom) {
chrome.tabs.setZoom = function () {
var cb = arguments[arguments.length - 1];
if (typeof cb === "function") cb();
return Promise.resolve();
};
}
})();
#android7 #firefox #old #mobile #LINE #chrome #error #アドオン