Fastboot usage notes and fastboot usage notes

Source: Internet
Author: User

Fastboot usage notes and fastboot usage notes
1. Copy fastboot to the/usr/bin/directory.

In the future, we can directly use the fastboot command, instead of entering the fastboot directory every time. This is very convenient:
(Fastboot file directory: baselinetwo/LINUX/android/out/host/linux-x86/bin)
Run the following command to put fastboot in the usr/bin directory:

sudo cp fastboot /usr/bin/
2. Burn boot. img

Sometimes, the software of our user version has some bugs, but we need to debug and analyze the bug, but we need to keep the field data of the bug. At this time, we can use fastboot to burn the boot. imgfile Of The eng version into the mobile phone for debugging and analysis, and will not delete the current content of the mobile phone.

adb reboot bootloadersudo ./fastboot flash boot out/target/product/l9010/boot.imgsudo ./fastboot reboot
3. Several key commands for fl
adb reboot bootloaderfastboot devicesfastboot flash aboot out/target/product/$BUILD_PROJECT_NAME/emmc_appsboot.mbnfastboot flash boot out/target/product/$BUILD_PROJECT_NAME/boot.imgfastboot flash system out/target/product/$BUILD_PROJECT_NAME/system.imgfastboot flash userdata out/target/product/$BUILD_PROJECT_NAME/userdata.imgfastboot flash persist out/target/product/$BUILD_PROJECT_NAME/persist.imgfastboot flash recovery out/target/product/$BUILD_PROJECT_NAME/recovery.imgfastboot reboot
4. fastboot simple script:

To avoid the trouble of entering commands one by one, I wrote a very simple script:

Fastboot_hexiaoming.sh

adb reboot bootloadersudo fastboot devicessudo fastboot flash aboot emmc_appsboot.mbnsudo fastboot flash boot boot.imgsudo fastboot flash system system.imgsudo fastboot flash userdata userdata.imgsudo fastboot flash persist persist.imgsudo fastboot flash recovery recovery.imgsudo fastboot reboot

Usage of this script:
Go to the directory: baselinetwo/LINUX/android/out/target/product/project *****/

Run the following command:

source '/home/android/desttop/fastboot_hexiaoming.sh' 

Then enter the root password to directly flash the machine.

5. A fastboot script written by a colleague

Fastboot_load.sh

#!/bin/shSRC_DIR=$PWDBUILD_FILE=$0BUILD_PROJECT_NAME=$1BUILD_BOOT_DIR=$SRC_DIR/boot_images/build/msBUILD_MODEM_DIR=$SRC_DIR/modem_proc/build/msBUILD_RPM_DIR=$SRC_DIR/rpm_proc/buildBUILD_TZ_DIR=$SRC_DIR/trustzone_images/build/msBUILD_AP_DIR=$SRC_DIR/LINUX/androidBUILD_COMMON_DIR=$SRC_DIR/common/buildBUILD_MODEM_SRC_DIR=$SRC_DIR/modem_procfunction usage(){    echo ""    echo "******************************************************************************************************"    echo "* Usage:                                                                                             *"    echo -e "*\033[31m $BUILD_FILE  <product name>\033[0m*"    echo "*                                                                                                    *"    echo "******************************************************************************************************"    echo ""    echo "Build product name are:"    echo -e "\033[31m1.l5510\033[0m"    echo -e "\033[31m2.l5320\033[0m"    echo -e "\033[31m2.l9010\033[0m"    echo ""}if [ -z "$BUILD_PROJECT_NAME" ] ; then    usage;else # wholeif [ $BUILD_PROJECT_NAME = "l5320" ] ; thenecho 'it is l5320'fiadb reboot bootloaderfastboot devicesfastboot flash aboot out/target/product/$BUILD_PROJECT_NAME/emmc_appsboot.mbnfastboot flash boot out/target/product/$BUILD_PROJECT_NAME/boot.imgfastboot flash system out/target/product/$BUILD_PROJECT_NAME/system.imgfastboot flash userdata out/target/product/$BUILD_PROJECT_NAME/userdata.imgfastboot flash persist out/target/product/$BUILD_PROJECT_NAME/persist.imgfastboot flash recovery out/target/product/$BUILD_PROJECT_NAME/recovery.imgfastboot rebootfi #whole

Script command:
We first enter the Directory: codebase/cts_9010/baselinetwo/
Then run the following command:

sudo ./fastboot_load.sh l9010

Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

Related Article

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.