Sei sulla pagina 1di 29

Qualcomm Flash Image Loader (QFIL)

User Guide
80-NN120-1 C
August 15, 2014

Submit technical questions at:


https://support.cdmatech.com/

Confidential and Proprietary – Qualcomm Technologies, Inc.


NO PUBLIC DISCLOSURE PERMITTED: Please report postings of this document on public servers or websites
to: DocCtrlAgent@qualcomm.com.

Restricted Distribution: Not to be distributed to anyone who is not an employee of either Qualcomm or its
subsidiaries without the express approval of Qualcomm’s Configuration Management.

Not to be used, copied, reproduced, or modified in whole or in part, nor its contents revealed in any manner to others
without the express written permission of Qualcomm Technologies, Inc.

Qualcomm reserves the right to make changes to the product(s) or information contained herein without notice. No
liability is assumed for any damages arising directly or indirectly by their use or application. The information
provided in this document is provided on an “as is” basis.

This document contains confidential and proprietary information and must be shredded when discarded.

Qualcomm is a trademark of QUALCOMM Incorporated, registered in the United States and other countries. All
QUALCOMM Incorporated trademarks are used with permission. Other product and brand names may be
trademarks or registered trademarks of their respective owners.

This technical data may be subject to U.S. and international export, re-export, or transfer (“export”) laws. Diversion
contrary to U.S. and international law is strictly prohibited.

Qualcomm Technologies, Inc.


5775 Morehouse Drive
San Diego, CA 92121
U.S.A.

© 2014 Qualcomm Technologies, Inc.


All rights reserved.
Contents

1 Introduction...................................................................................................... 5
1.1 Purpose.......................................................................................................................... 5
1.2 Conventions .................................................................................................................. 5
1.3 References..................................................................................................................... 5
1.4 Technical assistance ...................................................................................................... 5
1.5 Acronyms ...................................................................................................................... 6

2 Installation........................................................................................................ 7
2.1 Installing QPST software .............................................................................................. 7

3 Target Device State ......................................................................................... 8


3.1 Emergency Download mode ......................................................................................... 8
3.2 HLOS mode ................................................................................................................ 10

4 Operation Guide ............................................................................................ 11


4.1 Start QFIL ................................................................................................................... 11
4.2 Download the build image .......................................................................................... 11
4.2.1 Download a flat build image ............................................................................ 12
4.2.2 Download a meta build image ......................................................................... 16
4.3 Flatten a meta build..................................................................................................... 17
4.4 Create Digest XML..................................................................................................... 19
4.5 Enable validation during download ............................................................................ 20
4.6 Back up and restore the QCN file ............................................................................... 21
4.7 Load Product Config ................................................................................................... 21
4.8 Advanced settings ....................................................................................................... 23
4.9 Save and clear log ....................................................................................................... 24

5 Command Line Arguments ........................................................................... 25

6 Troubleshooting ............................................................................................ 28
6.1 No port available ......................................................................................................... 28
6.2 Unable to flatten a metabuild image ........................................................................... 29

80-NN120-1 C 2 Confidential and Proprietary – Qualcomm Technologies, Inc.


MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Contents

Figures
Figure 3-1 QFIL – EDL mode ..................................................................................................................... 8
Figure 3-2 Device Manager – EDL mode .................................................................................................... 9
Figure 3-3 QFIL – HLOS mode ................................................................................................................. 10
Figure 3-4 Device Manager – HLOS mode ............................................................................................... 10
Figure 4-1 Select save or clear log ............................................................................................................. 24
Figure 6-1 Device in Diagnostic mode ...................................................................................................... 28
Figure 6-2 Access denied error message.................................................................................................... 29

Tables
Table 1-1 Reference documents and standards ............................................................................................ 5
Table 5-1 Command line arguments .......................................................................................................... 25

80-NN120-1 C 3 Confidential and Proprietary – Qualcomm Technologies, Inc.


MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Revision history

Revision Date Description


A Mar 2014 Initial release
B Jul 2014 Updated Section 2.2 and added Chapter 3
C Aug 2014 Numerous changes were made in this revision; added
information for using flat build and meta build images, readback
validation during download, etc.

80-NN120-1 C 4 Confidential and Proprietary – Qualcomm Technologies, Inc.


MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
1 Introduction

1.1 Purpose
This guide describes how to use the Qualcomm Flash Image Loader (QFIL) software which is
integrated in Qualcomm Product Support Tool (QPST™). QFIL is installed as part of the QPST
installation (QPST 2.7.422 or above). QPST is a set of Windows tools designed to interface with,
control, and test CDMA phones that contain Qualcomm ASICs. The QPST server can keep track
of multiple phones on local host machines.

1.2 Conventions
Function declarations, function names, type declarations, and code samples appear in a different
font, e.g., #include.
Code variables appear in angle brackets, e.g., <number>.
Commands to be entered appear in a different font, e.g., copy a:*.* b:.
Button and key names appear in bold font, e.g., click Save or press Enter.

1.3 References
Reference documents are listed in Table 1-1. Reference documents that are no longer applicable
are deleted from this table; therefore, reference numbers may not be sequential.

Table 1-1 Reference documents and standards


Ref. Document

Qualcomm Technologies
Q1 Application Note: Software Glossary for Customers CL93-V3077-1
Q2 Qualcomm Product Support Tool (QPST™) 2.7 User Guide 80-VL1400-3
Q3 Qualcomm Multiunit System Control (QMSCT) 80-VL903-1

1.4 Technical assistance


For assistance or clarification on information in this document, submit a case to Qualcomm
Technologies, Inc. (QTI) at https://support.cdmatech.com/.
If you do not have access to the CDMATech Support website, register for access or send email to
support.cdmatech@qti.qualcomm.com.

80-NN120-1 C 5 Confidential and Proprietary – Qualcomm Technologies, Inc.


MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Introduction

1.5 Acronyms
For definitions of terms and abbreviations, see [Q1].

80-NN120-1 C 6 Confidential and Proprietary – Qualcomm Technologies, Inc.


MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
2 Installation

This chapter provides information needed to install the QPST applications.

2.1 Installing QPST software


1. In Windows Explorer, locate the setup.exe file in the CD’s root directory. Double-click the
file to launch the setup program.
2. Follow the instructions provided by the installer. This could include additional reboots
depending on your operating system version and that of certain system files that QPST may
need to update.
3. After rebooting the computer, relaunch the setup program by double-clicking the setup.exe
file. When the Setup Complete dialog appears, the application has been installed successfully.
4. Click Finish to complete the installation.

80-NN120-1 C 7 Confidential and Proprietary – Qualcomm Technologies, Inc.


MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
3 Target Device State

The QFIL tool is used to flash a build image into a target in Emergency Download (EDL) mode
or High Level OS (HLOS) mode (normal bootup).

3.1 Emergency Download mode


When the device is in EDL mode, the port information is displayed in on the QFIL main screen as
Qualcomm HS-USB QDLoader.

Target device
and port

Figure 3-1 QFIL – EDL mode

80-NN120-1 C 8 Confidential and Proprietary – Qualcomm Technologies, Inc.


MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Target Device State

The same port information is enumerated in Device Manager.

Target device and port

Figure 3-2 Device Manager – EDL mode

80-NN120-1 C 9 Confidential and Proprietary – Qualcomm Technologies, Inc.


MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Target Device State

3.2 HLOS mode


If a device is in HLOS mode, during the download process, QFIL automatically switches the
target to EDL mode and then loads the build into the phone.When the phone boots up with no
issues and the HLOS is running, the target will be enumerated as Qualcomm HS-USB
Diagnostics 9025 in both Device Manager and on the QFIL main screen.

Target device
and port

Figure 3-3 QFIL – HLOS mode

Target device and port

Figure 3-4 Device Manager – HLOS mode

80-NN120-1 C 10 Confidential and Proprietary – Qualcomm Technologies, Inc.


MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
4 Operation Guide

4.1 Start QFIL


1. To launch QFIL, click Start > Programs > QPST > QFIL. The following figure illustrates
the QFIL main screen when no target device is attached to the computer.

Target device
not attached

4.2 Download the build image


The build images can be organized in one of the following ways:
 Flat build – All the files that are needed to load a build are contained in a single folder. See
Section 4.2.1 for instructions on downloading the flat build image.
 Meta build – Images are organized in folders that follow the metabuild structure. See Section
4.2.2 for instructions on downloading the metabuild image.
If needed, metabuild files can be converted to a flat build structure.

80-NN120-1 C 11 Confidential and Proprietary – Qualcomm Technologies, Inc.


MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Operation Guide

4.2.1 Download a flat build image


Organization of the flat build requires that all the files needed to load a build must be contained
within a single folder.
1. Plug in a target device (in EDL mode) to an available USB port. The device is displayed at
the top of the main screen.

Target device
attached

If the port is not automatically detected, click Select Port. Select the applicable device and
click OK. If no ports are displayed in the Select Port dialog, see Section 6 for troubleshooting
information.

2. In the Select Programmer field, click Browse and navigate to the flat build path and select
the programmer.
3. Select the Firehose Programmer MBN file, e.g., prog_<type>_firehose_<msm>.mbn.
Where:
 <type> – Can be either emmc or ufs

80-NN120-1 C 12 Confidential and Proprietary – Qualcomm Technologies, Inc.


MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Operation Guide

 <msm> – Corresponds to the platform name, e.g., 8084.

The Select Build field is updated with the location of this programmer. You can also follow
step 3 below to change the search path. The programmer is downloaded before downloading
an image; if the programmer is not a firehose programmer, the image download will not
work.

80-NN120-1 C 13 Confidential and Proprietary – Qualcomm Technologies, Inc.


MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Operation Guide

4. Click Load XML to load the configuration file.


a. Multi-select the raw program XML files rawprogram_unsprase and rawprogram2 in
the dialog box and click Open.

b. Multi-select the patch0 and patch2 XML files, and click Open.

80-NN120-1 C 14 Confidential and Proprietary – Qualcomm Technologies, Inc.


MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Operation Guide

5. Click Download to start the download. During downloading, all of the function buttons are
dimmed and will be re-enabled after downloading is complete.

Progress bar

Status

The download progress is indicated by the horizontal progress bar. The Status field displays
the updated files and the images currently being programmed into the target device.
When the download has completed successfully, a Download Succeed and Finish Download
message displays in the Status field.

80-NN120-1 C 15 Confidential and Proprietary – Qualcomm Technologies, Inc.


MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Operation Guide

4.2.2 Download a meta build image


The meta build organization is captured by the contents.xml file, which can be located at the root
folder of the meta build.
1. Plug in a target device in EDL mode to an available USB port. Click Select Port.

6. Click Load Content.

7. Click Download.
When the download has completed successfully, a Download Succeed and Finish Download
message displays in the Status field.

80-NN120-1 C 16 Confidential and Proprietary – Qualcomm Technologies, Inc.


MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Operation Guide

4.3 Flatten a meta build


1. From the Tools menu, select Flat Meta Build.

2. In the Content XML field, click Browse and select the contents.xml file.
3. In the Flat Build Path field, click Browse and navigate to the location where the flat build
image will be written.
4. To override the rawprogram file that is defined in contents.xml, in the RawProgram XML
field, click Browse and navigate to the applicable rawprogram file.
5. Click the Force Override Files checkbox to override any existing file in the Flat Build Path.
If this is unchecked and some files exist in the Flat Build Path, the process will not continue.
6. Click OK to start flattening the build.
When the flattening of the build completes successfully, the Flatten Succeed and Finish
Flatten messages are displayed in the Status field.

Status

80-NN120-1 C 17 Confidential and Proprietary – Qualcomm Technologies, Inc.


MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Operation Guide

7. Using Windows Explorer open the local flat build path to verify that the flat build succeeded.

80-NN120-1 C 18 Confidential and Proprietary – Qualcomm Technologies, Inc.


MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Operation Guide

4.4 Create Digest XML


A digest XML file containing the raw program XML and related binary files to hash can be
created for flat builds.
1. From the Tools menu, select Create Digest XML.
2. In the Raw Program XML field, click Browse and select a raw program XML file.

3. In the Digest Xml Path field, click Browse to select the folder where the Digest XML file
will be stored. Click OK to start.

If the path is left empty, the Digest XML will be created in the same folder as the raw
program XML is by default.
The Digest XML (*.digest) must be created in advance in order to enable SHA256 validation.
Create Digest XML can be run multiple times to download multiple Raw Program XML
files. Use one Digest XML file per Raw Program XML and place these Digest XML in the
flat build folder using the same name as the Raw Program XML.

Raw program XML


and digest files

80-NN120-1 C 19 Confidential and Proprietary – Qualcomm Technologies, Inc.


MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Operation Guide

4.5 Enable validation during download


1. From the Configuration menu, select Download Configuration.

2. In the Readback Mode field, select one of the following to enable validation during
download:

Item Description
0-No Readback Disable Readback Verify

1-Always External Readback Data Once the download of a file is finished, Host(PC) will read out all
the data that is downloaded and compared them with the original
file data.

2-Always Internal Readback verify Once the download of a file is finished, Target (phone) will read
out all the downloaded data from eMMC and compared them with
the data that is received from USB Line.

3-Always External Readback Once the download of a file is finished, Host ask target to send out
SHA256 SHA256 hash of the data that is downloaded and compared them
with the original file hash. (Only work for a flat build. You will need
to create digest XML in advance in order to enable this feature)

4-Always External Readback Once the download of a file is finished, Host will read out all the
Data(SHA256 Verify) data that is downloaded, calculate the SHA256 hash of these data
on Host side and compared them with the original file hash. (Only
work for a flat build. You will need to create digest XML in advance
in order to enable this feature)

5-Follow RawProgram Internal [Not available]


Readback Verify
255-Readback AllData Only [Not available]

80-NN120-1 C 20 Confidential and Proprietary – Qualcomm Technologies, Inc.


MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Operation Guide

4.6 Back up and restore the QCN file


1. From the Tools menu, select QCN Backup Restore.
2. Click Browse…to change the QCN file path and then click Backup QCN to backup QCN
from the phone (optional).
3. Click Browse…to change the QCN file path and then click Restore QCN to restore QCN
into the phone (optional).

4.7 Load Product Config


The Load Product Config option is only available for the flat build. This procedure will save
2 to 3 steps as compared to using the standard flat build procedure described in Section 4.2.1. The
product config file is generated by QMSCT, which has the ability to read the *.pcfg files.
1. From the File menu, select Load Product Config.
2. The application will open C:\Qualcomm\SWDL folder by default. If the product config file is
located elsewhere; browse to that location and select the applicable *.pcfg file and click
Open.

80-NN120-1 C 21 Confidential and Proprietary – Qualcomm Technologies, Inc.


MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Operation Guide

3. Once the *.pcfg file is loaded, the Programmer Path, Search Path, RawProgram and Patch
files will be loaded.

80-NN120-1 C 22 Confidential and Proprietary – Qualcomm Technologies, Inc.


MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Operation Guide

4.8 Advanced settings


Firehose setting
 Max Payload Size in Byte to Target – Specifies the maximum payload size in bytes sent to
the target phone for each packet.
 Device Type and Platform – Specifies the flash type and platform.
 Ack Raw Data Settings – When enabled, the phone will send a response once every N
packet(s) is sent.
 Always Validate – Enable this option to always validate the data programming that is written
to flash.

Backup and restore QCN setting


 Auto Backup and Restore QCN – Enable this option to back up the QCN before download is
started and restore the QCN after download and reboot. The option is invalid when the phone
is initially in EDL (QDLoader) mode.
 SPC Code – SPC code for backup QCN; the default is 000000.

80-NN120-1 C 23 Confidential and Proprietary – Qualcomm Technologies, Inc.


MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Operation Guide

4.9 Save and clear log


After downloading the build image, right-click the status box to select to Save Log or Clear Log.

Figure 4-1 Select save or clear log

80-NN120-1 C 24 Confidential and Proprietary – Qualcomm Technologies, Inc.


MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
5 Command Line Arguments

Table 5-1 Command line arguments


Parameter Description Value
-Mode Mode setting 0 – Normal Mode
1 – Engineer Mode
2 – WCF Mode
3 – Silent Mode
Qfil.exe -Mode=1
-COM Comport number setting
Qfil.exe -COM=10
-SAHARA Enable Sahara Download and Enabled: true\false
include the programmer path, Path: programmer
the format is: full path
-SAHARA=enabled;path
Qfil.exe -
Sahara=true;”D:\CBW8600A01_A_T1701\prog_emmc_
FireHose_8x26.mbn”
-SearchPath Image binary file search path,
only used for flat build
download, it’s also the search
path for raw program and
patch XML file, only one
search path is available
Qfil.exe -SEARCHPATH=”D:\CBW8600A01_A_T1701”
-RawProgram Raw program XML file name,
can be multiply files, separated
by comma
Qfil.exe -
RawProgram=rawprogram_unsparse.xml,rawprogram2
.xml
-Patch Patch XML file name, can be
multiply files, separated by
comma
Qfil.exe -patch=patch0,patch2.xml
-AckRawDataEveryNumPackets Ack raw data every number Enable: true\false
packets setting, if the setting is Number: ack
enabled, phone will send number settings
response once every multiply
of setting packets, the format
is:
-
AckRawDataEveryNumPacket
s = enable;number

80-NN120-1 C 25 Confidential and Proprietary – Qualcomm Technologies, Inc.


MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Command Line Arguments

Parameter Description Value


Qfil.exe -AckRawDataEveryNumPackets=TRUE;100
-MaxPayloadSizeToTargetInBytes Max payload size to target in Enable: true\false
bytes setting; define the Number: max
payload size in byte for each payload setting
packet, if enable if false, host
will negotiate the size with
target and set it to the
maximum size that is
supported by target. Otherwise
the setting number is used.
the format is:
-
MaxPayloadSizeToTargetInByt
es = enable;number
Qfil.exe -
MaxPayloadSizeToTargetInBytes=”true;49152”
-READBACKMODE Read back verify method:
0-No Readback value=”0”
1-Always External Readback value=”1”
Data value=”2”
2-Always Ixternal Readback value=”3”
verify value=”4”
3-Always External Readback value=”5”
SHA256
4-Always External Readback
Data(SHA256 Verify)
5-Follow RawProgram Internal
Readback Verify
Qfil.exe -READBACKMODE=0
-RESETAFTERDOWNLOAD If enabled, phone will be reset Enabled: true\false
after download or restore QCN
Qfil.exe –RESETAFTERDOWNLOAD=true
- MAXDIGESTTABLESIZE Not avaiable

-SWITCHTOFIREHOSETIMEOUT Switch to firehose time out;


specify the timeout in seconds
that will waited once the phone
is switch from Diag to EDL
Qfil.exe -SWITCHTOFIREHOSETIMEOUT=”50”
-RESETTIMEOUT Reset time out; specify the
timeout in second that is
waited until a reset is done
(Diag or EDL port appears)
Qfil.exe -RESETTIMEOUT=”500”
-RESETDELAYTIME Reset delay time; specify the
delay time in seconds before a
wait for reset done is started.
Qfil.exe -RESETTIMEOUT=”5”
-METABUILD Select Meta build content XML
full path

80-NN120-1 C 26 Confidential and Proprietary – Qualcomm Technologies, Inc.


MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Command Line Arguments

Parameter Description Value


Qfil.exe -
METABUILD=”C:\M8626AAAAANLYD1636.1\contents.
xml”
-FLATBUILDPATH Path for a to meta build to flat
and saved
Qfil.exe -
FLATBUILDPATH=”C:\M8626AAAAANLYD1636.1”
-METABUILDRAWPROGRAM Specify a specify raw program
in order to flat a meta build,
then the default raw program
file listed in contents.xml is not
used
Qfil.exe -
METABUILDRAWPROGRAM=”C:\M8626AAAAANLYD
1636.1\rawprogram_unsparse.xml”
- FLATBUILDFORCEOVERRIDE Is the option is true, existing
file in flat build folder will be
overwritten by the new flatten
file, otherwise, it will be kept
unchanged.
Qfil.exe –FLATBUILDFORCEOVERRIDE=true
-QCNPATH QCN path for manual
backup\restore
Qfil.exe -QCNPATH=”C:\M8x26\8x26.qcn”
-QCNAUTOBACKUPRESTORE Auto Backup\Restore QCN Enabled: true\false
setting, only worked for Diag
mode
Qfil.exe -QCNAUTOBACKUPRESTORE
-SPCCODE SPC Code 000000
Qfil.exe -SPCCODE=”000000”
-DOWNLOADFLAT Start download flat build (Silent
Mode)
Qfil.exe -Mode=3 -DOWNLOADFLAT
-DOWNLOADMETA Start download meta build
(Silent Mode)
Qfil.exe -Mode=3 -DOWNLOADMETA
-LOGFILEPATH Enable local file log, the file will
contains every log as shown in
log view.
Qfil.exe -
LOGFILEPATH="c:\temp\QFILLogs\AndroidDownload
MetaLogs.txt"
-CONSOLELOG Enable console log (Silent
Mode)
qfil.exe -Mode=3 -consolelog

80-NN120-1 C 27 Confidential and Proprietary – Qualcomm Technologies, Inc.


MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
6 Troubleshooting

6.1 No port available


When the message “No Port Available” displays at the top of the QFIL window, check Device
Manager in Windows to ensure the device is listed under Ports as either Qualcomm HS-USB
QDLoader or Qualcomm HS-USB Diagnostics.

Device in Diagnostic mode

Figure 6-1 Device in Diagnostic mode

80-NN120-1 C 28 Confidential and Proprietary – Qualcomm Technologies, Inc.


MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Troubleshooting

6.2 Unable to flatten a metabuild image


If an error is displayed in the Status field when using the Flat Meta Build function, ensure that
you have Administrator access to the folder where the flatten build will be written.

Access denied
error message

Figure 6-2 Access denied error message

80-NN120-1 C 29 Confidential and Proprietary – Qualcomm Technologies, Inc.


MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION

Potrebbero piacerti anche