ADB and Fastboot are part of the Android SDK package. You can download the official release from the https://developer.android.com/ website, by selecting Android Studio - RELEASE NOTES - SDK platform tools: Download SDK Platform Tools
Extract the contents of this ZIP file into an easily accessible folder).
Open Windows explorer and browse to where you extracted the contents of this ZIP file.
Open up a Command Prompt from the same directory as this ADB binary (hold Shift and Right-clicking within the folder then click the "open command prompt here" option, on Windows 10 users may see "PowerShell" instead of "Command Prompt").
Connect your phone to your PC with a USB cable.
Dial the debug code *#*#33284#*#* or use a different way to enable ADB (take a look to the KaiOS devices).
In the Command Prompt window, enter the following command to launch the ADB daemon: adb devices
If everything was successful, you should now see your device's serial number in the command prompt.
NOTE: from the Command Prompt you can normally use
adb, as in all the guides on this site. If you use PowerShell you must specify the path using./. For example theadb devicescommand of the Command Prompt becomes./adb devicesin PowerShell.
(sources for Windows and macOS on XDA-developers.com)

ADB and Fastboot are part of the Android SDK package. Download the
official release for your platform from the developer.android.com website, by selecting Android Studio - RELEASE NOTES - SDK platform tools: Download SDK Platform Tools
Open the Terminal.
To browse to the folder you extracted ADB into, enter the following command: cd /path/to/extracted/folder/ or just drag and drop the folder on the terminal.
Connect your phone to your Mac/PC with a USB cable. On Mac, change the USB connection mode to "file transfer (MTP)" mode.
Dial the debug code *#*#33284#*#* or use a different way to enable ADB (take a look to the KaiOS devices).
Once the Terminal is in the same folder your ADB tools are in, you can execute the following command to launch the ADB daemon: adb devices.
If everything was successful, you should now see your device's serial number in the Terminal.
sudo apt install adb fastboot
sudo dnf install android-tools
sudo pacman -S android-tools or just sudo pacman -S adb
sudo emerge --ask dev-util/android-tools
Since the USB drivers for these peripherals are in many cases not
recognized on Linux, we can rely on this manual configuration (from here):
wget -S -O - https://raw.githubusercontent.com/cm-b2g/B2G/1230463/tools/51-android.rules |
sudo tee >/dev/null /etc/udev/rules.d/51-android.rules;
sudo udevadm control --reload-rules
lsusb to get the Vendor ID, from the terminal, in my case on Qualcomm (Nokia 8110 4G) the output is:Bus 001 Device 007: ID 05c6:f003 Qualcomm, Inc. Nokia 8110 4G
so my vendor ID is 05c6.
/etc/udev/rules.d/51-android.rules file, if the line for your ID vendor is not available, just add it as this:#Qualcomm*
SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", MODE="0664", GROUP="plugdev"
Obviously for Spreadtrum and Mediatek the value from the lsusb output will be different.
sudo chmod a+r /etc/udev/rules.d/51-android.rules
/.android/adb_usb.ini in your HOME directory (not as root) ant put the value of vendor ID on this file using hex format. In my example the value is 0x05c6, where 05c6 is the vendor ID that we got before, for Nokia 8110 4G. Here are some screenshots of what it must look like:


adb devices on the terminal to list all devices connected on your PC. Your device should be listed and is ready to receive Gaia apps or use it on WebIDE.Source: https://developer.kaiostech.com/getting-started/env-setup/os-env-setup
Source: (https://www.gizmoadvices.com/fastboot-adb-commands/ Enriched by Ivan.
-a (listens on all network interfaces, not just localhost)-d (uses USB device, error if multiple devices connected)-e (uses TCP/IP device, error if multiple TCP/IP devices available)-s SERIAL (uses device with given serial, overrides $ANDROID_SERIAL)-t ID (uses device with given transport id)-H (name of adb server host, default=localhost)-P (port of adb server)-L SOCKET (listens on the given socket for adb server)Note that [param] means the parameter or option is optional and not required. <param> means it is required and must be present.
adb help
This command prints a list of all the available adb commands.
Usage: adb help
adb version
This command shows the version of adb installed on your machine.
Usage: adb version
adb devices
This command prints a list of all attached devices. In response, it returns the serial number and state of the device.
Usage: adb devices
Example output: 210048b device
adb reboot
This command reboots the device (defaults to booting the system image, but supports also bootloader|fastboot|recovery|sideload|sideload-auto-reboot.)
Usage: adb reboot [options]
Example usage which boots to recovery: adb reboot recovery
adb forward
This command forwards the socket connections. It required USB Debugging enabled.
Usage: adb forward <local> <remote>
Example usage: adb forward tcp:6000 localfilesystem:/data/local/debugger-socket
In this example adb forwards the UN*X socket in /data/local/debugger-socket to TCP port 6000 on localhost or whereever ADB is listening.
adb kill-server
It terminates the adb server process. Sometimes you might want to terminate the adb server and restart it to resolve the problems.
Usage: adb kill-server
adb connect
This command allows using adb over Wi-Fi. This requires the host and the device connected to the same Wi-Fi network.
Usage: adb connect <host>[:<port>]
Not very useful in KaiOS. To use ADB over Wi-Fi, firstly connect the device to PC and set tcp ip port to 5555 using adb tcpip 5555 command. You should find your IP by connecting the browser of your phone on a website like this (on Android you can get this info from Settings). Now you can use adb connect command to use ADB over Wi-Fi.
Example usage: adb connect 192.168.1.100:6542
adb usb
Restarts ADB in USB mode.
Usage: adb usb
adb install
Pushes an Android application (.apk) from host to an emulator or the device (not useful on KaiOS).
Usage: adb install [options] <path/to/file.apk>
Example usage: adb install minetest.apk
adb uninstall
Uninstalls or removes the package (.apk) from the emulator or Android device (not useful on KaiOS).
Usage: adb uninstall [options] <Package>
Example usage: adb uninstall net.minetest.minetest
adb shell pm list packages
Prints all packages installed on the device/emulator (not useful on KaiOS).
Usage: adb shell pm list packages [options] [FILTER]
Example usage: adb shell pm list packages
adb shell
This command opens the shell. All the commands in whose examples contain the word "shell" can be used individually only after running this command.
Usage: adb shell [Command to run if any]
Examples for usage: adb shell adb shell ls /data/local/webapps/
To exit from shell just type exit and press ENTER.
adb shell start
This command can be used to start a daemon or a script.
adb shell stop
This command can be used to stop a service.
adb shell pm path
Prints the path to the APK of the given package (not useful on KaiOS).
adb shell pm clear
This command deletes all the data associated with the package (clears app data and cache - not useful on KaiOS).
adb pull
Downloads or pulls a specified file from an emulator/device to your computer (host).
adb push
This command is used to upload or push or copy a file from the host (computer) to an emulator or the device.
adb shell ls
Lists directory contents.
adb shell cd
Change the directory or folder.
adb shell rm
adb shell mkdir
adb shell touch
adb shell pwd
adb shell cp
adb shell mv
adb shell netstat
adb shell ping
adb shell net cfg
adb shell ip
adb logcat
adb shell dumpsys
adb shell dumpstate
adb shell screencap
adb shell screenrecord
adb root
adb sideload
adb shell ps
adb shell top
adb shell getprop
adb shell setprop
BusyBox combines tiny versions of many common UNIX utilities into a
single small executable. It provides minimalist replacements for most of
the utilities you usually find in GNU coreutils, util-linux, etc. The
utilities in BusyBox generally have fewer options than their
full-featured GNU cousins; however, the options that are included
provide the expected functionality and behave very much like their GNU
counterparts.
Learn more on the official website of the project,
busybox.net
HOME - busybox
COMMANDS - busybox
DOWNLOADS - busybox
Global options
[-w Erase userdata and cache (and format if supported by partition
type).]{.small} [-u Do not erase partition before
formatting.]{.small} [-s Specify a device. For USB, provide either a
serial number or path to device port. For ethernet, provide an address
in the form :[:port] where is either tcp or udp.]{.small} [-c
Override kernel commandline.]{.small} [-i Specify a custom USB vendor
id.]{.small} [-b, --base Specify a custom kernel base address
(default: 0x10000000).]{.small} [--kernel-offset Specify a custom
kernel offset (default: 0x00008000).]{.small} [--ramdisk-offset
Specify a custom ramdisk offset (default: 0x01000000).]{.small}
[--tags-offset Specify a custom tags offset (default:
0x00000100).]{.small} [-n, --page-size Specify the nand page size
(default: 2048).]{.small} [-S [K|M|G] Automatically sparse files
greater than 'size'. 0 to disable.]{.small} [--slot Specify slot
name to be used if the device supports slots. All operations on
partitions that support slots will be done on the slot specified:
'all' can be given to refer to all slots, 'other' can be given to
refer to a non-current slot. If this flag is not used, slotted
partitions will default to the current active slot.]{.small} [-a,
--set-active[=] Sets the active slot. If no slot is provided, this
will default to the value given by --slot. If slots are not supported,
this does nothing. This will run after all non-reboot
commands.]{.small} [--skip-secondary Will not flash secondary slots
when performing a flashall or update. This will preserve data on other
slots.]{.small} [--skip-reboot Will not reboot the device when
performing commands that normally trigger a reboot.]{.small}
[--disable-verity Set the disable-verity flag in the the vbmeta image
being flashed.]{.small} [--disable-verification Set the
disable-verification flag in the vbmeta image being flashed.]{.small}
[--wipe-and-use-fbe On devices which support it, erase userdata and
cache, and enable file-based encryption.]{.small} [--unbuffered Do
not buffer input or output.]{.small} [--version Display
version.]{.small} [*-h, --help show this message.]
[This command is similar to
*adb
devices it prints a list of all attached devices in fastboot mode. In
response, it returns the serial number of the device.]{.small} [
Syntax: fastboot devices ]
[*Reboots the device to normal or standard mode. Used to exit the
fastboot mode or boot loader mode.]{.small} [ Syntax: fastboot
reboot ]
[*This commands boots the device into Recovery Mode.]{.small} [
Syntax: fastboot reboot recovery ]
[*Unlocks bootloader on the device.]{.small} [ Syntax: fastboot
oem unlock ]
[*Used to relock the bootloader on the device.]{.small} [ Syntax:
fastboot oem lock ]
[*Prints bootloader lock/unlock status.]{.small} [ Syntax:
fastboot oem device-info ]
[*Flashes recovery image to the device.]{.small} [ Syntax:
fastboot flash recovery ]{.small} [ Example: fastboot flash
recovery twrp.img ]
[*Used to boot the image file without installing or flashing on the
device. Can be used to boot recovery image without flashing on the
device.]{.small} [ Syntax: fastboot boot ]{.small} [
Example: fastboot boot recovery.img ]
[*Flashes flashable zip file from fastboot or bootloader mode.]{.small}
[ Syntax: fastboot flash ]{.small} [ Example: fastboot
flash update.zip ]
[*Displays CID (Carrier ID) of the device.]{.small} [ Syntax:
fastboot getvar cid ]