Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Verified Commit 6d2f3d6e authored by Jackeagle's avatar Jackeagle Committed by Manu Suresh
Browse files

Move fastboot stack to external @e/fastboot package

The fastboot protocol implementation, WebUSB transport layer, and shared
type definitions have been moved out of the installer source tree and into
the dedicated @e/fastboot package (https://gitlab.e.foundation/e/tools/fastboot.js

).
This was the setup we had before and management wants to keep the fastboot
stack maintained separately.

The internal lib directory now only contains the ADB protocol code. The ADB
files have been updated to import shared types (error classes, logging) and
the WebUSB transport from @e/fastboot instead of the now-removed local copies.

What moved to @e/fastboot:
  - lib/transport/ (WebUsbTransport, USB filters, endpoint detection)
  - lib/fastboot/ (FastbootDevice, protocol framing, sparse image handling)
  - lib/types.ts (error classes, logging, shared type definitions)

What stays here:
  - lib/adb/ (ADB protocol, auth, sideload, streams)

The bootloader wrapper class now imports directly from @e/fastboot instead
of the internal barrel export.

Signed-off-by: default avatarJackeagle <jackeagle102@gmail.com>
parent e4c54552
Loading
Loading
Loading
Loading
+469 −307

File changed.

Preview size limit exceeded, changes collapsed.

+1 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@
    "vite": "^6.0.5"
  },
  "dependencies": {
    "@e/fastboot": "2.0.0",
    "@zip.js/zip.js": "^2.7.54",
    "hash-wasm": "^4.11.0",
    "ky": "^1.7.4"
+1 −1
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@ import {
  TimeoutError,
  setLogLevel,
  LogLevel,
} from "../../lib/index.ts";
} from "@e/fastboot";
import { Device } from "./device.class.js";
import { WDebug } from "../../debug.js";

+1 −1
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@
 * The entire struct is base64-encoded with a trailing " user@host\0".
 */

import { log, logError } from "../types.js";
import { log, logError } from "@e/fastboot";
import {
  ADB_CREDENTIAL_STORE_NAME,
  ADB_CREDENTIAL_DB_VERSION,
+4 −4
Original line number Diff line number Diff line
@@ -13,10 +13,10 @@ import {
  type SideloadProgressCallback,
  log,
  logError,
} from "../types.js";
import { WebUsbTransport } from "../transport/webusb.js";
import { ADB_USB_FILTER } from "../transport/types.js";
import { DEFAULT_TIMEOUT_MS } from "../transport/types.js";
  WebUsbTransport,
  ADB_USB_FILTER,
  DEFAULT_TIMEOUT_MS,
} from "@e/fastboot";
import {
  AdbCommand,
  ADB_VERSION,
Loading