2023年6月27日发(作者:)
Android通过adb快速恢复出⼚设置⼀⼀条命令:adb reboot bootloader && fastboot erase userdata && fastboot erase cache && fastboot rebootadb reboot bootloadercheck if device availablefastboot devicesremove user datafastboot erase userdataremove cachefastboot erase cachereboot devicefastboot reboot⼆adb reboot recovery擦除data数据重启⼿机Fastboot is a powerful tool bundled with Google Android SDK and also an engineering protocol that helps to write data directly to yourphone’s flash memory. Since it directly writes to the phone’s flash memory, It can start on your device even before Android OS loads, evenunder the scenario when Android isn’t installed at phone needs to be booted into “Bootloader mode” to use the Fastboot commands. It enables access on all your device , one can patch those partitions by flashing firmware, recoveries, bootloader ot is most commonly used for unlocking the bootloader or to establish communication with hardware when the software has failed orbricked. If you are familiar with rooting and modding your android phone, you must have heard a lot about ADB and fastboot. If you are newto this scene, we’d recommend checking our beginners guide to Contents [show]Popular Fastboot CommandsWhen you’re working on the bootloader mode, ADB commands will no longer work, as the device is not booted into Android OS. Hence,the Android debugging tools can’t communicate to the phone. As mentioned above, the Fastboot commands would work even if the OSisn’t booted, provided your device is booted into Bootloader/Fastboot mode. These are probably the most useful tools available which willcome to rescue when you brick your device or when you want to replace your device execute the below mentioned commands, you’ll also need to have Fastboot installed on your computer system, You can follow ourguide to install ADB and Fastboot for the installation. Now that you have Fastboot working on your system, you can check the belowcommands. To make it easier, we’ve added a short description, syntax and an you begin executing the commands:ADB and Fastboot installed on your systemBoot your device into fastboot mode/bootloader mode. (This method requires ADB, However, you can also check our guide which has keycombinations to boot your device into fastboot mode.)Enable USB Debugging, to do so, You’ll need to enable Android developer options:Go to Settings > About > Build Number and Tap for 7 ’ll see a message “You’re a developer now.”Come back to Settings > Developer Options > USB debugging and enable ot devices commandType Fastboot devices in the command prompt and result should be a serial number, similar to the adb devices command. If entering thiscommand shows your device name with a serial number, it implies that your phone is good to go for fastboot operations. However, if theresult is empty then you might want to check the fastboot installation and :fastboot devicesFastboot OEM unlock commandThe Fastboot OEM unlock command is the most popular command, it is your key to unlock the bootloader of your device. Although thiscommand works with most of the devices, it won’t work for some brands. If your OEM enables fastboot mode, then you will be able tounlock your phone with this such as Google Pixel, Google Nexus, OnePlus, HTC, Motorola, and etc. usually support bootloader unlock with this command. Ifyou own a different device, you’d have to follow separate guides to do the trick. Also, unlocking the bootloader voids the warranty for somebrands, so only unlock if you are willing to risk your :fastboot oem unlockPS: Running the unlock command in the command prompt will wipe your entire data on the phone. So please proceed carefully. We won’tbe held responsible for your data loss!Fastboot OEM lock commandThe Fastboot OEM unlock command is opposite of the OEM unlock command. Using this command, you can lock your bootloader and goback to the stock factory for information: This command could help you with your warranty even after you’ve unlocked it. Because in most parts of the world, therepresentatives at service centers think that a locked bootloader means the device wasn’t unlocked. Although there are ways to find out if adevice was previously unlocked, most of the service centers don’t get that far. But if they find out, don’t blame us!Syntax:fastboot oem lockFastboot Flash commandThe Fastboot flash command would help you to flash ZIP files. Companies like OnePlus, release the flashable ZIP file of the upcomingfirmware for their testers. So, one can simply download the ZIP file, place it in the folder on their PC, open Command window from thatfolder and flash the zip. Normally, fastboot images are flashed in this : It is always recommended to place the zip files in the same folder of your ADB binaries so that you do not need to specify the path oryou can alternatively open the command window from that particular :fastboot flash %%Example:fastboot flash tboot Flash Recovery commandThe Fastboot flash recovery is a powerful fastboot command which is used to flash recovery images. This will patch your recovery partitionwith a new image. When we install a custom recovery such as TWRP on our device, this is the command we use. This would replace thestock recovery with the custom :fastboot flash recovery %%Example:fastboot flash recovery tboot Flash Boot commandThe boot image contains the kernel of your device. You can use the Fastboot Flash boot command to replace the stock kernel with acustom kernel of your choice. This command would replace the boot partition of your device. It might look simple, but could be risky if youflash a wrong boot image. There are chances that your device might not boot or might get stuck in a Bootloop. The only way to recover ifyou mess up with this would be flashing the stock boot :fastboot flash boot %%Example:fastboot flash boot tboot Erase commandAs the name says, this command would erase items from your device. By using the Fastboot erase command you’ll be able to wipe datafrom different partitions on your device. This command is generally used before flashing a new ROM, as it wipes the existing data andmakes space for the new files to be written. This command deletes all your data from the partitions you’ve mentioned in the command, soit’s always a good idea to take a backup before you run :fastboot erase %PARTITION NAME%Example:To erase system partitionfastboot erase systemTo erase boot partitionfastboot erase bootTo erase cache partitionfastboot erase cacheTo erase user data partitionfastboot erase userdataTo erase recovery partitionfastboot erase recoveryFastboot Format commandIf you want to completely format the flash partitions of your device, you can use Fastboot format command. This will allocate new blocks ofdata to your device partition and that makes it different from fastboot erase command. A full backup of device data is always recommendedas it can wipe your entire :fastboot format %PARTITION NAME%Example:To format system partitionfastboot format systemTo format boot partitionfastboot format bootTo format cache partitionfastboot format cacheTo format user data partitionfastboot format userdataTo format recovery partitionfastboot format recoveryFastboot Reboot/reboot-bootloader commandsThe Fastboot reboot command will help you to boot your device normally to OS. On entering the reboot command you’ll be booting thesystem partition of your device. Whereas the reboot-bootloader command will take you back to bootloader mode followed by a :To reboot your devicefastboot rebootTo reboot your device to fastboot modefastboot reboot-bootloader
发布者:admin,转转请注明出处:http://www.yc00.com/web/1687841319a49932.html
评论列表(0条)