欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

修改局部源码烧录手顺

程序员文章站 2023-12-22 10:11:40
...

1. 添加命令到PATH路径下,方便全局使用:

android-sdk-windows\tools(主要使用adb.exefastboot.exe)

android-sdk-windows\platform-tools(主要使用ddms.bat)

2. 常用的刷机命令

>adb devices

F:\Users\TXL\Desktop>adb devices

List of devices attached

M9WRB08AKGVCWE0008      device

1a10c933        device

罗列出连接到电脑的所有设备

 

>adb reboot bootloader

进入bootloader模式

 

>adb remount

挂载system分区为可读写,方便下边使用adb push 文件 目的地

 

>adb push Mms.apk /system/app

将自己的apk覆盖system/app下的apk

 

>adb reboot

覆盖后的重启

 

3. bootloader后可以使用fastboot命令

主要的命令有:

F:\Users\TXL\Desktop>adb -s 1a10c933 reboot bootloader

>fastboot devices

F:\Users\TXL\Desktop>fastboot devices

1a10c933        fastboot

>fastboot flash boot boot.img

>fastboot flash system system.img

>fastboot flash recovery recovery.img

刷分区

>fastboot –w

清除数据

>fastboot update <filename>

zip

>fastboot erase <partition>

擦除分区

F:\Users\TXL\Desktop>fastboot

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

  -s <serial number>                       specify device serial number

  -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

 

上一篇:

下一篇: