Skip to content

Instantly share code, notes, and snippets.

@Kochise
Created December 19, 2019 10:27
Show Gist options
  • Save Kochise/38933551e751a1a567c8b81ac2e01a03 to your computer and use it in GitHub Desktop.
Save Kochise/38933551e751a1a567c8b81ac2e01a03 to your computer and use it in GitHub Desktop.
Qualcomm QFIL (2.0.2.6) command line arguments
-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:
-AckRawDataEveryNumPackets = enable;number
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:
-MaxPayloadSizeToTargetInBytes = 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
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:\M8626AAAAANLYD1636.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\AndroidDownloadMetaLogs.txt"
-CONSOLELOG
>Enable console log (Silent Mode)
qfil.exe -Mode=3 -consolelog
ARG_STR_ALL
ARG_STR_PID
ARG_STR_MODE
ARG_STR_COM
ARG_STR_RESETPARAM
ARG_STR_SKIP_QPST_CHECK
ARG_STR_WORK_PATH
ARG_STR_LOGFILEPATH
ARG_STR_DETECTIONLOG
ARG_STR_PBLDOWNLOADPROTOCOL
ARG_STR_PROGRAMMER
ARG_STR_RESETSAHARASTATEMACHINE
ARG_STR_SAHARAREADSERIALNO
ARG_STR_MAXDIGESTTABLESIZE
ARG_STR_CHAINEDDIGEST
ARG_STR_SIGNEDDIGEST
ARG_STR_DRYRUN
ARG_STR_SEARCHPATH
ARG_STR_RAWPROGRAM
ARG_STR_PATCH
ARG_STR_EDMAPATH
ARG_STR_ACKRAWDATA
ARG_STR_MAXPAYLOADSIZE
ARG_STR_ACTIVEBOOTPARTITION
ARG_STR_DEVICETYPE
ARG_STR_PLATFORM
ARG_STR_VALIDATIONMODE
ARG_STR_RESETAFTERDOWNLOAD
ARG_STR_SWITCHTOFIREHOSETIMEOUT
ARG_STR_RESETTIMEOUT
ARG_STR_RESETDELAYTIME
ARG_STR_FFUPATH
ARG_STR_CDT_CONFIG
ARG_STR_METABUILD
ARG_STR_METABUILDPROGRAMMER
ARG_STR_FLATBUILDPATH
ARG_STR_FLATBUILDFORCEOVERRIDE
ARG_STR_QCNMANUALPATH
ARG_STR_AUTOBACKUPRESTOREQCN
ARG_STR_SPCCODE
ARG_STR_ENABLEMULTISIM
ARG_STR_AUTOPRESERVEPARTITIONS
ARG_STR_PARTITIONPRESERVEMODE
ARG_STR_PRESERVEDPARTITIONS
ARG_STR_ERASEALL
ARG_STR_PROVISIONPROGRAMMER
ARG_STR_PROVISIONXML
ARG_STR_DOWNLOADFLAT
ARG_STR_DOWNLOADMETA
ARG_STR_FLATMETA
ARG_STR_BREAKDOWNFFU
ARG_STR_BACKUPQCN
ARG_STR_RESTOREQCN
ARG_STR_EDMA
ARG_STR_GETPARTITIONINFO
ARG_STR_SECTORPARAMS
ARG_STR_FILEPATH
ARG_STR_ERASESECTOR
ARG_STR_READSECTOR
ARG_STR_WRITESECTOR
@vtlk027
Copy link

vtlk027 commented Feb 3, 2021

Hey i am having issue with the qfil.exe -programmer=enabled;fullpath

I tried to enable it and give the full path but qfil does not take the path. Can you please help where am i doing wrong.

Please try
qfil.exe -programmer=true;"C:\Path to your_file"

@Kochise
Copy link
Author

Kochise commented Feb 10, 2022

Please remember all qfil aren't the same, ensure you have the latest version.

@prowerInJava
Copy link

Hey i am having issue with the QFIL.exe -MODE=3 -COM=5 -METABUILD=…..\contents.xml;8155_la -PROGRAMMER=True;“…….\prog_firehose_ddr.elf” -DOWNLOADMETA

I tried to give the full path but qfil does not take the path. shown: (Download Fail:Programmer is not selected)Can you please help where am i doing wrong.

@Kochise
Copy link
Author

Kochise commented Nov 16, 2022

Which version are you using ? Keep in mind QFIL remains kind of a hack, so it's rather hard to be sure everything is gonna work like expected.

@prowerInJava
Copy link

Hey i am having issue with the QFIL.exe -MODE=3 -COM=5 -METABUILD=…..\contents.xml;8155_la -PROGRAMMER=True;“…….\prog_firehose_ddr.elf” -DOWNLOADMETA

I tried to give the full path but qfil does not take the path. shown: (Download Fail:Programmer is not selected)Can you please help where am i doing wrong.

QFIL version : 2.0.2.3
I can’t find the operation documents of the entire software on Qualcomm‘s official website .How can I get the complete QFIL documents.

@samEngineering
Copy link

samEngineering commented Mar 13, 2023

Is there a way to provision using one of these options? The only way I found to trigger any actions is to run DOWNLOADFLAT or -DOWNLOADMETA, but nothing for provision. Providing the PROVISIONPROGRAMMERPATH and PROVISIONXMLPATH does not trigger the provisioning.

Also if anyone is looking for the correct command line argument syntax, look at the contents of the file at
C:\Users\<you>\AppData\Roaming\Qualcomm\QFIL\QFIL.config

@GuzuGuzu
Copy link

Dears,

Please advise what parts are being affected when argument "ARG_STR_ERASEALL" is used?

@samEngineering
Copy link

Thanks for the reply. I opted to simply use the QSaharaServer and fh_loader utilities instead of QFIL.

@GuzuGuzu
Copy link

GuzuGuzu commented Jun 15, 2023 via email

@JosueMartinez117
Copy link

Hello @GuzuGuzu ,

Hope you are fine.

If you use the flag eraseall , the files for calibration xQCN or QCN will be removed, it is important that you can do a local backup of the QCN before flash incase you want to erase all.

@GuzuGuzu
Copy link

I do have some backups, but unfortunately not of the mentioned calibration files. Chip will get into EDL mode, but won't switch to Sahara. Would you be willing to assist in reviving it? My e-mail address is: guzu-guzu [at} hotmaildot.com.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment