FastBoot Notes for use

Source: Internet
Author: User

1. Copy the fastboot to the/usr/bin/directory

In the future we can use the FastBoot command directly, and do not need to go into the FastBoot directory every time, this is very convenient:
(fastboot file directory: Baselinetwo/linux/android/out/host/linux-x86/bin)
To place FastBoot in the Usr/bin directory:

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

Sometimes there are bugs in our user version of the software, but we want to debug the bug, but keep the data on the bug site. So this time we can use FastBoot to burn the eng version of the boot.img file into the phone, you can debug the analysis, and will not delete the current contents of the phone.

adb reboot bootloadersudo ./fastboot flash boot out/target/product/l9010/boot.imgsudo ./fastboot reboot
3. Several key commands for the brush machine
adb reboot bootloaderfastboot devicesfastboot Flash aboot out /target/product/$BUILD _project_name/emmc_appsboot .mbn  fastboot Flash boot out /target/ product/$BUILD _project_name/boot.img  fastboot Flash system out /target/product/$BUILD _project_name/system.img  FastBoot Flash userdata out /target/product/$BUILD _project_name/userdata.img  fastboot Flash persist out /target/product/ $BUILD _project_name/persist.img  fastboot Flash Recovery out /target/product/$BUILD _project_name/recovery .img  fastboot reboot  
4.fastboot Simple script:

In order to avoid the input of a single command, very troublesome, 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

How this script is used:
I go into the directory: baselinetwo/linux/android/out/target/product/project*****/

Execute command:

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

Then enter the root password, you can directly brush the machine.

5. A fastboot script written by a colleague

fastboot_load.sh

#!/bin/shSrc_dir=$PWDbuild_file= $Build_project_name= $Build_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_procfunctionusage(){Echo ""    Echo "******************************************************************************************************"    Echo "* Usage: *"    Echo - e "*\033[31m $BUILD _file <product name>\033[0m*"    Echo "*                                                                                                    *"    Echo "******************************************************************************************************"    Echo ""    Echo "Build Product name is:"    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"] ; ThenUsageElse # 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 use command:
Let's go to catalog: codebase/cts_9010/baselinetwo/
Then execute the command:

sudo ./fastboot_load.sh l9010

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

FastBoot Notes for use

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.