Socket
Socket
Sign inDemoInstall

android-fastboot

Package Overview
Dependencies
1
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    android-fastboot

JavaScript implementation of fastboot, using WebUSB


Version published
Weekly downloads
5
decreased by-80%
Maintainers
1
Install size
5.73 MB
Created
Weekly downloads
 

Readme

Source

fastboot.js

fastboot.js is an implementation of the Android fastboot protocol in JavaScript. It runs in web browsers by using the WebUSB API, which is currently supported by Chrome.

If you're looking for a ready-to-use installer for custom ROMs, see android-webinstall.

Why?

Many users, particularly those with less technical experience, have trouble flashing custom operating systems on Android devices. This is not necessarily their fault; there are many steps in the process that can go wrong. Broken or outdated Android platform tools, missed commands or steps, and many other factors can cause problems during flashing.

WebUSB makes it possible to move most of the complexity into the browser, where the environment is much more controlled and most of the steps can be automated. This makes it easier for users to flash ROMs onto their devices and is more likely to result in success.

Google's Android Flash Tool for AOSP CI images and Pixel factory images is already taking advantage of this, but unfortunately, it is proprietary and closed-source. Furthermore, it only supports flashing the aforementioned images from Google, so flashing custom ROMs with it is not possible. This is where fastboot.js comes in: it is an open-source library that can be used to create web installers for flashing anything.

Features

The following fastboot features are supported:

  • Running commands (erase, lock, unlock, getvar, reboot, etc.)
  • Flashing raw, bootloader, sparse, and custom AVB key images
  • Flashing AOSP factory image zips (update.zip), including firmware, logical partitions, and verified boot keys
  • Flashing images larger than the bootloader's maximum download size (by splitting sparse images)
  • Flashing logical partitions

Detailed progress callbacks are also provided for many flashing steps.

Installation

This library is available as a package on npm, so you can easily add it to your project:

# Using npm
npm install --save android-fastboot

# Using yarn
yarn add android-fastboot

Examples

A basic demo of fastboot.js can be found here. The source code is included in this repository.

There is also a user-friendly ROM installer available, with a live ProtonAOSP instance that can be used to flash devices officially supported by ProtonAOSP.

Documentation

Documentation generated from JSDoc comments can be found here.

FAQs

Last updated on 19 Jan 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc