Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: kdrag0n/fastboot.js
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: GrapheneOS/fastboot.js
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 14 commits
  • 20 files changed
  • 5 contributors

Commits on Nov 1, 2022

  1. safely flash bootloader firmware to both slots

    Information from Daniel Micay <danielmicay@gmail.com>:
    
    SoC firmware anti-rollback protection is being actively used for 6th and
    7th generation Pixels. The code implementing this was deployed as part
    of Android 13 resulting in an initial rollback version increase.
    
    Consider the situation where a device shipped with v5 firmware and was
    upgraded to v7 by the user. It has v7 on the current slot and v5 on the
    alternate slot. It has been successfully booted with v7 firmware so the
    OS has incremented the rollback version to v7. If the user unlocks and
    unsuccessfully flashes new firmware or a new OS, the device rolls back
    to the other slot, bricking itself.
    
    The safest solution to this problem is flashing the unused slot with the
    new firmware, making it active, booting it and then repeating it. This
    makes sure that the new firmware is flashed to both slots and verifies
    that it boots up successfully before proceeding with flashing the OS.
    
    It makes sense to do this for ALL devices because all devices can deploy
    similar anti-rollback protection and this also improves overall safety
    of installation. Anti-rollback protection isn't the only reason that the
    inactive slot could have non-booting firmware. Something could have gone
    wrong previously so the user only has 1 booting firmware slot remaining.
    This new approach makes fastboot.js much safer than Google's approach to
    flashing.
    
    GrapheneOS has adopted this for both fastboot.js and also the CLI
    flashing script in the factory images zip since shortly after the
    release of Android 13. It's very well tested now and we've avoided the
    issues with bricked devices people are experiencing with flashing the
    stock OS.
    flawedworld authored and thestinger committed Nov 1, 2022
    Configuration menu
    Copy the full SHA
    f270be4 View commit details
    Browse the repository at this point in the history

Commits on Dec 15, 2022

  1. use Blob instead of ArrayBuffer for raw to sparse conversion

    Raw images can be quite large, and it might not be possible to convert
    the images in RAM, on low memory devices, as raw to sparse conversion
    can consume memory more than twice the size of the image being
    converted. This commit also reduces fastboot.js peak memory usage
    during flashing.
    octocorvus authored and thestinger committed Dec 15, 2022
    Configuration menu
    Copy the full SHA
    e7a9403 View commit details
    Browse the repository at this point in the history

Commits on Apr 22, 2023

  1. update dependencies

    Remove better-docs and jsdoc dependencies, which are used for building
    documentation. The documentation hasn't been updated by upstream and
    script to build it is broken anyway. I think it is better to just drop
    support for building documentation than maintain it downstream. This
    commit also fixes warnings shown by package manager when installing
    dependencies.
    
    Explicitly add dependencies required by @rollup/plugin-typescript, which
    were previously installed implicitly:
    - tslib 2.5.0
    - typescript 5.0.4
    
    update rollup to 3.20.5 and its plugins:
    - update @rollup/plugin-node-resolve to 15.0.2
    - update @rollup/plugin-typescript to 11.1.0
    - replace deprecated rollup-plugin-terser with @rollup/plugin-terser 0.4.1
    
    update other dependencies:
    - @types/w3c-web-usb to 1.0.6
    - eslint to 8.38.0
    - eslint-config-prettier to 8.8.0
    - prettier to 2.8.7
    
    Also, run 'yarn upgrade` to upgrade dependencies in yarn.lock to their
    latest versions, as per ranges specified in package.json.
    octocorvus authored and thestinger committed Apr 22, 2023
    Configuration menu
    Copy the full SHA
    b21126d View commit details
    Browse the repository at this point in the history
  2. update zip.js to 2.7.6

    Also add support for updating files in dist/vendor during build step.
    octocorvus authored and thestinger committed Apr 22, 2023
    Configuration menu
    Copy the full SHA
    2ca0b56 View commit details
    Browse the repository at this point in the history
  3. get Pako via package manager

    Also add support for updating Pako files in dist/vendor during build step.
    octocorvus authored and thestinger committed Apr 22, 2023
    Configuration menu
    Copy the full SHA
    5a4e929 View commit details
    Browse the repository at this point in the history
  4. fix: change error type thrown by waitForConnect to unknown

    This fixes "Argument of type 'unknown' is not assignable to parameter of
    type 'Error'" warning shown during compilation. The error type may not
    necessarily be of type Error, the caller should narrow the error down to
    specific types.
    octocorvus authored and thestinger committed Apr 22, 2023
    Configuration menu
    Copy the full SHA
    1991358 View commit details
    Browse the repository at this point in the history
  5. factory: directly extract images from nested images zip

    The nested images zip is uncompressed and can be read from directly.
    This results in reduced storage usage (as the nested images zip doesn't
    need to extracted into a blob first) and slightly faster flashing times
    on low end and mobile devices (as there is no "unpack images" step).
    octocorvus authored and thestinger committed Apr 22, 2023
    Configuration menu
    Copy the full SHA
    7665dd0 View commit details
    Browse the repository at this point in the history
  6. rebuild dist

    thestinger committed Apr 22, 2023
    Configuration menu
    Copy the full SHA
    066d736 View commit details
    Browse the repository at this point in the history

Commits on Jul 29, 2024

  1. Configuration menu
    Copy the full SHA
    7de86ba View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e2dd436 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    cf95cc0 View commit details
    Browse the repository at this point in the history
  4. support flashing optimized factory images

    See the corresponding fastboot commit for more info.
    muhomorr authored and thestinger committed Jul 29, 2024
    Configuration menu
    Copy the full SHA
    a9ca7a3 View commit details
    Browse the repository at this point in the history
  5. add missing await

    thestinger committed Jul 29, 2024
    Configuration menu
    Copy the full SHA
    f7069c8 View commit details
    Browse the repository at this point in the history

Commits on Aug 6, 2024

  1. factory-optimized: adjust FlashScript parser to changed entry paths

    Zip entries are now contained in an outer directory.
    muhomorr authored and thestinger committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    ffe7e27 View commit details
    Browse the repository at this point in the history
Loading