All Fastboot commands that you must appreciate. You must have understood that those commands shouldn’t be practised without possessing the knowledge everything it behaves, but that is not the predicament. You can examine all these commands.
Why you need Fastboot commands? Because this gives you a power to moderate your mobile’s OS, you can add data which you want, to your system. If you are getting bored with the factory setting and apps then you can use Fastboot.
Are you intimate rooting and modding your android smartphone? If Yes, you must have discovered a bundle of things concerning Magisk Modules, ADB , Miracle Box, CF Auto Root, and fastboot. Fastboot can format your system and reload with the desired one.
We are going into deep to learn you more for requirement and experiment on your device. Rooting and Custom ROM can void your warranty and system too. So you need to take special care for this. Gossipfunda will not be responsible for any loss. But never stop experimenting because it generates the power to change the world.
First we understand about What is fastboot and how it works, after that we see the difference between the bootloader and fastboot. For more and fast learning go through the table of content.
What are Fastboot commands?
Fastboot commands are a potent tool with inbuilt design protocol consists of Google Android SDK Packets, which accommodates to read/write data right to your device flash memory. In simple words, it gives you authority to change the property of your phone. Fastboot wipe your previous unsed code with the new one. On the other hand, it instantly communicates to the electronic solid-state non-volatile memory storage medium (flash memory), boot on your machine before initiating Android OS, also under the situation when AndroidOS not installed or present.
Fastboot is usually applied for building a connection with hardware if your operating system has crashed or bricked. It also used for unlocking the bootloader.
The mobile requires to be booted into “Bootloader” to apply the Fastboot commands. It authorizes access to the system partitions. Therefore, you can patch the partitions by flashing firmware, Rooting custom ROMs, recovery mode, bootloader many more.
What is the difference between bootloader and fastboot?
Booting happens immediately after you power-on the computer. Bootloader runs a piece of code called BIOS on the system which does an initial checks to all the connected input and output devices. This contains the instruction set of an operating system and program control loads the operating system on the machine. Fastboot is kind of protocol, used to update the flash partitions on the Android device. It is a tool under Android Software Development Kit modifies the flash of an Android device when connected to the PC via USB connection. This is used to backup the apps and data. It helps to reflash, erase format, boot and reboot the ROM. These are invoked by command line codes. Hence fastboot is considered as command tool.
Android Software Development Kit:
Android software development kit consists of a debugger, libraries and an emulator which allows in development of latest Android applications. Basically, it contains a set of tools which involves in the development purpose. These tools are updated accordingly with an update in Android platform. These are the command line tools to create, build and debug both on emulator and the devices attached. Android applications are written in languages like Java and C++ and have an extension in .apk format. Computers operating on Linux, MAC OS X10.5.8, Windows 7 and higher versions will support this development kit.
Android Debug Bridge (adb):
It is a diagnostic tool which finds and fixes the issues in OS (ROM). This named as another command tool. It contains three components:
Don’t Miss: ADB Sideload, ADB Push & ADB Pull
Client sends adb commands. These adb commands are invoked from a command line terminal.
This runs commands in a background process on a device.
This establishes a connection of communication between client and daemon. This is a background process which runs on a machine.
How does ADB works:
Android debug bridge client, always checks for the running server process. If there is no server process, it will initiate the server process. The server binds to the TCP port 5037 and reads the adb client commands. All adb clients use TCP port 5037 to establish communication with running devices. Once the server sets up the connection, adb commands will start debugging on the connected devices.
Installation of adb:
- Go for ADB install apk.
- Open Google and type SDK platform tools.
- Click on SDK platform release notes under developers.android.com.
- Under features overview, click on SDK platform tools.
- It will open a page, which will show you downloads onto various OS platforms. Click on Download SDK platform – Tools Windows.
- This directs to the page for downloading the tools. After agreeing to the terms and conditions click on DOWNLOAD SDK ANDROID PLATFORM – TOOLS FOR WINDOWS.
- Now a folder name platform tools.zip gets downloaded. Extract the entire folder onto the c-drive and delete from downloads.
- This consists of both adb and fastboot exe.
- Copy the path of platform tools and right click on the desktop for properties.
- Then click on Advanced system settings.
- Go to Environment variables and go to System variables. Now double click on Path and copy the path of platform tools in new. Thiswillallow the terminal to run directly from the path.
How to install USB Drivers:
- Open Google and click on Google USB Drivers.
- Click on USB Drivers under developers.android.com.
- Download USB Driver zip file.
- Extract the zip file into platform tools folder which is in the c-drive.
Now open a command prompt and enter adb, it will display adb commands. If you click fast boot, it will display fast boot commands.
Developer options on mobile:
- Device is connected to the system via USB. To enable debugging, we need to activate Developer options in mobile. Follow below steps for USB debugging:
- From Android version 4.2 and above, the Developer options is hidden by default. To make it visible, go to Settings, click on About phone. Where you can find Build number option. Tap Build number 7 times.
- After tapping, if you return back to the previous screen, you will find Developer options.
The above installations will help to set up the communication between client and daemon.
Now we go through the list of fast boot commands:
The update command:
Command line code: fastboot update xyz.zip
It helps in reflashing the device from zip file.
The flash shell command:
Command code line: fastboot flashall xyz.zip
This command flashes the whole device including recovery, system and boot.
The flash partition command:
Command line code: fastboot flash recovery.img
This is a powerful command to flash single partition. It is a partition specified flash. Example, if cache is corrupted, we can flash only on cache.
The erase command:
Command line code: fastboot erase partition
It will delete only a particular partition.
Partitions are divided into:
- User data
The format command:
Command line code: fastboot format partition
This will format a particular partition. Example: fastboot format system.
The getvar command:
Command line code: fastboot getvar all
Getvar command displays all the variables of bootloader.
The Fastboot command:
Command line code: fastboot boot partition
This command tests the custom developed kernel codes. Without actual flashing, we can boot into different files.
Listing all devices command:
Command line code: fastboot devices
This identifies all the devices attached to the system.
Command line code: fastboot reboot
This command reboots the device.
The above listed fastboot commands are available on every device. But there are a few commands which are OEM specific. These are also called as hidden fastboot commands. Because they are OEM specific and differ from one brand of mobile to another. These OEM specific commands can be obtained by using a string search like strings * | findstr /i oem. Below are the details of hidden commands:
The unlock OEM command:
Command line code: fastboot unlock OEM
Different brands of mobiles vary in number of steps while unlocking the OEM. It will install custom ROMS.
Re-locking the bootloader
For newer phones (2015 to 2020):
fastboot flashing lock
For old Phones
fastboot oem lock
Few more hidden commands list:
fastboot oem writecid fastboot oem writeimei fastboot oem get_identifier_token fastboot flash unlocktoken unlock_code.bin fastboot oem unlock-go fastboot oem unlock fastboot oem lock fastboot oem device-info preflash fastboot oem enable-charger-screen fastboot oem disable-charger-screen fastboot oem off-mode-charge fastboot oem select-display-panel fastboot oem boot log fastboot oem getvar fastboot oem mmcinfo fastboot oem info fastboot oem secure wipe
Refer for more useful commands : go here
Hope these command list will help the developers and users to understand how important the fastboot and ADB commands in debugging purposes.
Sharing is Caring