Android Fastboot[wiki Encyclopedia]

Source: Internet
Author: User

Overview

FastBoot is the This method that's Android uses to flash the Android build onto the target. If you really want the details, the FastBoot protocol specification are found in the Android source fastboot_protocol.txt. FastBoot abstracts the details of the memory type, error correction code used, etc, so the user does not need to know them . The user can simply run commands such as "FastBoot Flash" and "FastBoot erase" in order to flash or remove the files store D in the target ' s EMMC or NAND internal memory.

What's with the name ' FastBoot ' or how is you booting faster? This feature should is renamed ' Making-the-bootloader-simple-to-use '. FastBoot speeds up your development, not the time it takes to boot.

The FastBoot client is built as part of a normal Android build and are built automatically when you compile the mydroid sou Rce. It's located in $MYDROID/out/host/linux-x86/bin/fastboot.

[edit]flashing with fastboot

The biggest benefit of fastboot is so it automates the manual steps of flashing to the EMMC or NAND partitions. FastBoot allows flashing of unsigned partition images.

For example, your can flash the kernel image with the command:

$ sudo fastboot flash boot path-to-kernel/boot.img

The later versions of the TI u-boot allow you to flash the zimage directly, without have to create the boot.img first:

$ sudo fastboot flash zimage path-to-kernel/arch/arm/boot/zimage

Similarly for the Rootfs:

$ sudo fastboot flash system path-to-system/system.img

The general form to Flash is:

$ sudo fastboot flash <partition name> <file>

That's it; All the details is taken care's for you. Know how to unlock the EMMC, which flavor of ECC to use, which method of writing to EMMC or even where The flash happens. It's all done for you.

Also erase partitions with commands such as:

$ sudo fastboot erase boot$ sudo fastboot erase system$ sudo fastboot erase data$ sudo fastboot erase cache

The above would wipe each individual partition, which can is combined into the single command:

$ sudo fastboot erase system-w
[edit]partitions Setup

Regions in EMMC is given names. Their offsets and sizes is set in U-boot in the mmc.c file of the board directory that is using. For example, for the Blaze, this file is u-boot/board/omap4430sdp/mmc.c:

static struct partition partitions[] = {{"-",},{"Xloader",},{"bootloader",},/* "misc" Partition is Requi Red for recovery */{"misc",},{"-", 384},{"EFS", 16384},{"recovery", 8*1024},{"boot", 8*1024},{"System", 512 *1024},{"Cache", 256*1024},{"UserData", 0},{0, 0},};

The partitions used is shown here:http://www.omappedia.com/wiki/android_emmc_booting If you want to change the name, siz E, or location of all of the partitions, you could make the changes in this MMC.C file and run the command:

$ sudo fastboot OEM format
[edit]fastboot on the Blaze

Note that ' Blaze ' in the below instructions can refer to either the Blaze or Blaze Tablet board, as FastBoot works in the Same.

1. Connect the Blaze to the PC with the mini USB cable for UART connection and start a terminal program. Power on the Blaze and press a key to stop the boot in the u-boot. Enter "FastBoot" at the terminal prompt.

2. Connect the Blaze to the PC with the Micro USB cable for OTG connection.

3. Go to the location of the ' fastboot ' binary on your Linux Host PC, and enter commands in order to flash a file to the D esired partition in EMMC, such as:

$ sudo./fastboot Flash xloader MLO

Note:if the EMMC have never been flased before on this Blaze, or do wish to reset/change the name, size, or locations of Any of the partitions and then first run the command:

$ sudo./fastboot OEM format

The script file fastboot.sh is included with the TI Android releases in $MYDROID/device/ti/blaze/boot/fastboot.sh and auto Matically flashes all of the partitions of the EMMC. It assumes that the required files is located in the same directory as fastboot.sh and the FastBoot binary. It also automatically detects the device type and uses the correct MLO. The usage is simply:

$ sudo./fastboot.sh

4. Reboot the board either by removing the power, or by running the command:

$ sudo./fastboot reboot
[edit]troubleshooting

If you get a message ' waiting for device ' when trying to run FastBoot commands from the host, confirm that is running The commands as "sudo."

[edit]flashing NAND on the Zoom II

If you is using the Zoom II (TI OMAP3 Development Board), use these steps to put the Zoom II into the fastboot preboot mo De by holding and the board is booting. Note that NAND was used instead of EMMC on the Zoom II, but the FastBoot commands work in the same-as FastBoot is ABSTR Acted from the memory details.

    1. Disconnect the debug board from Zoom II
    2. Disconnect the power and USB cables to Zoom II
    3. Reset the board with the small button on the back, interior of the Zoom Ii.
    4. Hold down the large center ' OK ' button
    5. You are only having about second between steps 3 & 4 before normal booting continues. Holding the ' Ok ' button before step 3 is helpful.

You should see:

    • LED briefly blink red to OFF
    • LED stay on Red

The continuous red LED means that FastBoot command has started. Next You should connect the USB cable from the host to the Zoom Ii.

You should see:

    • LED Blink Red to Blue
    • Continous Blue

This means, USB discovery by the host is successful. You is ready to go! If you don't see a continous blue LED, repeat the setup steps.

[edit]booting with fastboot

In addition to flashing the EMMC, FastBoot can also is used to boot from files already flashed to the EMMC. To does, so start fastboot on the target, and then run a command on the host PC, for example to boot the u-boot:

# sudo fastboot boot u-boot.bin
[edit]Exiting fastboot

In addition to disconnecting the USB cable, the user can exit FastBoot when a user-defined timeout expires or when a ctrl- C is seen from the console.

The new fastboot Help:

# Help FastBoot FastBoot [inactive timeout]     -Run as a fastboot USB device. The optional inactive timeout is the decimal seconds before the normal console resumes.<pre>to run FastBoot with a T Imeout of seconds, do:<pre># FastBoot 100

The console prints out:

FastBoot inactivity Timeout seconds Disconnect USB cable to finish fastboot. FastBoot Inactivity Detected

Can still do:

# FastBoot

It would behave as it did before. If you want-stop it, now you can use the ctrl-c on the console. The timeout happens when inactivity was seen during the FastBoot command, and the timeout is reset after each command. If the command takes longer than timeout, like reflashing the system image, it'll not timeout during the command. Because host discovery of the FastBoot device can take a couple of seconds, it's recommended that the timeout being at least Ten seconds.

Android Fastboot[wiki Encyclopedia]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.