2024年8月28日发(作者:袭乐蓉)
Helpful Tip
On some GNU/Linux distributions,like Debian Sid,you can install fastboot just with this command:
sudo apt-get install android-tools-fastboot
Or on Fedora,you can install android-tools package(which contains fastboot)with this command:
sudo yum install android-tools
Troubleshooting fastboot
"Command not found"errors
If the adb or fastboot binary file is installed on your computer, but you see a"command not found"type of error when entering
your command into the terminal,the problem may be that the /platform-tools directory(or whichever directory contains the
binary)is not in the"path of execution"for your terminal means that your computer doesn't know where exactly
the binary is located.
The solution to this is to add the directory containing the binary to your PATH.
Linux/OS X
On most Linux/OS X systems using the Bourne Again Shell(bash), you can do the following:
1Edit the"hidden"(starting with a period)file~/.bashrc --If your version of Linux supports the gedit editor,simply type
gedit~/.bashrc
2Next,add this line to the bottom:export PATH=${PATH}:/tools:/platform-tools(Change
to the actual path to the SDK's/platform-tools example:export PATH=${PATH}:/home/user/android-sdk-
linux/platform-tools /)
3Save the open a new adb command should now be available.
Windows
On Windows systems you can do the following:
4Righ-click on My Computer and select Properties.
5Choose Advanced,and click on the Environment Variables button.
6Navigate to System Variables and double click on Path to edit.
7Enter the full path to your tools folder.
errors
If you seeat any point when executing fastboot command,the PC is not configured to use fastboot typically,this
is because you are not running fastboot with elevated privileges.
Linux/OSX
Run fastboot as root or with sudo.
Windows
Run fastboot as an Administrator.
Make sure the output of fastboot devices returns your device serial number or you will never get past this error message.
Installing recovery using fastboot
You can use fastboot to install your recovery image to the device.
Installing ClockworkMod Recovery on the device
8Connect the device to the computer via USB.
9Make sure the fastboot binary is in your PATH or that you place the downloaded image in the same directory as fastboot.
10Open a terminal on your PC and reboot the device into fastboot mode by typing adb reboot bootloader or by using the
hardware key combination.
Once the device is in fastboot mode,verify your PC sees the device by typing fastboot devices
§If you don't see your device serial number,and
instead see"",fastboot is not
configured properly on your fastboot
documentation for more info.
11Flash ClockworkMod Recovery onto your device by entering the following command:fastboot flash recovery
your_recovery_ where the latter part is the name of the file you downloaded.
12Once the flash completes successfully,reboot the device into recovery to verify the installation.
§Note:Some ROMs overwrite recovery at boot time so if you do not plan to immediately boot into recovery to install
CyanogenMod,please be aware that this may overwrite your custom recovery with the stock one.
2024年8月28日发(作者:袭乐蓉)
Helpful Tip
On some GNU/Linux distributions,like Debian Sid,you can install fastboot just with this command:
sudo apt-get install android-tools-fastboot
Or on Fedora,you can install android-tools package(which contains fastboot)with this command:
sudo yum install android-tools
Troubleshooting fastboot
"Command not found"errors
If the adb or fastboot binary file is installed on your computer, but you see a"command not found"type of error when entering
your command into the terminal,the problem may be that the /platform-tools directory(or whichever directory contains the
binary)is not in the"path of execution"for your terminal means that your computer doesn't know where exactly
the binary is located.
The solution to this is to add the directory containing the binary to your PATH.
Linux/OS X
On most Linux/OS X systems using the Bourne Again Shell(bash), you can do the following:
1Edit the"hidden"(starting with a period)file~/.bashrc --If your version of Linux supports the gedit editor,simply type
gedit~/.bashrc
2Next,add this line to the bottom:export PATH=${PATH}:/tools:/platform-tools(Change
to the actual path to the SDK's/platform-tools example:export PATH=${PATH}:/home/user/android-sdk-
linux/platform-tools /)
3Save the open a new adb command should now be available.
Windows
On Windows systems you can do the following:
4Righ-click on My Computer and select Properties.
5Choose Advanced,and click on the Environment Variables button.
6Navigate to System Variables and double click on Path to edit.
7Enter the full path to your tools folder.
errors
If you seeat any point when executing fastboot command,the PC is not configured to use fastboot typically,this
is because you are not running fastboot with elevated privileges.
Linux/OSX
Run fastboot as root or with sudo.
Windows
Run fastboot as an Administrator.
Make sure the output of fastboot devices returns your device serial number or you will never get past this error message.
Installing recovery using fastboot
You can use fastboot to install your recovery image to the device.
Installing ClockworkMod Recovery on the device
8Connect the device to the computer via USB.
9Make sure the fastboot binary is in your PATH or that you place the downloaded image in the same directory as fastboot.
10Open a terminal on your PC and reboot the device into fastboot mode by typing adb reboot bootloader or by using the
hardware key combination.
Once the device is in fastboot mode,verify your PC sees the device by typing fastboot devices
§If you don't see your device serial number,and
instead see"",fastboot is not
configured properly on your fastboot
documentation for more info.
11Flash ClockworkMod Recovery onto your device by entering the following command:fastboot flash recovery
your_recovery_ where the latter part is the name of the file you downloaded.
12Once the flash completes successfully,reboot the device into recovery to verify the installation.
§Note:Some ROMs overwrite recovery at boot time so if you do not plan to immediately boot into recovery to install
CyanogenMod,please be aware that this may overwrite your custom recovery with the stock one.