# Fairphone 5 flashing scripts

## Requirements

- A USB-C cable plugged into your computer
- The phone needs to be booted into the bootloader.  
  To do so:
  1. Power the phone down
  2. Press and hold the _volume down_ button
  3. Plug the USB-C cable into the phone
  4. The phone will boot, and it will reach the bootloader.
  5. You can now run the script built for your OS. See below.

## How to run

### macOS

`flash_fp5_factory.command` can be used from the command line, or via Finder.
If using Finder, right click and open. Grant permissions when asked.

### Linux

`flash_fp5_factory.sh` is a symlink pointing to `flash_fp5_factory.command`.
Both can be launched from the command line.
A local installation of fastboot is required.

### Windows

`flash_fp5_factory.bat` starts a [git-bash](https://git-scm.com/download/win) environment,
then runs `flash_fp5_factory.command` within it.
To run it, double click on the file.

## Regarding the "images" folder

It should store the following:

- all the image files that are required to flash the device
- the SHA digest files, possibly both MD5 and SHA256
