• Stars
    star
    383
  • Rank 109,684 (Top 3 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created over 3 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

WebUSB implementation of the Android fastboot protocol

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.

More Repositories

1

safetynet-fix

Google SafetyNet attestation workarounds for Magisk
C++
6,032
star
2

android12-extensions

Enable and customize hidden features on Android 12.
Kotlin
429
star
3

proton-clang

Proton Clang toolchains builds in the form of a continuously updating Git repository. Clone with --depth=1.
C
290
star
4

android-webinstall

Easy-to-use web installer for Android-based operating systems
Vue
245
star
5

adevtool

Android ROM device support and bringup tool, designed for maximum automation and speed.
TypeScript
215
star
6

base16-kitty

Base16 color scheme template for kitty
Mustache
192
star
7

freqbench

Comprehensive CPU frequency performance/power benchmark
Python
160
star
8

pyrobud

A clean selfbot for Telegram with an emphasis on quality and practicality, designed to complement the official clients.
Python
126
star
9

cbackup

Fast & complete app + data backup script for Android
Shell
85
star
10

tipatch

A patcher for TWRP to backup internal storage/emulated SD card contents (photos, downloads, videos, etc).
Kotlin
70
star
11

touchpaint

An experimental Linux kernel module that demonstrates the lowest possible input latency on modern smartphones. Not for Android or production use.
C
63
star
12

colorkt

Modern color science library for Kotlin Multiplatform and Java
Kotlin
61
star
13

android_packages_apps_RepainterServicePriv

First-class custom ROM integration service for my Repainter app
Kotlin
58
star
14

linux-virtcontainer

Guest kernel for Nestbox (rootless VM containers on Android)
C
58
star
15

inter-font-pack

Magisk module that replaces Android's system fonts with Inter and other complementary fonts.
Shell
50
star
16

proton_kernel_redbull

Proton Kernel for the Pixel 5 (redfin) and Pixel 4a 5G (bramble), unified as redbull.
C
43
star
17

proton_zf6

Proton Kernel for the Asus Zenfone 6 (2019), codename Kirin and also known as I01WD and ZS630KL.
C
42
star
18

proton_bluecross

Proton Kernel for the Pixel 3 (blueline) and Pixel 3 XL (crosshatch) unified as bluecross. (discontinued)
C
36
star
19

proton_wsl2

Proton Kernel for the Windows Subsystem for Linux 2 (WSL 2). Highly experimental and always at the mercy of Windows Update.
C
26
star
20

base16-termux

Base16 for Termux
Mustache
26
star
21

aarch64-elf-gcc

GCC 9.2.0 + binutils 2.32 toolchain for x86_64 hosts, targeted for bare-metal (ELF / kernel-only) AArch64 systems.
C
25
star
22

proton_kernel_wahoo

Proton Kernel for the Pixel 2 (walleye) and Pixel 2 XL (taimen), unified as wahoo.
C
25
star
23

earlypilot

All-in-one server for monetizing software development with the early access supporter model
Kotlin
23
star
24

glcolortest

GLSL shader for testing color science and palette generation algorithms interactively
GLSL
23
star
25

kramflash

A fast & simple bootable GKI kernel flasher for boot image v2 and v3 devices.
Perl
20
star
26

benchkit

A developer-centric toolkit module for Android to facilitate in-depth profiling and benchmarking. MOVED to official Magisk module repo: https://github.com/Magisk-Modules-Repo/benchkit
Shell
19
star
27

ulog

Simple, fast, efficient logging facade for Android apps
Kotlin
17
star
28

mainline_kernel_easel

Mainline Linux kernel for the Pixel Visual Core image coprocessor (codename Easel/Monette Hill) found in the Pixel 2 and 3.
C
17
star
29

protonaosp.kdrag0n.dev

Website for @ProtonAOSP, a minimal Android fork focused on UI/UX and performance.
JavaScript
16
star
30

arm-eabi-gcc

GCC 9.2.0 + binutils 2.32 toolchain for x86_64 hosts, targeted for bare-metal (ELF / kernel-only) AArch32 systems.
C
15
star
31

touchpaint-android

Touchpaint Android app for latency testing, corollary to the Linux kernel module: https://github.com/kdrag0n/touchpaint
Kotlin
14
star
32

fxdsp

Fast and simple C++ DSP engine with high-quality effects. Originally built for PhantomAmp, an Android app for rootless system-wide audio effects.
C++
13
star
33

kdrag0n.dev

My personal website.
HTML
12
star
34

linux-m1

My experiments with Linux for the Apple M1 platform, based on Asahi and Corellium patches
C
11
star
35

app-utils

Select parts of my homegrown library for Android app development
Kotlin
10
star
36

drone-ssh-debug

A Drone plugin to enable remote build monitoring and debugging over SSH.
Shell
10
star
37

touchpaint-flutter

Touchpaint Flutter app for touch latency testing, corollary to the Android app: https://github.com/kdrag0n/touchpaint-android
Dart
9
star
38

velocity_tissot

Velocity Kernel for the Xiaomi Mi A1 (tissot). (discontinued)
C
9
star
39

eas_sdm660

An accurate, performant, and power-efficient EAS energy model for the Qualcomm Snapdragon 660 SoC (codename sdm660). THIS IS NOT A FULL EAS IMPLEMENTATION.
C
8
star
40

callbench

A program to measure the speed of simple time syscalls and vDSO calls, as well as basic in-memory file I/O using the mmap(2) and read(2) syscalls.
C
8
star
41

github-releases-proxy

GitHub Releases asset proxy for Cloudflare Workers
JavaScript
7
star
42

kbench

A Linux kernel microbenchmark suite.
Go
7
star
43

velocity_dream

Velocity Kernel for the Samsung Galaxy S8/S8+ (dreamlte/dream2lte). (discontinued)
C
7
star
44

blurtest

Test implementation of dual-filter Kawase blur in OpenGL ES 3.1, in the form of an Android app.
Kotlin
6
star
45

confirmationui-test

Simple app for testing Android Protected Confirmation (Confirmation UI)
Kotlin
6
star
46

serenade-calhacks23

TypeScript
6
star
47

aoc2021

My solutions for Advent of Code 2021
Python
5
star
48

DeviceSink

Android 11 device controls kitchen sink with all possible device types for testing.
Kotlin
5
star
49

caf4.14_kernel_wahoo

CAF 4.14 kernel for msm8998 wahoo
C
5
star
50

allocbench

Benchmark memory allocators realistically with techniques from Android, such as real-world trace replaying.
C++
5
star
51

msft-wsl2-kernel

An OLD and ABANDONED import of Microsoft's customized WSL2 Linux kernel with differentiated changes. Please use Microsoft's official up-to-date repository: https://github.com/microsoft/WSLv2-Linux-Kernel
C
5
star
52

aoc2020

My Advent of Code 2020 solutions in Rust and Python.
Python
4
star
53

passt-virtcontainer

C
4
star
54

caf_kernel_wahoo

CAF 4.4-based kernel for the Pixel 2 / XL (walleye/taimen), unified as wahoo. Note that this is a proof-of-concept which cannot fully boot Android due to encryption issues.
C
4
star
55

SwiftUI-AKList

Fast, stable, flexible SwiftUI wrapper for AppKit's NSOutlineView
Swift
3
star
56

speedscribble-htn2021

Hack the North 2021 team project: Draw against your friends in 1 minute!
JavaScript
3
star
57

stock_kernel_bluecross

A flashable stock kernel package for the Pixel 3 (blueline) and Pixel 3 XL (crosshatch) unified as bluecross/b1c1. Files extracted from Google factory images.
Shell
2
star
58

proprietary_vendor_asus

Proprietary vendor blobs for Asus devices, currently only the ZenFone 6 (I01WD).
Makefile
2
star
59

nanotap

A daemon that parses and dumps touch input events on Linux.
Go
2
star
60

structalgo

My implementations of various data structures and algorithms in C.
C
2
star
61

github-release-redirector

A simple Go web server that redirects a configured list of paths to the latest release asset on a GitHub repository.
Go
2
star
62

quicklock

Research project: Secure smart lock protocol with auditing and access control delegation.
Kotlin
2
star
63

archenemy

ArchEnemy Linux — a spin of Arch's official archiso live rescue disk with additional tools, tailored for my use.
Shell
2
star
64

hueflake-issues

Issue tracker for Hueflake
2
star
65

freebsd_easel

FreeBSD ported to the Pixel Visual Core (codename Easel/Monette Hill).
C
2
star
66

vardbg

A simple Python debugger and profiler, written for GCI 2019. Moved to CCExtractor.
Python
2
star
67

netbsd_easel

NetBSD ported to the Pixel Visual Core (codename Easel/Monette Hill).
2
star
68

aoc2022

Advent of Code 2022 solutions
Python
2
star
69

soca-treehacks24

JavaScript
2
star
70

gtcycles

A tool to measure the frequency of the generic timer on ARMv8 CPUs.
C
1
star
71

binderlat

A Go program to measure the latency of Binder IPC transactions on Android.
Go
1
star
72

slack-greeter

A simple Slack bot to greet new members of a workspace, written in Rust for GCI 2019.
Rust
1
star
73

platform_packages_modules_Connectivity

Java
1
star
74

pyrowall

Prototype Telegram bot with module and command discovery written in Go using gotgbot.
Go
1
star
75

biowave

A fast Discord bot prototype written in Go with module and command discovery.
Go
1
star
76

plushed

An Android plushie recognizer using Flutter and TensorFlow, made for GCI 2019.
Dart
1
star
77

flex-gestures

A failed attempt at a fluid iPhone X-like gestures app for Android that doesn't require root.
Kotlin
1
star
78

kdrag0n

Profile
1
star
79

gci-stats

A simple stats fetcher for Google Code-in that supports sending data to Graphite.
Python
1
star
80

android_device_asus_I01WD

Old Android 10 device tree for AOSiP on the Asus ZenFone 6.
C++
1
star
81

bluestone

A discontinued multi-purpose Discord bot written in Java, available for reference purposes.
Java
1
star
82

osrc_dream

Samsung OSRC updates for the Exynos Galaxy S8/+ (dreamlte/dream2lte) as Git commits.
C
1
star
83

HierarchialPerformanceTest.jl

Julia implementation of Non-parametric Hierarchial Performance Testing, a statistical technique for comparing the performance of different computers.
Julia
1
star