fastboot using guide

潘驰
2023-12-01

转载来自:http://blog.csdn.net/ic_soc_arm_robin/article/details/16341625

1. 手机进入fastboot模式

先关机,开机时,同时按power键+camera或power + Home键,进入fastboot,红色字体
然后将手机和HOST,用USB线连接

2. 查看fastboot用法


sudo ./fastboot -h
usage: fastboot [ <option> ] <command>

commands:
  update <filename>                        reflash device from update.zip
  flashall                                 flash boot + recovery + system
  flash <partition> [ <filename> ]         write a file to a flash partition
  erase <partition>                        erase a flash partition
  format <partition>                       format a flash partition 
  getvar <variable>                        display a bootloader variable
  boot <kernel> [ <ramdisk> ]              download and boot kernel
  flash:raw boot <kernel> [ <ramdisk> ]    create bootimage and flash it
  devices                                  list all connected devices
  continue                                 continue with autoboot
  reboot                                   reboot device normally
  reboot-bootloader                        reboot device into bootloader
  help                                     show this help message

options:
  -w                                       erase userdata and cache (and format
                                           if supported by partition type)
  -u                                       do not first erase partition before
                                           formatting
  -s <specific device>                     specify device serial number
                                           or path to device port
  -l                                       with "devices", lists device paths
  -p <product>                             specify product name
  -c <cmdline>                             override kernel commandline
  -i <vendor id>                           specify a custom USB vendor id
  -b <base_addr>                           specify a custom kernel base address
  -n <page size>                           specify the nand page size. default: 2048
  -S <size>[K|M|G]                         automatically sparse files greater than
                                           size.  0 to disable

3. 查看进入fastboot模式的设备

sudo ./fastboot devices
20080823    fastboot


4. 烧写image

$ sudo ./fastboot flash partition_name img_file

一般只烧boot.img, system.img和userdata.img三个镜像

sudo ./fastboot flash boot boot.img
sending 'boot' (4700 KB)...
OKAY [  4.770s]
writing 'boot'...
OKAY [  1.849s]
finished. total time: 6.642s

sudo ./fastboot flash system system.img
sending 'system' (85090 KB)...
OKAY [ 86.732s]
writing 'system'...
OKAY [ 33.991s]
finished. total time: 120.723s

sudo ./fastboot flash userdata userdata.img
sending 'userdata' (1456 KB)...
OKAY [  1.485s]
writing 'userdata'...
OKAY [  1.350s]

finished. total time: 2.835s

5. QUALCOMM CONTENT

fastboot flash recovery recovery.img


fastboot devices
fastboot -w
fastboot flash boot .\boot.img
fastboot flash system   .\system.img
fastboot flash cache    .\cache.img
fastboot flash recovery .\recovery.img
fastboot flash persist  .\persist.img
fastboot flash userdata .\userdata.img
fastboot flash aboot    .\emmc_appsboot.mbn
fastboot flash sbl1 sbl1.mbn
fastboot flash recovery recovery.img
fastboot flash rpm       rpm.mbn
fastboot flash modem    NON-HLOS.bin
fastboot flash sdisdi.mbn
fastboot flash  tz tz.mbn
echo phone will restart
fastboot reboot
@pause



6. spreadtrum CONTENT

What is fastboot

Fastboot is a tool provided with Android. And it supported by our bootloader.

h ow to enter fastboot mode

Now we defined three boot mode, there are calibration, recovery, and fastboot.
You can enter fastboot by holding the HOME key( or CAMERA key ) when boot you phone up by POWER key. If enter fastboot mode success, you can get a string "fastboot_mode" on lcd in red font.
Now you can plug in a usb cable to connect you phone with Ubuntu host.

What we can do in fastboot mode(Linux)

You can find the host fastboot tool in ~/Android_Project/out/host/linux_x86/bin directory, it is named as "fastboot" too. But if you want to run it, you should be privileged as sudoer. 
1.check connected device

sudo ./fastboot devices

2.erase a nand partition

sudo ./fastboot erase Partition_Name

Now The partition names and their contents relation as follow:

2ndbl ----------- u-boot.bin 
params----------- u-boot parameters 
vmjaluna -------- vmjaluna.image 
modem ----------- modem.bin 
boot ------------ boot.img (previously it is named kernel) 
dsp ------------- dsp.bin 
fixnv ----------- nuitem.bin 
runtimenv ------- runtime nv 
recovery -------- recovery.img (it is not supported now) 
system ---------- system.img 
userdata -------- userdata.img 
boot_logo ------- boot_logo.bmp 
fastboot_logo --- fastboot_logo.bmp 
cache ----------- cache partition 
misc ------------ misc partition 

  1. flash a partition by an binary file or image
    sudo ./fastboot flash Partition_Name Flash_File

You can find the relation in the section 2.
You should erase it first before flash

  1. reboot your phone
    sudo ./fastboot reboot

If you want your phone boot up, you need press the POWER key again.

  1. reboot into fastboot again
    sudo ./fastboot reboot-bootloader


C aution:

The other commands's support still need some further development.

 类似资料:

相关阅读

相关文章

相关问答