antix@Antix:~/Downloads/a21s$ sudo su
[sudo] password for antix: 
root@Antix:/home/antix/Downloads/a21s# ls
boot.img  lineage-22.2-20250520-nightly-a21s-signed.zip  super_empty.img
dtbo.img  recovery.img                                   vbmeta.img
root@Antix:/home/antix/Downloads/a21s# adb devices
* daemon not running; starting now at tcp:5037
* daemon started successfully
List of devices attached
R58R415DC0Y	unauthorized

root@Antix:/home/antix/Downloads/a21s# adb devices
List of devices attached
R58R415DC0Y	unauthorized

root@Antix:/home/antix/Downloads/a21s# adb devices
List of devices attached
R58R415DC0Y	device

root@Antix:/home/antix/Downloads/a21s# fastboot devices
root@Antix:/home/antix/Downloads/a21s# adb devices
List of devices attached
R58R415DC0Y	device

root@Antix:/home/antix/Downloads/a21s# fastboot devices
root@Antix:/home/antix/Downloads/a21s# sudo heimdall detect
Device detected
root@Antix:/home/antix/Downloads/a21s# sudo heimdall flash --BOOT boot.img --no-reboot
sudo heimdall flash --RECOVERY recovery.img --no-reboot
sudo heimdall flash --DTBO dtbo.img --no-reboot
sudo heimdall flash --VBMETA vbmeta.img --no-reboot
Heimdall v2.1.1

Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna https://glassechidna.com.au
Copyright (c) 2021-2024 Henrik Grimler
This software is provided free of charge. Copying and redistribution is encouraged.

Initialising connection...
Detecting device...
Claiming interface...
Initialising protocol...
Resetting device...
Protocol initialisation successful.

Beginning session...

Some devices may take up to 2 minutes to respond.
Please be patient!

Session begun.

Downloading device's PIT file...
PIT file download successful.

Uploading BOOT
100%
BOOT upload successful

Ending session...
ERROR: Failed to receive session end confirmation!
Releasing device interface...

Heimdall v2.1.1

Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna https://glassechidna.com.au
Copyright (c) 2021-2024 Henrik Grimler
This software is provided free of charge. Copying and redistribution is encouraged.

Initialising connection...
Detecting device...
Claiming interface...
Initialising protocol...
Resetting device...
sudo heimdall detectERROR: Failed to reset device!
ERROR: Failed to send handshake!
ERROR: Protocol initialisation failed!

Releasing device interface...

Heimdall v2.1.1

Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna https://glassechidna.com.au
Copyright (c) 2021-2024 Henrik Grimler
This software is provided free of charge. Copying and redistribution is encouraged.

Initialising connection...
Detecting device...
ERROR: Failed to detect compatible download-mode device.
Heimdall v2.1.1

Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna https://glassechidna.com.au
Copyright (c) 2021-2024 Henrik Grimler
This software is provided free of charge. Copying and redistribution is encouraged.

Initialising connection...
Detecting device...
ERROR: Failed to detect compatible download-mode device.
root@Antix:/home/antix/Downloads/a21s# sudo heimdall detect
Device detected
root@Antix:/home/antix/Downloads/a21s# 
root@Antix:/home/antix/Downloads/a21s# 
root@Antix:/home/antix/Downloads/a21s# sudo heimdall detect
Device detected
root@Antix:/home/antix/Downloads/a21s# sudo heimdall flash --BOOT boot.img --no-reboot
Heimdall v2.1.1

Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna https://glassechidna.com.au
Copyright (c) 2021-2024 Henrik Grimler
This software is provided free of charge. Copying and redistribution is encouraged.

Initialising connection...
Detecting device...
Claiming interface...
Initialising protocol...
Resetting device...
Protocol initialisation successful.

Beginning session...

Some devices may take up to 2 minutes to respond.
Please be patient!

Session begun.

Downloading device's PIT file...
PIT file download successful.

Uploading BOOT
100%
BOOT upload successful

Ending session...
ERROR: Failed to receive session end confirmation!
Releasing device interface...

root@Antix:/home/antix/Downloads/a21s# sudo heimdall flash --RECOVERY recovery.img --no-reboot
Heimdall v2.1.1

Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna https://glassechidna.com.au
Copyright (c) 2021-2024 Henrik Grimler
This software is provided free of charge. Copying and redistribution is encouraged.

Initialising connection...
Detecting device...
Claiming interface...
Initialising protocol...
Resetting device...
ERROR: Failed to reset device!
ERROR: Failed to send handshake!
ERROR: Protocol initialisation failed!

Releasing device interface...

root@Antix:/home/antix/Downloads/a21s# sudo heimdall flash --DTBO dtbo.img --no-reboot
Heimdall v2.1.1

Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna https://glassechidna.com.au
Copyright (c) 2021-2024 Henrik Grimler
This software is provided free of charge. Copying and redistribution is encouraged.

Initialising connection...
Detecting device...
ERROR: Failed to detect compatible download-mode device.
root@Antix:/home/antix/Downloads/a21s# sudo heimdall flash --VBMETA vbmeta.img --no-reboot
Heimdall v2.1.1

Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna https://glassechidna.com.au
Copyright (c) 2021-2024 Henrik Grimler
This software is provided free of charge. Copying and redistribution is encouraged.

Initialising connection...
Detecting device...
ERROR: Failed to detect compatible download-mode device.
root@Antix:/home/antix/Downloads/a21s# sudo heimdall reset
Usage: heimdall <action> <action arguments>

Action: close-pc-screen
Arguments: [--verbose] [--no-reboot] [--resume] [--stdout-errors]
           [--usb-log-level <none/error/warning/debug>]
Description: Attempts to get rid off the "connect phone to PC" screen.
Note: --no-reboot causes the device to remain in download mode after the action
      is completed. If you wish to perform another action whilst remaining in
      download mode, then the following action must specify the --resume flag.

Action: detect
Arguments: [--wait] [--verbose] [--stdout-errors]
           [--usb-log-level <none/error/warning/debug>]
Description: Indicates whether or not a download mode device can be detected.
             Returns instantly per default, or waits until device is found
             when --wait argument is used.

Action: download-pit
Arguments: --output <filename> [--verbose] [--no-reboot] [--stdout-errors]
    [--wait] [--usb-log-level <none/error/warning/debug>]
Description: Downloads the connected device's PIT file to the specified
    output file. If --wait is used Heimdall waits until a compatible device is
    connected.
Note: --no-reboot causes the device to remain in download mode after the action
      is completed. If you wish to perform another action whilst remaining in
      download mode, then the following action must specify the --resume flag.

Action: flash
Arguments:
    [--<partition name> <filename> ...]
    [--<partition identifier> <filename> ...]
    [--pit <filename>] [--verbose] [--no-reboot] [--resume] [--stdout-errors]
    [--usb-log-level <none/error/warning/debug>] [--skip-size-check] [--wait]
  or:
    --repartition --pit <filename> [--<partition name> <filename> ...]
    [--<partition identifier> <filename> ...] [--verbose] [--no-reboot]
    [--resume] [--stdout-errors] [--usb-log-level <none/error/warning/debug>]
    [--tflash] [--skip-size-check] [--wait]
Description: Flashes one or more firmware files to your phone. Partition names
    (or identifiers) can be obtained by executing the print-pit action.
    With --wait Heimdall waits until a compatible device is connected.
    T-Flash mode allows to flash the inserted SD-card instead of the internal MMC.
    Use --skip-size-check to not verify that files fit in the specified partition.
Note: --no-reboot causes the device to remain in download mode after the action
      is completed. If you wish to perform another action whilst remaining in
      download mode, then the following action must specify the --resume flag.
WARNING: If you're repartitioning it's strongly recommended you specify
        all files at your disposal.

Action: help
Description: Displays this dialogue.

Action: info
Description: Displays information about Heimdall.

Action: print-pit
Arguments: [--file <filename>] [--verbose] [--no-reboot] [--stdout-errors]
    [--usb-log-level <none/error/warning/debug>] [--wait]
Description: Prints the contents of a PIT file in a human readable format. If
    a filename is not provided then Heimdall retrieves the PIT file from the 
    connected device. If --wait is used then Heimdall waits until a compatible
    device is connected.
Note: --no-reboot causes the device to remain in download mode after the action
      is completed. If you wish to perform another action whilst remaining in
      download mode, then the following action must specify the --resume flag.

Action: version
Description: Displays the version number of this binary.
root@Antix:/home/antix/Downloads/a21s#