1. Home
  2. Android Development Guide for MediaTek X20
  3. Version compile and download
  4. Android version download

Android version download

3.2.1 Necessary Condition

You need prepare 6 components(windows):

  • exe(win) / xflash(linux)
  • Normal load(Include image files and scatter file etc.)
  • Special images and scatter file
  • cfg.xml
  • exe(win) / fastboot command(linux)
  • fastboot command script file

3.2.2 Flash Tool access path

\vendor\mediatek\proprietary\system\core\xflash

3.2.3 How to build special images

Execute following commands, build system will automatically create FES folder and come out the special lk.bin, where FES store the needed files for xflash download to target before entering fastboot mode.

Then, you can find a folder named FES.

PATH: \out\target\product\amt6797_64_open\FES

3.2.4 Download

3.2.4.1 Windows Preparation

  • exe

\xflash\bin\win\xflash.exe

  • Normal load(Include image files and scatter file etc.)

You can put it anywhere, eg, \xflash\bin\win\img

  • Special images and scatter file

You can put it anywhere, eg, \xflash\bin\win\FES. How to build it?

Please see “How to build special images”.

  • cfg.xml

\xflash\bin\win\config

  • exe

\xflash\bin\win, you shoud put it in normal load folder.

  • fastboot command script file

Written by yourself, you should put it in normal load folder.

eg:fastboot command script file named xflash.bat

fastboot devices

fastboot flash gpt PGPT

****

fastboot flash userdata userdata.img

fastboot reboot

3.2.4.2 Windows Download

Step 1. Make a device to enter fastboot mode

  • Prepare special images and corresponding scatter file.
  • Run program in command line mode like this:

xflash.exe enter-fastboot “G:\xflash\bin\win\FES\MT6797_Android_scatter.txt”
AndroidProject1

  • Then plug in USB cable to device without power adapter
  • Plug in power adapter then
  • Xflash will scan and open device COM port and connect it, download some necessary images to devices, then make device to enter fastboot mode.

AndroidProject2

Step 2. Run fastboot command script file

  • You need write a download script.

Such as xflash.bat

  • Run the download script, download success.

3.2.4.3 Linux Preparation

  • xflash

\xflash\bin\linux\xflash

  • Normal load(Include image files and scatter file etc.)

You can put it anywhere, eg, \xflash\bin\linux\img

  • Special images and scatter file

You can put it anywhere, eg, \xflash\bin\linux\FES. How to build it?

Please see “How to build special images”.

  • cfg.xml

\xflash\bin\linux\config

  • fastboot

If your OS doesn’t support fastboot command, please install this cammand first.

  • fastboot command script file

Writen by your self, you should put it in normal load folder.

 

3.2.4.4 Ubuntu Download

Step 1. Make a device to enter fastboot mode

  • Prepare special images and corresponding scatter file.
  • Run program in command line mode like this:

sudo ./xflash enter-fastboot “/**/xflash/bin/win/FES/MT6797_Android_scatter.txt”

  • Then plug in USB cable to device without power adapter
  • Plug in power adapter then
  • Xflash will scan and open device COM port and connect it, download some necessary images to devices, then make device enter fastboot mode.

Step 2. Run fastboot command script file

  • You need write a download script.

Such as xflash.sh

  • Run the download script, download success.

 

Was this article helpful to you? Yes 1 No 2

How can we help?